diff --git a/code/game/machinery/biogenerator.dm b/code/game/machinery/biogenerator.dm index bde30cd92d4..6344dec7bbf 100644 --- a/code/game/machinery/biogenerator.dm +++ b/code/game/machinery/biogenerator.dm @@ -97,16 +97,17 @@ else if(processing) to_chat(user, "The biogenerator is currently processing.") 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, "The biogenerator is already full! Activate it.") 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, "You empty the plant bag into the biogenerator.") diff --git a/code/modules/reagents/Chemistry-Machinery.dm b/code/modules/reagents/Chemistry-Machinery.dm index bf107eebd16..ddd53d98fdf 100644 --- a/code/modules/reagents/Chemistry-Machinery.dm +++ b/code/modules/reagents/Chemistry-Machinery.dm @@ -829,7 +829,6 @@ //All types that you can put into the grinder to transfer the reagents to the beaker. !Put all recipes above this.! - /obj/item/weapon/reagent_containers/food/pill = list(), /obj/item/weapon/reagent_containers/food = list(), /obj/item/weapon/reagent_containers/honeycomb = list() ) @@ -895,19 +894,18 @@ to_chat(usr, "The machine cannot hold anymore items.") return 1 - //Fill machine with the plantbag! + //Fill machine with a plantbag! if(istype(O, /obj/item/weapon/storage/bag/plants)) - - for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in O.contents) - O.contents -= G - G.forceMove(src) + var/obj/item/weapon/storage/bag/plants/PB = O + for(var/obj/item/weapon/reagent_containers/food/snacks/grown/G in PB.contents) + PB.remove_from_storage(G, src) holdingitems += G if(holdingitems && holdingitems.len >= limit) //Sanity checking so the blender doesn't overfill to_chat(user, "You empty the plant bag into the All-In-One grinder.") + if(!PB.contents.len) + to_chat(user, "You empty [PB] into the All-In-One grinder.") updateUsrDialog() return 0