diff --git a/code/modules/hydroponics/grown/misc_seeds.dm b/code/modules/hydroponics/grown/misc_seeds.dm index b3779e1d0cc5..25c6d038e46d 100644 --- a/code/modules/hydroponics/grown/misc_seeds.dm +++ b/code/modules/hydroponics/grown/misc_seeds.dm @@ -15,13 +15,15 @@ growing_icon = 'icons/obj/hydroponics/growing_flowers.dmi' genes = list(/datum/plant_gene/trait/plant_type/weed_hardy) -/obj/item/seeds/starthistle/harvest(mob/user) +/obj/item/seeds/starthistle/harvest(mob/user, obj/item/storage/bag/plants/bag) var/obj/machinery/hydroponics/parent = loc var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc var/seed_count = getYield() for(var/i in 1 to seed_count) var/obj/item/seeds/starthistle/harvestseeds = Copy() harvestseeds.forceMove(output_loc) + if(bag && bag.can_be_inserted(harvestseeds)) + bag.handle_item_insertion(harvestseeds, user, TRUE) parent.update_tray(user, seed_count) diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index 784dabc6bd30..821419634147 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -54,7 +54,7 @@ return text -/obj/item/seeds/replicapod/harvest(mob/user = usr) //now that one is fun -- Urist +/obj/item/seeds/replicapod/harvest(mob/user, obj/item/storage/bag/plants/bag) var/obj/machinery/hydroponics/parent = loc var/make_podman = 0 var/ckey_holder = null @@ -102,5 +102,7 @@ for(var/i=0,iThis plot is completely devoid of weeds! It doesn't need uprooting.") else if(istype(O, /obj/item/storage/bag/plants)) - attack_hand(user) - var/obj/item/storage/bag/plants/S = O - for(var/obj/item/food/grown/G in locate(user.x,user.y,user.z)) - if(!S.can_be_inserted(G)) - return - S.handle_item_insertion(G, user, TRUE) + if(!harvest) + attack_hand(user) + return + + myseed.harvest(user, O) else if(istype(O, /obj/item/shovel/spade)) if(!myseed && !weedlevel) diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 4132930cae0e..2cdeea2ded11 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -210,7 +210,7 @@ return new /obj/item/unsorted_seeds(src, mutation_level, tray.get_mutation_focus()) -/obj/item/seeds/proc/harvest(mob/user = usr) +/obj/item/seeds/proc/harvest(mob/user, obj/item/storage/bag/plants/bag) var/obj/machinery/hydroponics/tray = loc var/output_loc = tray.Adjacent(user) ? user.loc : tray.loc // Needed for TK @@ -222,6 +222,8 @@ var/obj/item/produce = new product(output_loc, mutated_seed) if(!produce) return + if(bag && bag.can_be_inserted(produce)) + bag.handle_item_insertion(produce, user, TRUE) product_name = produce.name