Merge pull request #6641 from Citadel-Station-13/upstream-merge-37447

[MIRROR] Fixes mousetraps not going off from being dumped out
This commit is contained in:
LetterJay
2018-05-05 09:38:11 -05:00
committed by GitHub
2 changed files with 15 additions and 8 deletions
+3 -1
View File
@@ -232,13 +232,15 @@
stoplag(1)
qdel(progress)
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress)
/datum/component/storage/proc/mass_remove_from_storage(atom/target, list/things, datum/progressbar/progress, trigger_on_found = TRUE)
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())
return FALSE
if(TICK_CHECK)
progress.update(progress.goal - length(things))
return TRUE