mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-05 06:21:57 +00:00
* Fixes display of appearance type in VV (#78725) ## About The Pull Request Appearance vars are awful to detect. They have a type var you can access, for an appearance the value of this var is `/image`. However `istype(appearance, /image) == 0`. This is good enough for identification, you might think this just means detecting appearance would be something like `if(thing.type == /image && !istype(thing, /image))`, but there's a problem with this: `istype(appearance, /datum) == 0`. For that matter it seems like all istypes that check if an appearance is some type fail, so you can't know that it's safe to access the `.type` var to do that earlier combined check. Now we get into magic territory, `istype(new /image, appearance) == 1`. I have no clue internally why this is the case but it seems to be unique to appearances, and so can be used to identify them from a previously unknown var. You have to rule out that the thing you're checking is a path, it would pass the check if the value were `/image` then, but this is simple enough. I hate having to know all this, so now you know this too. 🆑 ninjanomnom admin: Appearance vars in VV now display instead of being left blank /🆑 * Fixes display of appearance type in VV --------- Co-authored-by: Emmett Gaines <ninjanomnom@gmail.com>