From e1a254c34f9f368859ed1b28be078a6d2e2eb7e7 Mon Sep 17 00:00:00 2001 From: Miniature Date: Fri, 2 Dec 2011 15:45:08 +1030 Subject: [PATCH] Fixed a silly, and no mode votes while round is in progress, more .gitignore (*.lk, info.json) --- .gitignore | 4 +++- code/game/vote.dm | 13 +++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index bdf187e5111..f12223e2c4b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,6 @@ *.log *.int *.rsc -*.dmb \ No newline at end of file +*.dmb +*.lk +info.json \ No newline at end of file diff --git a/code/game/vote.dm b/code/game/vote.dm index 93155476e47..1307349a05b 100644 --- a/code/game/vote.dm +++ b/code/game/vote.dm @@ -59,7 +59,7 @@ calcwin() if(mode) - if(!ticker) + if(ticker.current_state == GAME_STATE_PREGAME) if(!going) world << "The game will start soon." going = 1 @@ -74,7 +74,7 @@ world << "Result is change to \red [wintext]" world.save_mode(winner) - if(ticker.current_state != 1) + if(ticker.current_state != GAME_STATE_PREGAME) world <<"\red World will reboot in 10 seconds" feedback_set_details("end_error","mode vote - [winner]") @@ -262,7 +262,9 @@ if(!vote.canvote()) // not time to vote yet if(config.allow_vote_restart) text+="Voting to restart is enabled.
" - if(config.allow_vote_mode) text+="Voting to change mode is enabled.
" + if(config.allow_vote_mode) + if(ticker.current_state == GAME_STATE_PREGAME) text+="Voting to change mode is enabled.
" + else text =+ "Change mode votes are disabled while a round is in progress, vote to restart first.
" text+="

Next vote can begin in [vote.nextwait()]." text+=footer @@ -273,7 +275,10 @@ if(config.allow_vote_restart) text += "Begin restart vote.
" if(config.allow_vote_mode) - text += "Begin change mode vote.
" + if(ticker.current_state == GAME_STATE_PREGAME) + text += "Begin change mode vote.
" + else + text =+ "Change mode votes are disabled while a round is in progress, vote to restart first.
" text += footer usr << browse(text, "window=vote")