fix: handle resizing shelf items from non-player movement (#26940)

This commit is contained in:
warriorstar-orion
2024-10-01 17:10:04 +00:00
committed by GitHub
parent 666713eb4d
commit 6c38283707
+6
View File
@@ -227,6 +227,7 @@
/datum/component/shelved/RegisterWithParent()
. = ..()
RegisterSignal(parent, COMSIG_ITEM_PICKUP, PROC_REF(on_item_pickup))
RegisterSignal(parent, COMSIG_MOVABLE_MOVED, PROC_REF(on_movable_moved))
var/obj/shelf = locateUID(shelf_uid)
if(shelf)
RegisterSignal(shelf, COMSIG_MOVABLE_SHOVE_IMPACT, PROC_REF(on_movable_shove_impact))
@@ -241,6 +242,11 @@
SIGNAL_HANDLER // COMSIG_ITEM_PICKUP
qdel(src)
/// Generic handler for if anything moves us off our original shelf position, such as atmos pressure.
/datum/component/shelved/proc/on_movable_moved()
SIGNAL_HANDLER // COMSIG_MOVABLE_MOVED
qdel(src)
/datum/component/shelved/UnregisterFromParent()
. = ..()
var/obj/O = parent