Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mode declares #12954

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ var/global/bridge_secret = null
if(probabilities[M.config_name] <= 0)
qdel(M)
continue
if(global.master_last_mode == M.name)
if(global.master_last_mode == M.name && M.name != "Extended" && M.name != "Traitor") //So we can start on lowpop
qdel(M)
continue
if(global.modes_failed_start[M.name])
Chip11-n marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
32 changes: 18 additions & 14 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,6 @@ SUBSYSTEM_DEF(ticker)
/datum/controller/subsystem/ticker/proc/setup()
to_chat(world, "<span class='boldannounce'>Игра начинается...</span>")

// Discuss your stuff after the round ends.
if(config.ooc_round_autotoggle)
to_chat(world, "<span class='warning bold'>OOC-канал отключен для всех на время раунда!</span>")
ooc_allowed = FALSE

var/init_start = world.timeofday

log_mode("Current master mode is [master_mode]")
Expand All @@ -205,16 +200,20 @@ SUBSYSTEM_DEF(ticker)

var/list/datum/game_mode/runnable_modes = config.get_runnable_modes(bundle)
if(!runnable_modes.len)
runnable_modes = config.get_always_runnable_modes()

if(!runnable_modes.len)
current_state = GAME_STATE_PREGAME
to_chat(world, "<B>Невозможно выбрать игровой режим.</B> Возвращение в предыгровое лобби.")
// Players can initiate gamemode vote again
var/datum/poll/gamemode_vote = SSvote.possible_polls[/datum/poll/gamemode]
if(gamemode_vote)
if(!totalPlayersReady) //In case of empty server, no infinity votes
runnable_modes = config.get_always_runnable_modes()
else //Let player choose something else
current_state = GAME_STATE_PREGAME
to_chat(world, "<B>Невозможно выбрать игровой режим.</B> Возвращение в предыгровое лобби.")
SSticker.start_ASAP = FALSE //To prevent starts spam

var/datum/poll/gamemode_vote = SSvote.possible_polls[/datum/poll/gamemode]
if(!gamemode_vote)
return FALSE
gamemode_vote.reset_next_vote()
return FALSE
if(gamemode_vote.can_start())
SSvote.start_vote(gamemode_vote)
return FALSE

// hiding forced gamemode in secret
if(istype(bundle, /datum/modesbundle/all/secret) && secret_force_mode != "Secret")
Expand Down Expand Up @@ -255,6 +254,11 @@ SUBSYSTEM_DEF(ticker)
SSjob.ResetOccupations()
return FALSE

// Discuss your stuff after the round ends.
if(config.ooc_round_autotoggle)
to_chat(world, "<span class='warning bold'>OOC-канал отключен для всех на время раунда!</span>")
ooc_allowed = FALSE

if(!bundle || !bundle.hide_mode_announce)
mode.announce()

Expand Down
Loading