mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Faster, non-blocking world init (#23136)
* Moves turf New calls to Initialize * Much faster * Fixed * Makes add_to_active queue up before SSair is initialized * Remove active queuing * And the proc * Move the check * Fix some shit * F U C K T U R F S * Necessary * Unnecessary * SHUT THE FUCK UP * Panic mode hurts the code * Such a * Simple answer * A well thought out plan * /turf/open optimization * Undo the warning suppression now that it's fixed * Fixes lava typecaching badly * Added late initialization * Make the atmos offenders late initialize * Add extra logging * GLABALS * Better solution for trying to activate w/o air * Further base calling copypasta * Gates, guards, gorans * Small doc fix * Do the faster * T U R F V A R P E R S I S T E N C E * The solution is always so simple * The (hopefully) final nail in the coffin
This commit is contained in:
@@ -64,25 +64,25 @@
|
||||
..()
|
||||
|
||||
/obj/machinery/computer/holodeck/Initialize(mapload)
|
||||
..()
|
||||
if(!mapload && ticker.current_state < GAME_STATE_PLAYING)
|
||||
return
|
||||
program_cache = list()
|
||||
emag_programs = list()
|
||||
for(var/typekey in subtypesof(program_type))
|
||||
var/area/holodeck/A = locate(typekey)
|
||||
if(!A || A == offline_program) continue
|
||||
if(A.contents.len == 0) continue // not loaded
|
||||
if(A.restricted)
|
||||
emag_programs += A
|
||||
else
|
||||
program_cache += A
|
||||
if(typekey == init_program)
|
||||
load_program(A,force=1)
|
||||
if(random_program && program_cache.len && init_program == null)
|
||||
load_program(pick(program_cache),force=1)
|
||||
else if(!program)
|
||||
load_program(offline_program)
|
||||
. = mapload //late-initialize, area_copy need turfs to have air
|
||||
if(!mapload)
|
||||
..()
|
||||
program_cache = list()
|
||||
emag_programs = list()
|
||||
for(var/typekey in subtypesof(program_type))
|
||||
var/area/holodeck/A = locate(typekey)
|
||||
if(!A || A == offline_program) continue
|
||||
if(A.contents.len == 0) continue // not loaded
|
||||
if(A.restricted)
|
||||
emag_programs += A
|
||||
else
|
||||
program_cache += A
|
||||
if(typekey == init_program)
|
||||
load_program(A,force=1)
|
||||
if(random_program && program_cache.len && init_program == null)
|
||||
load_program(pick(program_cache),force=1)
|
||||
else if(!program)
|
||||
load_program(offline_program)
|
||||
|
||||
/obj/machinery/computer/holodeck/power_change()
|
||||
..()
|
||||
|
||||
Reference in New Issue
Block a user