mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-14 11:52:39 +00:00
Fixes error if next_map.json is missing (#34222)
This commit is contained in:
committed by
CitadelStationBot
parent
b2021912d7
commit
d8c3157741
@@ -27,7 +27,7 @@ SUBSYSTEM_DEF(mapping)
|
||||
#ifdef FORCE_MAP
|
||||
config = new(FORCE_MAP)
|
||||
#else
|
||||
config = new
|
||||
config = new(error_if_missing = FALSE)
|
||||
#endif
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -31,15 +31,16 @@
|
||||
var/voteweight = 1
|
||||
var/allow_custom_shuttles = TRUE
|
||||
|
||||
/datum/map_config/New(filename = "data/next_map.json", default_to_box, delete_after)
|
||||
/datum/map_config/New(filename = "data/next_map.json", default_to_box, delete_after, error_if_missing = TRUE)
|
||||
if(default_to_box)
|
||||
return
|
||||
LoadConfig(filename)
|
||||
LoadConfig(filename, error_if_missing)
|
||||
if(delete_after)
|
||||
fdel(filename)
|
||||
|
||||
/datum/map_config/proc/LoadConfig(filename)
|
||||
/datum/map_config/proc/LoadConfig(filename, error_if_missing)
|
||||
if(!fexists(filename))
|
||||
if(error_if_missing)
|
||||
log_world("map_config not found: [filename]")
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user