mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 15:39:57 +01:00
Update MC (#18112)
* sdf * fsda * fuck * fuck2 * toolz * sdaf * sdfa * saf * sdfa * sdfa * sdf * sdfa * temp rename * temp rename * temp rename * sdaf * the pain is immensurable in the land of byond * the curse of rah * safd * sadf * sadf * gf * asf * fssdfa * sfd * sadf * sfda * brah * brah * it's easier for you to fix this * ffs * brah * brah
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
SUBSYSTEM_DEF(ai_obfuscation)
|
||||
name = "AI Obfuscation"
|
||||
flags = SS_NO_FIRE
|
||||
flags = SS_NO_FIRE | SS_NO_INIT
|
||||
|
||||
var/list/image/obfuscation_images = list()
|
||||
|
||||
|
||||
@@ -160,7 +160,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
|
||||
admin_notice(SPAN_DANGER("Air settling completed in [(REALTIMEOFDAY - starttime)/10] seconds!"), R_DEBUG)
|
||||
|
||||
..(timeofday)
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/air/fire(resumed = FALSE, no_mc_tick = FALSE)
|
||||
if (!resumed)
|
||||
@@ -440,7 +440,7 @@ Total Unsimulated Turfs: [world.maxx*world.maxy*world.maxz - simulated_turf_coun
|
||||
active_edges -= E
|
||||
|
||||
/datum/controller/subsystem/air/ExplosionStart()
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/air/ExplosionEnd()
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
@@ -18,6 +18,8 @@ SUBSYSTEM_DEF(alarm)
|
||||
/datum/controller/subsystem/alarm/Initialize(timeofday)
|
||||
all_handlers = list(atmosphere_alarm, camera_alarm, fire_alarm, motion_alarm, power_alarm)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/alarm/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
current = all_handlers.Copy()
|
||||
|
||||
@@ -13,7 +13,8 @@ SUBSYSTEM_DEF(ao)
|
||||
|
||||
/datum/controller/subsystem/ao/Initialize()
|
||||
fire(FALSE, TRUE)
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/ao/fire(resumed = 0, no_mc_tick = FALSE)
|
||||
var/list/curr = queue
|
||||
@@ -38,7 +39,7 @@ SUBSYSTEM_DEF(ao)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/ao/ExplosionStart()
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/ao/ExplosionEnd()
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(arrivals)
|
||||
current_mobs.Cut()
|
||||
else
|
||||
// Sleep, we ain't doin' shit. on_hotzone_enter() will wake us.
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
// Called when a living mob enters the shuttle area.
|
||||
/datum/controller/subsystem/arrivals/proc/on_hotzone_enter(mob/living/M)
|
||||
@@ -37,7 +37,7 @@ SUBSYSTEM_DEF(arrivals)
|
||||
if (istype(M))
|
||||
current_mobs += SOFTREF(M)
|
||||
|
||||
wake() // Wake the process.
|
||||
can_fire = TRUE // Wake the process.
|
||||
|
||||
if (!wait_for_launch && shuttle.location == 1 && shuttle.moving_status == SHUTTLE_IDLE)
|
||||
set_launch_countdown()
|
||||
@@ -72,7 +72,7 @@ SUBSYSTEM_DEF(arrivals)
|
||||
/datum/controller/subsystem/arrivals/proc/set_launch_countdown()
|
||||
wait_for_launch = 1
|
||||
launch_time = world.time + shuttle_launch_countdown
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
/datum/controller/subsystem/arrivals/proc/stop_launch_countdown()
|
||||
wait_for_launch = 0
|
||||
|
||||
@@ -14,7 +14,7 @@ SUBSYSTEM_DEF(assets)
|
||||
newtransporttype = /datum/asset_transport/webroot
|
||||
|
||||
if (newtransporttype == transport.type)
|
||||
return
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
var/datum/asset_transport/newtransport = new newtransporttype ()
|
||||
if (newtransport.validate_config())
|
||||
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(assets)
|
||||
|
||||
transport.Initialize(cache)
|
||||
|
||||
. = ..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/assets/Recover()
|
||||
cache = SSassets.cache
|
||||
|
||||
@@ -30,6 +30,8 @@ SUBSYSTEM_DEF(battle_monsters)
|
||||
GenerateDatum(BATTLE_MONSTERS_GEN_TRAP)
|
||||
GenerateDatum(BATTLE_MONSTERS_GEN_SPELL)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/battle_monsters/proc/CreateCard(var/identifier,var/turf/cardloc)
|
||||
var/list/splitstring = dd_text2List(identifier,",")
|
||||
var/obj/item/battle_monsters/card/new_card
|
||||
|
||||
@@ -86,7 +86,8 @@ SUBSYSTEM_DEF(cargo)
|
||||
var/datum/cargospawner/spawner = new
|
||||
spawner.start()
|
||||
qdel(spawner)
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/*
|
||||
Loading Data
|
||||
|
||||
@@ -7,7 +7,7 @@ var/regex/is_http_protocol = regex("^https?://")
|
||||
|
||||
SUBSYSTEM_DEF(chat)
|
||||
name = "Chat"
|
||||
flags = SS_TICKER
|
||||
flags = SS_TICKER | SS_NO_INIT
|
||||
wait = 1
|
||||
priority = SS_PRIORITY_CHAT
|
||||
init_order = SS_INIT_CHAT
|
||||
|
||||
@@ -87,7 +87,8 @@ SUBSYSTEM_DEF(chemistry)
|
||||
log_subsystem_chemistry("Found [pre_secret_len] reactions.")
|
||||
log_subsystem_chemistry("Loaded [load_secret_chemicals()] secret reactions.")
|
||||
initialize_specific_heats() // must be after reactions
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/chemistry/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
|
||||
@@ -15,7 +15,6 @@ SUBSYSTEM_DEF(cult)
|
||||
var/tome_data = ""
|
||||
|
||||
/datum/controller/subsystem/cult/Initialize()
|
||||
. = ..()
|
||||
for(var/rune in subtypesof(/datum/rune))
|
||||
var/datum/rune/R = new rune
|
||||
runes_by_name[R.name] = rune
|
||||
@@ -28,6 +27,8 @@ SUBSYSTEM_DEF(cult)
|
||||
limited_runes[R.type] = R.max_number_allowed //The runes created will tick the counter down to zero.
|
||||
tome_data += "</div>"
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/cult/proc/add_rune(var/datum/rune/R)
|
||||
if(check_rune_limit(R))
|
||||
return FALSE
|
||||
|
||||
@@ -48,6 +48,8 @@ SUBSYSTEM_DEF(discord)
|
||||
GLOB.config.load("config/discord.txt", "discord")
|
||||
update_channels()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/discord/stat_entry(msg)
|
||||
msg = "A: [active] C: [length(channels)] G: [length(channels_to_group)]"
|
||||
return ..()
|
||||
|
||||
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(docs)
|
||||
log_config("SSdocs: invalid load option specified in config")
|
||||
log_subsystem_documents("invalid load option specified in config")
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/*
|
||||
Fetching Data
|
||||
|
||||
@@ -22,7 +22,7 @@ SUBSYSTEM_DEF(economy)
|
||||
for(var/account in GLOB.department_funds)
|
||||
create_department_account(account)
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/economy/Recover()
|
||||
src.station_account = SSeconomy.station_account
|
||||
|
||||
@@ -6,10 +6,11 @@ SUBSYSTEM_DEF(evac)
|
||||
wait = 2 SECONDS
|
||||
|
||||
/datum/controller/subsystem/evac/Initialize()
|
||||
. = ..()
|
||||
if(!evacuation_controller)
|
||||
evacuation_controller = new current_map.evac_controller_type ()
|
||||
evacuation_controller.set_up()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/evac/fire()
|
||||
evacuation_controller.process()
|
||||
|
||||
@@ -37,6 +37,8 @@ SUBSYSTEM_DEF(events)
|
||||
if(current_map.use_overmap)
|
||||
overmap_event_handler.create_events(current_map.overmap_z, current_map.overmap_size, current_map.overmap_event_areas)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/events/Recover()
|
||||
active_events = SSevents.active_events
|
||||
finished_events = SSevents.finished_events
|
||||
|
||||
@@ -10,7 +10,7 @@ SUBSYSTEM_DEF(explosives)
|
||||
priority = SS_PRIORITY_EXPLOSIVES
|
||||
runlevels = RUNLEVELS_PLAYING
|
||||
|
||||
suspended = TRUE // Start disabled, explosions will wake us if need be.
|
||||
can_fire = FALSE // Start disabled, explosions will wake us if need be.
|
||||
|
||||
var/list/work_queue = list()
|
||||
var/ticks_without_work = 0
|
||||
@@ -29,7 +29,7 @@ SUBSYSTEM_DEF(explosives)
|
||||
ticks_without_work++
|
||||
if (ticks_without_work > 5)
|
||||
// All explosions handled, we can sleep now.
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
mc_notified = FALSE
|
||||
Master.ExplosionEnd()
|
||||
@@ -417,8 +417,8 @@ SUBSYSTEM_DEF(explosives)
|
||||
work_queue += data
|
||||
|
||||
// Wake it up from sleeping if necessary.
|
||||
if (suspended)
|
||||
wake()
|
||||
if (!can_fire)
|
||||
can_fire = TRUE
|
||||
|
||||
/datum/controller/subsystem/explosives/stat_entry(msg)
|
||||
msg ="P:[work_queue.len]"
|
||||
|
||||
@@ -25,10 +25,10 @@ SUBSYSTEM_DEF(fail2topic)
|
||||
log_subsystem_fail2topic("Subsystem disabled due to it not supporting UNIX.")
|
||||
|
||||
if (!enabled)
|
||||
suspended = TRUE
|
||||
can_fire = FALSE
|
||||
flags |= SS_NO_FIRE
|
||||
|
||||
. = ..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/fail2topic/fire()
|
||||
while (rate_limiting.len)
|
||||
|
||||
@@ -312,14 +312,15 @@ SUBSYSTEM_DEF(garbage)
|
||||
testing("CANCELLED search for references to a [usr.client.running_find_references].")
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
SSgarbage.enable()
|
||||
SSgarbage.can_fire = TRUE
|
||||
SSgarbage.update_nextfire(reset_time = TRUE)
|
||||
return
|
||||
|
||||
if(!skip_alert && alert(usr, "Running this will lock everything up for 5+ minutes. Would you like to begin the search?", "Find References", "Yes", "No") != "Yes")
|
||||
running_find_references = null
|
||||
return
|
||||
|
||||
SSgarbage.disable() // Keeps the GC from failing to collect objects being searched for here
|
||||
SSgarbage.can_fire = FALSE // Keeps the GC from failing to collect objects being searched for here
|
||||
|
||||
if(usr?.client)
|
||||
usr.client.running_find_references = type
|
||||
@@ -356,7 +357,8 @@ SUBSYSTEM_DEF(garbage)
|
||||
usr.client.running_find_references = null
|
||||
running_find_references = null
|
||||
|
||||
SSgarbage.enable() //restart the garbage collector
|
||||
SSgarbage.can_fire = TRUE //restart the garbage collector
|
||||
SSgarbage.update_nextfire(reset_time = TRUE) //restart the garbage collector
|
||||
|
||||
/datum/proc/search_var(potential_container, container_name, recursive_limit = 64, search_time = world.time)
|
||||
//If we are performing a search without a check tick, we should avoid sleeping
|
||||
|
||||
@@ -18,7 +18,6 @@ SUBSYSTEM_DEF(ghostroles)
|
||||
src.spawners = SSghostroles.spawners
|
||||
|
||||
/datum/controller/subsystem/ghostroles/Initialize(start_timeofday)
|
||||
. = ..()
|
||||
for(var/spawner in subtypesof(/datum/ghostspawner))
|
||||
CHECK_TICK
|
||||
var/datum/ghostspawner/G = new spawner
|
||||
@@ -39,6 +38,8 @@ SUBSYSTEM_DEF(ghostroles)
|
||||
for(var/spawn_type in spawn_types)
|
||||
spawn_atom[spawn_type] = list()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
//Adds a spawnpoint to the spawnpoint list
|
||||
/datum/controller/subsystem/ghostroles/proc/add_spawnpoints(var/obj/effect/ghostspawpoint/P)
|
||||
if(!P.identifier) //If the spawnpoint has no identifier -> Abort
|
||||
|
||||
@@ -13,13 +13,14 @@ SUBSYSTEM_DEF(hallucinations)
|
||||
var/list/all_hallucinations = list()
|
||||
|
||||
/datum/controller/subsystem/hallucinations/Initialize()
|
||||
. = ..()
|
||||
for(var/T in subtypesof(/datum/hallucination))
|
||||
all_hallucinations += T
|
||||
hallucinated_phrases = file2list("code/modules/hallucinations/text_lists/hallucinated_phrases.txt")
|
||||
hallucinated_actions = file2list("code/modules/hallucinations/text_lists/hallucinated_actions.txt") //important note when adding to this file: "you" will always be replaced by the hallucinator's name
|
||||
hallucinated_thoughts = file2list("code/modules/hallucinations/text_lists/hallucinated_thoughts.txt")
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/hallucinations/proc/get_hallucination(var/mob/living/carbon/C)
|
||||
var/list/candidates = list()
|
||||
for(var/T in all_hallucinations)
|
||||
|
||||
@@ -73,7 +73,8 @@ SUBSYSTEM_DEF(icon_cache)
|
||||
build_dust_cache()
|
||||
build_space_cache()
|
||||
setup_collar_mappings()
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/icon_cache/proc/setup_collar_mappings()
|
||||
collar_states = list()
|
||||
|
||||
@@ -82,7 +82,7 @@ SUBSYSTEM_DEF(icon_smooth)
|
||||
|
||||
if (GLOB.config.fastboot)
|
||||
LOG_DEBUG("icon_smoothing: Skipping prebake, fastboot enabled.")
|
||||
return ..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
var/list/queue = smooth_queue
|
||||
smooth_queue = list()
|
||||
@@ -98,7 +98,7 @@ SUBSYSTEM_DEF(icon_smooth)
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
. = ..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/icon_smooth/proc/add_to_queue(atom/thing)
|
||||
SHOULD_NOT_SLEEP(TRUE)
|
||||
|
||||
@@ -23,7 +23,8 @@ SUBSYSTEM_DEF(icon_update)
|
||||
|
||||
/datum/controller/subsystem/icon_update/Initialize()
|
||||
fire(FALSE, TRUE)
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/icon_update/fire(resumed = FALSE, no_mc_tick = FALSE)
|
||||
var/list/icon_update_queue_cache = icon_update_queue
|
||||
|
||||
@@ -209,7 +209,7 @@ SUBSYSTEM_DEF(atlas)
|
||||
else
|
||||
current_sector = selected_sector
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/atlas/proc/load_map_directory(directory, overwrite_default_z = FALSE)
|
||||
. = 0
|
||||
|
||||
@@ -34,7 +34,7 @@ SUBSYSTEM_DEF(atoms)
|
||||
InitializeAtoms()
|
||||
initialized = INITIALIZATION_INNEW_REGULAR
|
||||
|
||||
return ..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/atoms/proc/InitializeAtoms(list/atoms, list/atoms_to_return)
|
||||
if(initialized == INITIALIZATION_INSSATOMS)
|
||||
|
||||
@@ -24,7 +24,8 @@ SUBSYSTEM_DEF(holomap)
|
||||
/datum/controller/subsystem/holomap/Initialize()
|
||||
generate_all_minimaps()
|
||||
LOG_DEBUG("SSholomap: [minimaps.len] maps.")
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/holomap/proc/generate_all_minimaps()
|
||||
minimaps.len = world.maxz
|
||||
|
||||
@@ -35,7 +35,7 @@ SUBSYSTEM_DEF(finalize)
|
||||
// Generate contact report.
|
||||
generate_contact_report()
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/proc/resort_all_areas()
|
||||
GLOB.all_areas = list()
|
||||
|
||||
@@ -47,4 +47,4 @@ SUBSYSTEM_DEF(misc_early)
|
||||
|
||||
click_catchers = create_click_catcher()
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
@@ -37,7 +37,7 @@ SUBSYSTEM_DEF(misc_late)
|
||||
if (GLOB.config.use_forumuser_api)
|
||||
update_admins_from_api(TRUE)
|
||||
|
||||
..(timeofday)
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/proc/sorted_add_area(area/A)
|
||||
GLOB.all_areas += A
|
||||
|
||||
@@ -19,6 +19,8 @@ SUBSYSTEM_DEF(persistent_configuration)
|
||||
|
||||
load_from_file("data/persistent_config.json")
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/persistent_configuration/proc/load_from_file(filename)
|
||||
var/file = file2text(filename)
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ SUBSYSTEM_DEF(xenoarch)
|
||||
var/turf/simulated/mineral/artifact_turf = pop(artifacts_spawnturf_temp)
|
||||
artifact_turf.artifact_find = new()
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
|
||||
#undef XENOARCH_SPAWN_CHANCE
|
||||
|
||||
@@ -10,4 +10,5 @@ SUBSYSTEM_DEF(ipintel)
|
||||
|
||||
/datum/controller/subsystem/ipintel/Initialize()
|
||||
enabled = TRUE
|
||||
. = ..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
@@ -22,7 +22,6 @@ SUBSYSTEM_DEF(jobs)
|
||||
var/list/deferred_preference_sanitizations = list()
|
||||
|
||||
/datum/controller/subsystem/jobs/Initialize()
|
||||
..()
|
||||
|
||||
SetupOccupations()
|
||||
LoadJobs("config/jobs.txt")
|
||||
@@ -32,6 +31,8 @@ SUBSYSTEM_DEF(jobs)
|
||||
|
||||
SSticker.setup_player_ready_list()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/jobs/Recover()
|
||||
occupations = SSjobs.occupations
|
||||
unassigned = SSjobs.unassigned
|
||||
|
||||
@@ -13,6 +13,8 @@ SUBSYSTEM_DEF(law)
|
||||
else
|
||||
load_from_code()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/law/proc/load_from_code()
|
||||
for (var/L in subtypesof(/datum/law/low_severity))
|
||||
low_severity += new L
|
||||
|
||||
@@ -48,10 +48,10 @@ SUBSYSTEM_DEF(lighting)
|
||||
|
||||
/datum/controller/subsystem/lighting/ExplosionStart()
|
||||
force_queued = TRUE
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/lighting/ExplosionEnd()
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
if (!force_override)
|
||||
force_queued = FALSE
|
||||
|
||||
@@ -108,7 +108,7 @@ SUBSYSTEM_DEF(lighting)
|
||||
SSticker.OnRoundstart(CALLBACK(src, PROC_REF(handle_roundstart)))
|
||||
#endif
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/lighting/fire(resumed = FALSE, no_mc_tick = FALSE)
|
||||
if (!resumed)
|
||||
|
||||
@@ -38,6 +38,7 @@ SUBSYSTEM_DEF(machinery)
|
||||
priority = SS_PRIORITY_MACHINERY
|
||||
init_order = SS_INIT_MACHINERY
|
||||
flags = SS_POST_FIRE_TIMING
|
||||
wait = 2 SECONDS
|
||||
|
||||
var/static/tmp/current_step = SSMACHINERY_PIPENETS
|
||||
var/static/tmp/cost_pipenets = 0
|
||||
@@ -87,7 +88,8 @@ SUBSYSTEM_DEF(machinery)
|
||||
build_rcon_lists()
|
||||
setup_atmos_machinery(machinery)
|
||||
fire(FALSE, TRUE) // Tick machinery once to pare down the list so we don't hammer the server on round-start.
|
||||
..(timeofday)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/machinery/fire(resumed = FALSE, no_mc_tick = FALSE)
|
||||
var/timer
|
||||
@@ -95,7 +97,7 @@ SUBSYSTEM_DEF(machinery)
|
||||
timer = world.tick_usage
|
||||
process_pipenets(resumed, no_mc_tick)
|
||||
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(world.tick_usage - timer))
|
||||
if (state != SS_RUNNING && init_state == SS_INITSTATE_DONE)
|
||||
if (state != SS_RUNNING && initialized)
|
||||
return
|
||||
current_step = SSMACHINERY_MACHINERY
|
||||
resumed = FALSE
|
||||
@@ -103,7 +105,7 @@ SUBSYSTEM_DEF(machinery)
|
||||
timer = world.tick_usage
|
||||
process_machinery(resumed, no_mc_tick)
|
||||
cost_machinery = MC_AVERAGE(cost_machinery, TICK_DELTA_TO_MS(world.tick_usage - timer))
|
||||
if(state != SS_RUNNING && init_state == SS_INITSTATE_DONE)
|
||||
if(state != SS_RUNNING && initialized)
|
||||
return
|
||||
current_step = SSMACHINERY_POWERNETS
|
||||
resumed = FALSE
|
||||
@@ -111,7 +113,7 @@ SUBSYSTEM_DEF(machinery)
|
||||
timer = world.tick_usage
|
||||
process_powernets(resumed, no_mc_tick)
|
||||
cost_powernets = MC_AVERAGE(cost_powernets, TICK_DELTA_TO_MS(world.tick_usage - timer))
|
||||
if(state != SS_RUNNING && init_state == SS_INITSTATE_DONE)
|
||||
if(state != SS_RUNNING && initialized)
|
||||
return
|
||||
current_step = SSMACHINERY_POWER_OBJECTS
|
||||
resumed = FALSE
|
||||
@@ -119,7 +121,7 @@ SUBSYSTEM_DEF(machinery)
|
||||
timer = world.tick_usage
|
||||
process_power_objects(resumed, no_mc_tick)
|
||||
cost_power_objects = MC_AVERAGE(cost_power_objects, TICK_DELTA_TO_MS(world.tick_usage - timer))
|
||||
if (state != SS_RUNNING && init_state == SS_INITSTATE_DONE)
|
||||
if (state != SS_RUNNING && initialized)
|
||||
return
|
||||
current_step = SSMACHINERY_PIPENETS
|
||||
|
||||
@@ -165,7 +167,7 @@ SUBSYSTEM_DEF(machinery)
|
||||
network.isprocessing = null
|
||||
pipenets -= network
|
||||
continue
|
||||
network.process()
|
||||
network.process(wait * 0.1)
|
||||
if (no_mc_tick)
|
||||
CHECK_TICK
|
||||
else if (MC_TICK_CHECK)
|
||||
@@ -203,7 +205,7 @@ SUBSYSTEM_DEF(machinery)
|
||||
continue
|
||||
//process_all was moved here because of calls overhead for no benefits
|
||||
if(HAS_FLAG(machine.processing_flags, MACHINERY_PROCESS_SELF))
|
||||
if(machine.process() == PROCESS_KILL)
|
||||
if(machine.process(wait * 0.1) == PROCESS_KILL)
|
||||
STOP_PROCESSING_MACHINE(machine, MACHINERY_PROCESS_SELF)
|
||||
processing -= machine
|
||||
if (no_mc_tick)
|
||||
@@ -267,10 +269,10 @@ SUBSYSTEM_DEF(machinery)
|
||||
return ..()
|
||||
|
||||
/datum/controller/subsystem/machinery/ExplosionStart()
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/machinery/ExplosionEnd()
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
/datum/controller/subsystem/machinery/proc/build_rcon_lists()
|
||||
rcon_smes_units.Cut()
|
||||
|
||||
@@ -18,7 +18,8 @@ SUBSYSTEM_DEF(mapping)
|
||||
|
||||
current_map.build_away_sites()
|
||||
current_map.build_exoplanets()
|
||||
. = ..(timeofday)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/mapping/Recover()
|
||||
flags |= SS_NO_INIT
|
||||
|
||||
@@ -10,7 +10,8 @@ SUBSYSTEM_DEF(materials)
|
||||
|
||||
/datum/controller/subsystem/materials/Initialize()
|
||||
create_material_lists()
|
||||
. = ..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/**
|
||||
* Initialize the lists of materials, if they are not initialized already
|
||||
|
||||
@@ -57,6 +57,8 @@ SUBSYSTEM_DEF(mobs)
|
||||
|
||||
mtl_incorporeal = typecacheof(mtl_incorporeal)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/mobs/stat_entry(msg)
|
||||
msg = "P:[GLOB.mob_list.len]"
|
||||
return ..()
|
||||
|
||||
@@ -63,7 +63,7 @@ SUBSYSTEM_DEF(mob_ai)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/mob_ai/ExplosionStart()
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/mob_ai/ExplosionEnd()
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
@@ -19,7 +19,7 @@ SUBSYSTEM_DEF(news)
|
||||
|
||||
INVOKE_ASYNC(src, PROC_REF(load_from_forums))
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/news/proc/load_from_forums()
|
||||
if (!GLOB.config.forum_api_path || !global.forum_api_key)
|
||||
@@ -79,7 +79,7 @@ SUBSYSTEM_DEF(news)
|
||||
var/datum/computer_file/data/news_article/news = new()
|
||||
news.filename = "[channel.channel_name] vol. [total_vol_count - count_pulled + news_count]"
|
||||
news.stored_data = post["content"]
|
||||
ntnet_global.available_news.Add(news)
|
||||
GLOB.ntnet_global.available_news.Add(news)
|
||||
|
||||
if (news_count > archive_limit)
|
||||
news.archived = 1
|
||||
|
||||
@@ -2,12 +2,15 @@ SUBSYSTEM_DEF(nightlight)
|
||||
name = "Night Lighting"
|
||||
wait = 5 MINUTES
|
||||
init_order = SS_INIT_NIGHT
|
||||
flags = SS_BACKGROUND | SS_NO_TICK_CHECK | SS_NO_FIRE
|
||||
flags = SS_BACKGROUND | SS_NO_FIRE
|
||||
priority = SS_PRIORITY_NIGHT
|
||||
|
||||
var/isactive = FALSE
|
||||
var/disable_type = NL_NOT_DISABLED
|
||||
|
||||
/datum/controller/subsystem/nightlight/Initialize(start_timeofday)
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/nightlight/stat_entry(msg)
|
||||
msg = "A:[isactive] T:[worldtime2hours()] D:[disable_type]"
|
||||
return ..()
|
||||
@@ -19,14 +22,14 @@ SUBSYSTEM_DEF(nightlight)
|
||||
/datum/controller/subsystem/nightlight/proc/temp_disable(time = -1)
|
||||
if (disable_type != NL_PERMANENT_DISABLE)
|
||||
disable_type = NL_TEMPORARY_DISABLE
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
deactivate(FALSE)
|
||||
if (time > 0)
|
||||
addtimer(CALLBACK(src, PROC_REF(end_temp_disable)), time, TIMER_UNIQUE | TIMER_OVERRIDE)
|
||||
|
||||
/datum/controller/subsystem/nightlight/proc/end_temp_disable()
|
||||
if (disable_type == NL_TEMPORARY_DISABLE)
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
// 'whitelisted' areas are areas that have nightmode explicitly enabled
|
||||
|
||||
@@ -61,10 +64,10 @@ SUBSYSTEM_DEF(nightlight)
|
||||
/datum/controller/subsystem/nightlight/proc/is_active()
|
||||
return isactive
|
||||
|
||||
/datum/controller/subsystem/nightlight/enable()
|
||||
..()
|
||||
disable_type = NL_NOT_DISABLED
|
||||
// /datum/controller/subsystem/nightlight/enable()
|
||||
// ..()
|
||||
// disable_type = NL_NOT_DISABLED
|
||||
|
||||
/datum/controller/subsystem/nightlight/disable()
|
||||
..()
|
||||
disable_type = NL_PERMANENT_DISABLE
|
||||
// /datum/controller/subsystem/nightlight/disable()
|
||||
// ..()
|
||||
// disable_type = NL_PERMANENT_DISABLE
|
||||
|
||||
@@ -20,7 +20,8 @@ SUBSYSTEM_DEF(overlays)
|
||||
/datum/controller/subsystem/overlays/Initialize()
|
||||
initialized = TRUE
|
||||
Flush()
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/overlays/Recover()
|
||||
overlay_icon_state_caches = SSoverlays.overlay_icon_state_caches
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBSYSTEM_DEF(pai)
|
||||
name = "pAI"
|
||||
init_order = SS_INIT_MISC_FIRST
|
||||
flags = SS_NO_FIRE
|
||||
flags = SS_NO_FIRE | SS_NO_INIT
|
||||
|
||||
var/list/pai_software_by_key
|
||||
var/list/default_pai_software
|
||||
|
||||
@@ -78,7 +78,7 @@ SUBSYSTEM_DEF(plants)
|
||||
plant_gene_datums[gene_mask] = G
|
||||
gene_masked_list += (list(list("tag" = gene_tag, "mask" = gene_mask)))
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/plants/Recover()
|
||||
if (istype(SSplants))
|
||||
|
||||
@@ -101,7 +101,7 @@ PROCESSING_SUBSYSTEM_DEF(electronics)
|
||||
printer_recipe_list_upgraded += list(list(path = "[O.type]", name = "[O.name]", desc = "[O.desc]", "basic" = TRUE, "category" = category))
|
||||
|
||||
|
||||
..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
#undef IC_SPAWN_DEFAULT
|
||||
#undef IC_SPAWN_RESEARCH
|
||||
|
||||
@@ -13,7 +13,8 @@ PROCESSING_SUBSYSTEM_DEF(ntsl2)
|
||||
|
||||
/datum/controller/subsystem/processing/ntsl2/Initialize(timeofday)
|
||||
attempt_connect()
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/*
|
||||
* Builds request object meant to do certain action. Returns FALSE (0) when there was an issue.
|
||||
|
||||
@@ -34,7 +34,7 @@ SUBSYSTEM_DEF(processing)
|
||||
STOP_PROCESSING(src, D)
|
||||
|
||||
/datum/controller/subsystem/processing/ExplosionStart()
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/processing/ExplosionEnd()
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
@@ -3,7 +3,7 @@ var/global/list/psychic_ranks_to_strings = list("Psionically Sensitive", "Psioni
|
||||
PROCESSING_SUBSYSTEM_DEF(psi)
|
||||
name = "Psionics"
|
||||
priority = SS_PRIORITY_PSYCHICS
|
||||
flags = SS_BACKGROUND
|
||||
flags = SS_BACKGROUND | SS_NO_INIT
|
||||
|
||||
var/checking_nlom = FALSE
|
||||
var/last_nlom_awareness_check = 0
|
||||
|
||||
@@ -38,7 +38,8 @@ SUBSYSTEM_DEF(shuttle)
|
||||
LAZYDISTINCTADD(shuttles_to_initialize, shuttle_type)
|
||||
block_queue = FALSE
|
||||
clear_init_queue()
|
||||
. = ..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/shuttle/fire(resumed = FALSE)
|
||||
if (!resumed)
|
||||
|
||||
@@ -1,59 +1,77 @@
|
||||
#define PROFILER_PATH(file) "./data/logs/[game_id]/profiler/[##file]"
|
||||
|
||||
#define PROFILER_FILENAME "profiler.json"
|
||||
#define SENDMAPS_FILENAME "sendmaps.json"
|
||||
|
||||
SUBSYSTEM_DEF(profiler)
|
||||
name = "Profiler"
|
||||
wait = 1
|
||||
priority = SS_PRIORITY_PROFILE
|
||||
|
||||
flags = SS_TICKER
|
||||
init_order = INIT_ORDER_PROFILER
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
wait = 3000
|
||||
var/fetch_cost = 0
|
||||
var/write_cost = 0
|
||||
|
||||
var/last_fire_rt = 0
|
||||
var/threshold = 0
|
||||
|
||||
var/next_restart = 0
|
||||
var/restart_period = 0
|
||||
/datum/controller/subsystem/profiler/stat_entry(msg)
|
||||
msg += "F:[round(fetch_cost,1)]ms"
|
||||
msg += "|W:[round(write_cost,1)]ms"
|
||||
return msg
|
||||
|
||||
/datum/controller/subsystem/profiler/Initialize()
|
||||
if (!GLOB.config.profiler_is_enabled)
|
||||
..()
|
||||
flags |= SS_NO_FIRE
|
||||
return
|
||||
if(GLOB.config.profiler_is_enabled)
|
||||
StartProfiling()
|
||||
else
|
||||
StopProfiling() //Stop the early start profiler
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
restart_period = GLOB.config.profiler_restart_period
|
||||
threshold = GLOB.config.profiler_timeout_threshold
|
||||
|
||||
..()
|
||||
|
||||
/datum/controller/subsystem/profiler/Shutdown()
|
||||
. = ..()
|
||||
if (GLOB.config.profiler_is_enabled)
|
||||
DumpData()
|
||||
world.Profile(PROFILE_CLEAR, type="sendmaps")
|
||||
/datum/controller/subsystem/profiler/OnConfigLoad()
|
||||
if(GLOB.config.profiler_is_enabled)
|
||||
StartProfiling()
|
||||
can_fire = TRUE
|
||||
else
|
||||
StopProfiling()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/profiler/fire()
|
||||
. = world.timeofday
|
||||
DumpFile()
|
||||
|
||||
if (!last_fire_rt)
|
||||
last_fire_rt = .
|
||||
next_restart = world.time + restart_period
|
||||
world.Profile(PROFILE_START)
|
||||
world.Profile(PROFILE_START, type="sendmaps")
|
||||
/datum/controller/subsystem/profiler/Shutdown()
|
||||
if(GLOB.config.profiler_is_enabled)
|
||||
DumpFile(allow_yield = FALSE)
|
||||
world.Profile(PROFILE_CLEAR, type = "sendmaps")
|
||||
return ..()
|
||||
|
||||
if (. - last_fire_rt > threshold)
|
||||
DumpData()
|
||||
else if (world.time > next_restart)
|
||||
RestartProfiler()
|
||||
/datum/controller/subsystem/profiler/proc/StartProfiling()
|
||||
world.Profile(PROFILE_START)
|
||||
world.Profile(PROFILE_START, type = "sendmaps")
|
||||
|
||||
last_fire_rt = .
|
||||
/datum/controller/subsystem/profiler/proc/StopProfiling()
|
||||
world.Profile(PROFILE_STOP)
|
||||
world.Profile(PROFILE_STOP, type = "sendmaps")
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/DumpData()
|
||||
log_perf("Profiler: dump profile after CPU spike.")
|
||||
admin_notice(SPAN_DANGER("Profiler: dump profile after CPU spike."), R_SERVER|R_DEV)
|
||||
/datum/controller/subsystem/profiler/proc/DumpFile(allow_yield = TRUE)
|
||||
var/timer = TICK_USAGE_REAL
|
||||
var/current_profile_data = world.Profile(PROFILE_REFRESH, format = "json")
|
||||
var/current_sendmaps_data = world.Profile(PROFILE_REFRESH, type = "sendmaps", format="json")
|
||||
fetch_cost = MC_AVERAGE(fetch_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
if(allow_yield)
|
||||
CHECK_TICK
|
||||
|
||||
var/name = "[game_id]_[time2text(world.timeofday, "hh-mm-ss")]"
|
||||
text2file(world.Profile(PROFILE_REFRESH, "json"), "data/logs/[game_id]/profiler/[name].json")
|
||||
text2file(world.Profile(PROFILE_REFRESH, type = "sendmaps", format = "json"), "data/logs/[game_id]/profiler/[name]_sendmaps.json")
|
||||
if(!length(current_profile_data)) //Would be nice to have explicit proc to check this
|
||||
stack_trace("Warning, profiling stopped manually before dump.")
|
||||
var/prof_file = file(PROFILER_PATH(PROFILER_FILENAME))
|
||||
if(fexists(prof_file))
|
||||
fdel(prof_file)
|
||||
if(!length(current_sendmaps_data)) //Would be nice to have explicit proc to check this
|
||||
stack_trace("Warning, sendmaps profiling stopped manually before dump.")
|
||||
var/sendmaps_file = file(PROFILER_PATH(SENDMAPS_FILENAME))
|
||||
if(fexists(sendmaps_file))
|
||||
fdel(sendmaps_file)
|
||||
|
||||
/datum/controller/subsystem/profiler/proc/RestartProfiler()
|
||||
world.Profile(PROFILE_CLEAR)
|
||||
world.Profile(PROFILE_CLEAR, type="sendmaps")
|
||||
next_restart = world.time + restart_period
|
||||
timer = TICK_USAGE_REAL
|
||||
WRITE_FILE(prof_file, current_profile_data)
|
||||
WRITE_FILE(sendmaps_file, current_sendmaps_data)
|
||||
write_cost = MC_AVERAGE(write_cost, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
|
||||
|
||||
#undef PROFILER_FILENAME
|
||||
#undef SENDMAPS_FILENAME
|
||||
#undef PROFILER_PATH
|
||||
|
||||
@@ -20,7 +20,6 @@ SUBSYSTEM_DEF(records)
|
||||
var/list/accents = list()
|
||||
|
||||
/datum/controller/subsystem/records/Initialize()
|
||||
..()
|
||||
for(var/type in localized_fields)
|
||||
localized_fields[type] = compute_localized_field(type)
|
||||
|
||||
@@ -28,6 +27,8 @@ SUBSYSTEM_DEF(records)
|
||||
InitializeReligions()
|
||||
InitializeAccents()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/records/PreInit()
|
||||
records = list()
|
||||
records_locked = list()
|
||||
|
||||
@@ -20,7 +20,6 @@ SUBSYSTEM_DEF(distress)
|
||||
feedback_set("responseteam_count", 0)
|
||||
|
||||
/datum/controller/subsystem/distress/Initialize(start_timeofday)
|
||||
. = ..()
|
||||
var/list/all_teams = subtypesof(/datum/responseteam)
|
||||
for(var/team in all_teams)
|
||||
CHECK_TICK
|
||||
@@ -29,6 +28,8 @@ SUBSYSTEM_DEF(distress)
|
||||
available_teams += ert
|
||||
all_ert_teams += ert
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/distress/stat_entry(msg)
|
||||
msg = "CC:[can_call_ert]"
|
||||
return ..()
|
||||
|
||||
@@ -30,9 +30,10 @@ SUBSYSTEM_DEF(skybox)
|
||||
background_color = SSatlas.current_sector.starlight_color
|
||||
|
||||
/datum/controller/subsystem/skybox/Initialize()
|
||||
. = ..()
|
||||
build_space_appearances()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/skybox/Recover()
|
||||
skybox_cache = SSskybox.skybox_cache
|
||||
|
||||
|
||||
@@ -117,8 +117,6 @@ SUBSYSTEM_DEF(spatial_grid)
|
||||
var/number_of_oranges_ears = NUMBER_OF_PREGENERATED_ORANGES_EARS
|
||||
|
||||
/datum/controller/subsystem/spatial_grid/Initialize(start_timeofday)
|
||||
. = ..()
|
||||
|
||||
cells_on_x_axis = SPATIAL_GRID_CELLS_PER_SIDE(world.maxx)
|
||||
cells_on_y_axis = SPATIAL_GRID_CELLS_PER_SIDE(world.maxy)
|
||||
|
||||
@@ -141,6 +139,8 @@ SUBSYSTEM_DEF(spatial_grid)
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_NEW_Z, PROC_REF(propogate_spatial_grid_to_new_z))
|
||||
RegisterSignal(SSdcs, COMSIG_GLOB_EXPANDED_WORLD_BOUNDS, PROC_REF(after_world_bounds_expanded))
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
///add a movable to the pre init queue for whichever type is specified so that when the subsystem initializes they get added to the grid
|
||||
/datum/controller/subsystem/spatial_grid/proc/enter_pre_init_queue(atom/movable/waiting_movable, type)
|
||||
RegisterSignal(waiting_movable, COMSIG_PARENT_PREQDELETED, PROC_REF(queued_item_deleted), override = TRUE)
|
||||
@@ -404,7 +404,7 @@ SUBSYSTEM_DEF(spatial_grid)
|
||||
* * exclusive_type - either null or a valid contents channel. if you just want to remove a single type from the grid cell then use this
|
||||
*/
|
||||
/datum/controller/subsystem/spatial_grid/proc/exit_cell(atom/movable/old_target, turf/target_turf, exclusive_type)
|
||||
if(init_state != SS_INITSTATE_DONE)
|
||||
if(!initialized)
|
||||
return
|
||||
|
||||
if(!target_turf || !old_target?.important_recursive_contents)
|
||||
@@ -448,7 +448,7 @@ SUBSYSTEM_DEF(spatial_grid)
|
||||
|
||||
///find the cell this movable is associated with and removes it from all lists
|
||||
/datum/controller/subsystem/spatial_grid/proc/force_remove_from_cell(atom/movable/to_remove, datum/spatial_grid_cell/input_cell)
|
||||
if(init_state != SS_INITSTATE_DONE)
|
||||
if(!initialized)
|
||||
remove_from_pre_init_queue(to_remove)//the spatial grid doesnt exist yet, so just take it out of the queue
|
||||
return
|
||||
|
||||
@@ -473,7 +473,7 @@ SUBSYSTEM_DEF(spatial_grid)
|
||||
if(remove_from_cells)
|
||||
queue_list -= to_remove
|
||||
|
||||
if(init_state != SS_INITSTATE_DONE)
|
||||
if(!initialized)
|
||||
return queues_containing_movable
|
||||
|
||||
var/list/containing_cells = list()
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBSYSTEM_DEF(statistics)
|
||||
name = "Statistics & Inactivity"
|
||||
wait = 1 MINUTE
|
||||
flags = SS_NO_TICK_CHECK | SS_BACKGROUND
|
||||
flags = SS_BACKGROUND
|
||||
priority = SS_PRIORITY_STATISTICS
|
||||
|
||||
var/kicked_clients = 0
|
||||
@@ -45,6 +45,8 @@ GENERAL_PROTECT_DATUM(/datum/controller/subsystem/statistics)
|
||||
|
||||
sortTim(simple_statistics, GLOBAL_PROC_REF(cmp_name_asc), TRUE)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/statistics/fire()
|
||||
// Handle AFK.
|
||||
if(GLOB.config.kick_inactive)
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(statpanels)
|
||||
name = "Stat Panels"
|
||||
wait = 4
|
||||
init_order = SS_INIT_MISC_FIRST
|
||||
flags = SS_NO_INIT
|
||||
priority = SS_PRIORITY_STATPANELS
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
init_stage = INITSTAGE_EARLY
|
||||
@@ -203,7 +204,7 @@ SUBSYSTEM_DEF(statpanels)
|
||||
list("Instances:", "[num2text(world.contents.len, 10)]"),
|
||||
list("World Time:", "[world.time]"),
|
||||
list("Globals:", GLOB.stat_entry(), text_ref(GLOB)),
|
||||
list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_TICK_USAGE,0.1)]%)"),
|
||||
list("Byond:", "(FPS:[world.fps]) (TickCount:[world.time/world.tick_lag]) (TickDrift:[round(Master.tickdrift,1)]([round((Master.tickdrift/(world.time/world.tick_lag))*100,0.1)]%)) (Internal Tick Usage: [round(MAPTICK_LAST_INTERNAL_TICK_USAGE,0.1)]%)"),
|
||||
list("Master Controller:", Master.stat_entry(), text_ref(Master)),
|
||||
list("Failsafe Controller:", Failsafe.stat_entry(), text_ref(Failsafe)),
|
||||
list("","")
|
||||
|
||||
@@ -48,7 +48,7 @@ SUBSYSTEM_DEF(stickyban)
|
||||
cache[ckey] = ban
|
||||
world.SetConfig("ban", ckey, list2stickyban(ban))
|
||||
|
||||
return ..()
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/stickyban/proc/Populatedbcache()
|
||||
var/newdbcache = list() //so if we runtime or the db connection dies we don't kill the existing cache
|
||||
|
||||
@@ -35,7 +35,8 @@ SUBSYSTEM_DEF(sunlight)
|
||||
CHECK_TICK
|
||||
|
||||
LOG_DEBUG("sunlight: [light_points.len] sun emitters.")
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/sunlight/proc/set_overall_light(...)
|
||||
. = 0
|
||||
|
||||
@@ -11,7 +11,6 @@ var/datum/controller/subsystem/ticker/SSticker
|
||||
name = "Ticker"
|
||||
|
||||
priority = SS_PRIORITY_TICKER
|
||||
flags = SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
init_order = SS_INIT_LOBBY
|
||||
|
||||
@@ -74,6 +73,8 @@ var/datum/controller/subsystem/ticker/SSticker
|
||||
pregame()
|
||||
restart_timeout = GLOB.config.restart_timeout
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/ticker/stat_entry(msg)
|
||||
var/state = ""
|
||||
switch (current_state)
|
||||
@@ -423,7 +424,7 @@ var/datum/controller/subsystem/ticker/SSticker
|
||||
pregame_timeleft = LOBBY_TIME
|
||||
LOG_DEBUG("SSticker: lobby reset due to game setup failure, using pregame time [LOBBY_TIME]s.")
|
||||
else
|
||||
var/mc_init_time = round(Master.initialization_time_taken, 1)
|
||||
var/mc_init_time = round(Master.init_timeofday, 1)
|
||||
var/dynamic_time = LOBBY_TIME - mc_init_time
|
||||
total_players = length(GLOB.player_list)
|
||||
LAZYINITLIST(ready_player_jobs)
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
SUBSYSTEM_DEF(trade)
|
||||
name = "Trade"
|
||||
wait = 1 MINUTE
|
||||
flags = SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVELS_PLAYING
|
||||
var/list/traders = list() //List of all nearby traders
|
||||
|
||||
/datum/controller/subsystem/trade/Initialize()
|
||||
for(var/i in 1 to rand(1,3))
|
||||
generateTrader(1)
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/trade/Recover()
|
||||
traders = SStrade.traders
|
||||
|
||||
@@ -22,7 +22,8 @@ SUBSYSTEM_DEF(virtualreality)
|
||||
robots[network] = list()
|
||||
for(var/network in boundnetworks)
|
||||
bounded[network] = list()
|
||||
..()
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
|
||||
/datum/controller/subsystem/virtualreality/proc/add_mech(var/mob/living/heavy_vehicle/mech, var/network)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
SUBSYSTEM_DEF(vote)
|
||||
name = "Voting"
|
||||
wait = 1 SECOND
|
||||
flags = SS_KEEP_TIMING | SS_NO_TICK_CHECK
|
||||
flags = SS_KEEP_TIMING | SS_KEEP_TIMING
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
priority = SS_PRIORITY_VOTE
|
||||
|
||||
@@ -22,6 +22,7 @@ SUBSYSTEM_DEF(vote)
|
||||
|
||||
/datum/controller/subsystem/vote/Initialize(timeofday)
|
||||
next_transfer_time = GLOB.config.vote_autotransfer_initial
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/vote/fire(resumed = FALSE)
|
||||
if (mode)
|
||||
@@ -40,6 +41,8 @@ SUBSYSTEM_DEF(vote)
|
||||
autotransfer()
|
||||
next_transfer_time += GLOB.config.vote_autotransfer_interval
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
/datum/controller/subsystem/vote/proc/autotransfer()
|
||||
initiate_vote("crew_transfer","the server", 1)
|
||||
LOG_DEBUG("The server has called a crew transfer vote")
|
||||
|
||||
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(zcopy)
|
||||
|
||||
// for admin proc-call
|
||||
/datum/controller/subsystem/zcopy/proc/update_all()
|
||||
disable()
|
||||
can_fire = FALSE
|
||||
LOG_DEBUG("SSzcopy: update_all() invoked.")
|
||||
|
||||
var/turf/T // putting the declaration up here totally speeds it up, right?
|
||||
@@ -52,11 +52,11 @@ SUBSYSTEM_DEF(zcopy)
|
||||
|
||||
LOG_DEBUG("SSzcopy: [num_upd + num_amupd] turf updates queued ([num_upd] direct, [num_amupd] indirect), [num_del] orphans destroyed.")
|
||||
|
||||
enable()
|
||||
can_fire = TRUE
|
||||
|
||||
// for admin proc-call
|
||||
/datum/controller/subsystem/zcopy/proc/hard_reset()
|
||||
disable()
|
||||
can_fire = FALSE
|
||||
LOG_DEBUG("SSzcopy: hard_reset() invoked.")
|
||||
var/num_deleted = 0
|
||||
var/num_turfs = 0
|
||||
@@ -77,7 +77,7 @@ SUBSYSTEM_DEF(zcopy)
|
||||
|
||||
LOG_DEBUG("SSzcopy: deleted [num_deleted] overlays, and queued [num_turfs] turfs for update.")
|
||||
|
||||
enable()
|
||||
can_fire = TRUE
|
||||
|
||||
/datum/controller/subsystem/zcopy/stat_entry(msg)
|
||||
msg = "Mx: [json_encode(zlev_maximums)] | \
|
||||
@@ -98,6 +98,8 @@ SUBSYSTEM_DEF(zcopy)
|
||||
// Flush the queue.
|
||||
fire(FALSE, TRUE)
|
||||
|
||||
return SS_INIT_SUCCESS
|
||||
|
||||
// If you add a new Zlevel or change Z-connections, call this.
|
||||
/datum/controller/subsystem/zcopy/proc/calculate_zstack_limits()
|
||||
zlev_maximums = new(world.maxz)
|
||||
@@ -115,10 +117,10 @@ SUBSYSTEM_DEF(zcopy)
|
||||
log_subsystem("zcopy", "Z-Level maximums: [json_encode(zlev_maximums)]")
|
||||
|
||||
/datum/controller/subsystem/zcopy/StartLoadingMap()
|
||||
suspend()
|
||||
can_fire = FALSE
|
||||
|
||||
/datum/controller/subsystem/zcopy/StopLoadingMap()
|
||||
wake()
|
||||
can_fire = TRUE
|
||||
|
||||
/datum/controller/subsystem/zcopy/fire(resumed, no_mc_tick)
|
||||
if (!resumed)
|
||||
|
||||
Reference in New Issue
Block a user