mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
Improper forced qdel cleanup, some expanded del all verbs (#66595)
* Removes all supurfolus uses of QDEL_HINT_LETMELIVE This define exists to allow abstract, sturucturally important things to opt out of being qdeleted. It does not exist to be a "Immune to everything" get out of jail free card. We have systems for this, and it's not appropriate here. This change is inherently breaking, because things might be improperly qdeling these things. Those issues will need to be resolved in future, as they pop up * Changes all needless uses of COMSIG_PARENT_PREQDELETED It exists for things that want to block the qdel. If that's not you, don't use it * Adds force and hard del verbs, for chip and break glass cases respectively The harddel verb comes with two options before it's run, to let you tailor it to your level of fucked * Damn you nova Adds proper parent returns instead of . = ..() Co-authored-by: Seth Scherer <supernovaa41@gmx.com> * Ensures immortality talismans cannot delete their human if something goes fuckey. Thanks ath/oro for pointing this out Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
This commit is contained in:
@@ -269,7 +269,7 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
|
||||
spawned -= holo_atom
|
||||
continue
|
||||
|
||||
RegisterSignal(holo_atom, COMSIG_PARENT_PREQDELETED, .proc/remove_from_holo_lists)
|
||||
RegisterSignal(holo_atom, COMSIG_PARENT_QDELETING, .proc/remove_from_holo_lists)
|
||||
holo_atom.flags_1 |= HOLOGRAM_1
|
||||
|
||||
if(isholoeffect(holo_atom))//activates holo effects and transfers them from the spawned list into the effects list
|
||||
@@ -279,10 +279,10 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
|
||||
var/atom/holo_effect_product = holo_effect.activate(src)//change name
|
||||
if(istype(holo_effect_product))
|
||||
spawned += holo_effect_product // we want mobs or objects spawned via holoeffects to be tracked as objects
|
||||
RegisterSignal(holo_effect_product, COMSIG_PARENT_PREQDELETED, .proc/remove_from_holo_lists)
|
||||
RegisterSignal(holo_effect_product, COMSIG_PARENT_QDELETING, .proc/remove_from_holo_lists)
|
||||
if(islist(holo_effect_product))
|
||||
for(var/atom/atom_product as anything in holo_effect_product)
|
||||
RegisterSignal(atom_product, COMSIG_PARENT_PREQDELETED, .proc/remove_from_holo_lists)
|
||||
RegisterSignal(atom_product, COMSIG_PARENT_QDELETING, .proc/remove_from_holo_lists)
|
||||
continue
|
||||
|
||||
if(isobj(holo_atom))
|
||||
@@ -309,7 +309,7 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
|
||||
spawned -= holo_atom
|
||||
if(!holo_atom)
|
||||
return
|
||||
UnregisterSignal(holo_atom, COMSIG_PARENT_PREQDELETED)
|
||||
UnregisterSignal(holo_atom, COMSIG_PARENT_QDELETING)
|
||||
var/turf/target_turf = get_turf(holo_atom)
|
||||
for(var/atom/movable/atom_contents as anything in holo_atom) //make sure that things inside of a holoitem are moved outside before destroying it
|
||||
atom_contents.forceMove(target_turf)
|
||||
@@ -328,7 +328,7 @@ GLOBAL_LIST_INIT(typecache_holodeck_linked_floorcheck_ok, typecacheof(list(/turf
|
||||
/obj/machinery/computer/holodeck/proc/remove_from_holo_lists(datum/to_remove, _forced)
|
||||
SIGNAL_HANDLER
|
||||
spawned -= to_remove
|
||||
UnregisterSignal(to_remove, COMSIG_PARENT_PREQDELETED)
|
||||
UnregisterSignal(to_remove, COMSIG_PARENT_QDELETING)
|
||||
|
||||
/obj/machinery/computer/holodeck/process(delta_time)
|
||||
if(damaged && DT_PROB(5, delta_time))
|
||||
|
||||
Reference in New Issue
Block a user