From da2bde0e5a433e2d0bbc26f5c3e8fdf2cbb04687 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 23 Apr 2017 01:35:55 -0500 Subject: [PATCH] Quite possibly the smallest microoptimization here (#519) --- code/controllers/subsystem.dm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index e4dc9f833e..dfa9984f38 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -145,10 +145,11 @@ /datum/controller/subsystem/proc/pause() . = 1 - if (state == SS_RUNNING) - state = SS_PAUSED - else if (state == SS_SLEEPING) - state = SS_PAUSING + switch(state) + if(SS_RUNNING) + state = SS_PAUSED + if(SS_SLEEPING) + state = SS_PAUSING //used to initialize the subsystem AFTER the map has loaded @@ -208,4 +209,4 @@ next_fire = world.time + wait if ("queued_priority") //editing this breaks things. return 0 - . = ..() \ No newline at end of file + . = ..()