diff --git a/code/controllers/subsystem.dm b/code/controllers/subsystem.dm index 0c1f8411fc..eee6945c41 100644 --- a/code/controllers/subsystem.dm +++ b/code/controllers/subsystem.dm @@ -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]" diff --git a/code/controllers/subsystem/acid.dm b/code/controllers/subsystem/acid.dm index e1528f458d..a83afb3923 100644 --- a/code/controllers/subsystem/acid.dm +++ b/code/controllers/subsystem/acid.dm @@ -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() diff --git a/code/controllers/subsystem/assets.dm b/code/controllers/subsystem/assets.dm index d4a2407309..fd27c9424f 100644 --- a/code/controllers/subsystem/assets.dm +++ b/code/controllers/subsystem/assets.dm @@ -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() diff --git a/code/controllers/subsystem/atoms.dm b/code/controllers/subsystem/atoms.dm index b7ac19ad1f..aeadfcf94e 100644 --- a/code/controllers/subsystem/atoms.dm +++ b/code/controllers/subsystem/atoms.dm @@ -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 diff --git a/code/controllers/subsystem/augury.dm b/code/controllers/subsystem/augury.dm index 386345a728..32086f52ed 100644 --- a/code/controllers/subsystem/augury.dm +++ b/code/controllers/subsystem/augury.dm @@ -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() diff --git a/code/controllers/subsystem/blackbox.dm b/code/controllers/subsystem/blackbox.dm index 7fbbaa8795..74536c7f0f 100644 --- a/code/controllers/subsystem/blackbox.dm +++ b/code/controllers/subsystem/blackbox.dm @@ -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 diff --git a/code/controllers/subsystem/communications.dm b/code/controllers/subsystem/communications.dm index d3ad7d1c96..7a8748c20f 100644 --- a/code/controllers/subsystem/communications.dm +++ b/code/controllers/subsystem/communications.dm @@ -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 diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm index 35f3d39cd4..864274b8fb 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -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 diff --git a/code/controllers/subsystem/disease.dm b/code/controllers/subsystem/disease.dm index 75ff3af534..c75063c256 100644 --- a/code/controllers/subsystem/disease.dm +++ b/code/controllers/subsystem/disease.dm @@ -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 diff --git a/code/controllers/subsystem/explosion.dm b/code/controllers/subsystem/explosion.dm index fcacba2519..1e3a6f8a6e 100644 --- a/code/controllers/subsystem/explosion.dm +++ b/code/controllers/subsystem/explosion.dm @@ -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 diff --git a/code/controllers/subsystem/fire_burning.dm b/code/controllers/subsystem/fire_burning.dm index 2caa2fd89c..73358000f1 100644 --- a/code/controllers/subsystem/fire_burning.dm +++ b/code/controllers/subsystem/fire_burning.dm @@ -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() diff --git a/code/controllers/subsystem/icon_smooth.dm b/code/controllers/subsystem/icon_smooth.dm index 11657c76dc..84df089973 100644 --- a/code/controllers/subsystem/icon_smooth.dm +++ b/code/controllers/subsystem/icon_smooth.dm @@ -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() diff --git a/code/controllers/subsystem/inbounds.dm b/code/controllers/subsystem/inbounds.dm index ab736ac2d1..16e0f53028 100644 --- a/code/controllers/subsystem/inbounds.dm +++ b/code/controllers/subsystem/inbounds.dm @@ -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() diff --git a/code/controllers/subsystem/ipintel.dm b/code/controllers/subsystem/ipintel.dm index afde42c7d8..fca394924d 100644 --- a/code/controllers/subsystem/ipintel.dm +++ b/code/controllers/subsystem/ipintel.dm @@ -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 diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 5f50b3dfcf..f28373ef22 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -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 diff --git a/code/controllers/subsystem/language.dm b/code/controllers/subsystem/language.dm index 6d87b0ad9e..e80a7096d8 100644 --- a/code/controllers/subsystem/language.dm +++ b/code/controllers/subsystem/language.dm @@ -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)) diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm index 3de7b92cad..78e8b150c3 100644 --- a/code/controllers/subsystem/lighting.dm +++ b/code/controllers/subsystem/lighting.dm @@ -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 diff --git a/code/controllers/subsystem/machines.dm b/code/controllers/subsystem/machines.dm index d6c6e8662d..eab61d4ef9 100644 --- a/code/controllers/subsystem/machines.dm +++ b/code/controllers/subsystem/machines.dm @@ -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() diff --git a/code/controllers/subsystem/mapping.dm b/code/controllers/subsystem/mapping.dm index df13c57078..2c36e10d31 100644 --- a/code/controllers/subsystem/mapping.dm +++ b/code/controllers/subsystem/mapping.dm @@ -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 diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index ef15d49ad7..10c6f8e5c4 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -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 diff --git a/code/controllers/subsystem/mobs.dm b/code/controllers/subsystem/mobs.dm index 8999f420b5..cbe9d5c245 100644 --- a/code/controllers/subsystem/mobs.dm +++ b/code/controllers/subsystem/mobs.dm @@ -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() diff --git a/code/controllers/subsystem/npcpool.dm b/code/controllers/subsystem/npcpool.dm index 4491cb14ce..4f875721e8 100644 --- a/code/controllers/subsystem/npcpool.dm +++ b/code/controllers/subsystem/npcpool.dm @@ -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 diff --git a/code/controllers/subsystem/orbit.dm b/code/controllers/subsystem/orbit.dm index 421a312e4f..6184bb005b 100644 --- a/code/controllers/subsystem/orbit.dm +++ b/code/controllers/subsystem/orbit.dm @@ -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() diff --git a/code/controllers/subsystem/pai.dm b/code/controllers/subsystem/pai.dm index acdd2ff6ac..2a1a04e21d 100644 --- a/code/controllers/subsystem/pai.dm +++ b/code/controllers/subsystem/pai.dm @@ -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 diff --git a/code/controllers/subsystem/parallax.dm b/code/controllers/subsystem/parallax.dm index 678b96adaf..39d07ee676 100644 --- a/code/controllers/subsystem/parallax.dm +++ b/code/controllers/subsystem/parallax.dm @@ -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 diff --git a/code/controllers/subsystem/persistence.dm b/code/controllers/subsystem/persistence.dm index 5dd47ca999..05062a6314 100644 --- a/code/controllers/subsystem/persistence.dm +++ b/code/controllers/subsystem/persistence.dm @@ -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 diff --git a/code/controllers/subsystem/ping.dm b/code/controllers/subsystem/ping.dm index 01576084bc..a6b444c4e7 100644 --- a/code/controllers/subsystem/ping.dm +++ b/code/controllers/subsystem/ping.dm @@ -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 diff --git a/code/controllers/subsystem/processing/fields.dm b/code/controllers/subsystem/processing/fields.dm index eb839619ad..6a878fa142 100644 --- a/code/controllers/subsystem/processing/fields.dm +++ b/code/controllers/subsystem/processing/fields.dm @@ -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 diff --git a/code/controllers/subsystem/processing/flightpacks.dm b/code/controllers/subsystem/processing/flightpacks.dm index 253ee294a9..1d85811878 100644 --- a/code/controllers/subsystem/processing/flightpacks.dm +++ b/code/controllers/subsystem/processing/flightpacks.dm @@ -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 diff --git a/code/controllers/subsystem/processing/obj.dm b/code/controllers/subsystem/processing/obj.dm index 3f602dc32c..29fe277232 100644 --- a/code/controllers/subsystem/processing/obj.dm +++ b/code/controllers/subsystem/processing/obj.dm @@ -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() diff --git a/code/controllers/subsystem/processing/overlays.dm b/code/controllers/subsystem/processing/overlays.dm index ad84295b52..fba4ebcaf0 100644 --- a/code/controllers/subsystem/processing/overlays.dm +++ b/code/controllers/subsystem/processing/overlays.dm @@ -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 diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm index 4c77cfb2e0..0586975866 100644 --- a/code/controllers/subsystem/processing/processing.dm +++ b/code/controllers/subsystem/processing/processing.dm @@ -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 diff --git a/code/controllers/subsystem/radio.dm b/code/controllers/subsystem/radio.dm index 57b34dae33..de605cb554 100644 --- a/code/controllers/subsystem/radio.dm +++ b/code/controllers/subsystem/radio.dm @@ -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() diff --git a/code/controllers/subsystem/religion.dm b/code/controllers/subsystem/religion.dm index 477f7411f2..bba7dd082e 100644 --- a/code/controllers/subsystem/religion.dm +++ b/code/controllers/subsystem/religion.dm @@ -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 diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm index 412af41381..ea91e8a688 100644 --- a/code/controllers/subsystem/shuttle.dm +++ b/code/controllers/subsystem/shuttle.dm @@ -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() diff --git a/code/controllers/subsystem/spacedrift.dm b/code/controllers/subsystem/spacedrift.dm index 1944c3f279..8fe7cbe048 100644 --- a/code/controllers/subsystem/spacedrift.dm +++ b/code/controllers/subsystem/spacedrift.dm @@ -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() diff --git a/code/controllers/subsystem/squeak.dm b/code/controllers/subsystem/squeak.dm index f9a291129a..d94efd0a4a 100644 --- a/code/controllers/subsystem/squeak.dm +++ b/code/controllers/subsystem/squeak.dm @@ -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() diff --git a/code/controllers/subsystem/stickyban.dm b/code/controllers/subsystem/stickyban.dm index 4136f731df..8251df0039 100644 --- a/code/controllers/subsystem/stickyban.dm +++ b/code/controllers/subsystem/stickyban.dm @@ -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() diff --git a/code/controllers/subsystem/sun.dm b/code/controllers/subsystem/sun.dm index ba71d86e1a..7a3528cc3d 100644 --- a/code/controllers/subsystem/sun.dm +++ b/code/controllers/subsystem/sun.dm @@ -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 diff --git a/code/controllers/subsystem/tgui.dm b/code/controllers/subsystem/tgui.dm index 11dbb6d081..52fd286eed 100644 --- a/code/controllers/subsystem/tgui.dm +++ b/code/controllers/subsystem/tgui.dm @@ -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 diff --git a/code/controllers/subsystem/throwing.dm b/code/controllers/subsystem/throwing.dm index f1d4b88f77..f245b0766c 100644 --- a/code/controllers/subsystem/throwing.dm +++ b/code/controllers/subsystem/throwing.dm @@ -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 diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index e9a356ef86..d196c9cb10 100755 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -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_* ! diff --git a/code/controllers/subsystem/time_track.dm b/code/controllers/subsystem/time_track.dm index 0e5a473611..cb190206b7 100644 --- a/code/controllers/subsystem/time_track.dm +++ b/code/controllers/subsystem/time_track.dm @@ -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 diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 8a0dfe1f0d..c8d5b69e61 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -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) diff --git a/code/controllers/subsystem/title.dm b/code/controllers/subsystem/title.dm index 11511608cd..4f1dbc37c7 100644 --- a/code/controllers/subsystem/title.dm +++ b/code/controllers/subsystem/title.dm @@ -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 diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 7126d93a47..0dbc7c5d3a 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -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 diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm index eb49568810..88102e260c 100644 --- a/code/controllers/subsystem/weather.dm +++ b/code/controllers/subsystem/weather.dm @@ -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() diff --git a/tgstation.dme b/tgstation.dme index 4c84dc7a10..1e1c153493 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -21,6 +21,7 @@ #include "code\__DATASTRUCTURES\linked_lists.dm" #include "code\__DATASTRUCTURES\priority_queue.dm" #include "code\__DATASTRUCTURES\stacks.dm" +#include "code\__DEFINES\_tick.dm" #include "code\__DEFINES\access.dm" #include "code\__DEFINES\admin.dm" #include "code\__DEFINES\antagonists.dm" @@ -71,7 +72,6 @@ #include "code\__DEFINES\status_effects.dm" #include "code\__DEFINES\subsystems.dm" #include "code\__DEFINES\tgui.dm" -#include "code\__DEFINES\tick.dm" #include "code\__DEFINES\time.dm" #include "code\__DEFINES\typeids.dm" #include "code\__DEFINES\voreconstants.dm"