From 2a866c4924787508cb51d24eb30f62ea0f5017e2 Mon Sep 17 00:00:00 2001 From: PrismaticGynoid Date: Sun, 17 Sep 2017 21:45:29 -0700 Subject: [PATCH] Fixes for nettles (#3854) * Fixes for nettles Nettle plants can now spawn randomly from weeds - it was trying to spawn 'nettles', but the name of the plant is 'nettle', so it never spawned. Now it can. You now hit people with food if you use it on harm intent. This is mostly so that you can use nettles as a weapon again, but hey, who wouldn't want to hit people over the head with a baguette. Nettles and other stinging "fruits" can no longer be used to generate infinite chemicals by throwing them. Chemicals that the "fruits" inject are now properly removed when hitting a target. * Fixes for nettles Nettle plants can now spawn randomly from weeds - it was trying to spawn 'nettles', but the name of the plant is 'nettle', so it never spawned. Now it can. You now hit people with food if you use it on harm intent. This is mostly so that you can use nettles as a weapon again, but hey, who wouldn't want to hit people over the head with a baguette. Nettles and other stinging "fruits" can no longer be used to generate infinite chemicals by throwing them. Chemicals that the "fruits" inject are now properly removed when hitting a target. --- code/modules/hydroponics/seed.dm | 9 ++++++--- code/modules/hydroponics/trays/tray.dm | 2 +- code/modules/reagents/reagent_containers/food/snacks.dm | 5 +++++ 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/modules/hydroponics/seed.dm b/code/modules/hydroponics/seed.dm index 010888602f3..5c6053aba4b 100644 --- a/code/modules/hydroponics/seed.dm +++ b/code/modules/hydroponics/seed.dm @@ -158,10 +158,13 @@ if(!body_coverage) return - target << "You are stung by \the [fruit]!" - for(var/rid in chems) + if (fruit) var/injecting = min(5,max(1,get_trait(TRAIT_POTENCY)/5)) - target.reagents.add_reagent(rid,injecting) + to_chat(target, "You are stung by \the [fruit]!") + for(var/chem in chems) + target.reagents.add_reagent(chem,injecting) + if (fruit.reagents) + fruit.reagents.remove_reagent(chem, injecting) //Splatter a turf. /datum/seed/proc/splatter(var/turf/T,var/obj/item/thrown) diff --git a/code/modules/hydroponics/trays/tray.dm b/code/modules/hydroponics/trays/tray.dm index f906e257b4a..4b26011f6de 100644 --- a/code/modules/hydroponics/trays/tray.dm +++ b/code/modules/hydroponics/trays/tray.dm @@ -322,7 +322,7 @@ //Remove the seed if something is already planted. if(seed) seed = null - seed = plant_controller.seeds[pick(list("reishi","nettles","amanita","mushrooms","plumphelmet","towercap","harebells","weeds"))] + seed = plant_controller.seeds[pick(list("reishi","nettle","amanita","mushrooms","plumphelmet","towercap","harebells","weeds"))] if(!seed) return //Weed does not exist, someone fucked up. dead = 0 diff --git a/code/modules/reagents/reagent_containers/food/snacks.dm b/code/modules/reagents/reagent_containers/food/snacks.dm index 27defe26387..3ecdb95bd2e 100644 --- a/code/modules/reagents/reagent_containers/food/snacks.dm +++ b/code/modules/reagents/reagent_containers/food/snacks.dm @@ -15,6 +15,7 @@ var/list/nutriment_desc = list("food" = 1) center_of_mass = list("x"=16, "y"=16) w_class = ITEMSIZE_SMALL + force = 1 /obj/item/weapon/reagent_containers/food/snacks/New() ..() @@ -79,6 +80,10 @@ if (fullness > (550 * (1 + M.overeatduration / 2000))) // The more you eat - the more you can eat M << "You cannot force any more of [src] to go down your throat." return 0 + + else if(user.a_intent == I_HURT) + return ..() + else if(istype(M,/mob/living/carbon/human)) var/mob/living/carbon/human/H = M