[MIRROR] MC Runlevels (#988)
* MC Runlevels * Update ticker.dm * Delete ticker.dm.rej
This commit is contained in:
committed by
Poojawa
parent
42e8c5dbbd
commit
4463646952
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(acid)
|
||||
name = "Acid"
|
||||
priority = 40
|
||||
flags = SS_NO_INIT|SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -12,6 +12,7 @@ SUBSYSTEM_DEF(air)
|
||||
priority = 20
|
||||
wait = 5
|
||||
flags = SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/cost_turfs = 0
|
||||
var/cost_groups = 0
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
SUBSYSTEM_DEF(augury)
|
||||
name = "Augury"
|
||||
flags = SS_NO_INIT
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/watchers = list()
|
||||
var/list/doombringers = list()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
SUBSYSTEM_DEF(disease)
|
||||
name = "Disease"
|
||||
flags = SS_KEEP_TIMING|SS_NO_INIT
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
SUBSYSTEM_DEF(events)
|
||||
name = "Events"
|
||||
init_order = INIT_ORDER_EVENTS
|
||||
runlevels = RUNLEVEL_GAME
|
||||
|
||||
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
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(fire_burning)
|
||||
name = "Fire Burning"
|
||||
priority = 40
|
||||
flags = SS_NO_INIT|SS_BACKGROUND
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -2,7 +2,8 @@ SUBSYSTEM_DEF(garbage)
|
||||
name = "Garbage"
|
||||
priority = 15
|
||||
wait = 5
|
||||
flags = SS_FIRE_IN_LOBBY|SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
|
||||
flags = SS_POST_FIRE_TIMING|SS_BACKGROUND|SS_NO_INIT
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY
|
||||
|
||||
var/collection_timeout = 3000// deciseconds to wait to let running procs finish before we just say fuck it and force del() the object
|
||||
var/delslasttick = 0 // number of del()'s we've done this tick
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(inbounds)
|
||||
name = "Inbounds"
|
||||
priority = 40
|
||||
flags = SS_NO_INIT
|
||||
runlevels = RUNLEVEL_GAME
|
||||
|
||||
var/list/processing = list()
|
||||
var/list/currentrun = list()
|
||||
|
||||
@@ -2,6 +2,7 @@ SUBSYSTEM_DEF(mobs)
|
||||
name = "Mobs"
|
||||
priority = 100
|
||||
flags = SS_KEEP_TIMING|SS_NO_INIT
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ SUBSYSTEM_DEF(npcpool)
|
||||
name = "NPC Pool"
|
||||
flags = SS_POST_FIRE_TIMING|SS_NO_INIT|SS_BACKGROUND
|
||||
priority = 20
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/canBeUsed = list()
|
||||
var/list/needsDelegate = list()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
SUBSYSTEM_DEF(parallax)
|
||||
name = "Parallax"
|
||||
wait = 2
|
||||
flags = SS_POST_FIRE_TIMING | SS_FIRE_IN_LOBBY | 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
|
||||
|
||||
/datum/controller/subsystem/parallax/fire(resumed = 0)
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
PROCESSING_SUBSYSTEM_DEF(overlays)
|
||||
name = "Overlay"
|
||||
flags = SS_TICKER|SS_FIRE_IN_LOBBY
|
||||
flags = SS_TICKER
|
||||
wait = 1
|
||||
priority = 500
|
||||
init_order = INIT_ORDER_OVERLAY
|
||||
runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_SETUP
|
||||
|
||||
stat_tag = "Ov"
|
||||
currentrun = null
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
SUBSYSTEM_DEF(server_maint)
|
||||
name = "Server Tasks"
|
||||
wait = 6
|
||||
flags = SS_POST_FIRE_TIMING|SS_FIRE_IN_LOBBY
|
||||
flags = SS_POST_FIRE_TIMING
|
||||
priority = 10
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
var/list/currentrun
|
||||
|
||||
/datum/controller/subsystem/server_maint/Initialize(timeofday)
|
||||
|
||||
@@ -5,6 +5,7 @@ SUBSYSTEM_DEF(shuttle)
|
||||
wait = 10
|
||||
init_order = INIT_ORDER_SHUTTLE
|
||||
flags = SS_KEEP_TIMING|SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME
|
||||
|
||||
var/list/mobile = list()
|
||||
var/list/stationary = list()
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(spacedrift)
|
||||
priority = 30
|
||||
wait = 5
|
||||
flags = SS_NO_INIT|SS_KEEP_TIMING
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
SUBSYSTEM_DEF(tgui)
|
||||
name = "tgui"
|
||||
wait = 9
|
||||
flags = SS_NO_INIT|SS_FIRE_IN_LOBBY
|
||||
flags = SS_NO_INIT
|
||||
priority = 110
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
|
||||
var/list/currentrun = list()
|
||||
var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key.
|
||||
|
||||
@@ -6,6 +6,7 @@ SUBSYSTEM_DEF(throwing)
|
||||
priority = 25
|
||||
wait = 1
|
||||
flags = SS_NO_INIT|SS_KEEP_TIMING|SS_TICKER
|
||||
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/currentrun
|
||||
var/list/processing = list()
|
||||
|
||||
@@ -5,7 +5,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
init_order = INIT_ORDER_TICKER
|
||||
|
||||
priority = 200
|
||||
flags = SS_FIRE_IN_LOBBY|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_* !
|
||||
var/force_ending = 0 //Round was ended by admin intervention
|
||||
@@ -109,6 +110,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
if(timeLeft <= 0)
|
||||
current_state = GAME_STATE_SETTING_UP
|
||||
Master.SetRunLevel(RUNLEVEL_SETUP)
|
||||
if(start_immediately)
|
||||
fire()
|
||||
|
||||
@@ -116,6 +118,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(!setup())
|
||||
//setup failed
|
||||
current_state = GAME_STATE_STARTUP
|
||||
Master.SetRunLevel(RUNLEVEL_LOBBY)
|
||||
|
||||
if(GAME_STATE_PLAYING)
|
||||
mode.process(wait * 0.1)
|
||||
@@ -128,6 +131,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
current_state = GAME_STATE_FINISHED
|
||||
toggle_ooc(1) // Turn it on
|
||||
declare_completion(force_ending)
|
||||
Master.SetRunLevel(RUNLEVEL_POSTGAME)
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/setup()
|
||||
to_chat(world, "<span class='boldannounce'>Starting game...</span>")
|
||||
@@ -204,8 +208,6 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
transfer_characters() //transfer keys to the new mobs
|
||||
|
||||
Master.RoundStart() //let the party begin...
|
||||
|
||||
for(var/I in round_start_events)
|
||||
var/datum/callback/cb = I
|
||||
cb.InvokeAsync()
|
||||
@@ -218,6 +220,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
world << sound('sound/AI/welcome.ogg')
|
||||
|
||||
current_state = GAME_STATE_PLAYING
|
||||
Master.SetRunLevel(RUNLEVEL_GAME)
|
||||
|
||||
if(SSevents.holidays)
|
||||
to_chat(world, "<font color='blue'>and...</font>")
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
SUBSYSTEM_DEF(time_track)
|
||||
name = "Time Tracking"
|
||||
wait = 600
|
||||
flags = SS_NO_INIT|SS_FIRE_IN_LOBBY|SS_NO_TICK_CHECK
|
||||
flags = SS_NO_INIT|SS_NO_TICK_CHECK
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
|
||||
var/time_dilation_current = 0
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ SUBSYSTEM_DEF(timer)
|
||||
wait = 1 //SS_TICKER subsystem, so wait is in ticks
|
||||
init_order = INIT_ORDER_TIMER
|
||||
|
||||
flags = SS_FIRE_IN_LOBBY|SS_TICKER|SS_NO_INIT
|
||||
flags = SS_TICKER|SS_NO_INIT
|
||||
|
||||
var/list/datum/timedevent/processing = list()
|
||||
var/list/hashes = list()
|
||||
|
||||
@@ -2,7 +2,9 @@ SUBSYSTEM_DEF(vote)
|
||||
name = "Vote"
|
||||
wait = 10
|
||||
|
||||
flags = SS_FIRE_IN_LOBBY|SS_KEEP_TIMING|SS_NO_INIT
|
||||
flags = SS_KEEP_TIMING|SS_NO_INIT
|
||||
|
||||
runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT
|
||||
|
||||
var/initiator = null
|
||||
var/started_time = null
|
||||
|
||||
@@ -3,6 +3,7 @@ SUBSYSTEM_DEF(weather)
|
||||
name = "Weather"
|
||||
flags = SS_BACKGROUND
|
||||
wait = 10
|
||||
runlevels = RUNLEVEL_GAME
|
||||
var/list/processing = list()
|
||||
var/list/existing_weather = list()
|
||||
var/list/eligible_zlevels = list(ZLEVEL_LAVALAND)
|
||||
|
||||
Reference in New Issue
Block a user