mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-15 04:01:41 +00:00
* update_icon() improvements Fixes some update_icon() calls to properly call parent and use update_overlays() and update_icon_state(). The rest of obj/item fuck it * Suggested fixes, also passes the linter * I always forget . = ..() is faster than return ..() FOR SOME FUCKING REASON * Actually this is better * Signilzes datum/action to update its icon when its connected item does.
11 lines
425 B
Plaintext
11 lines
425 B
Plaintext
//Prevents calling anything in update_icon() like update_icon_state() or update_overlays()
|
|
|
|
/datum/element/update_icon_blocker/Attach(datum/target)
|
|
. = ..()
|
|
if(!istype(target, /atom))
|
|
return ELEMENT_INCOMPATIBLE
|
|
RegisterSignal(target, COMSIG_ATOM_UPDATE_ICON, .proc/block_update_icon)
|
|
|
|
/datum/element/update_icon_blocker/proc/block_update_icon()
|
|
return COMSIG_ATOM_NO_UPDATE_ICON_STATE | COMSIG_ATOM_NO_UPDATE_OVERLAYS
|