The monkey portrait decoration is now a set of random pictures that also act as persistent photo frames. Every station map gets one. (#61844)

spriteadd: Desouled the picture frame sprites.
This commit is contained in:
Ghom
2021-10-08 06:10:03 -04:00
committed by GitHub
parent 92330a241e
commit 4d84a5b36e
15 changed files with 135 additions and 44 deletions
+1 -1
View File
@@ -293,7 +293,7 @@ Used by the AI doomsday and the self-destruct nuke.
#undef INIT_ANNOUNCE
// Custom maps are removed after station loading so the map files does not persist for no reason.
if(config.map_path == "custom")
if(config.map_path == CUSTOM_MAP_PATH)
fdel("_maps/custom/[config.map_file]")
// And as the file is now removed set the next map to default.
next_map_config = load_map_config(default_to_box = TRUE)
+13
View File
@@ -262,6 +262,19 @@ SUBSYSTEM_DEF(persistence)
if(fexists(frame_path))
return json_decode(file2text(frame_path))
/// Removes the identifier of a persitent photo frame from the json.
/datum/controller/subsystem/persistence/proc/RemovePhotoFrame(identifier)
var/frame_path = file("data/photo_frames.json")
if(!fexists(frame_path))
return
var/frame_json = json_decode(file2text(frame_path))
frame_json -= identifier
frame_json = json_encode(frame_json)
fdel(frame_path)
WRITE_FILE(frame_path, frame_json)
/datum/controller/subsystem/persistence/proc/LoadPhotoPersistence()
var/album_path = file("data/photo_albums.json")
var/frame_path = file("data/photo_frames.json")