Merge pull request #3656 from Citadel-Station-13/upstream-merge-32132
[MIRROR] Map config cleanup
This commit is contained in:
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"map_name": "Box Station",
|
||||
"map_path": "map_files/BoxStation",
|
||||
"map_file": "BoxStation.dmm",
|
||||
"minetype": "lavaland",
|
||||
"transition_config": "default",
|
||||
"allow_custom_shuttles": "yes"
|
||||
"map_file": "BoxStation.dmm"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"map_name": "Delta Station",
|
||||
"map_path": "map_files/Deltastation",
|
||||
"map_file": "DeltaStation2.dmm",
|
||||
"minetype": "lavaland",
|
||||
"transition_config": "default",
|
||||
"allow_custom_shuttles": "yes"
|
||||
"map_file": "DeltaStation2.dmm"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"map_name": "MetaStation",
|
||||
"map_path": "map_files/MetaStation",
|
||||
"map_file": "MetaStation.dmm",
|
||||
"minetype": "lavaland",
|
||||
"transition_config": "default",
|
||||
"allow_custom_shuttles": "yes"
|
||||
"map_file": "MetaStation.dmm"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"map_name": "OmegaStation",
|
||||
"map_path": "map_files/OmegaStation",
|
||||
"map_file": "OmegaStation.dmm",
|
||||
"minetype": "lavaland",
|
||||
"transition_config": "default",
|
||||
"allow_custom_shuttles": "yes"
|
||||
"map_file": "OmegaStation.dmm"
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"map_name": "PubbyStation",
|
||||
"map_path": "map_files/PubbyStation",
|
||||
"map_file": "PubbyStation.dmm",
|
||||
"minetype": "lavaland",
|
||||
"transition_config": "default",
|
||||
"allow_custom_shuttles": "yes"
|
||||
"map_file": "PubbyStation.dmm"
|
||||
}
|
||||
@@ -1,8 +1,5 @@
|
||||
{
|
||||
"map_name": "Runtime Station",
|
||||
"map_path": "map_files/debug",
|
||||
"map_file": "runtimestation.dmm",
|
||||
"minetype": "lavaland",
|
||||
"transition_config": "default",
|
||||
"allow_custom_shuttles": "no"
|
||||
"map_file": "runtimestation.dmm"
|
||||
}
|
||||
|
||||
@@ -69,12 +69,11 @@
|
||||
map_path = json["map_path"]
|
||||
map_file = json["map_file"]
|
||||
|
||||
minetype = json["minetype"]
|
||||
allow_custom_shuttles = json["allow_custom_shuttles"]
|
||||
minetype = json["minetype"] || minetype
|
||||
allow_custom_shuttles = json["allow_custom_shuttles"] == TRUE
|
||||
|
||||
var/list/jtcl = json["transition_config"]
|
||||
|
||||
if(jtcl != "default")
|
||||
var/jtcl = json["transition_config"]
|
||||
if(jtcl && jtcl != "default")
|
||||
transition_config.Cut()
|
||||
|
||||
for(var/I in jtcl)
|
||||
@@ -87,25 +86,22 @@
|
||||
CHECK_EXISTS("map_name")
|
||||
CHECK_EXISTS("map_path")
|
||||
CHECK_EXISTS("map_file")
|
||||
CHECK_EXISTS("minetype")
|
||||
CHECK_EXISTS("transition_config")
|
||||
CHECK_EXISTS("allow_custom_shuttles")
|
||||
|
||||
var/path = GetFullMapPath(json["map_path"], json["map_file"])
|
||||
if(!fexists(path))
|
||||
log_world("Map file ([path]) does not exist!")
|
||||
return
|
||||
|
||||
if(json["transition_config"] != "default")
|
||||
if(!islist(json["transition_config"]))
|
||||
var/tc = json["transition_config"]
|
||||
if(tc != "default")
|
||||
if(!islist(tc))
|
||||
log_world("transition_config is not a list!")
|
||||
return
|
||||
|
||||
var/list/jtcl = json["transition_config"]
|
||||
for(var/I in jtcl)
|
||||
for(var/I in tc)
|
||||
if(isnull(TransitionStringToEnum(I)))
|
||||
log_world("Invalid transition_config option: [I]!")
|
||||
if(isnull(TransitionStringToEnum(jtcl[I])))
|
||||
if(isnull(TransitionStringToEnum(tc[I])))
|
||||
log_world("Invalid transition_config option: [I]!")
|
||||
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user