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:
LemonInTheDark
2022-05-06 17:52:45 -07:00
committed by GitHub
parent d61fa9df81
commit 0504c0a2b4
20 changed files with 153 additions and 98 deletions
+1 -1
View File
@@ -11,7 +11,7 @@
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/examine)
RegisterSignal(parent, COMSIG_PARENT_ATTACKBY, .proc/applyplate)
RegisterSignal(parent, COMSIG_PARENT_PREQDELETED, .proc/dropplates)
RegisterSignal(parent, COMSIG_PARENT_QDELETING, .proc/dropplates)
if(istype(parent, /obj/vehicle/sealed/mecha/working/ripley))
RegisterSignal(parent, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_mech_overlays)
+2 -2
View File
@@ -58,7 +58,7 @@
if(usage_flags & SHOCK_REQUIREMENT_ITEM)
required_object = input_item
required_object.Move(parent_as_movable)
RegisterSignal(required_object, COMSIG_PARENT_PREQDELETED, .proc/delete_self)
RegisterSignal(required_object, COMSIG_PARENT_QDELETING, .proc/delete_self)
RegisterSignal(parent, COMSIG_ATOM_TOOL_ACT(TOOL_SCREWDRIVER), .proc/move_required_object_from_contents)
if(usage_flags & SHOCK_REQUIREMENT_ON_SIGNAL_RECEIVED)
@@ -109,7 +109,7 @@
UnregisterSignal(parent, requested_signal_parent_emits)
if(required_object)
UnregisterSignal(required_object, list(COMSIG_PARENT_PREQDELETED, COMSIG_ASSEMBLY_PULSED))
UnregisterSignal(required_object, list(COMSIG_PARENT_QDELETING, COMSIG_ASSEMBLY_PULSED))
if(parent_as_movable && (required_object in parent_as_movable.contents))
required_object.Move(parent_as_movable.loc)
+2 -2
View File
@@ -63,7 +63,7 @@
if(!QDELETED(shooter))
RegisterSignal(shooter, COMSIG_MOB_LOGOUT, .proc/autofire_off)
UnregisterSignal(shooter, COMSIG_MOB_LOGIN)
RegisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_ITEM_DROPPED), .proc/autofire_off)
RegisterSignal(parent, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED), .proc/autofire_off)
parent.RegisterSignal(src, COMSIG_AUTOFIRE_ONMOUSEDOWN, /obj/item/gun/.proc/autofire_bypass_check)
parent.RegisterSignal(parent, COMSIG_AUTOFIRE_SHOT, /obj/item/gun/.proc/do_autofire)
@@ -84,7 +84,7 @@
if(!QDELETED(shooter))
RegisterSignal(shooter, COMSIG_MOB_LOGIN, .proc/on_client_login)
UnregisterSignal(shooter, COMSIG_MOB_LOGOUT)
UnregisterSignal(parent, list(COMSIG_PARENT_PREQDELETED, COMSIG_ITEM_DROPPED))
UnregisterSignal(parent, list(COMSIG_PARENT_QDELETING, COMSIG_ITEM_DROPPED))
shooter = null
parent.UnregisterSignal(parent, COMSIG_AUTOFIRE_SHOT)
parent.UnregisterSignal(src, COMSIG_AUTOFIRE_ONMOUSEDOWN)
+2 -2
View File
@@ -50,14 +50,14 @@
RegisterSignal(parent, list(COMSIG_COMPONENT_ADDED), .proc/enable)
/datum/component/plumbing/RegisterWithParent()
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED,COMSIG_PARENT_PREQDELETED), .proc/disable)
RegisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING), .proc/disable)
RegisterSignal(parent, list(COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH), .proc/toggle_active)
RegisterSignal(parent, list(COMSIG_OBJ_HIDE), .proc/hide)
RegisterSignal(parent, list(COMSIG_ATOM_UPDATE_OVERLAYS), .proc/create_overlays) //called by lateinit on startup
RegisterSignal(parent, list(COMSIG_MOVABLE_CHANGE_DUCT_LAYER), .proc/change_ducting_layer)
/datum/component/plumbing/UnregisterFromParent()
UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED,COMSIG_PARENT_PREQDELETED, COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH,COMSIG_OBJ_HIDE, \
UnregisterSignal(parent, list(COMSIG_MOVABLE_MOVED, COMSIG_PARENT_QDELETING, COMSIG_OBJ_DEFAULT_UNFASTEN_WRENCH, COMSIG_OBJ_HIDE, \
COMSIG_ATOM_UPDATE_OVERLAYS, COMSIG_MOVABLE_CHANGE_DUCT_LAYER, COMSIG_COMPONENT_ADDED))
/datum/component/plumbing/Destroy()
+2 -2
View File
@@ -95,7 +95,7 @@
holder = equipper
qdel(GetComponent(/datum/component/connect_loc_behalf))
AddComponent(/datum/component/connect_loc_behalf, holder, holder_connections)
RegisterSignal(holder, COMSIG_PARENT_PREQDELETED, .proc/holder_deleted)
RegisterSignal(holder, COMSIG_PARENT_QDELETING, .proc/holder_deleted)
/*
* Detects if the holder mob is deleted.
@@ -120,7 +120,7 @@
/datum/component/slippery/proc/on_drop(datum/source, mob/user)
SIGNAL_HANDLER
UnregisterSignal(user, COMSIG_PARENT_PREQDELETED)
UnregisterSignal(user, COMSIG_PARENT_QDELETING)
qdel(GetComponent(/datum/component/connect_loc_behalf))
add_connect_loc_behalf_to_parent()
+2 -2
View File
@@ -112,7 +112,7 @@
SIGNAL_HANDLER
holder = equipper
RegisterSignal(holder, COMSIG_MOVABLE_DISPOSING, .proc/disposing_react, override=TRUE)
RegisterSignal(holder, COMSIG_PARENT_PREQDELETED, .proc/holder_deleted, override=TRUE)
RegisterSignal(holder, COMSIG_PARENT_QDELETING, .proc/holder_deleted, override=TRUE)
//override for the preqdeleted is necessary because putting parent in hands sends the signal that this proc is registered towards,
//so putting an object in hands and then equipping the item on a clothing slot (without dropping it first)
//will always runtime without override = TRUE
@@ -120,7 +120,7 @@
/datum/component/squeak/proc/on_drop(datum/source, mob/user)
SIGNAL_HANDLER
UnregisterSignal(user, COMSIG_MOVABLE_DISPOSING)
UnregisterSignal(user, COMSIG_PARENT_PREQDELETED)
UnregisterSignal(user, COMSIG_PARENT_QDELETING)
holder = null
///just gets rid of the reference to holder in the case that theyre qdeleted