From d539e4b539b7e5a3b99c5216ee791f2f48365795 Mon Sep 17 00:00:00 2001 From: cib Date: Thu, 22 Dec 2011 16:26:07 -0800 Subject: [PATCH] Changed the pregame time from 90 seconds to 180 seconds. Delay(admin verb) can now also be used after round end has been announced, to keep the world from rebooting. Also boosted the restart delay from 25 seconds to 60 seconds. --- code/game/gamemodes/gameticker.dm | 6 ++++-- code/modules/admin/admin.dm | 12 +++++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 7c7c30c880a..0e1e54e5215 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -7,7 +7,7 @@ var/global/datum/controller/gameticker/ticker /datum/controller/gameticker - var/const/restart_timeout = 250 + var/const/restart_timeout = 600 var/current_state = GAME_STATE_PREGAME var/hide_mode = 0 @@ -29,7 +29,7 @@ var/global/datum/controller/gameticker/ticker /datum/controller/gameticker/proc/pregame() do - pregame_timeleft = 90 + pregame_timeleft = 180 world << "Welcome to the pre-game lobby!" world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds" while(current_state == GAME_STATE_PREGAME) @@ -164,6 +164,7 @@ var/global/datum/controller/gameticker/ticker if(!mode.explosion_in_progress && mode.check_finished()) current_state = GAME_STATE_FINISHED + going = 1 spawn declare_completion() @@ -182,6 +183,7 @@ var/global/datum/controller/gameticker/ticker blackbox.save_all_data_to_sql() sleep(restart_timeout) + while(!going) sleep(10) world.Reboot() return 1 diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 25cbee548b8..a92253cfb62 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -2385,14 +2385,20 @@ set category = "Server" set desc="Delay the game start" set name="Delay" - if (!ticker || ticker.current_state != GAME_STATE_PREGAME) + if (!ticker || (ticker.current_state != GAME_STATE_PREGAME && ticker.current_state != GAME_STATE_FINISHED)) return alert("Too late... The game has already started!", null, null, null, null, null) going = !( going ) if (!( going )) - world << "The game start has been delayed." + if(ticker.current_state == GAME_STATE_FINISHED) + world << "The game end has been delayed." + else + world << "The game start has been delayed." log_admin("[key_name(usr)] delayed the game.") else - world << "The game will start soon." + if(ticker.current_state == GAME_STATE_FINISHED) + world << "The game will end soon." + else + world << "The game will start soon." log_admin("[key_name(usr)] removed the delay.") /obj/admins/proc/adjump()