Merge branch 'master' into custom_roundstart_items

This commit is contained in:
kevinz000
2017-08-31 18:23:56 -07:00
407 changed files with 7081 additions and 152390 deletions
+25 -17
View File
@@ -288,6 +288,7 @@
/datum/configuration/proc/Reload()
load("config/config.txt")
load("config/comms.txt", "comms")
load("config/game_options.txt","game_options")
load("config/policies.txt", "policies")
loadsql("config/dbconfig.txt")
@@ -444,27 +445,12 @@
fps = text2num(value)
if("automute_on")
automute_on = 1
if("comms_key")
global.comms_key = value
if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
global.comms_allowed = 1
if("cross_server_address")
cross_address = value
if(value != "byond:\\address:port")
cross_allowed = 1
if("cross_comms_name")
cross_name = value
if("panic_server_name")
if (value != "\[Put the name here\]")
panic_server_name = value
if("panic_server_address")
if(value != "byond://address:port")
panic_address = value
if("medal_hub_address")
global.medal_hub = value
if("medal_hub_password")
global.medal_pass = value
if("show_irc_name")
showircname = 1
if("see_own_notes")
@@ -549,8 +535,12 @@
if("irc_announce_new_game")
irc_announce_new_game = TRUE
else
WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'")
#if DM_VERSION > 511
#error Replace the line below with WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'")
#endif
HandleCommsConfig(name, value) //TODO: Deprecate this eventually
else if(type == "comms")
HandleCommsConfig(name, value)
else if(type == "game_options")
switch(name)
if("damage_multiplier")
@@ -790,6 +780,24 @@
if(fps <= 0)
fps = initial(fps)
/datum/configuration/proc/HandleCommsConfig(name, value)
switch(name)
if("comms_key")
global.comms_key = value
if(value != "default_pwd" && length(value) > 6) //It's the default value or less than 6 characters long, warn badmins
global.comms_allowed = TRUE
if("cross_server_address")
cross_address = value
if(value != "byond:\\address:port")
cross_allowed = TRUE
if("cross_comms_name")
cross_name = value
if("medal_hub_address")
global.medal_hub = value
if("medal_hub_password")
global.medal_pass = value
else
WRITE_FILE(GLOB.config_error_log, "Unknown setting in configuration: '[name]'")
/datum/configuration/proc/loadmaplist(filename)
var/list/Lines = world.file2list(filename)
+22 -18
View File
@@ -53,20 +53,24 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/static/restart_clear = 0
var/static/restart_timeout = 0
var/static/restart_count = 0
//current tick limit, assigned before running a subsystem.
//used by CHECK_TICK as well so that the procs subsystems call can obey that SS's tick limits
var/static/current_ticklimit = TICK_LIMIT_RUNNING
/datum/controller/master/New()
// Highlander-style: there can only be one! Kill off the old and replace it with the new.
subsystems = list()
var/list/_subsystems = list()
subsystems = _subsystems
if (Master != src)
if (istype(Master))
Recover()
qdel(Master)
else
init_subtypes(/datum/controller/subsystem, subsystems)
var/list/subsytem_types = subtypesof(/datum/controller/subsystem)
sortTim(subsytem_types, /proc/cmp_subsystem_init)
for(var/I in subsytem_types)
_subsystems += new I
Master = src
if(!GLOB)
@@ -131,7 +135,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
FireHim = TRUE
if(3)
msg = "The [BadBoy.name] subsystem seems to be destabilizing the MC and will be offlined."
BadBoy.flags_1 |= SS_NO_FIRE
BadBoy.flags |= SS_NO_FIRE
if(msg)
to_chat(GLOB.admins, "<span class='boldannounce'>[msg]</span>")
log_world(msg)
@@ -167,7 +171,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
// Initialize subsystems.
current_ticklimit = config.tick_limit_mc_init
for (var/datum/controller/subsystem/SS in subsystems)
if (SS.flags_1 & SS_NO_INIT)
if (SS.flags & SS_NO_INIT)
continue
SS.Initialize(REALTIMEOFDAY)
CHECK_TICK
@@ -232,13 +236,13 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
var/timer = world.time
for (var/thing in subsystems)
var/datum/controller/subsystem/SS = thing
if (SS.flags_1 & SS_NO_FIRE)
if (SS.flags & SS_NO_FIRE)
continue
SS.queued_time = 0
SS.queue_next = null
SS.queue_prev = null
SS.state = SS_IDLE
if (SS.flags_1 & SS_TICKER)
if (SS.flags & SS_TICKER)
tickersubsystems += SS
timer += world.tick_lag * rand(1, 5)
SS.next_fire = timer
@@ -284,7 +288,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//if there are mutiple sleeping procs running before us hogging the cpu, we have to run later
// because sleeps are processed in the order received, so longer sleeps are more likely to run first
if (world.tick_usage > TICK_LIMIT_MC)
if (TICK_USAGE > TICK_LIMIT_MC)
sleep_delta += 2
current_ticklimit = TICK_LIMIT_RUNNING * 0.5
sleep(world.tick_lag * (processing + sleep_delta))
@@ -293,7 +297,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
sleep_delta = MC_AVERAGE_FAST(sleep_delta, 0)
if (last_run + (world.tick_lag * processing) > world.time)
sleep_delta += 1
if (world.tick_usage > (TICK_LIMIT_MC*0.5))
if (TICK_USAGE > (TICK_LIMIT_MC*0.5))
sleep_delta += 1
if (make_runtime)
@@ -371,7 +375,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
continue
if (SS.next_fire > world.time)
continue
SS_flags = SS.flags_1
SS_flags = SS.flags
if (SS_flags & SS_NO_FIRE)
subsystemstocheck -= SS
continue
@@ -399,16 +403,16 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//keep running while we have stuff to run and we haven't gone over a tick
// this is so subsystems paused eariler can use tick time that later subsystems never used
while (ran && queue_head && world.tick_usage < TICK_LIMIT_MC)
while (ran && queue_head && TICK_USAGE < TICK_LIMIT_MC)
ran = FALSE
bg_calc = FALSE
current_tick_budget = queue_priority_count
queue_node = queue_head
while (queue_node)
if (ran && world.tick_usage > TICK_LIMIT_RUNNING)
if (ran && TICK_USAGE > TICK_LIMIT_RUNNING)
break
queue_node_flags = queue_node.flags_1
queue_node_flags = queue_node.flags
queue_node_priority = queue_node.queued_priority
//super special case, subsystems where we can't make them pause mid way through
@@ -417,7 +421,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
//(unless we haven't even ran anything this tick, since its unlikely they will ever be able run
// in those cases, so we just let them run)
if (queue_node_flags & SS_NO_TICK_CHECK)
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - world.tick_usage && ran_non_ticker)
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - TICK_USAGE && ran_non_ticker)
queue_node.queued_priority += queue_priority_count * 0.10
queue_priority_count -= queue_node_priority
queue_priority_count += queue_node.queued_priority
@@ -429,7 +433,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
current_tick_budget = queue_priority_count_bg
bg_calc = TRUE
tick_remaining = TICK_LIMIT_RUNNING - world.tick_usage
tick_remaining = TICK_LIMIT_RUNNING - TICK_USAGE
if (current_tick_budget > 0 && queue_node_priority > 0)
tick_precentage = tick_remaining / (current_tick_budget / queue_node_priority)
@@ -438,7 +442,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
tick_precentage = max(tick_precentage*0.5, tick_precentage-queue_node.tick_overrun)
current_ticklimit = round(world.tick_usage + tick_precentage)
current_ticklimit = round(TICK_USAGE + tick_precentage)
if (!(queue_node_flags & SS_TICKER))
ran_non_ticker = TRUE
@@ -449,9 +453,9 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
queue_node.state = SS_RUNNING
tick_usage = world.tick_usage
tick_usage = TICK_USAGE
var/state = queue_node.ignite(queue_node_paused)
tick_usage = world.tick_usage - tick_usage
tick_usage = TICK_USAGE - tick_usage
if (state == SS_RUNNING)
state = SS_IDLE
+6 -6
View File
@@ -6,7 +6,7 @@
var/wait = 20 //time to wait (in deciseconds) between each call to fire(). Must be a positive integer.
var/priority = 50 //When mutiple subsystems need to run in the same tick, higher priority subsystems will run first and be given a higher share of the tick before MC_TICK_CHECK triggers a sleep
var/flags_1 = 0 //see MC.dm in __DEFINES Most flags_1 must be set on world start to take full effect. (You can also restart the mc to force them to process again)
var/flags = 0 //see MC.dm in __DEFINES Most flags must be set on world start to take full effect. (You can also restart the mc to force them to process again)
//set to 0 to prevent fire() calls, mostly for admin use or subsystems that may be resumed later
// use the SS_NO_FIRE flag instead for systems that never fire to keep it from even being added to the list
@@ -61,13 +61,13 @@
//fire() seems more suitable. This is the procedure that gets called every 'wait' deciseconds.
//Sleeping in here prevents future fires until returned.
/datum/controller/subsystem/proc/fire(resumed = 0)
flags_1 |= SS_NO_FIRE
flags |= SS_NO_FIRE
throw EXCEPTION("Subsystem [src]([type]) does not fire() but did not set the SS_NO_FIRE flag. Please add the SS_NO_FIRE flag to any subsystem that doesn't fire so it doesn't get added to the processing list and waste cpu.")
/datum/controller/subsystem/Destroy()
dequeue()
can_fire = 0
flags_1 |= SS_NO_FIRE
flags |= SS_NO_FIRE
Master.subsystems -= src
@@ -76,14 +76,14 @@
// (this lets us sort our run order correctly without having to re-sort the entire already sorted list)
/datum/controller/subsystem/proc/enqueue()
var/SS_priority = priority
var/SS_flags = flags_1
var/SS_flags = flags
var/datum/controller/subsystem/queue_node
var/queue_node_priority
var/queue_node_flags
for (queue_node = Master.queue_head; queue_node; queue_node = queue_node.queue_next)
queue_node_priority = queue_node.queued_priority
queue_node_flags = queue_node.flags_1
queue_node_flags = queue_node.flags
if (queue_node_flags & SS_TICKER)
if (!(SS_flags & SS_TICKER))
@@ -170,7 +170,7 @@
if(can_fire && !(SS_NO_FIRE in flags_1))
if(can_fire && !(SS_NO_FIRE in flags))
msg = "[round(cost,1)]ms|[round(tick_usage,1)]%([round(tick_overrun,1)]%)|[round(ticks,0.1)]\t[msg]"
else
msg = "OFFLINE\t[msg]"
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(acid)
name = "Acid"
priority = 40
flags_1 = SS_NO_INIT|SS_BACKGROUND
flags = SS_NO_INIT|SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+15 -15
View File
@@ -11,7 +11,7 @@ SUBSYSTEM_DEF(air)
init_order = INIT_ORDER_AIR
priority = 20
wait = 5
flags_1 = SS_BACKGROUND
flags = SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/cost_turfs = 0
@@ -71,65 +71,65 @@ SUBSYSTEM_DEF(air)
/datum/controller/subsystem/air/fire(resumed = 0)
var/timer = world.tick_usage
var/timer = TICK_USAGE_REAL
if(currentpart == SSAIR_PIPENETS || !resumed)
process_pipenets(resumed)
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_pipenets = MC_AVERAGE(cost_pipenets, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_ATMOSMACHINERY
if(currentpart == SSAIR_ATMOSMACHINERY)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_atmos_machinery(resumed)
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_atmos_machinery = MC_AVERAGE(cost_atmos_machinery, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_ACTIVETURFS
if(currentpart == SSAIR_ACTIVETURFS)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_active_turfs(resumed)
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_turfs = MC_AVERAGE(cost_turfs, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_EXCITEDGROUPS
if(currentpart == SSAIR_EXCITEDGROUPS)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_excited_groups(resumed)
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_groups = MC_AVERAGE(cost_groups, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_HIGHPRESSURE
if(currentpart == SSAIR_HIGHPRESSURE)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_high_pressure_delta(resumed)
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_highpressure = MC_AVERAGE(cost_highpressure, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_HOTSPOTS
if(currentpart == SSAIR_HOTSPOTS)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_hotspots(resumed)
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_hotspots = MC_AVERAGE(cost_hotspots, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
currentpart = SSAIR_SUPERCONDUCTIVITY
if(currentpart == SSAIR_SUPERCONDUCTIVITY)
timer = world.tick_usage
timer = TICK_USAGE_REAL
process_super_conductivity(resumed)
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(world.tick_usage - timer))
cost_superconductivity = MC_AVERAGE(cost_superconductivity, TICK_DELTA_TO_MS(TICK_USAGE_REAL - timer))
if(state != SS_RUNNING)
return
resumed = 0
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(assets)
name = "Assets"
init_order = INIT_ORDER_ASSETS
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/cache = list()
var/list/preload = list()
+1 -1
View File
@@ -6,7 +6,7 @@
SUBSYSTEM_DEF(atoms)
name = "Atoms"
init_order = INIT_ORDER_ATOMS
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/initialized = INITIALIZATION_INSSATOMS
var/old_initialized
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(augury)
name = "Augury"
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/watchers = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(blackbox)
name = "Blackbox"
wait = 6000
flags_1 = SS_NO_TICK_CHECK | SS_NO_INIT
flags = SS_NO_TICK_CHECK | SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
init_order = INIT_ORDER_BLACKBOX
+1 -1
View File
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(communications)
name = "Communications"
flags_1 = SS_NO_INIT | SS_NO_FIRE
flags = SS_NO_INIT | SS_NO_FIRE
var/silicon_message_cooldown
var/nonsilicon_message_cooldown
+3 -3
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(dbcore)
name = "Database"
flags_1 = SS_NO_INIT|SS_NO_FIRE
flags = SS_NO_INIT|SS_NO_FIRE
init_order = INIT_ORDER_DBCORE
var/const/FAILED_DB_CONNECTION_CUTOFF = 5
@@ -251,7 +251,7 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
var/table
var/position //1-based index into item data
var/sql_type
var/flags_1
var/flags
var/length
var/max_length
//types
@@ -275,7 +275,7 @@ Delayed insert mode was removed in mysql 7 and only works with MyISAM type table
table = table_handler
position = position_handler
sql_type = type_handler
flags_1 = flag_handler
flags = flag_handler
length = length_handler
max_length = max_length_handler
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(disease)
name = "Disease"
flags_1 = SS_NO_FIRE | SS_NO_INIT
flags = SS_NO_FIRE | SS_NO_INIT
var/list/active_diseases = list() //List of Active disease in all mobs; purely for quick referencing.
var/list/diseases
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(explosion)
priority = 99
wait = 1
flags_1 = SS_TICKER|SS_NO_INIT
flags = SS_TICKER|SS_NO_INIT
var/list/explosions
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(fire_burning)
name = "Fire Burning"
priority = 40
flags_1 = SS_NO_INIT|SS_BACKGROUND
flags = SS_NO_INIT|SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+10 -10
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(garbage)
name = "Garbage"
priority = 15
wait = 20
flags_1 = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
var/collection_timeout = 3000// deciseconds to wait to let running procs finish before we just say fuck it and force del() the object
@@ -67,9 +67,9 @@ SUBSYSTEM_DEF(garbage)
HandleToBeQueued()
if(state == SS_RUNNING)
HandleQueue()
if (state == SS_PAUSED) //make us wait again before the next run.
state = SS_RUNNING
state = SS_RUNNING
//If you see this proc high on the profile, what you are really seeing is the garbage collection/soft delete overhead in byond.
//Don't attempt to optimize, not worth the effort.
@@ -114,7 +114,7 @@ SUBSYSTEM_DEF(garbage)
var/type = A.type
testing("GC: -- \ref[A] | [type] was unable to be GC'd and was deleted --")
didntgc["[type]"]++
HardDelete(A)
++delslasttick
@@ -147,15 +147,15 @@ SUBSYSTEM_DEF(garbage)
//this is purely to separate things profile wise.
/datum/controller/subsystem/garbage/proc/HardDelete(datum/A)
var/time = world.timeofday
var/tick = world.tick_usage
var/tick = TICK_USAGE
var/ticktime = world.time
var/type = A.type
var/refID = "\ref[A]"
del(A)
tick = (world.tick_usage-tick+((world.time-ticktime)/world.tick_lag*100))
tick = (TICK_USAGE-tick+((world.time-ticktime)/world.tick_lag*100))
if (tick > highest_del_tickusage)
highest_del_tickusage = tick
time = world.timeofday - time
@@ -167,7 +167,7 @@ SUBSYSTEM_DEF(garbage)
log_game("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete)")
message_admins("Error: [type]([refID]) took longer than 1 second to delete (took [time/10] seconds to delete).")
postpone(time/5)
/datum/controller/subsystem/garbage/proc/HardQueue(datum/A)
if (istype(A) && A.gc_destroyed == GC_CURRENTLY_BEING_QDELETED)
tobequeued += A
+1 -1
View File
@@ -3,7 +3,7 @@ SUBSYSTEM_DEF(icon_smooth)
init_order = INIT_ORDER_ICON_SMOOTHING
wait = 1
priority = 35
flags_1 = SS_TICKER
flags = SS_TICKER
var/list/smooth_queue = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(inbounds)
name = "Inbounds"
priority = 40
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
runlevels = RUNLEVEL_GAME
var/list/processing = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(ipintel)
name = "XKeyScore"
init_order = INIT_ORDER_XKEYSCORE
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/enabled = 0 //disable at round start to avoid checking reconnects
var/throttle = 0
var/errors = 0
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(job)
name = "Jobs"
init_order = INIT_ORDER_JOBS
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/occupations = list() //List of all jobs
var/list/name_occupations = list() //Dict of all jobs, keys are titles
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(language)
name = "Language"
init_order = INIT_ORDER_LANGUAGE
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
/datum/controller/subsystem/language/Initialize(timeofday)
for(var/L in subtypesof(/datum/language))
+1 -1
View File
@@ -6,7 +6,7 @@ SUBSYSTEM_DEF(lighting)
name = "Lighting"
wait = 2
init_order = INIT_ORDER_LIGHTING
flags_1 = SS_TICKER
flags = SS_TICKER
var/initialized = FALSE
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(machines)
name = "Machines"
init_order = INIT_ORDER_MACHINES
flags_1 = SS_KEEP_TIMING
flags = SS_KEEP_TIMING
var/list/processing = list()
var/list/currentrun = list()
var/list/powernets = list()
+2 -2
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(mapping)
name = "Mapping"
init_order = INIT_ORDER_MAPPING
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/nuke_tiles = list()
var/list/nuke_threats = list()
@@ -84,7 +84,7 @@ SUBSYSTEM_DEF(mapping)
C.update_icon()
/datum/controller/subsystem/mapping/Recover()
flags_1 |= SS_NO_INIT
flags |= SS_NO_INIT
map_templates = SSmapping.map_templates
ruins_templates = SSmapping.ruins_templates
space_ruins_templates = SSmapping.space_ruins_templates
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(minimap)
name = "Minimap"
init_order = INIT_ORDER_MINIMAP
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/const/MINIMAP_SIZE = 2048
var/const/TILE_SIZE = 8
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(mobs)
name = "Mobs"
priority = 100
flags_1 = SS_KEEP_TIMING|SS_NO_INIT
flags = SS_KEEP_TIMING|SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+1 -1
View File
@@ -5,7 +5,7 @@
SUBSYSTEM_DEF(npcpool)
name = "NPC Pool"
flags_1 = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
priority = 20
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
+1 -1
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(orbit)
name = "Orbits"
priority = 35
wait = 2
flags_1 = SS_NO_INIT|SS_TICKER
flags = SS_NO_INIT|SS_TICKER
var/list/currentrun = list()
var/list/processing = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(pai)
name = "pAI"
flags_1 = SS_NO_INIT|SS_NO_FIRE
flags = SS_NO_INIT|SS_NO_FIRE
var/list/candidates = list()
var/ghost_spam = FALSE
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(parallax)
name = "Parallax"
wait = 2
flags_1 = SS_POST_FIRE_TIMING | SS_BACKGROUND | SS_NO_INIT
flags = SS_POST_FIRE_TIMING | SS_BACKGROUND | SS_NO_INIT
priority = 65
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/list/currentrun
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(persistence)
name = "Persistence"
init_order = INIT_ORDER_PERSISTENCE
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/savefile/secret_satchels
var/list/satchel_blacklist = list() //this is a typecache
var/list/new_secret_satchels = list() //these are objects
+1 -1
View File
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(ping)
name = "Ping"
wait = 6
flags_1 = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
flags = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
priority = 10
var/list/currentrun
@@ -2,5 +2,5 @@ PROCESSING_SUBSYSTEM_DEF(fields)
name = "Fields"
wait = 2
priority = 40
flags_1 = SS_KEEP_TIMING | SS_NO_INIT
flags = SS_KEEP_TIMING | SS_NO_INIT
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
@@ -3,7 +3,7 @@ PROCESSING_SUBSYSTEM_DEF(flightpacks)
priority = 30
wait = 2
stat_tag = "FM"
flags_1 = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
flags = SS_NO_INIT|SS_TICKER|SS_KEEP_TIMING
var/flightsuit_processing = FLIGHTSUIT_PROCESSING_FULL
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(obj)
name = "Objects"
priority = 40
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
var/list/processing = list()
var/list/currentrun = list()
@@ -1,6 +1,6 @@
PROCESSING_SUBSYSTEM_DEF(overlays)
name = "Overlay"
flags_1 = SS_TICKER
flags = SS_TICKER
wait = 1
priority = 500
init_order = INIT_ORDER_OVERLAY
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(processing)
name = "Processing"
priority = 25
flags_1 = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT
wait = 10
var/stat_tag = "P" //Used for logging
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(radio)
name = "Radio"
flags_1 = SS_NO_FIRE|SS_NO_INIT
flags = SS_NO_FIRE|SS_NO_INIT
var/list/datum/radio_frequency/frequencies = list()
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(religion)
name = "Religion"
flags_1 = SS_NO_FIRE|SS_NO_INIT
flags = SS_NO_FIRE|SS_NO_INIT
var/religion
var/deity
+2 -2
View File
@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(server_maint)
name = "Server Tasks"
wait = 6
flags_1 = SS_POST_FIRE_TIMING
flags = SS_POST_FIRE_TIMING
priority = 10
init_order = INIT_ORDER_SERVER_MAINT
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
@@ -33,7 +33,7 @@ SUBSYSTEM_DEF(server_maint)
qdel(C)
if (!(!C || world.time - C.connection_time < PING_BUFFER_TIME || C.inactivity >= (wait-1)))
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*world.tick_usage/100]")
winset(C, null, "command=.update_ping+[world.time+world.tick_lag*TICK_USAGE_REAL/100]")
if (MC_TICK_CHECK) //one day, when ss13 has 1000 people per server, you guys are gonna be glad I added this tick check
return
+1 -1
View File
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(shuttle)
name = "Shuttle"
wait = 10
init_order = INIT_ORDER_SHUTTLE
flags_1 = SS_KEEP_TIMING|SS_NO_TICK_CHECK
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME
var/list/mobile = list()
+1 -1
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(spacedrift)
name = "Space Drift"
priority = 30
wait = 5
flags_1 = SS_NO_INIT|SS_KEEP_TIMING
flags = SS_NO_INIT|SS_KEEP_TIMING
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun = list()
+1 -1
View File
@@ -5,7 +5,7 @@
SUBSYSTEM_DEF(squeak)
name = "Squeak"
init_order = INIT_ORDER_SQUEAK
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/exposed_wires = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(stickyban)
name = "Sticky Ban"
init_order = INIT_ORDER_STICKY_BAN
flags_1 = SS_NO_FIRE
flags = SS_NO_FIRE
var/list/cache = list()
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(sun)
name = "Sun"
wait = 600
flags_1 = SS_NO_TICK_CHECK|SS_NO_INIT
flags = SS_NO_TICK_CHECK|SS_NO_INIT
var/angle
var/dx
var/dy
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(tgui)
name = "tgui"
wait = 9
flags_1 = SS_NO_INIT
flags = SS_NO_INIT
priority = 110
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
+1 -1
View File
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(throwing)
name = "Throwing"
priority = 25
wait = 1
flags_1 = SS_NO_INIT|SS_KEEP_TIMING|SS_TICKER
flags = SS_NO_INIT|SS_KEEP_TIMING|SS_TICKER
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
var/list/currentrun
+1 -1
View File
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(ticker)
init_order = INIT_ORDER_TICKER
priority = 200
flags_1 = SS_KEEP_TIMING
flags = SS_KEEP_TIMING
runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME
var/current_state = GAME_STATE_STARTUP //state of current round (used by process()) Use the defines GAME_STATE_* !
+1 -1
View File
@@ -1,7 +1,7 @@
SUBSYSTEM_DEF(time_track)
name = "Time Tracking"
wait = 600
flags_1 = SS_NO_INIT|SS_NO_TICK_CHECK
flags = SS_NO_INIT|SS_NO_TICK_CHECK
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
var/time_dilation_current = 0
+20 -20
View File
@@ -7,7 +7,7 @@ SUBSYSTEM_DEF(timer)
wait = 1 //SS_TICKER subsystem, so wait is in ticks
init_order = INIT_ORDER_TIMER
flags_1 = SS_TICKER|SS_NO_INIT
flags = SS_TICKER|SS_NO_INIT
var/list/datum/timedevent/processing = list()
var/list/hashes = list()
@@ -215,7 +215,7 @@ SUBSYSTEM_DEF(timer)
var/datum/callback/callBack
var/timeToRun
var/hash
var/list/flags_1
var/list/flags
var/spent = FALSE //set to true right before running.
var/name //for easy debugging.
//cicular doublely linked list
@@ -224,16 +224,16 @@ SUBSYSTEM_DEF(timer)
var/static/nextid = 1
/datum/timedevent/New(datum/callback/callBack, timeToRun, flags_1, hash)
/datum/timedevent/New(datum/callback/callBack, timeToRun, flags, hash)
id = TIMER_ID_NULL
src.callBack = callBack
src.timeToRun = timeToRun
src.flags_1 = flags_1
src.flags = flags
src.hash = hash
if (flags_1 & TIMER_UNIQUE)
if (flags & TIMER_UNIQUE)
SStimer.hashes[hash] = src
if (flags_1 & TIMER_STOPPABLE)
if (flags & TIMER_STOPPABLE)
do
if (nextid >= TIMER_ID_MAX)
nextid = 1
@@ -241,12 +241,12 @@ SUBSYSTEM_DEF(timer)
while(SStimer.timer_id_dict["timerid" + num2text(id, 8)])
SStimer.timer_id_dict["timerid" + num2text(id, 8)] = src
name = "Timer: " + num2text(id, 8) + ", TTR: [timeToRun], Flags: [jointext(bitfield2list(flags_1, list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT")), ", ")], callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""])"
name = "Timer: " + num2text(id, 8) + ", TTR: [timeToRun], Flags: [jointext(bitfield2list(flags, list("TIMER_UNIQUE", "TIMER_OVERRIDE", "TIMER_CLIENT_TIME", "TIMER_STOPPABLE", "TIMER_NO_HASH_WAIT")), ", ")], callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""])"
if (callBack.object != GLOBAL_PROC)
LAZYADD(callBack.object.active_timers, src)
if (flags_1 & TIMER_CLIENT_TIME)
if (flags & TIMER_CLIENT_TIME)
//sorted insert
var/list/ctts = SStimer.clienttime_timers
var/cttl = length(ctts)
@@ -291,7 +291,7 @@ SUBSYSTEM_DEF(timer)
/datum/timedevent/Destroy()
..()
if (flags_1 & TIMER_UNIQUE)
if (flags & TIMER_UNIQUE)
SStimer.hashes -= hash
@@ -301,10 +301,10 @@ SUBSYSTEM_DEF(timer)
callBack = null
if (flags_1 & TIMER_STOPPABLE)
if (flags & TIMER_STOPPABLE)
SStimer.timer_id_dict -= "timerid" + num2text(id, 8)
if (flags_1 & TIMER_CLIENT_TIME)
if (flags & TIMER_CLIENT_TIME)
SStimer.clienttime_timers -= src
return QDEL_HINT_IWILLGC
@@ -346,7 +346,7 @@ SUBSYSTEM_DEF(timer)
else
. = "[callBack.object.type]"
/proc/addtimer(datum/callback/callback, wait, flags_1)
/proc/addtimer(datum/callback/callback, wait, flags)
if (!callback)
return
@@ -354,12 +354,12 @@ SUBSYSTEM_DEF(timer)
var/hash
if (flags_1 & TIMER_UNIQUE)
if (flags & TIMER_UNIQUE)
var/list/hashlist
if(flags_1 & TIMER_NO_HASH_WAIT)
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, flags_1 & TIMER_CLIENT_TIME)
if(flags & TIMER_NO_HASH_WAIT)
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, flags & TIMER_CLIENT_TIME)
else
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags_1 & TIMER_CLIENT_TIME)
hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, wait, flags & TIMER_CLIENT_TIME)
hashlist += callback.arguments
hash = hashlist.Join("|||||||")
@@ -370,19 +370,19 @@ SUBSYSTEM_DEF(timer)
SStimer.hashes -= hash
else
if (flags_1 & TIMER_OVERRIDE)
if (flags & TIMER_OVERRIDE)
qdel(hash_timer)
else
if (hash_timer.flags_1 & TIMER_STOPPABLE)
if (hash_timer.flags & TIMER_STOPPABLE)
. = hash_timer.id
return
var/timeToRun = world.time + wait
if (flags_1 & TIMER_CLIENT_TIME)
if (flags & TIMER_CLIENT_TIME)
timeToRun = REALTIMEOFDAY + wait
var/datum/timedevent/timer = new(callback, timeToRun, flags_1, hash)
var/datum/timedevent/timer = new(callback, timeToRun, flags, hash)
return timer.id
/proc/deltimer(id)
+1 -1
View File
@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(title)
name = "Title Screen"
flags_1 = SS_NO_FIRE|SS_NO_INIT
flags = SS_NO_FIRE|SS_NO_INIT
var/file_path
var/icon/icon
+1 -1
View File
@@ -2,7 +2,7 @@ SUBSYSTEM_DEF(vote)
name = "Vote"
wait = 10
flags_1 = SS_KEEP_TIMING|SS_NO_INIT
flags = SS_KEEP_TIMING|SS_NO_INIT
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
+1 -1
View File
@@ -1,7 +1,7 @@
//Used for all kinds of weather, ex. lavaland ash storms.
SUBSYSTEM_DEF(weather)
name = "Weather"
flags_1 = SS_BACKGROUND
flags = SS_BACKGROUND
wait = 10
runlevels = RUNLEVEL_GAME
var/list/processing = list()