Skip to content

Commit

Permalink
Fixes smugglers satchels being able to refresh items forever (tgstati…
Browse files Browse the repository at this point in the history
  • Loading branch information
KorPhaeron authored and lzimann committed Feb 5, 2018
1 parent 966c09b commit d962858
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/controllers/subsystem/persistence.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions code/game/objects/items/storage/backpack.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down

0 comments on commit d962858

Please sign in to comment.