mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-15 09:56:47 +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:
@@ -260,7 +260,7 @@
|
||||
var/mob/S = new mob_type(T)
|
||||
animals += S
|
||||
GLOB.death_event.register(S, src, PROC_REF(remove_animal))
|
||||
GLOB.destroyed_event.register(S, src, PROC_REF(remove_animal))
|
||||
RegisterSignal(S, COMSIG_QDELETING, PROC_REF(remove_animal))
|
||||
adapt_animal(S)
|
||||
if(animals.len >= max_animal_count)
|
||||
repopulating = 0
|
||||
@@ -279,10 +279,10 @@
|
||||
daddy.group_multiplier = Z.air.group_multiplier
|
||||
Z.air.equalize(daddy)
|
||||
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/proc/remove_animal(var/mob/M)
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/proc/remove_animal(mob/M)
|
||||
animals -= M
|
||||
GLOB.death_event.unregister(M, src)
|
||||
GLOB.destroyed_event.unregister(M, src)
|
||||
UnregisterSignal(M, COMSIG_QDELETING)
|
||||
repopulate_types |= M.type
|
||||
|
||||
/obj/effect/overmap/visitable/sector/exoplanet/proc/generate_map()
|
||||
|
||||
Reference in New Issue
Block a user