Configuration datum refactor
This commit is contained in:
committed by
CitadelStationBot
parent
d25894447e
commit
e5ef3d2405
@@ -79,13 +79,13 @@ SUBSYSTEM_DEF(ticker)
|
||||
if(!GLOB.syndicate_code_response)
|
||||
GLOB.syndicate_code_response = generate_code_phrase()
|
||||
..()
|
||||
start_at = world.time + (config.lobby_countdown * 10)
|
||||
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
|
||||
|
||||
/datum/controller/subsystem/ticker/fire()
|
||||
switch(current_state)
|
||||
if(GAME_STATE_STARTUP)
|
||||
if(Master.initializations_finished_with_no_players_logged_in)
|
||||
start_at = world.time + (config.lobby_countdown * 10)
|
||||
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
|
||||
for(var/client/C in GLOB.clients)
|
||||
window_flash(C, ignorepref = TRUE) //let them know lobby has opened up.
|
||||
to_chat(world, "<span class='boldnotice'>Welcome to [station_name()]!</span>")
|
||||
@@ -207,7 +207,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
else
|
||||
mode.announce()
|
||||
|
||||
if(!config.ooc_during_round)
|
||||
if(!CONFIG_GET(flag/ooc_during_round))
|
||||
toggle_ooc(FALSE) // Turn it off
|
||||
|
||||
CHECK_TICK
|
||||
@@ -429,7 +429,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
CHECK_TICK
|
||||
|
||||
if(config.cross_allowed)
|
||||
if(CONFIG_GET(string/cross_server_address))
|
||||
send_news_report()
|
||||
|
||||
CHECK_TICK
|
||||
@@ -495,7 +495,8 @@ SUBSYSTEM_DEF(ticker)
|
||||
to_chat(world, "<font color='purple'><b>Tip of the round: </b>[html_encode(m)]</font>")
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/check_queue()
|
||||
if(!queued_players.len || !config.hard_popcap)
|
||||
var/hpc = CONFIG_GET(number/hard_popcap)
|
||||
if(!queued_players.len || !hpc)
|
||||
return
|
||||
|
||||
queue_delay++
|
||||
@@ -503,7 +504,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
|
||||
switch(queue_delay)
|
||||
if(5) //every 5 ticks check if there is a slot available
|
||||
if(living_player_count() < config.hard_popcap)
|
||||
if(living_player_count() < hpc)
|
||||
if(next_in_line && next_in_line.client)
|
||||
to_chat(next_in_line, "<span class='userdanger'>A slot has opened! You have approximately 20 seconds to join. <a href='?src=\ref[next_in_line];late_join=override'>\>\>Join Game\<\<</a></span>")
|
||||
SEND_SOUND(next_in_line, sound('sound/misc/notice1.ogg'))
|
||||
@@ -517,7 +518,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
queue_delay = 0
|
||||
|
||||
/datum/controller/subsystem/ticker/proc/check_maprotate()
|
||||
if (!config.maprotation)
|
||||
if (!CONFIG_GET(flag/maprotation))
|
||||
return
|
||||
if (SSshuttle.emergency && SSshuttle.emergency.mode != SHUTTLE_ESCAPE || SSshuttle.canRecall())
|
||||
return
|
||||
@@ -527,7 +528,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
maprotatechecked = 1
|
||||
|
||||
//map rotate chance defaults to 75% of the length of the round (in minutes)
|
||||
if (!prob((world.time/600)*config.maprotatechancedelta))
|
||||
if (!prob((world.time/600)*CONFIG_GET(number/maprotatechancedelta)))
|
||||
return
|
||||
INVOKE_ASYNC(SSmapping, /datum/controller/subsystem/mapping/.proc/maprotate)
|
||||
|
||||
@@ -687,7 +688,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
return
|
||||
|
||||
if(!delay)
|
||||
delay = config.round_end_countdown * 10
|
||||
delay = CONFIG_GET(number/round_end_countdown) * 10
|
||||
|
||||
var/skip_delay = check_rights()
|
||||
if(delay_end && !skip_delay)
|
||||
|
||||
Reference in New Issue
Block a user