This commit is contained in:
AffectedArc07
2021-05-23 17:26:17 +01:00
parent 110f579464
commit 7486d026b7
72 changed files with 411 additions and 590 deletions
+2 -2
View File
@@ -266,11 +266,11 @@ SUBSYSTEM_DEF(changelog)
usr.client.github()
// Takes a PR number as argument
if(href_list["openPR"])
if(GLOB?.configuration?.url.github_url)
if(GLOB.configuration.url.github_url)
if(alert("This will open PR #[href_list["openPR"]] in your browser. Are you sure?",,"Yes","No")=="No")
return
// If the github URL in the config has a trailing slash, it doesnt matter here, thankfully github accepts having a double slash: https://github.com/org/repo//pull/1
var/url = "[GLOB?.configuration?.url.github_url]/pull/[href_list["openPR"]]"
var/url = "[GLOB.configuration.url.github_url]/pull/[href_list["openPR"]]"
usr << link(url)
else
to_chat(usr, "<span class='danger'>The GitHub URL is not set in the server configuration. PRs cannot be opened from changelog view. Please inform the server host.</span>")
+1 -1
View File
@@ -5,7 +5,7 @@ SUBSYSTEM_DEF(holiday)
var/list/holidays
/datum/controller/subsystem/holiday/Initialize(start_timeofday)
if(!config.allow_holidays)
if(!GLOB.configuration.general.allow_holidays)
return ..() //Holiday stuff was not enabled in the config!
var/YY = text2num(time2text(world.timeofday, "YY")) // get the current year
+1 -1
View File
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(lighting)
/datum/controller/subsystem/lighting/Initialize(timeofday)
if(!initialized)
if(config.starlight)
if(GLOB.configuration.general.starlight)
for(var/I in GLOB.all_areas)
var/area/A = I
if(A.dynamic_lighting == DYNAMIC_LIGHTING_IFSTARLIGHT)
+2 -2
View File
@@ -70,8 +70,8 @@ SUBSYSTEM_DEF(mapping)
GLOB.map_name = "Unknown"
// World name
if(config && config.server_name)
world.name = "[config.server_name]: [station_name()]"
if(GLOB.configuration.general.server_name)
world.name = "[GLOB.configuration.general.server_name]: [station_name()]"
else
world.name = station_name()
+2 -2
View File
@@ -14,9 +14,9 @@ SUBSYSTEM_DEF(nightshift)
var/high_security_mode = FALSE
/datum/controller/subsystem/nightshift/Initialize()
if(!config.enable_night_shifts)
if(!GLOB.configuration.general.enable_night_shifts)
can_fire = FALSE
if(config.randomize_shift_time)
if(GLOB.configuration.general.randomise_shift_time)
GLOB.gametime_offset = rand(0, 23) HOURS
return ..()
+2 -2
View File
@@ -13,7 +13,7 @@ SUBSYSTEM_DEF(profiler)
..("F:[round(fetch_cost, 1)]ms | W:[round(write_cost, 1)]ms")
/datum/controller/subsystem/profiler/Initialize()
if(!config.auto_profile)
if(!GLOB.configuration.general.enable_auto_profiler)
StopProfiling() //Stop the early start profiler if we dont want it on in the config
flags |= SS_NO_FIRE
return ..()
@@ -22,7 +22,7 @@ SUBSYSTEM_DEF(profiler)
DumpFile()
/datum/controller/subsystem/profiler/Shutdown()
if(config.auto_profile)
if(GLOB.configuration.general.enable_auto_profiler)
DumpFile()
return ..()
+6 -2
View File
@@ -1,4 +1,6 @@
#define CALL_SHUTTLE_REASON_LENGTH 12
/// Time elapsed from roundstart before shuttle calls are allowed
#define SHUTTLE_REFUEL_DELAY 20 MINUTES
SUBSYSTEM_DEF(shuttle)
name = "Shuttle"
@@ -42,6 +44,8 @@ SUBSYSTEM_DEF(shuttle)
var/sold_atoms = ""
var/list/hidden_shuttle_turfs = list() //all turfs hidden from navigation computers associated with a list containing the image hiding them and the type of the turf they are pretending to be
var/list/hidden_shuttle_turf_images = list() //only the images from the above list
/// Default refuel delay
var/refuel_delay = SHUTTLE_REFUEL_DELAY
/datum/controller/subsystem/shuttle/Initialize(start_timeofday)
ordernum = rand(1,9000)
@@ -97,7 +101,7 @@ SUBSYSTEM_DEF(shuttle)
/datum/controller/subsystem/shuttle/proc/secondsToRefuel()
var/elapsed = world.time - SSticker.round_start_time
var/remaining = round((config.shuttle_refuel_delay - elapsed) / 10)
var/remaining = round((refuel_delay - elapsed) / 10)
return remaining > 0 ? remaining : 0
/datum/controller/subsystem/shuttle/proc/requestEvac(mob/user, call_reason)
@@ -115,7 +119,7 @@ SUBSYSTEM_DEF(shuttle)
emergency = backup_shuttle
if(secondsToRefuel())
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - config.shuttle_refuel_delay)/600))] minutes before trying again.")
to_chat(user, "The emergency shuttle is refueling. Please wait another [abs(round(((world.time - SSticker.round_start_time) - refuel_delay)/600))] minutes before trying again.")
return
switch(emergency.mode)
+4 -2
View File
@@ -77,9 +77,9 @@ SUBSYSTEM_DEF(ticker)
switch(current_state)
if(GAME_STATE_STARTUP)
// This is ran as soon as the MC starts firing, and should only run ONCE, unless startup fails
round_start_time = world.time + (config.pregame_timestart * 10)
round_start_time = world.time + (GLOB.configuration.general.lobby_time * 10)
to_chat(world, "<B><span class='darkmblue'>Welcome to the pre-game lobby!</span></B>")
to_chat(world, "Please, setup your character and select ready. Game will start in [config.pregame_timestart] seconds")
to_chat(world, "Please, setup your character and select ready. Game will start in [GLOB.configuration.general.lobby_time] seconds")
current_state = GAME_STATE_PREGAME
fire() // TG says this is a good idea
for(var/mob/new_player/N in GLOB.player_list)
@@ -280,6 +280,8 @@ SUBSYSTEM_DEF(ticker)
else
log_debug("Playercount: [playercount] versus trigger: [highpop_trigger] - keeping standard job config")
SSnightshift.check_nightshift()
#ifdef UNIT_TESTS
RunUnitTests()
#endif
@@ -220,10 +220,10 @@ SUBSYSTEM_DEF(tickets)
"Man Up" = "Man Up",
)
if(GLOB?.configuration?.url.banappeals_url)
if(GLOB.configuration.url.banappeals_url)
response_phrases["Appeal on the Forums"] = "Appealing a ban must occur on the forums. Privately messaging, or adminhelping about your ban will not resolve it. To appeal your ban, please head to <a href='[GLOB.configuration.url.banappeals_url]'>[GLOB.configuration.url.banappeals_url]</a>"
if(GLOB?.configuration?.url.github_url)
if(GLOB.configuration.url.github_url)
response_phrases["Github Issue Report"] = "To report a bug, please go to our <a href='[GLOB.configuration.url.github_url]'>Github page</a>. Then go to 'Issues'. Then 'New Issue'. Then fill out the report form. If the report would reveal current-round information, file it after the round ends."
var/sorted_responses = list()
+11 -11
View File
@@ -53,9 +53,9 @@ SUBSYSTEM_DEF(vote)
voting.Cut()
current_votes.Cut()
if(auto_muted && !config.ooc_allowed && !(config.auto_toggle_ooc_during_round && SSticker.current_state == GAME_STATE_PLAYING))
if(auto_muted && !GLOB.ooc_enabled && !(GLOB.configuration.general.auto_disable_ooc && SSticker.current_state == GAME_STATE_PLAYING))
auto_muted = 0
config.ooc_allowed = !( config.ooc_allowed )
GLOB.ooc_enabled = TRUE
to_chat(world, "<b>The OOC channel has been automatically enabled due to vote end.</b>")
log_admin("OOC was toggled automatically due to vote end.")
message_admins("OOC has been toggled on automatically.")
@@ -257,21 +257,21 @@ SUBSYSTEM_DEF(vote)
if(mode == "gamemode" && SSticker.ticker_going)
SSticker.ticker_going = FALSE
to_chat(world, "<font color='red'><b>Round start has been delayed.</b></font>")
if(mode == "crew_transfer" && config.ooc_allowed)
auto_muted = 1
config.ooc_allowed = !( config.ooc_allowed )
if(mode == "crew_transfer" && GLOB.ooc_enabled)
auto_muted = TRUE
GLOB.ooc_enabled = FALSE
to_chat(world, "<b>The OOC channel has been automatically disabled due to a crew transfer vote.</b>")
log_admin("OOC was toggled automatically due to crew_transfer vote.")
message_admins("OOC has been toggled off automatically.")
if(mode == "gamemode" && config.ooc_allowed)
auto_muted = 1
config.ooc_allowed = !( config.ooc_allowed )
if(mode == "gamemode" && GLOB.ooc_enabled)
auto_muted = TRUE
GLOB.ooc_enabled = FALSE
to_chat(world, "<b>The OOC channel has been automatically disabled due to the gamemode vote.</b>")
log_admin("OOC was toggled automatically due to gamemode vote.")
message_admins("OOC has been toggled off automatically.")
if(mode == "custom" && config.ooc_allowed)
auto_muted = 1
config.ooc_allowed = !( config.ooc_allowed )
if(mode == "custom" && GLOB.ooc_enabled)
auto_muted = TRUE
GLOB.ooc_enabled = FALSE
to_chat(world, "<b>The OOC channel has been automatically disabled due to a custom vote.</b>")
log_admin("OOC was toggled automatically due to custom vote.")
message_admins("OOC has been toggled off automatically.")