Skip to content
Open
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/entries/general.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
/// station name (the name of the station in-game)
/datum/config_entry/string/stationname

/datum/config_entry/flag/delay_if_no_admins // APOC EDIT ADD - (delay if no admins)
/datum/config_entry/number/delay_if_no_admins // APOC EDIT ADD - (delay if no admins)

/// Countdown between lobby and the round starting.
/datum/config_entry/number/lobby_countdown
Expand Down
11 changes: 8 additions & 3 deletions code/controllers/subsystem/ticker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -153,12 +153,17 @@ SUBSYSTEM_DEF(ticker)
++total_admins_ready

// APOC EDIT ADD START - (delay if no admins)
if(CONFIG_GET(flag/delay_if_no_admins))
if(CONFIG_GET(number/delay_if_no_admins))
if(timeLeft <= 600 && timeLeft > -1)
if(length(GLOB.admins) <= 0)
var/important_admins_on = 0
for(var/client/online_admin as anything in GLOB.admins)
if(online_admin.is_afk() || !check_rights_for(online_admin, R_BAN))
continue
important_admins_on++
if(important_admins_on < CONFIG_GET(number/delay_if_no_admins))
SetTimeLeft(-1)
start_immediately = FALSE
to_chat(world, span_infoplain("<b>The game start has been delayed due to no admins connected.</b>"), confidential = TRUE)
to_chat(world, span_infoplain("<b>The game start has been delayed due to not enough important admins connected.</b>"), confidential = TRUE)
return
// APOC EDIT ADD END

Expand Down
4 changes: 2 additions & 2 deletions config/apoc_config.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## NICE images for COOL discord users, seperated by commas i.e. BITE_IMG_LIST http://url/image.gif, http://url/image.png
#BITE_IMG_LIST

## Delay the round from starting if no admins are connected.
#DELAY_IF_NO_ADMINS
## Amount of admins required to prevent round delay.
#DELAY_IF_NO_ADMINS 1
Loading