mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
Merge remote-tracking branch 'upstream/release'
This commit is contained in:
@@ -5,9 +5,11 @@
|
||||
/datum/configuration
|
||||
var/list/engine_map // Comma separated list of engines to choose from. Blank means fully random.
|
||||
var/time_off = FALSE
|
||||
var/pto_job_change = FALSE
|
||||
var/limit_interns = -1 //Unlimited by default
|
||||
var/limit_visitors = -1 //Unlimited by default
|
||||
var/pto_cap = 100 //Hours
|
||||
var/require_flavor = FALSE
|
||||
|
||||
/hook/startup/proc/read_vs_config()
|
||||
var/list/Lines = file2list("config/config.txt")
|
||||
@@ -52,5 +54,8 @@
|
||||
config.pto_cap = text2num(value)
|
||||
if ("time_off")
|
||||
config.time_off = TRUE
|
||||
|
||||
if ("pto_job_change")
|
||||
config.pto_job_change = TRUE
|
||||
if ("require_flavor")
|
||||
config.require_flavor = TRUE
|
||||
return 1
|
||||
|
||||
@@ -35,7 +35,12 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
|
||||
if (!shuttle.location) //leaving from the station
|
||||
//launch the pods!
|
||||
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
|
||||
for (var/EP in escape_pods)
|
||||
var/datum/shuttle/ferry/escape_pod/pod
|
||||
if(istype(escape_pods[EP], /datum/shuttle/ferry/escape_pod))
|
||||
pod = escape_pods[EP]
|
||||
else
|
||||
continue
|
||||
if (!pod.arming_controller || pod.arming_controller.armed)
|
||||
pod.launch(src)
|
||||
|
||||
@@ -57,7 +62,12 @@ var/global/datum/emergency_shuttle_controller/emergency_shuttle
|
||||
|
||||
//arm the escape pods
|
||||
if (evac)
|
||||
for (var/datum/shuttle/ferry/escape_pod/pod in escape_pods)
|
||||
for (var/EP in escape_pods)
|
||||
var/datum/shuttle/ferry/escape_pod/pod
|
||||
if(istype(escape_pods[EP], /datum/shuttle/ferry/escape_pod))
|
||||
pod = escape_pods[EP]
|
||||
else
|
||||
continue
|
||||
if (pod.arming_controller)
|
||||
pod.arming_controller.arm()
|
||||
|
||||
|
||||
@@ -12,6 +12,8 @@ SUBSYSTEM_DEF(nanoui)
|
||||
var/list/nano_asset_dirs = list(\
|
||||
"nano/css/",\
|
||||
"nano/images/",\
|
||||
"nano/images/status_icons/",\
|
||||
"nano/images/modular_computers/",
|
||||
"nano/js/",\
|
||||
"nano/templates/"\
|
||||
)
|
||||
|
||||
@@ -9,6 +9,10 @@ SUBSYSTEM_DEF(processing)
|
||||
var/stat_tag = "P" //Used for logging
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
var/process_proc = /datum/proc/process
|
||||
|
||||
var/debug_last_thing
|
||||
var/debug_original_process_proc // initial() does not work with procs
|
||||
|
||||
/datum/controller/subsystem/processing/stat_entry()
|
||||
..("[stat_tag]:[processing.len]")
|
||||
@@ -30,6 +34,32 @@ SUBSYSTEM_DEF(processing)
|
||||
if (MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/datum/controller/subsystem/processing/proc/toggle_debug()
|
||||
if(!check_rights(R_DEBUG))
|
||||
return
|
||||
|
||||
if(debug_original_process_proc)
|
||||
process_proc = debug_original_process_proc
|
||||
debug_original_process_proc = null
|
||||
else
|
||||
debug_original_process_proc = process_proc
|
||||
process_proc = /datum/proc/DebugSubsystemProcess
|
||||
|
||||
to_chat(usr, "[name] - Debug mode [debug_original_process_proc ? "en" : "dis"]abled")
|
||||
|
||||
/datum/proc/DebugSubsystemProcess(var/wait, var/times_fired, var/datum/controller/subsystem/processing/subsystem)
|
||||
subsystem.debug_last_thing = src
|
||||
var/start_tick = world.time
|
||||
var/start_tick_usage = world.tick_usage
|
||||
. = call(src, subsystem.debug_original_process_proc)(wait, times_fired)
|
||||
|
||||
var/tick_time = world.time - start_tick
|
||||
var/tick_use_limit = world.tick_usage - start_tick_usage - 100 // Current tick use - starting tick use - 100% (a full tick excess)
|
||||
if(tick_time > 0)
|
||||
crash_with("[log_info_line(subsystem.debug_last_thing)] slept during processing. Spent [tick_time] tick\s.")
|
||||
if(tick_use_limit > 0)
|
||||
crash_with("[log_info_line(subsystem.debug_last_thing)] took longer than a tick to process. Exceeded with [tick_use_limit]%")
|
||||
|
||||
/datum/proc/process()
|
||||
set waitfor = 0
|
||||
return PROCESS_KILL
|
||||
|
||||
Reference in New Issue
Block a user