mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
fix: handle resizing shelf items from non-player movement (#26940)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user