SS init tags V2 (#15502)

* SS init tags V2

* Sabre tweaks
This commit is contained in:
AffectedArc07
2021-02-15 13:02:50 -05:00
committed by GitHub
parent 577b24b8dc
commit c7d01c9b57
8 changed files with 77 additions and 100 deletions
+2 -2
View File
@@ -325,7 +325,7 @@ SUBSYSTEM_DEF(air)
var/watch = start_watch()
log_startup_progress("Initializing atmospherics machinery...")
var/count = _setup_atmos_machinery(machines_to_init)
log_startup_progress(" Initialized [count] atmospherics machines in [stop_watch(watch)]s.")
log_startup_progress("Initialized [count] atmospherics machines in [stop_watch(watch)]s.")
// this underscored variant is so that we can have a means of late initing
// atmos machinery without a loud announcement to the world
@@ -349,7 +349,7 @@ SUBSYSTEM_DEF(air)
var/watch = start_watch()
log_startup_progress("Initializing pipe networks...")
var/count = _setup_pipenets(pipes)
log_startup_progress(" Initialized [count] pipenets in [stop_watch(watch)]s.")
log_startup_progress("Initialized [count] pipenets in [stop_watch(watch)]s.")
// An underscored wrapper that exists for the same reason
// the machine init wrapper does
+3 -3
View File
@@ -54,7 +54,7 @@ SUBSYSTEM_DEF(atoms)
CHECK_TICK
if(noisy)
log_startup_progress(" Initialized [count] atoms in [stop_watch(watch)]s")
log_startup_progress("Initialized [count] atoms in [stop_watch(watch)]s")
else
log_debug(" Initialized [count] atoms in [stop_watch(watch)]s")
pass(count)
@@ -71,9 +71,9 @@ SUBSYSTEM_DEF(atoms)
var/atom/A = I
A.LateInitialize()
if(noisy)
log_startup_progress(" Late initialized [late_loaders.len] atoms in [stop_watch(watch)]s")
log_startup_progress("Late initialized [length(late_loaders)] atoms in [stop_watch(watch)]s")
else
log_debug(" Late initialized [late_loaders.len] atoms in [stop_watch(watch)]s")
log_debug(" Late initialized [length(late_loaders)] atoms in [stop_watch(watch)]s")
late_loaders.Cut()
/datum/controller/subsystem/atoms/proc/InitAtom(atom/A, list/arguments)
+31 -1
View File
@@ -8,7 +8,7 @@ SUBSYSTEM_DEF(mapping)
preloadTemplates()
// Pick a random away mission.
if(!config.disable_away_missions)
createRandomZlevel()
load_away_mission()
// Seed space ruins
if(!config.disable_space_ruins)
// load in extra levels of space ruins
@@ -162,5 +162,35 @@ SUBSYSTEM_DEF(mapping)
log_world("Ruin loader finished with [budget] left to spend.")
/datum/controller/subsystem/mapping/proc/load_away_mission()
if(length(GLOB.awaydestinations))
return
if(GLOB.potentialRandomZlevels && length(GLOB.potentialRandomZlevels))
var/watch = start_watch()
log_startup_progress("Loading away mission...")
var/map = pick(GLOB.potentialRandomZlevels)
var/file = file(map)
if(isfile(file))
var/zlev = GLOB.space_manager.add_new_zlevel(AWAY_MISSION, linkage = UNAFFECTED, traits = list(AWAY_LEVEL,BLOCK_TELEPORT))
GLOB.space_manager.add_dirt(zlev)
GLOB.maploader.load_map(file, z_offset = zlev)
late_setup_level(block(locate(1, 1, zlev), locate(world.maxx, world.maxy, zlev)))
GLOB.space_manager.remove_dirt(zlev)
log_world("Away mission loaded: [map]")
for(var/thing in GLOB.landmarks_list)
var/obj/effect/landmark/L = thing
if(L.name != "awaystart")
continue
GLOB.awaydestinations.Add(L)
log_startup_progress("Away mission loaded in [stop_watch(watch)]s.")
else
log_startup_progress("No away missions found.")
return
/datum/controller/subsystem/mapping/Recover()
flags |= SS_NO_INIT