diff --git a/code/datums/components/storage/concrete/rped.dm b/code/datums/components/storage/concrete/rped.dm
index 8014cf17c2..3744e833ac 100644
--- a/code/datums/components/storage/concrete/rped.dm
+++ b/code/datums/components/storage/concrete/rped.dm
@@ -37,7 +37,7 @@
to_chat(M, "You start dumping out tier/cell rating [lowest_rating] parts from [parent].")
var/turf/T = get_turf(A)
var/datum/progressbar/progress = new(M, length(things), T)
- while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
+ while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
stoplag(1)
qdel(progress)
A.do_squish(0.8, 1.2)
@@ -81,7 +81,7 @@
to_chat(M, "You start dumping out tier/cell rating [lowest_rating] parts from [parent].")
var/turf/T = get_turf(A)
var/datum/progressbar/progress = new(M, length(things), T)
- while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
+ while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
stoplag(1)
qdel(progress)
A.do_squish(0.8, 1.2)
diff --git a/code/datums/components/storage/storage.dm b/code/datums/components/storage/storage.dm
index 92d1754bd7..cf0b3d6920 100644
--- a/code/datums/components/storage/storage.dm
+++ b/code/datums/components/storage/storage.dm
@@ -271,20 +271,20 @@
var/turf/T = get_turf(A)
var/list/things = contents()
var/datum/progressbar/progress = new(M, length(things), T)
- while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress)))
+ while (do_after(M, 10, TRUE, T, FALSE, CALLBACK(src, .proc/mass_remove_from_storage, T, things, progress, TRUE, M)))
stoplag(1)
qdel(progress)
A.do_squish(0.8, 1.2)
-/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE)
+/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE, mob/user)
var/atom/real_location = real_location()
for(var/obj/item/I in things)
things -= I
if(I.loc != real_location)
continue
- remove_from_storage(I, target)
- if(trigger_on_found && I.on_found())
+ if(trigger_on_found && user && (user.active_storage != src) && I.on_found(user))
return FALSE
+ remove_from_storage(I, target)
if(TICK_CHECK)
progress.update(progress.goal - length(things))
return TRUE
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 3009831da7..7752dfb8d5 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -800,6 +800,8 @@
var/list/things = src_object.contents()
var/datum/progressbar/progress = new(user, things.len, src)
var/datum/component/storage/STR = GetComponent(/datum/component/storage)
+ if(STR == src_object)
+ return
while (do_after(user, 10, TRUE, src, FALSE, CALLBACK(STR, /datum/component/storage.proc/handle_mass_item_insertion, things, src_object, user, progress)))
stoplag(1)
qdel(progress)
diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm
index 93735f1079..fa566c5225 100755
--- a/code/game/turfs/turf.dm
+++ b/code/game/turfs/turf.dm
@@ -386,7 +386,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
var/list/things = src_object.contents()
var/datum/progressbar/progress = new(user, things.len, src)
- while (do_after(usr, 1 SECONDS, TRUE, src, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress)))
+ while (do_after(usr, 1 SECONDS, TRUE, src, FALSE, CALLBACK(src_object, /datum/component/storage.proc/mass_remove_from_storage, src, things, progress, TRUE, user)))
stoplag(1)
qdel(progress)