Moves init_order to defines, moves SSevents above ticker.

This commit is contained in:
Jack Edge
2017-04-20 17:31:06 +01:00
parent 133173c67c
commit a76d4374c1
27 changed files with 54 additions and 35 deletions

View File

@@ -19,3 +19,26 @@
//For servers that can't do with any additional lag, set this to none in flightpacks.dm in subsystem/processing.
#define FLIGHTSUIT_PROCESSING_NONE 0
#define FLIGHTSUIT_PROCESSING_FULL 1
// Subsystem init_order, from highest priority to lowest priority
// The numbers just define the ordering, they are meaningless otherwise.
#define INIT_ORDER_JOBS 15
#define INIT_ORDER_EVENTS 14
#define INIT_ORDER_TICKER 13
#define INIT_ORDER_MAPPING 12
#define INIT_ORDER_ATOMS 11
#define INIT_ORDER_MACHINES 9
#define INIT_ORDER_SHUTTLE 3
#define INIT_ORDER_TIMER 1
#define INIT_ORDER_DEFAULT 0
#define INIT_ORDER_AIR -1
#define INIT_ORDER_MINIMAP -2
#define INIT_ORDER_ASSETS -3
#define INIT_ORDER_ICON_SMOOTHING -5
#define INIT_ORDER_OVERLAY -6
#define INIT_ORDER_XKEYSCORE -10
#define INIT_ORDER_STICKY_BAN -10
#define INIT_ORDER_LIGHTING -20
#define INIT_ORDER_SQUEAK -40
#define INIT_ORDER_PERSISTENCE -100

View File

@@ -2,7 +2,7 @@
/datum/controller/subsystem
// Metadata; you should define these.
name = "fire coderbus" //name of the subsystem
var/init_order = 0 //order of initialization. Higher numbers are initialized first, lower numbers later. Can be decimal and negative values.
var/init_order = INIT_ORDER_DEFAULT //order of initialization. Higher numbers are initialized first, lower numbers later. Use defines in __DEFINES/subsystems.dm for easy understanding of order.
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

View File

@@ -8,7 +8,7 @@
SUBSYSTEM_DEF(air)
name = "Air"
init_order = -1
init_order = INIT_ORDER_AIR
priority = 20
wait = 5
flags = SS_BACKGROUND

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(assets)
name = "Assets"
init_order = -3
init_order = INIT_ORDER_ASSETS
flags = SS_NO_FIRE
var/list/cache = list()

View File

@@ -4,7 +4,7 @@
SUBSYSTEM_DEF(atoms)
name = "Atoms"
init_order = 11
init_order = INIT_ORDER_ATOMS
flags = SS_NO_FIRE
var/initialized = INITIALIZATION_INSSATOMS

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(events)
name = "Events"
init_order = 6
init_order = INIT_ORDER_EVENTS
var/list/control = list() //list of all datum/round_event_control. Used for selecting events based on weight and occurrences.
var/list/running = list() //list of all existing /datum/round_event

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(icon_smooth)
name = "Icon Smoothing"
init_order = -5
init_order = INIT_ORDER_ICON_SMOOTHING
wait = 1
priority = 35
flags = SS_TICKER

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(ipintel)
name = "XKeyScore"
init_order = -10
init_order = INIT_ORDER_XKEYSCORE
flags = SS_NO_FIRE
var/enabled = 0 //disable at round start to avoid checking reconnects
var/throttle = 0

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(job)
name = "Jobs"
init_order = 14
init_order = INIT_ORDER_JOBS
flags = SS_NO_FIRE
var/list/occupations = list() //List of all jobs

View File

