mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 21:18:37 +01:00
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:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user