Skip to content

Commit

Permalink
Merge pull request #5913 from Trilbyspaceclone/lobby_issues
Browse files Browse the repository at this point in the history
Requested by k5: Lobby death
  • Loading branch information
Trilbyspaceclone authored Dec 28, 2024
2 parents fb25d79 + 7afc4fb commit 0615a19
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
4 changes: 4 additions & 0 deletions code/controllers/configuration.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GLOBAL_LIST_EMPTY(storyteller_cache)
var/allow_admin_ooccolor = 0 // Allows admins with relevant permissions to have their own ooc colour
var/allow_vote_restart = 0 // allow votes to e
var/automatic_restart_time = 0 // server will begin ending the round at this time
var/automatic_restart_time_lobby = 0// Server will end if you cant start a round after this time
var/automatic_restart_delay = 0 // warning on how long until things restart
var/ert_admin_call_only = 0
var/allow_vote_mode = 0 // allow votes to change mode
Expand Down Expand Up @@ -382,6 +383,9 @@ GLOBAL_LIST_EMPTY(storyteller_cache)
if ("automatic_restart_time")
config.automatic_restart_time = text2num(value) SECONDS

if ("automatic_restart_time_lobby")
config.automatic_restart_time_lobby = text2num(value) SECONDS

if ("automatic_restart_delay")
config.automatic_restart_delay = text2num(value) SECONDS

Expand Down
9 changes: 9 additions & 0 deletions code/controllers/subsystems/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,15 @@ SUBSYSTEM_DEF(ticker)
fire()
first_start_trying = FALSE

if(config.automatic_restart_time_lobby)
if(world.time >= config.automatic_restart_time_lobby)
to_chat(world, "<span class='danger'>Restarting world do to no active players willing to start game. Save characters if working on them.</span>")
log_admin("World has rebooted do to no active players willing to play the game.")
SEND_SOUND(world, sound('sound/AI/annoucement_dings.ogg'))
spawn(60 SECONDS)
if(!(current_state == GAME_STATE_PREGAME))
world.Reboot()

if(GAME_STATE_SETTING_UP)
if(!setup())
//setup failed
Expand Down
Binary file added sound/AI/annoucement_dings.ogg
Binary file not shown.

0 comments on commit 0615a19

Please sign in to comment.