Skip to content

Commit

Permalink
Fix Map JSON loading errors (tgstation#54563)
Browse files Browse the repository at this point in the history
Also fixes that one runtime everyone runs into when they first load in
  • Loading branch information
Cyberboss authored Oct 25, 2020
1 parent 9b756b4 commit d240eb7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
8 changes: 5 additions & 3 deletions code/datums/map_config.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@

allow_custom_shuttles = json["allow_custom_shuttles"] != FALSE

if (!islist(json["jobs_changes"]))
log_world("map_config \"job_changes\" field is missing or invalid!")
return
if ("jobs_changes" in json)
if(!islist(json["jobs_changes"]))
log_world("map_config \"job_changes\" field is missing or invalid!")
return
job_changes = json["job_changes"]

defaulted = FALSE
return TRUE
Expand Down
1 change: 1 addition & 0 deletions code/modules/admin/verbs/maprotation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
VM.map_file = "[map_file]"
VM.config_filename = "data/next_map.json"
var/json_value = list(
"version" = MAP_CURRENT_VERSION,
"map_name" = VM.map_name,
"map_path" = VM.map_path,
"map_file" = VM.map_file,
Expand Down
2 changes: 1 addition & 1 deletion code/modules/keybindings/setup.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
var/command = macro_set[key]
winset(src, "default-[REF(key)]", "parent=default;name=[key];command=[command]")

if(prefs.hotkeys)
if(prefs?.hotkeys)
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_ENABLED]")
else
winset(src, null, "input.focus=true input.background-color=[COLOR_INPUT_DISABLED]")
Expand Down

0 comments on commit d240eb7

Please sign in to comment.