Following this request here (more specifically this post) http://www.byond.com/forum/?post=2030286#comment18329359
As far as I've been able to tell there's no easy way of directly comparing one icon_state to another. I propose something along the lines of icon.Compare(), or maybe atom.comapreIconState(), or something idk names aren't my thing, but to summerize, it would return 1 if both icon_states of the two things compared are identical, and 0 if they are not. Perhaps it could be extended to include how precise they match, something like (again my naming verbose-ness is shit for this kinda thing) returning ICON_MASK_SAME for two states which are the same, but treats all pixels as black, ICON_SAME_WITHOUT_ALPHA (lol) for two states which are the same but ignores alpha transparency and treats all pixels as alpha 255, . You get the gist of it, I hope.
It would render the above request irrelevant since you could just compare it to a blank icon, I can also think of a lot of advancements in lighting and custom collision via use of this with different maps/masks.
ID:2033551
![]() Feb 9 2016, 11:17 am
|
|||||||
| |||||||
There's probably a more base-line method in existence though.