mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 15:17:01 +01:00
Initialize Refactor (#25981)
Shouldn't break anything, stops warning spam, logs errors qdel style at the end of the game. Initialize now expects a hint to be returned, one of: INITIALIZE_HINT_NORMAL - Does nothing, returned by the root proc INITIALIZE_HINT_LATELOAD - Call atom/proc/LateInitialize INITIALIZE_HINT_QDEL - Calls qdel on the atom LateInitialize currently defaults to the old re-calling behavior so there should be no issues with that. Things that didn't return a hint or fucked up somehow will be logged less loudly than they were before No more world start warnings!
This commit is contained in:
@@ -22,20 +22,17 @@
|
||||
var/perma_docked = FALSE //highlander with RESPAWN??? OH GOD!!!
|
||||
|
||||
/obj/docking_port/mobile/arrivals/Initialize(mapload)
|
||||
if(mapload)
|
||||
return TRUE //late initialize to make sure the latejoin list is populated
|
||||
|
||||
preferred_direction = dir
|
||||
|
||||
if(SSshuttle.arrivals)
|
||||
WARNING("More than one arrivals docking_port placed on map!")
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
return INITIALIZE_HINT_QDEL
|
||||
SSshuttle.arrivals = src
|
||||
|
||||
. = ..()
|
||||
|
||||
preferred_direction = dir
|
||||
return INITIALIZE_HINT_LATELOAD //for latejoin list
|
||||
|
||||
/obj/docking_port/mobile/arrivals/LateInitialize()
|
||||
areas = list()
|
||||
|
||||
var/list/new_latejoin = list()
|
||||
|
||||
Reference in New Issue
Block a user