Merge pull request #5755 from Fox-McCloud/loading-fixes

Fixes Dual Location Objects with Grinder and Biogenerator
This commit is contained in:
TheDZD
2016-10-10 20:18:24 -04:00
committed by GitHub
2 changed files with 9 additions and 10 deletions
+3 -2
View File
@@ -97,16 +97,17 @@
else if(processing)
to_chat(user, "<span class='warning'>The biogenerator is currently processing.</span>")
else if(istype(O, /obj/item/weapon/storage/bag/plants))
var/obj/item/weapon/storage/bag/plants/PB = O
var/i = 0
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in contents)
i++
if(i >= max_items)
to_chat(user, "<span class='warning'>The biogenerator is already full! Activate it.</span>")
else
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents)
for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in PB.contents)
if(i >= max_items)
break
G.forceMove(src)
PB.remove_from_storage(G, src)
i++
if(i < max_items)
to_chat(user, "<span class='info'>You empty the plant bag into the biogenerator.</span>")