added some cleanup code

This commit is contained in:
Putnam
2020-02-01 09:10:02 -08:00
parent aba0379bfb
commit 3dcce2b43a
3 changed files with 7 additions and 1 deletions
@@ -266,6 +266,10 @@ SUBSYSTEM_DEF(persistence)
var/bunker_path = file("data/bunker_passthrough.json")
if(fexists(bunker_path))
GLOB.bunker_passthrough = json_decode(file2text(bunker_path))
var/round_id = GLOB.round_id
for(var/ckey in GLOB.bunker_passthrough)
if(round_id - GLOB.bunker_passthrough[ckey] > 30)
GLOB.bunker_passthrough -= ckey
/datum/controller/subsystem/persistence/proc/GetPhotoAlbums()
var/album_path = file("data/photo_albums.json")
+1
View File
@@ -137,6 +137,7 @@ GLOBAL_LIST(round_end_notifiees)
return "The Database is not enabled!"
GLOB.bunker_passthrough |= ckey(params)
GLOB.bunker_passthrough[ckey(params)] = GLOB.round_id
SSpersistence.SavePanicBunker() //we can do this every time, it's okay
log_admin("[sender.friendly_name] has added [params] to the current round's bunker bypass list.")
message_admins("[sender.friendly_name] has added [params] to the current round's bunker bypass list.")
+2 -1
View File
@@ -24,7 +24,8 @@
return
GLOB.bunker_passthrough |= ckey(ckeytobypass)
SSpersistence.SavePanicBunker()
GLOB.bunker_passthrough[ckey(ckeytobypass)] = GLOB.round_id
SSpersistence.SavePanicBunker() //we can do this every time, it's okay
log_admin("[key_name(usr)] has added [ckeytobypass] to the current round's bunker bypass list.")
message_admins("[key_name_admin(usr)] has added [ckeytobypass] to the current round's bunker bypass list.")
send2irc("Panic Bunker", "[key_name(usr)] has added [ckeytobypass] to the current round's bunker bypass list.")