diff --git a/code/datums/components/_component.dm b/code/datums/components/_component.dm index 9e4e16f813..6b99cf8318 100644 --- a/code/datums/components/_component.dm +++ b/code/datums/components/_component.dm @@ -52,12 +52,16 @@ return /** - * Properly removes the component from `parent` and cleans up references - * Setting `force` makes it not check for and remove the component from the parent - * Setting `silent` deletes the component without sending a `COMSIG_COMPONENT_REMOVING` signal - */ + * Properly removes the component from `parent` and cleans up references + * + * Arguments: + * * force - makes it not check for and remove the component from the parent + * * silent - deletes the component without sending a [COMSIG_COMPONENT_REMOVING] signal + */ /datum/component/Destroy(force=FALSE, silent=FALSE) - if(!force && parent) + if(!parent) + return ..() + if(!force) _RemoveFromParent() if(!silent) SEND_SIGNAL(parent, COMSIG_COMPONENT_REMOVING, src) diff --git a/code/datums/components/acid.dm b/code/datums/components/acid.dm index 2e3784dc97..39e9b2cb63 100644 --- a/code/datums/components/acid.dm +++ b/code/datums/components/acid.dm @@ -38,9 +38,11 @@ /datum/component/acid/Destroy() STOP_PROCESSING(SSprocessing, src) - var/obj/O = parent level = 0 - O.update_overlays() + if(parent) // So, this is how you get runtimes fellas. + UnregisterSignal(parent, list(COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_ATOM_ATTACK_HAND)) // Don't worry about isitem checks, we don't need them. + var/atom/O = parent + O.update_icon(UPDATE_OVERLAYS) return ..() /datum/component/acid/process() diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 48213279f1..f8c17134ba 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -596,9 +596,13 @@ //SHOULD_CALL_PARENT(TRUE) return SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_ICON_STATE) -/// Updates the overlays of the atom +/** + * Builds a list of overlays for the atom, this will not apply them. + * If you need to update overlays, use [update_icon(UPDATE_OVERLAYS)], + * This proc is intended to be overridden. + */ /atom/proc/update_overlays() - //SHOULD_CALL_PARENT(TRUE) + SHOULD_CALL_PARENT(TRUE) . = list() SEND_SIGNAL(src, COMSIG_ATOM_UPDATE_OVERLAYS, .)