512 features to replace getFlatIcon?

How, what and why to code in BYOND.

Moderators: MisterPerson, Code Maintainers

User avatar
JJRcop
 
Joined: Wed Apr 23, 2014 1:52 am
Byond Username: JJRcop
Github Username: JJRcop

512 features to replace getFlatIcon?

Postby JJRcop » Mon Nov 12, 2018 4:17 pm #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
Code Maintainer
 
Joined: Fri Sep 22, 2017 4:06 am
Byond Username: SpaceManiac
Github Username: SpaceManiac

Re: 512 features to replace getFlatIcon?

Postby SpaceManiac » Mon Nov 12, 2018 9:06 pm #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
Location: The United States of America
Byond Username: John Oxford
Github Username: JohnOxford

Re: 512 features to replace getFlatIcon?

Postby John_Oxford » Thu Nov 15, 2018 10:03 pm #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?

Postby Ayy Lemoh » Fri Nov 16, 2018 2:42 am #454880

John_Oxford wrote:english



Return to Coding

Who is online

Users browsing this forum: Timonk