Merge pull request #15980 from AffectedArc07/toml-config

[READY] Converts configs to use TOML + Configuration refactor
This commit is contained in:
variableundefined
2021-07-25 08:26:29 -04:00
committed by GitHub
193 changed files with 2577 additions and 2858 deletions
+9 -9
View File
@@ -5,6 +5,8 @@
var/mappath = null
var/mapfile = null
var/loaded = 0 // Times loaded this round
/// Do we exclude this from CI checks? If so, set this to the templates pathtype itself to avoid it getting passed down
var/ci_exclude = null // DO NOT SET THIS IF YOU DO NOT KNOW WHAT YOU ARE DOING
/datum/map_template/New(path = null, map = null, rename = null)
if(path)
@@ -110,19 +112,16 @@
var/datum/map_template/T = new(path = "[path][map]", rename = "[map]")
GLOB.map_templates[T.name] = T
if(!config.disable_space_ruins) // so we don't unnecessarily clutter start-up
if(GLOB.configuration.ruins.enable_space_ruins) // so we don't unnecessarily clutter start-up
preloadRuinTemplates()
preloadShelterTemplates()
preloadShuttleTemplates()
/proc/preloadRuinTemplates()
// Still supporting bans by filename
var/list/banned
if(fexists("config/spaceRuinBlacklist.txt"))
banned = generateMapList("config/spaceRuinBlacklist.txt")
else
banned = generateMapList("config/example/spaceRuinBlacklist.txt")
banned += generateMapList("config/lavaRuinBlacklist.txt")
// Merge the active lists together
var/list/space_ruins = GLOB.configuration.ruins.active_space_ruins.Copy()
var/list/lava_ruins = GLOB.configuration.ruins.active_lava_ruins.Copy()
var/list/all_ruins = space_ruins | lava_ruins
for(var/item in subtypesof(/datum/map_template/ruin))
var/datum/map_template/ruin/ruin_type = item
@@ -131,7 +130,8 @@
continue
var/datum/map_template/ruin/R = new ruin_type()
if(banned.Find(R.mappath))
// If not in the active list, skip it
if(!(R.mappath in all_ruins))
continue
GLOB.map_templates[R.name] = R
+3 -3
View File
@@ -93,10 +93,10 @@ GLOBAL_PROTECT(revision_info) // Dont mess with this
msg += "<b>Round ID:</b> [GLOB.round_id ? GLOB.round_id : "NULL"]"
// Commit info
if(GLOB.revision_info.commit_hash && GLOB.revision_info.commit_date)
msg += "<b>Server Commit:</b> <a href='[config.githuburl]/commit/[GLOB.revision_info.commit_hash]'>[GLOB.revision_info.commit_hash]</a> (Date: [GLOB.revision_info.commit_date])"
if(GLOB.revision_info.commit_hash && GLOB.revision_info.commit_date && GLOB.configuration.url.github_url)
msg += "<b>Server Commit:</b> <a href='[GLOB.configuration.url.github_url]/commit/[GLOB.revision_info.commit_hash]'>[GLOB.revision_info.commit_hash]</a> (Date: [GLOB.revision_info.commit_date])"
if(GLOB.revision_info.origin_commit && (GLOB.revision_info.commit_hash != GLOB.revision_info.origin_commit))
msg += "<b>Origin Commit:</b> <a href='[config.githuburl]/commit/[GLOB.revision_info.origin_commit]'>[GLOB.revision_info.origin_commit]</a>"
msg += "<b>Origin Commit:</b> <a href='[GLOB.configuration.url.github_url]/commit/[GLOB.revision_info.origin_commit]'>[GLOB.revision_info.origin_commit]</a>"
else
msg += "<b>Server Commit:</b> <i>Unable to determine</i>"
+3
View File
@@ -1,9 +1,11 @@
/datum/map_template/ruin/lavaland
prefix = "_maps/map_files/RandomRuins/LavaRuins/"
ci_exclude = /datum/map_template/ruin/lavaland
/datum/map_template/ruin/lavaland/biodome
cost = 5
allow_duplicates = FALSE
ci_exclude = /datum/map_template/ruin/lavaland/biodome // This is a parent holder, not a ruin itself
/datum/map_template/ruin/lavaland/biodome/beach
name = "Biodome Beach"
@@ -71,6 +73,7 @@
/datum/map_template/ruin/lavaland/sin
cost = 10
allow_duplicates = FALSE
ci_exclude = /datum/map_template/ruin/lavaland/sin // This is a parent holder, not a ruin itself
/datum/map_template/ruin/lavaland/sin/envy
name = "Ruin of Envy"
+1
View File
@@ -2,6 +2,7 @@
/datum/map_template/ruin/space
prefix = "_maps/map_files/RandomRuins/SpaceRuins/"
cost = 1
ci_exclude = /datum/map_template/ruin/space
/datum/map_template/ruin/space/zoo
id = "zoo"
+4 -4
View File
@@ -25,13 +25,13 @@
if(istype(S,/obj/effect/proc_holder/spell/targeted/lichdom) && S != src)
return ..()
if(existence_stops_round_end)
config.continuous_rounds = 0
GLOB.configuration.gamemode.disable_certain_round_early_end = FALSE
return ..()
/obj/effect/proc_holder/spell/targeted/lichdom/cast(list/targets, mob/user = usr)
if(!config.continuous_rounds)
existence_stops_round_end = 1
config.continuous_rounds = 1
if(!GLOB.configuration.gamemode.disable_certain_round_early_end)
existence_stops_round_end = TRUE
GLOB.configuration.gamemode.disable_certain_round_early_end = TRUE
for(var/mob/M in targets)
var/list/hand_items = list()