512 features to replace getFlatIcon?

How, what and why to code in BYOND.
Post Reply
User avatar
JJRcop
Joined: Wed Apr 23, 2014 1:52 am
Byond Username: JJRcop
Github Username: JJRcop

512 features to replace getFlatIcon?

Post by JJRcop » #453908

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.
I lurk quite often...
SpaceManiac
Joined: Fri Sep 22, 2017 4:06 am
Byond Username: SpaceManiac
Github Username: SpaceManiac

Re: 512 features to replace getFlatIcon?

Post by SpaceManiac » #453962

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.
User avatar
John_Oxford
Github User
Joined: Sat Nov 15, 2014 5:19 am
Byond Username: John Oxford
Github Username: JohnOxford
Location: The United States of America

Re: 512 features to replace getFlatIcon?

Post by John_Oxford » #454804

english
Bill Rowe - Used for everything // SYS-OP - AI // SYS-USR - Cyborg
https://gyazo.com/07cbe7219ba24366c1f655ad6c56a524

Signature Content:
Spoiler:
Offical In-Game rank:
Image

Image

Image

Image
TechnoAlchemist wrote:you where always right john, you where always right
>implying the admin conspiracy wasen't just confirmed by a admin.
see, i told you motherfuckers.
NikNakFlak wrote:this isn't a game you can't just post whenever you want
I don't even know what the fuck tg is.

Image

Image
User avatar
Ayy Lemoh
Joined: Mon Jun 05, 2017 5:58 pm
Byond Username: Jerry Derpington

Re: 512 features to replace getFlatIcon?

Post by Ayy Lemoh » #454880

John_Oxford wrote:english
[youtube]S73nmMU1LDs[/youtube]
Post Reply

Who is online

Users browsing this forum: No registered users