mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Fix: Only call autogamemode vote once.
This commit is contained in:
@@ -88,14 +88,15 @@ var/global/datum/controller/subsystem/ticker/ticker
|
||||
Master.SetRunLevel(RUNLEVEL_SETUP)
|
||||
return
|
||||
|
||||
if(pregame_timeleft <= config.vote_autogamemode_timeleft)
|
||||
SSvote.autogamemode() // Start the game mode vote
|
||||
if(pregame_timeleft <= config.vote_autogamemode_timeleft && !SSvote.gamemode_vote_called)
|
||||
SSvote.autogamemode() // Start the game mode vote (if we haven't had one already)
|
||||
|
||||
// Called during GAME_STATE_SETTING_UP (RUNLEVEL_SETUP)
|
||||
/datum/controller/subsystem/ticker/proc/setup_tick(resumed = FALSE)
|
||||
if(!setup_choose_gamemode())
|
||||
// It failed, go back to lobby state and re-send the welcome message
|
||||
pregame_timeleft = config.pregame_time
|
||||
SSvote.gamemode_vote_called = FALSE // Allow another autogamemode vote
|
||||
current_state = GAME_STATE_PREGAME
|
||||
Master.SetRunLevel(RUNLEVEL_LOBBY)
|
||||
pregame_welcome()
|
||||
|
||||
@@ -13,6 +13,7 @@ SUBSYSTEM_DEF(vote)
|
||||
var/duration
|
||||
var/mode
|
||||
var/question
|
||||
var/gamemode_vote_called = FALSE // Have we had a gamemode vote this round? Only auto-call if we haven't
|
||||
var/list/choices = list()
|
||||
var/list/gamemode_names = list()
|
||||
var/list/voted = list()
|
||||
@@ -257,6 +258,7 @@ SUBSYSTEM_DEF(vote)
|
||||
world << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
|
||||
|
||||
if(mode == VOTE_GAMEMODE && round_progressing)
|
||||
gamemode_vote_called = TRUE
|
||||
round_progressing = 0
|
||||
to_world("<font color='red'><b>Round start has been delayed.</b></font>")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user