[MIRROR] Fixes smugglers satchels being able to refresh items forever (#5313)

* Fixes smugglers satchels being able to refresh items forever (#35270)

* Fixes smugglers satchels being able to refresh items forever
This commit is contained in:
CitadelStationBot
2018-02-05 00:48:12 -06:00
committed by Poojawa
parent 600f1a7b84
commit a5d1cae1ac
2 changed files with 9 additions and 1 deletions
+3 -1
View File
@@ -10,6 +10,7 @@ SUBSYSTEM_DEF(persistence)
var/list/saved_messages = list()
var/list/saved_modes = list(1,2,3)
var/list/saved_trophies = list()
var/list/spawned_objects = list()
/datum/controller/subsystem/persistence/Initialize()
LoadSatchels()
@@ -62,7 +63,8 @@ SUBSYSTEM_DEF(persistence)
if(isfloorturf(F.loc) && !isplatingturf(F.loc))
F.hide(1)
if(ispath(path))
new path(F)
var/spawned_item = new path(F)
spawned_objects[spawned_item] = TRUE
placed_satchel++
var/free_satchels = 0
for(var/turf/T in shuffle(block(locate(TRANSITIONEDGE,TRANSITIONEDGE,ZLEVEL_STATION_PRIMARY), locate(world.maxx-TRANSITIONEDGE,world.maxy-TRANSITIONEDGE,ZLEVEL_STATION_PRIMARY)))) //Nontrivially expensive but it's roundstart only
@@ -326,6 +326,12 @@
new R(src)
revealed = 1
/obj/item/storage/backpack/satchel/flat/can_be_inserted(obj/item/W, stop_messages = 0, mob/user)
if(SSpersistence.spawned_objects[W])
to_chat(user, "<span class='warning'>[W] is unstable after its journey through space and time, it wouldn't survive another trip.</span>")
return FALSE
return ..()
/obj/item/storage/backpack/duffelbag
name = "duffel bag"
desc = "A large duffel bag for holding extra things."