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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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")
qdel(M)
continue
if(global.modes_failed_start[M.name])
Chip11-n marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
39 changes: 25 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,27 @@ 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)
var/no_ready = TRUE
for(var/mob/dead/new_player/P as anything in new_player_list)
if(P.client && P.ready)
no_ready = FALSE
break
Chip11-n marked this conversation as resolved.
Show resolved Hide resolved

if(no_ready) //In case of empty sevrver, no infinity votes
KIBORG04 marked this conversation as resolved.
Show resolved Hide resolved
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 +261,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
4 changes: 2 additions & 2 deletions code/game/gamemodes/game_mode.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@
if(get_player_count(check_ready) < minimum_player_count)
log_mode("[name] not start because number of players who Ready is less than minimum number of players.")
return FALSE
if(config.is_bundle_by_name(master_mode) && get_player_count(check_ready) < minimum_players_bundles)
log_mode("[name] not start because number of players who Ready is less than minimum number of players in bundle.")
if(config.is_bundle_by_name(master_mode) && get_player_count(FALSE) < minimum_players_bundles)
log_mode("[name] not start because number of players is less than minimum number of players in bundle.")
return FALSE
if(!CanPopulateFaction(check_ready))
log_mode("[name] not start because pre-filling of the faction failed.")
Expand Down
Loading