Allow configuring ruin/empty space level count - #36191

Allows map configs to set how many ruin levels (def. 7) and how many empty levels (def. 1) that will be created. Most useful for landlocked stations, event/one-off stations with unusual composition, or testing situations such as RuntimeStation.
This commit is contained in:
Tad Hardesty
2018-03-06 23:48:22 -08:00
committed by CitadelStationBot
parent 4d0b7133c8
commit 6402912a32
4 changed files with 27 additions and 4 deletions
+16
View File
@@ -18,6 +18,8 @@
var/map_file = "BoxStation.dmm"
var/traits = null
var/space_ruin_levels = 7
var/space_empty_levels = 1
var/minetype = "lavaland"
@@ -106,6 +108,20 @@
log_world("map_config traits is not a list!")
return
var/temp = json["space_ruin_levels"]
if (isnum(temp))
space_ruin_levels = temp
else if (!isnull(temp))
log_world("map_config space_ruin_levels is not a number!")
return
temp = json["space_empty_levels"]
if (isnum(temp))
space_empty_levels = temp
else if (!isnull(temp))
log_world("map_config space_empty_levels is not a number!")
return
if ("minetype" in json)
minetype = json["minetype"]