mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 05:30:05 +01:00
Hardens painting saving against inconsistent state (#65024)
Should help when paintings lists gets zeroed unintentionally during the round for some reason. Now it only deletes the painting file right before it writes the new file to prevent loss of data if anything runtimes or breaks.
This commit is contained in:
@@ -47,6 +47,7 @@
|
||||
fdel(png)
|
||||
//Remove entry from paintings list
|
||||
SSpersistent_paintings.paintings -= chosen_painting
|
||||
SSpersistent_paintings.deleted_paintings_md5s |= chosen_painting.md5
|
||||
SSpersistent_paintings.save_to_file() // Save now so we don't have broken variations if this round crashes
|
||||
//Delete any painting instances in the current round
|
||||
for(var/obj/structure/sign/painting/painting as anything in SSpersistent_paintings.painting_frames)
|
||||
|
||||
Reference in New Issue
Block a user