Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Material container drops sheets only on object deconstruct & not destroy. #1849

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion code/datums/components/material/material_container.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@
for(var/signal in container_signals)
parent.RegisterSignal(src, signal, container_signals[signal])

//drop sheets when the object is deconstructed but not deleted
RegisterSignal(parent, COMSIG_OBJ_DECONSTRUCT, PROC_REF(drop_sheets))

if(_mat_container_flags & MATCONTAINER_NO_INSERT)
return

Expand All @@ -75,7 +78,6 @@
RegisterSignal(atom_target, COMSIG_ATOM_REQUESTING_CONTEXT_FROM_ITEM, PROC_REF(on_requesting_context_from_item))

/datum/component/material_container/Destroy(force)
retrieve_all()
materials = null
allowed_materials = null
return ..()
Expand All @@ -88,6 +90,11 @@
if(mat_container_flags & MATCONTAINER_EXAMINE)
RegisterSignal(parent, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))

/datum/component/material_container/proc/drop_sheets()
SIGNAL_HANDLER

retrieve_all()

/datum/component/material_container/proc/on_examine(datum/source, mob/user, list/examine_texts)
SIGNAL_HANDLER

Expand Down
Loading