mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
Fastboot (#2761)
Adds a config option that disables some time consuming bootup steps that aren't generally required for debugging.
This commit is contained in:
@@ -245,6 +245,7 @@ var/list/gamemode_cache = list()
|
|||||||
|
|
||||||
// Master Controller settings.
|
// Master Controller settings.
|
||||||
var/mc_init_tick_limit = TICK_LIMIT_MC_INIT_DEFAULT
|
var/mc_init_tick_limit = TICK_LIMIT_MC_INIT_DEFAULT
|
||||||
|
var/fastboot = FALSE // If true, take some shortcuts during boot to speed it up for testing. Probably should not be used on production servers.
|
||||||
|
|
||||||
//UDP GELF Logging
|
//UDP GELF Logging
|
||||||
var/log_gelf_enabled = 0
|
var/log_gelf_enabled = 0
|
||||||
@@ -285,6 +286,11 @@ var/list/gamemode_cache = list()
|
|||||||
src.votable_modes += M.config_tag
|
src.votable_modes += M.config_tag
|
||||||
src.votable_modes += "secret"
|
src.votable_modes += "secret"
|
||||||
|
|
||||||
|
#ifdef UNIT_TEST
|
||||||
|
fastboot = TRUE
|
||||||
|
world.log << "UNIT_TEST present. Forcing fastboot on."
|
||||||
|
#endif
|
||||||
|
|
||||||
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
|
/datum/configuration/proc/load(filename, type = "config") //the type can also be game_options, in which case it uses a different switch. not making it separate to not copypaste code - Urist
|
||||||
var/list/Lines = file2list(filename)
|
var/list/Lines = file2list(filename)
|
||||||
|
|
||||||
@@ -819,6 +825,9 @@ var/list/gamemode_cache = list()
|
|||||||
if("access_warn_vms")
|
if("access_warn_vms")
|
||||||
access_warn_vms = text2num(value)
|
access_warn_vms = text2num(value)
|
||||||
|
|
||||||
|
if("fastboot")
|
||||||
|
fastboot = TRUE
|
||||||
|
|
||||||
else
|
else
|
||||||
log_misc("Unknown setting in configuration: '[name]'")
|
log_misc("Unknown setting in configuration: '[name]'")
|
||||||
|
|
||||||
|
|||||||
@@ -40,6 +40,11 @@ var/datum/controller/subsystem/icon_smooth/SSicon_smooth
|
|||||||
for (var/zlevel = 1 to world.maxz)
|
for (var/zlevel = 1 to world.maxz)
|
||||||
smooth_zlevel(zlevel, FALSE)
|
smooth_zlevel(zlevel, FALSE)
|
||||||
|
|
||||||
|
if (config.fastboot)
|
||||||
|
log_debug("icon_smoothing: Skipping prebake, fastboot enabled.")
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
var/queue = smooth_queue
|
var/queue = smooth_queue
|
||||||
smooth_queue = list()
|
smooth_queue = list()
|
||||||
for(var/V in queue)
|
for(var/V in queue)
|
||||||
|
|||||||
@@ -17,10 +17,16 @@
|
|||||||
..("A:[config.sun_accuracy] LP:[light_points.len] Z:[config.sun_target_z]")
|
..("A:[config.sun_accuracy] LP:[light_points.len] Z:[config.sun_target_z]")
|
||||||
|
|
||||||
/datum/controller/subsystem/sunlight/Initialize()
|
/datum/controller/subsystem/sunlight/Initialize()
|
||||||
|
|
||||||
presets = list()
|
presets = list()
|
||||||
for (var/thing in subtypesof(/datum/sun_state))
|
for (var/thing in subtypesof(/datum/sun_state))
|
||||||
presets += new thing
|
presets += new thing
|
||||||
|
|
||||||
|
if (config.fastboot)
|
||||||
|
log_debug("sunlight: fastboot detected, skipping setup.")
|
||||||
|
..()
|
||||||
|
return
|
||||||
|
|
||||||
var/thing
|
var/thing
|
||||||
var/turf/T
|
var/turf/T
|
||||||
for (thing in block(locate(1, 1, config.sun_target_z), locate(world.maxx, world.maxy, config.sun_target_z)))
|
for (thing in block(locate(1, 1, config.sun_target_z), locate(world.maxx, world.maxy, config.sun_target_z)))
|
||||||
|
|||||||
@@ -751,6 +751,8 @@
|
|||||||
stat("CPU:", world.cpu)
|
stat("CPU:", world.cpu)
|
||||||
stat("Tick Usage:", world.tick_usage)
|
stat("Tick Usage:", world.tick_usage)
|
||||||
stat("Instances:", world.contents.len)
|
stat("Instances:", world.contents.len)
|
||||||
|
if (config.fastboot)
|
||||||
|
stat(null, "FASTBOOT ENABLED")
|
||||||
if(Master)
|
if(Master)
|
||||||
Master.stat_entry()
|
Master.stat_entry()
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -464,3 +464,7 @@ LOG_GELF_PORT 12201
|
|||||||
## This determines how many VM identifiers must be spotted on a user before admins are warned about them joining.
|
## This determines how many VM identifiers must be spotted on a user before admins are warned about them joining.
|
||||||
## Leave at 0 or commented out to disable.
|
## Leave at 0 or commented out to disable.
|
||||||
# ACCESS_WARN_VMS 2
|
# ACCESS_WARN_VMS 2
|
||||||
|
|
||||||
|
|
||||||
|
# Enables fastboot - some features not essential to testing (like sunlight) will be disabled to speed up server boot. Should not be used on production servers.
|
||||||
|
# FASTBOOT
|
||||||
|
|||||||
Reference in New Issue
Block a user