Fixes mousetraps not going off from being dumped out (#37447)

* mousetrap fix

* fix mousetraps

* Update storage.dm

* Combine checks
This commit is contained in:
kevinz000
2018-05-04 02:42:55 -07:00
committed by CitadelStationBot
parent f27088a346
commit 4a7fae664e
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