mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Fix the issue with time not counting down before game start.
This commit is contained in:
@@ -21,7 +21,7 @@ datum/controller/vote
|
|||||||
if(mode)
|
if(mode)
|
||||||
// No more change mode votes after the game has started.
|
// No more change mode votes after the game has started.
|
||||||
// 3 is GAME_STATE_PLAYING, but that #define is undefined for some reason
|
// 3 is GAME_STATE_PLAYING, but that #define is undefined for some reason
|
||||||
if(mode == "gamemode" && ticker.current_state >= 3)
|
if(mode == "gamemode" && ticker.current_state >= 2)
|
||||||
world << "<b>Voting aborted due to game start.</b>"
|
world << "<b>Voting aborted due to game start.</b>"
|
||||||
src.reset()
|
src.reset()
|
||||||
return
|
return
|
||||||
@@ -151,10 +151,15 @@ datum/controller/vote
|
|||||||
|
|
||||||
reset()
|
reset()
|
||||||
switch(vote_type)
|
switch(vote_type)
|
||||||
if("restart") choices.Add("Restart Round","Continue Playing")
|
if("restart")
|
||||||
|
choices.Add("Restart Round","Continue Playing")
|
||||||
if("gamemode")
|
if("gamemode")
|
||||||
|
if(ticker.current_state >= 2)
|
||||||
|
return 0
|
||||||
choices.Add(config.votable_modes)
|
choices.Add(config.votable_modes)
|
||||||
if("crew_transfer")
|
if("crew_transfer")
|
||||||
|
if(ticker.current_state <= 2)
|
||||||
|
return 0
|
||||||
question = "End the shift?"
|
question = "End the shift?"
|
||||||
choices.Add("Initiate Crew Transfer", "Continue The Round")
|
choices.Add("Initiate Crew Transfer", "Continue The Round")
|
||||||
if("custom")
|
if("custom")
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ var/global/datum/controller/gameticker/ticker
|
|||||||
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
|
world << "<B><FONT color='blue'>Welcome to the pre-game lobby!</FONT></B>"
|
||||||
world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds"
|
world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds"
|
||||||
while(current_state == GAME_STATE_PREGAME)
|
while(current_state == GAME_STATE_PREGAME)
|
||||||
sleep(10)
|
for(var/i=0, i<10, i++)
|
||||||
|
sleep(1)
|
||||||
|
vote.process()
|
||||||
if(going)
|
if(going)
|
||||||
pregame_timeleft--
|
pregame_timeleft--
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user