[MIRROR] Makes maps be able to load correctly again [MDB IGNORE] (#9276)

* Makes maps be able to load correctly again

* Feex

Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
This commit is contained in:
SkyratBot
2021-11-06 19:27:52 +00:00
committed by GitHub
parent 653d286306
commit ec8ac5f18f
5 changed files with 35 additions and 16 deletions
+4 -4
View File
@@ -82,7 +82,7 @@
VM.map_path = CUSTOM_MAP_PATH
VM.map_file = "[map_file]"
VM.config_filename = "data/next_map.json"
VM.config_filename = PATH_TO_NEXT_MAP_JSON
var/json_value = list(
"version" = MAP_CURRENT_VERSION,
"map_name" = VM.map_name,
@@ -92,9 +92,9 @@
)
// If the file isn't removed text2file will just append.
if(fexists("data/next_map.json"))
fdel("data/next_map.json")
text2file(json_encode(json_value), "data/next_map.json")
if(fexists(PATH_TO_NEXT_MAP_JSON))
fdel(PATH_TO_NEXT_MAP_JSON)
text2file(json_encode(json_value), PATH_TO_NEXT_MAP_JSON)
if(SSmapping.changemap(VM))
message_admins("[key_name_admin(usr)] has changed the map to [VM.map_name]")