mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
[MIRROR] Pulls apart the vestiges of components still hanging onto signals [MDB IGNORE] (#21738)
* Pulls apart the vestiges of components still hanging onto signals * update modular --------- Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com> Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
Tom
parent
da5da42a18
commit
6dfe17306c
@@ -183,7 +183,7 @@
|
||||
user_port.set_output(owner)
|
||||
user = WEAKREF(owner)
|
||||
|
||||
RegisterSignal(owner, COMSIG_PARENT_EXAMINE, PROC_REF(on_examine))
|
||||
RegisterSignal(owner, COMSIG_ATOM_EXAMINE, PROC_REF(on_examine))
|
||||
RegisterSignal(owner, COMSIG_PROCESS_BORGCHARGER_OCCUPANT, PROC_REF(on_borg_charge))
|
||||
RegisterSignal(owner, COMSIG_LIVING_ELECTROCUTE_ACT, PROC_REF(on_electrocute))
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
user = null
|
||||
|
||||
UnregisterSignal(owner, list(
|
||||
COMSIG_PARENT_EXAMINE,
|
||||
COMSIG_ATOM_EXAMINE,
|
||||
COMSIG_PROCESS_BORGCHARGER_OCCUPANT,
|
||||
COMSIG_LIVING_ELECTROCUTE_ACT,
|
||||
))
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
stored_items += to_add
|
||||
to_add.forceMove(src)
|
||||
RegisterSignal(to_add, COMSIG_MOVABLE_MOVED, PROC_REF(handle_stored_item_moved))
|
||||
RegisterSignal(to_add, COMSIG_PARENT_QDELETING, PROC_REF(handle_stored_item_deleted))
|
||||
RegisterSignal(to_add, COMSIG_QDELETING, PROC_REF(handle_stored_item_deleted))
|
||||
SEND_SIGNAL(src, COMSIG_DISPENSERBOT_ADD_ITEM, to_add)
|
||||
|
||||
/obj/structure/dispenser_bot/proc/handle_stored_item_moved(obj/item/moving_item, atom/location)
|
||||
@@ -48,7 +48,7 @@
|
||||
/obj/structure/dispenser_bot/proc/remove_item(obj/item/to_remove)
|
||||
UnregisterSignal(to_remove, list(
|
||||
COMSIG_MOVABLE_MOVED,
|
||||
COMSIG_PARENT_QDELETING,
|
||||
COMSIG_QDELETING,
|
||||
))
|
||||
to_remove.forceMove(drop_location())
|
||||
stored_items -= to_remove
|
||||
@@ -148,7 +148,7 @@
|
||||
/obj/item/circuit_component/dispenser_bot/proc/remove_vendor_component(obj/item/circuit_component/vendor_component/vendor_component)
|
||||
SIGNAL_HANDLER
|
||||
UnregisterSignal(vendor_component, list(
|
||||
COMSIG_PARENT_QDELETING,
|
||||
COMSIG_QDELETING,
|
||||
COMSIG_CIRCUIT_COMPONENT_REMOVED,
|
||||
))
|
||||
if(!QDELING(vendor_component))
|
||||
@@ -165,7 +165,7 @@
|
||||
parent.add_component(vendor_component, user)
|
||||
vendor_components += vendor_component
|
||||
RegisterSignals(vendor_component, list(
|
||||
COMSIG_PARENT_QDELETING,
|
||||
COMSIG_QDELETING,
|
||||
COMSIG_CIRCUIT_COMPONENT_REMOVED,
|
||||
), PROC_REF(remove_vendor_component))
|
||||
|
||||
|
||||
@@ -103,14 +103,14 @@
|
||||
if(istype(shell, /obj/structure/money_bot))
|
||||
attached_bot = shell
|
||||
total_money.set_output(attached_bot.stored_money)
|
||||
RegisterSignal(shell, COMSIG_PARENT_ATTACKBY, PROC_REF(handle_money_insert))
|
||||
RegisterSignal(shell, COMSIG_ATOM_ATTACKBY, PROC_REF(handle_money_insert))
|
||||
RegisterSignal(shell, COMSIG_MONEYBOT_ADD_MONEY, PROC_REF(handle_money_update))
|
||||
RegisterSignal(parent, COMSIG_CIRCUIT_SET_LOCKED, PROC_REF(on_set_locked))
|
||||
attached_bot.locked = parent.locked
|
||||
|
||||
/obj/item/circuit_component/money_bot/unregister_shell(atom/movable/shell)
|
||||
UnregisterSignal(shell, list(
|
||||
COMSIG_PARENT_ATTACKBY,
|
||||
COMSIG_ATOM_ATTACKBY,
|
||||
COMSIG_MONEYBOT_ADD_MONEY,
|
||||
))
|
||||
total_money.set_output(null)
|
||||
|
||||
Reference in New Issue
Block a user