This commit is contained in:
Cyberboss
2017-03-22 12:11:59 -04:00
parent 7e14ec75fc
commit a801187ede
18 changed files with 21 additions and 47 deletions
+8 -8
View File
@@ -348,7 +348,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
var/tick_precentage
var/tick_remaining
var/ran = TRUE //this is right
var/ran_non_SSticker = FALSE
var/ran_non_ticker = FALSE
var/bg_calc //have we swtiched current_tick_budget to background mode yet?
var/tick_usage
@@ -372,7 +372,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
//(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_SSticker)
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - world.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
@@ -394,7 +394,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
CURRENT_TICKLIMIT = world.tick_usage + tick_precentage
if (!(queue_node_flags & SS_TICKER))
ran_non_SSticker = TRUE
ran_non_ticker = TRUE
ran = TRUE
tick_usage = world.tick_usage
queue_node_paused = (queue_node.state == SS_PAUSED || queue_node.state == SS_PAUSING)
@@ -456,20 +456,20 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
//resets the queue, and all subsystems, while filtering out the subsystem lists
// called if any mc's queue procs runtime or exit improperly.
/datum/controller/master/proc/SoftReset(list/SSticker_SS, list/normal_SS, list/lobby_SS)
/datum/controller/master/proc/SoftReset(list/ticker_SS, list/normal_SS, list/lobby_SS)
. = 0
log_world("MC: SoftReset called, resetting MC queue state.")
if (!istype(subsystems) || !istype(SSticker_SS) || !istype(normal_SS) || !istype(lobby_SS))
log_world("MC: SoftReset: Bad list contents: '[subsystems]' '[SSticker_SS]' '[normal_SS]' '[lobby_SS]' Crashing!")
if (!istype(subsystems) || !istype(ticker_SS) || !istype(normal_SS) || !istype(lobby_SS))
log_world("MC: SoftReset: Bad list contents: '[subsystems]' '[ticker_SS]' '[normal_SS]' '[lobby_SS]' Crashing!")
return
var/subsystemstocheck = subsystems + SSticker_SS + normal_SS + lobby_SS
var/subsystemstocheck = subsystems + ticker_SS + normal_SS + lobby_SS
for (var/thing in subsystemstocheck)
var/datum/controller/subsystem/SS = thing
if (!SS || !istype(SS))
//list(SS) is so if a list makes it in the subsystem list, we remove the list, not the contents
subsystems -= list(SS)
SSticker_SS -= list(SS)
ticker_SS -= list(SS)
normal_SS -= list(SS)
lobby_SS -= list(SS)
log_world("MC: SoftReset: Found bad entry in subsystem list, '[SS]'")
+1
View File
@@ -34,6 +34,7 @@
PreInit()
// Used to initialize the subsystem BEFORE the map has loaded
// Called AFTER Recover if that is called
// Prefer to use Initialize if possible
/datum/controller/subsystem/proc/PreInit()
return
-3
View File
@@ -7,9 +7,6 @@ SUBSYSTEM(augury)
var/list/observers_given_action = list()
/datum/controller/subsystem/augury/New()
NEW_SS_GLOBAL(SSaugury)
/datum/controller/subsystem/augury/stat_entry(msg)
..("W:[watchers.len]|D:[doombringers.len]")
@@ -8,9 +8,6 @@ SUBSYSTEM(communications)
var/silicon_message_cooldown
var/nonsilicon_message_cooldown
/datum/controller/subsystem/communications/New()
NEW_SS_GLOBAL(SScommunications)
/datum/controller/subsystem/communications/proc/can_announce(mob/living/user, is_silicon)
if(is_silicon && silicon_message_cooldown > world.time)
. = FALSE
@@ -6,10 +6,6 @@ SUBSYSTEM(fire_burning)
var/list/currentrun = list()
var/list/processing = list()
/datum/controller/subsystem/fire_burning/New()
NEW_SS_GLOBAL(SSfire_burning)
/datum/controller/subsystem/fire_burning/stat_entry()
..("P:[processing.len]")
-3
View File
@@ -32,9 +32,6 @@ SUBSYSTEM(garbage)
var/list/qdel_list = list() // list of all types that have been qdel()eted
#endif
/datum/controller/subsystem/garbage/New()
NEW_SS_GLOBAL(SSgarbage)
/datum/controller/subsystem/garbage/stat_entry(msg)
msg += "Q:[queue.len]|D:[delslasttick]|G:[gcedlasttick]|"
msg += "GR:"
@@ -7,9 +7,6 @@ SUBSYSTEM(icon_smooth)
var/list/smooth_queue = list()
/datum/controller/subsystem/icon_smooth/New()
NEW_SS_GLOBAL(SSicon_smooth)
/datum/controller/subsystem/icon_smooth/fire()
while(smooth_queue.len)
var/atom/A = smooth_queue[smooth_queue.len]
-2
View File
@@ -6,8 +6,6 @@ SUBSYSTEM(inbounds)
var/list/processing = list()
var/list/currentrun = list()
/datum/controller/subsystem/inbounds/New()
NEW_SS_GLOBAL(SSinbounds)
/datum/controller/subsystem/inbounds/stat_entry()
..("P:[processing.len]")
-3
View File
@@ -8,9 +8,6 @@ SUBSYSTEM(ipintel)
var/list/cache = list()
/datum/controller/subsystem/ipintel/New()
NEW_SS_GLOBAL(SSipintel)
/datum/controller/subsystem/ipintel/Initialize(timeofday, zlevel)
enabled = 1
. = ..()
@@ -1,6 +1,6 @@
//Fires five times every second.
PROCESSING_SUBSYTEM(fastprocess)
PROCESSING_SUBSYSTEM(fastprocess)
name = "Fast Processing"
wait = 2
stat_tag = "FP"
@@ -1,5 +1,5 @@
PROCESSING_SUBSYTEM(flightpacks)
PROCESSING_SUBSYSTEM(flightpacks)
name = "Flightpack Movement"
priority = 30
wait = 2
+1 -1
View File
@@ -1,4 +1,4 @@
PROCESSING_SUBSYTEM(obj)
SUBSYSTEM(obj)
name = "Objects"
priority = 40
flags = SS_NO_INIT
@@ -3,9 +3,6 @@ SUBSYSTEM(server_maint)
wait = 6000
flags = SS_NO_TICK_CHECK
/datum/controller/subsystem/server_maint/New()
NEW_SS_GLOBAL(SSserver)
/datum/controller/subsystem/server_maint/Initialize(timeofday)
if (config.hub)
world.visibility = 1
+1 -1
View File
@@ -1,4 +1,4 @@
SUBSYTEM(sun)
SUBSYSTEM(sun)
name = "Sun"
wait = 600
init_order = 2
-3
View File
@@ -14,9 +14,6 @@ SUBSYSTEM(vote)
var/list/voting = list()
var/list/generated_actions = list()
/datum/controller/subsystem/vote/New()
NEW_SS_GLOBAL(SSvote)
/datum/controller/subsystem/vote/fire() //called by master_controller
if(mode)
time_remaining = round((started_time + config.vote_period - world.time)/10)