Cleans up new lobby timing (#24250)

* Cleans up new lobby timing

* Changes
This commit is contained in:
Cyberboss
2017-02-22 14:41:12 +01:00
committed by AnturK
parent 0123d88a2d
commit ccf3e74074
3 changed files with 13 additions and 5 deletions
+3
View File
@@ -39,6 +39,7 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
var/make_runtime = 0
var/initializations_finished_with_no_players_logged_in //I wonder what this could be?
// Has round started? (So we know what subsystems to run)
var/round_started = 0
@@ -150,7 +151,9 @@ var/CURRENT_TICKLIMIT = TICK_LIMIT_RUNNING
// Set world options.
world.sleep_offline = 1
world.fps = config.fps
var/initialized_tod = world.timeofday
sleep(1)
initializations_finished_with_no_players_logged_in = initialized_tod < world.timeofday - 10
// Loop.
Master.StartProcessing(0)
+8 -5
View File
@@ -71,14 +71,17 @@ var/datum/subsystem/ticker/ticker
syndicate_code_response = generate_code_phrase()
..()
start_at = world.time + (config.lobby_countdown * 10)
world << "<span class='boldnotice'>Welcome to [station_name()]!</span>"
world << "Please set up your character and select \"Ready\". The game will start in about [config.lobby_countdown] seconds."
current_state = GAME_STATE_PREGAME
for(var/client/C in clients)
window_flash(C, ignorepref = TRUE) //let them know lobby has opened up.
/datum/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)
for(var/client/C in clients)
window_flash(C, ignorepref = TRUE) //let them know lobby has opened up.
world << "<span class='boldnotice'>Welcome to [station_name()]!</span>"
current_state = GAME_STATE_PREGAME
fire()
if(GAME_STATE_PREGAME)
//lobby stats for statpanels
if(isnull(timeLeft))
+2
View File
@@ -28,3 +28,5 @@
*/
new_player_panel()
client.playtitlemusic()
if(ticker.current_state < GAME_STATE_SETTING_UP)
src << "Please set up your character and select \"Ready\". The game will start in about [round(ticker.GetTimeLeft()/10)] seconds."