Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit a801187

Browse files
committed
Fix shit
1 parent 7e14ec7 commit a801187

18 files changed

Lines changed: 21 additions & 47 deletions

File tree

code/__DEFINES/MC.dm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define MC_AVERAGE_FAST(average, current) (0.7 * (average) + 0.3 * (current))
44
#define MC_AVERAGE(average, current) (0.8 * (average) + 0.2 * (current))
55
#define MC_AVERAGE_SLOW(average, current) (0.9 * (average) + 0.1 * (current))
6-
#define NEW_SS_GLOBAL2(varname) if(varname != src){if(istype(varname)){Recover();qdel(varname);}varname = src;}
6+
#define NEW_SS_GLOBAL(varname) if(varname != src){if(istype(varname)){Recover();qdel(varname);}varname = src;}
77

88
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = 1;Processor.processing += Datum}
99
#define STOP_PROCESSING(Processor, Datum) Datum.isprocessing = 0;Processor.processing -= Datum
@@ -70,14 +70,14 @@
7070

7171
#define SUBSYSTEM(X) var/datum/controller/subsystem/##X/SS##X;\
7272
/datum/controller/subsystem/##X/New(){\
73+
NEW_SS_GLOBAL(SS##X);\
7374
..();\
74-
NEW_SS_GLOBAL2(SS##X);\
7575
}\
7676
/datum/controller/subsystem/##X
7777

7878
#define PROCESSING_SUBSYSTEM(X) var/datum/controller/subsystem/processing/##X/SS##X;\
7979
/datum/controller/subsystem/processing/##X/New(){\
80+
NEW_SS_GLOBAL(SS##X);\
8081
..();\
81-
NEW_SS_GLOBAL2(SS##X);\
8282
}\
8383
/datum/controller/subsystem/processing/##X

code/controllers/master.dm

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
348348
var/tick_precentage
349349
var/tick_remaining
350350
var/ran = TRUE //this is right
351-
var/ran_non_SSticker = FALSE
351+
var/ran_non_ticker = FALSE
352352
var/bg_calc //have we swtiched current_tick_budget to background mode yet?
353353
var/tick_usage
354354

@@ -372,7 +372,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
372372
//(unless we haven't even ran anything this tick, since its unlikely they will ever be able run
373373
// in those cases, so we just let them run)
374374
if (queue_node_flags & SS_NO_TICK_CHECK)
375-
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - world.tick_usage && ran_non_SSticker)
375+
if (queue_node.tick_usage > TICK_LIMIT_RUNNING - world.tick_usage && ran_non_ticker)
376376
queue_node.queued_priority += queue_priority_count * 0.10
377377
queue_priority_count -= queue_node_priority
378378
queue_priority_count += queue_node.queued_priority
@@ -394,7 +394,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
394394
CURRENT_TICKLIMIT = world.tick_usage + tick_precentage
395395

396396
if (!(queue_node_flags & SS_TICKER))
397-
ran_non_SSticker = TRUE
397+
ran_non_ticker = TRUE
398398
ran = TRUE
399399
tick_usage = world.tick_usage
400400
queue_node_paused = (queue_node.state == SS_PAUSED || queue_node.state == SS_PAUSING)
@@ -456,20 +456,20 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
456456

457457
//resets the queue, and all subsystems, while filtering out the subsystem lists
458458
// called if any mc's queue procs runtime or exit improperly.
459-
/datum/controller/master/proc/SoftReset(list/SSticker_SS, list/normal_SS, list/lobby_SS)
459+
/datum/controller/master/proc/SoftReset(list/ticker_SS, list/normal_SS, list/lobby_SS)
460460
. = 0
461461
log_world("MC: SoftReset called, resetting MC queue state.")
462-
if (!istype(subsystems) || !istype(SSticker_SS) || !istype(normal_SS) || !istype(lobby_SS))
463-
log_world("MC: SoftReset: Bad list contents: '[subsystems]' '[SSticker_SS]' '[normal_SS]' '[lobby_SS]' Crashing!")
462+
if (!istype(subsystems) || !istype(ticker_SS) || !istype(normal_SS) || !istype(lobby_SS))
463+
log_world("MC: SoftReset: Bad list contents: '[subsystems]' '[ticker_SS]' '[normal_SS]' '[lobby_SS]' Crashing!")
464464
return
465-
var/subsystemstocheck = subsystems + SSticker_SS + normal_SS + lobby_SS
465+
var/subsystemstocheck = subsystems + ticker_SS + normal_SS + lobby_SS
466466

467467
for (var/thing in subsystemstocheck)
468468
var/datum/controller/subsystem/SS = thing
469469
if (!SS || !istype(SS))
470470
//list(SS) is so if a list makes it in the subsystem list, we remove the list, not the contents
471471
subsystems -= list(SS)
472-
SSticker_SS -= list(SS)
472+
ticker_SS -= list(SS)
473473
normal_SS -= list(SS)
474474
lobby_SS -= list(SS)
475475
log_world("MC: SoftReset: Found bad entry in subsystem list, '[SS]'")

code/controllers/subsystem.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
PreInit()
3535

3636
// Used to initialize the subsystem BEFORE the map has loaded
37+
// Called AFTER Recover if that is called
3738
// Prefer to use Initialize if possible
3839
/datum/controller/subsystem/proc/PreInit()
3940
return

code/controllers/subsystem/augury.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ SUBSYSTEM(augury)
77

88
var/list/observers_given_action = list()
99

10-
/datum/controller/subsystem/augury/New()
11-
NEW_SS_GLOBAL(SSaugury)
12-
1310
/datum/controller/subsystem/augury/stat_entry(msg)
1411
..("W:[watchers.len]|D:[doombringers.len]")
1512

code/controllers/subsystem/communications.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ SUBSYSTEM(communications)
88
var/silicon_message_cooldown
99
var/nonsilicon_message_cooldown
1010

11-
/datum/controller/subsystem/communications/New()
12-
NEW_SS_GLOBAL(SScommunications)
13-
1411
/datum/controller/subsystem/communications/proc/can_announce(mob/living/user, is_silicon)
1512
if(is_silicon && silicon_message_cooldown > world.time)
1613
. = FALSE

code/controllers/subsystem/fire_burning.dm

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ SUBSYSTEM(fire_burning)
66
var/list/currentrun = list()
77
var/list/processing = list()
88

9-
/datum/controller/subsystem/fire_burning/New()
10-
NEW_SS_GLOBAL(SSfire_burning)
11-
12-
139
/datum/controller/subsystem/fire_burning/stat_entry()
1410
..("P:[processing.len]")
1511

code/controllers/subsystem/garbage.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ SUBSYSTEM(garbage)
3232
var/list/qdel_list = list() // list of all types that have been qdel()eted
3333
#endif
3434

35-
/datum/controller/subsystem/garbage/New()
36-
NEW_SS_GLOBAL(SSgarbage)
37-
3835
/datum/controller/subsystem/garbage/stat_entry(msg)
3936
msg += "Q:[queue.len]|D:[delslasttick]|G:[gcedlasttick]|"
4037
msg += "GR:"

code/controllers/subsystem/icon_smooth.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ SUBSYSTEM(icon_smooth)
77

88
var/list/smooth_queue = list()
99

10-
/datum/controller/subsystem/icon_smooth/New()
11-
NEW_SS_GLOBAL(SSicon_smooth)
12-
1310
/datum/controller/subsystem/icon_smooth/fire()
1411
while(smooth_queue.len)
1512
var/atom/A = smooth_queue[smooth_queue.len]

code/controllers/subsystem/inbounds.dm

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ SUBSYSTEM(inbounds)
66
var/list/processing = list()
77
var/list/currentrun = list()
88

9-
/datum/controller/subsystem/inbounds/New()
10-
NEW_SS_GLOBAL(SSinbounds)
119
/datum/controller/subsystem/inbounds/stat_entry()
1210
..("P:[processing.len]")
1311

code/controllers/subsystem/ipintel.dm

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ SUBSYSTEM(ipintel)
88

99
var/list/cache = list()
1010

11-
/datum/controller/subsystem/ipintel/New()
12-
NEW_SS_GLOBAL(SSipintel)
13-
1411
/datum/controller/subsystem/ipintel/Initialize(timeofday, zlevel)
1512
enabled = 1
1613
. = ..()

0 commit comments

Comments
 (0)