mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Merge pull request #15980 from AffectedArc07/toml-config
[READY] Converts configs to use TOML + Configuration refactor
This commit is contained in:
@@ -47,7 +47,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
|
||||
/obj/machinery/gateway/centerstation/Initialize()
|
||||
..()
|
||||
update_icon()
|
||||
wait = world.time + config.gateway_delay
|
||||
wait = world.time + GLOB.configuration.gateway.away_mission_delay
|
||||
return INITIALIZE_HINT_LATELOAD
|
||||
|
||||
/obj/machinery/gateway/centerstation/LateInitialize()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away_mission_config.txt"))
|
||||
|
||||
// Call this before you remove the last dirt on a z level - that way, all objects
|
||||
// will have proper atmos and other important enviro things
|
||||
/proc/late_setup_level(turfs, smoothTurfs)
|
||||
@@ -38,39 +36,6 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
|
||||
qdel(otherthing)
|
||||
T.ChangeTurf(T.baseturf)
|
||||
|
||||
/proc/generateMapList(filename)
|
||||
var/list/potentialMaps = list()
|
||||
var/list/Lines = file2list(filename)
|
||||
|
||||
if(!Lines.len)
|
||||
return
|
||||
for(var/t in Lines)
|
||||
if(!t)
|
||||
continue
|
||||
|
||||
t = trim(t)
|
||||
if(length(t) == 0)
|
||||
continue
|
||||
else if(copytext(t, 1, 2) == "#")
|
||||
continue
|
||||
|
||||
var/pos = findtext(t, " ")
|
||||
var/name = null
|
||||
|
||||
if(pos)
|
||||
name = lowertext(copytext(t, 1, pos))
|
||||
|
||||
else
|
||||
name = lowertext(t)
|
||||
|
||||
if(!name)
|
||||
continue
|
||||
|
||||
potentialMaps.Add(t)
|
||||
|
||||
return potentialMaps
|
||||
|
||||
|
||||
/datum/map_template/ruin/proc/try_to_place(z,allowed_areas)
|
||||
var/sanity = PLACEMENT_TRIES
|
||||
while(sanity > 0)
|
||||
|
||||
Reference in New Issue
Block a user