Page 1 of 1

512 features to replace getFlatIcon?

Posted: Mon Nov 12, 2018 4:17 pm
by JJRcop
Hey, getFlatIcon is expensive and I want to stop using it. My use case is some mutable_appearances and an obj/screen that use a mob as a base, then I use icon procs on it. (which I also want to get rid of eventually but I am not able to right now) The /obj/screen doesn't use any icon procs after getFlatIcon, just the color, blend_mode, and screen_loc vars. So, I bet some new features will work well for that, but not the mutable_appearances, which all use some kind of icon proc after using getFlatIcon.
Since I made this stuff, new 512 features came out, (the /mutable_appearances used to be /images but they didn't really use dir, so that was an easy change) and I'd like to explore the potential options to replace getFlatIcon, if any exist.

Re: 512 features to replace getFlatIcon?

Posted: Mon Nov 12, 2018 9:06 pm
by SpaceManiac
getFlatIcon should only be necessary for exporting icons to HTML.

You can add the mob to the screen obj's vis_contents if you want the appearance to update continuously.

Otherwise, you can set the screen obj's .appearance to be the mob's .appearance, which will copy overlays and everything else.

Re: 512 features to replace getFlatIcon?

Posted: Thu Nov 15, 2018 10:03 pm
by John_Oxford
english

Re: 512 features to replace getFlatIcon?

Posted: Fri Nov 16, 2018 2:42 am
by Ayy Lemoh
John_Oxford wrote:english
[youtube]S73nmMU1LDs[/youtube]