Upload files
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
+6
-2
@@ -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, .)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user