mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Merge pull request #6837 from VOREStation/aro-juke
Fix hook "failing" when no file
This commit is contained in:
@@ -38,7 +38,7 @@ var/global/list/all_lobby_tracks = list()
|
|||||||
var/jukebox_track_file = "config/jukebox.json"
|
var/jukebox_track_file = "config/jukebox.json"
|
||||||
if(!fexists(jukebox_track_file))
|
if(!fexists(jukebox_track_file))
|
||||||
warning("File not found: [jukebox_track_file]")
|
warning("File not found: [jukebox_track_file]")
|
||||||
return
|
return 1
|
||||||
var/list/jsonData = json_decode(file2text(jukebox_track_file))
|
var/list/jsonData = json_decode(file2text(jukebox_track_file))
|
||||||
if(!istype(jsonData))
|
if(!istype(jsonData))
|
||||||
warning("Failed to read tracks from [jukebox_track_file], json_decode failed.")
|
warning("Failed to read tracks from [jukebox_track_file], json_decode failed.")
|
||||||
|
|||||||
Reference in New Issue
Block a user