mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 03:49:10 +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:
@@ -33,14 +33,14 @@
|
||||
ClearDestination()
|
||||
|
||||
destination = A
|
||||
GLOB.destroyed_event.register(destination, src, /datum/build_mode/move_into/proc/ClearDestination)
|
||||
RegisterSignal(destination, COMSIG_QDELETING, /datum/build_mode/move_into/proc/ClearDestination)
|
||||
to_chat(user, SPAN_NOTICE("Will now move targets into \the [destination]."))
|
||||
|
||||
/datum/build_mode/move_into/proc/ClearDestination(var/feedback)
|
||||
if(!destination)
|
||||
return
|
||||
|
||||
GLOB.destroyed_event.unregister(destination, src, /datum/build_mode/move_into/proc/ClearDestination)
|
||||
UnregisterSignal(destination, COMSIG_QDELETING)
|
||||
destination = null
|
||||
if(feedback)
|
||||
Warn("The selected destination was deleted.")
|
||||
|
||||
Reference in New Issue
Block a user