@@ -5,7 +5,7 @@ GLOBAL_LIST_EMPTY(lighting_update_objects) // List of lighting objects queued fo
SUBSYSTEM_DEF(lighting)
name = "Lighting"
wait = 2
init_order = -20
init_order = INIT_ORDER_LIGHTING
flags = SS_TICKER
var/initialized = FALSE

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(machines)
name = "Machines"
init_order = 9
init_order = INIT_ORDER_MACHINES
flags = SS_KEEP_TIMING
var/list/processing = list()
var/list/currentrun = list()

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(mapping)
name = "Mapping"
init_order = 12
init_order = INIT_ORDER_MAPPING
flags = SS_NO_FIRE
var/list/nuke_tiles = list()

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(minimap)
name = "Minimap"
init_order = -2
init_order = INIT_ORDER_MINIMAP
flags = SS_NO_FIRE
var/const/MINIMAP_SIZE = 2048
var/const/TILE_SIZE = 8

View File

@@ -1,6 +1,5 @@
SUBSYSTEM_DEF(mobs)
name = "Mobs"
init_order = 4
priority = 100
flags = SS_KEEP_TIMING|SS_NO_INIT

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(persistence)
name = "Persistence"
init_order = -100
init_order = INIT_ORDER_PERSISTENCE
flags = SS_NO_FIRE
var/savefile/secret_satchels
var/list/satchel_blacklist = list() //this is a typecache

View File

@@ -3,7 +3,7 @@ PROCESSING_SUBSYSTEM_DEF(overlays)
flags = SS_TICKER|SS_FIRE_IN_LOBBY
wait = 1
priority = 500
init_order = -6
init_order = INIT_ORDER_OVERLAY
stat_tag = "Ov"
currentrun = null

View File

@@ -1,6 +1,5 @@
SUBSYSTEM_DEF(radio)
name = "Radio"
init_order = 18
flags = SS_NO_FIRE|SS_NO_INIT
var/list/datum/radio_frequency/frequencies = list()

View File

@@ -1,6 +1,5 @@
SUBSYSTEM_DEF(religion)
name = "Religion"
init_order = 19
flags = SS_NO_FIRE|SS_NO_INIT
var/religion

View File

@@ -3,7 +3,7 @@
SUBSYSTEM_DEF(shuttle)
name = "Shuttle"
wait = 10
init_order = 3
init_order = INIT_ORDER_SHUTTLE
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
var/list/mobile = list()

View File

@@ -4,7 +4,7 @@
SUBSYSTEM_DEF(squeak)
name = "Squeak"
priority = 40
init_order = INIT_ORDER_SQUEAK
flags = SS_NO_FIRE
var/list/exposed_wires = list()

View File

@@ -1,6 +1,6 @@
SUBSYSTEM_DEF(stickyban)
name = "Sticky Ban"
init_order = -10
init_order = INIT_ORDER_STICKY_BAN
flags = SS_NO_FIRE
var/list/cache = list()

View File

@@ -1,7 +1,6 @@
SUBSYSTEM_DEF(sun)
name = "Sun"
wait = 600
init_order = 2
flags = SS_NO_TICK_CHECK|SS_NO_INIT
var/angle
var/dx

View File

@@ -1,7 +1,6 @@
SUBSYSTEM_DEF(tgui)
name = "tgui"
wait = 9
init_order = 16
flags = SS_NO_INIT|SS_FIRE_IN_LOBBY
priority = 110

View File

@@ -2,7 +2,7 @@
SUBSYSTEM_DEF(ticker)
name = "Ticker"
init_order = 13
init_order = INIT_ORDER_TICKER
priority = 200
flags = SS_FIRE_IN_LOBBY|SS_KEEP_TIMING

View File

@@ -4,7 +4,7 @@
SUBSYSTEM_DEF(timer)
name = "Timer"
wait = 1 //SS_TICKER subsystem, so wait is in ticks
init_order = 1
init_order = INIT_ORDER_TIMER
flags = SS_FIRE_IN_LOBBY|SS_TICKER|SS_NO_INIT

View File

@@ -125,6 +125,7 @@
var/datum/proximity_monitor/proximity_monitor = src.proximity_monitor
if(proximity_monitor)
proximity_monitor.HandleMove()
return 1
/atom/movable/proc/clean_on_move()