From b332cda61df2b61068aef4cce99edc2966ffeb4b Mon Sep 17 00:00:00 2001 From: joep van der velden Date: Sun, 28 Oct 2018 20:24:56 +0100 Subject: [PATCH] Made the round start time variable using the config.txt --- code/controllers/configuration.dm | 4 ++++ code/game/gamemodes/gameticker.dm | 3 +-- config/example/config.txt | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/controllers/configuration.dm b/code/controllers/configuration.dm index 1919df19ae6..17f8fcd3865 100644 --- a/code/controllers/configuration.dm +++ b/code/controllers/configuration.dm @@ -22,6 +22,7 @@ var/log_hrefs = 0 // logs all links clicked in-game. Could be used for debugging and tracking down exploits var/sql_enabled = 0 // for sql switching var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour + var/pregame_timestart = 240 // Time it takes for the server to start the game var/allow_vote_restart = 0 // allow votes to restart var/allow_vote_mode = 0 // allow votes to change mode var/vote_delay = 6000 // minimum time between voting sessions (deciseconds, 10 minute default) @@ -333,6 +334,9 @@ if("allow_admin_ooccolor") config.allow_admin_ooccolor = 1 + if("pregame_timestart") + config.pregame_timestart = text2num(value) + if("allow_vote_restart") config.allow_vote_restart = 1 diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index 29996b30760..21abbc89415 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -29,7 +29,6 @@ var/round_start_time = 0 var/list/availablefactions = list() // list of factions with openings var/pregame_timeleft = 0 - var/delay_end = 0 //if set to nonzero, the round will not restart on it's own var/triai = 0//Global holder for Triumvirate @@ -48,7 +47,7 @@ var/round_start_time = 0 'sound/music/Title2.ogg',\ 'sound/music/Title3.ogg',) do - pregame_timeleft = 180 + pregame_timeleft = config.pregame_timestart to_chat(world, "Welcome to the pre-game lobby!") to_chat(world, "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds") while(current_state == GAME_STATE_PREGAME) diff --git a/config/example/config.txt b/config/example/config.txt index 08792117b1f..264cc52fc49 100644 --- a/config/example/config.txt +++ b/config/example/config.txt @@ -113,6 +113,9 @@ ALLOW_ADMIN_OOCCOLOR ## If metadata is supported ALLOW_METADATA +## The time it takes for a round to start in seconds +PREGAME_TIMESTART 240 + ## allow players to initiate a restart vote #ALLOW_VOTE_RESTART