Fixes engraved component runtime on destroy() (#69323)

..() nulls the parent
This commit is contained in:
ShizCalev
2022-08-21 16:22:38 -07:00
committed by GitHub
parent 1304d11962
commit 85f0b27efc
+4 -2
View File
@@ -51,13 +51,15 @@
engraved_wall.update_appearance()
/datum/component/engraved/Destroy(force, silent)
. = ..()
if(!parent)
return ..()
parent.RemoveElement(/datum/element/art)
//must be here to allow overlays to be updated
UnregisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS)
if(parent && !QDELING(parent))
if(!QDELING(parent))
var/atom/parent_atom = parent
parent_atom.update_appearance()
return ..() //call this after since we null out the parent
/datum/component/engraved/RegisterWithParent()
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/on_examine)