mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 06:00:16 +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:
@@ -110,7 +110,7 @@
|
||||
if(V == "air")
|
||||
var/turf/open/O1 = B
|
||||
var/turf/open/O2 = T
|
||||
O1.air.copy_from(O2.air)
|
||||
O1.air.copy_from(O2.return_air())
|
||||
continue
|
||||
B.vars[V] = T.vars[V]
|
||||
toupdate += B
|
||||
|
||||
@@ -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()
|
||||
..()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
name = "asteroid"
|
||||
icon_state = "asteroid0"
|
||||
|
||||
/turf/open/floor/holofloor/asteroid/New()
|
||||
/turf/open/floor/holofloor/asteroid/Initialize()
|
||||
icon_state = "asteroid[pick(0,1,2,3,4,5,6,7,8,9,10,11,12)]"
|
||||
..()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
name = "basalt"
|
||||
icon_state = "basalt0"
|
||||
|
||||
/turf/open/floor/holofloor/basalt/New()
|
||||
/turf/open/floor/holofloor/basalt/Initialize()
|
||||
icon_state = "basalt[pick(0,1,2,3,4,5,6,7,8,9,10,11,12)]"
|
||||
..()
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "0"
|
||||
|
||||
/turf/open/floor/holofloor/space/New()
|
||||
/turf/open/floor/holofloor/space/Initialize()
|
||||
icon_state = SPACE_ICON_STATE // so realistic
|
||||
..()
|
||||
|
||||
@@ -68,11 +68,11 @@
|
||||
icon = 'icons/turf/space.dmi'
|
||||
icon_state = "speedspace_ns_1"
|
||||
|
||||
/turf/open/floor/holofloor/hyperspace/New()
|
||||
/turf/open/floor/holofloor/hyperspace/Initialize()
|
||||
icon_state = "speedspace_ns_[(x + 5*y + (y%2+1)*7)%15+1]"
|
||||
..()
|
||||
|
||||
/turf/open/floor/holofloor/hyperspace/ns/New()
|
||||
/turf/open/floor/holofloor/hyperspace/ns/Initialize()
|
||||
..()
|
||||
icon_state = "speedspace_ns_[(x + 5*y + (y%2+1)*7)%15+1]"
|
||||
|
||||
@@ -86,7 +86,7 @@
|
||||
smooth = SMOOTH_TRUE
|
||||
canSmoothWith = null
|
||||
|
||||
/turf/open/floor/holofloor/carpet/New()
|
||||
/turf/open/floor/holofloor/carpet/Initialize()
|
||||
..()
|
||||
addtimer(CALLBACK(src, .proc/update_icon), 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user