mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-10 23:47:08 +01:00
Refactored deletion observables to use the COMSIG_QDELETING signal (#20121)
Refactored deletion observables to use the COMSIG_QDELETING signal instead, removed the observable.
This commit is contained in:
@@ -170,14 +170,14 @@
|
||||
// These procs do not relocate the grenade, that's the callers responsibility
|
||||
/obj/item/integrated_circuit/manipulation/grenade/proc/attach_grenade(var/obj/item/grenade/G)
|
||||
attached_grenade = G
|
||||
GLOB.destroyed_event.register(attached_grenade, src, PROC_REF(detach_grenade))
|
||||
RegisterSignal(attached_grenade, COMSIG_QDELETING, PROC_REF(detach_grenade))
|
||||
size += G.w_class
|
||||
desc += " \An [attached_grenade] is attached to it!"
|
||||
|
||||
/obj/item/integrated_circuit/manipulation/grenade/proc/detach_grenade()
|
||||
if(!attached_grenade)
|
||||
return
|
||||
GLOB.destroyed_event.unregister(attached_grenade, src)
|
||||
UnregisterSignal(attached_grenade, COMSIG_QDELETING)
|
||||
attached_grenade = null
|
||||
size = initial(size)
|
||||
desc = initial(desc)
|
||||
|
||||
Reference in New Issue
Block a user