From 91d08fb1f67c2bdc688d4e5088a257acd415ef97 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Wed, 11 Sep 2019 06:33:03 -0400 Subject: [PATCH] garlic reagent --- .../recipes/recipes_microwave.dm | 2 +- code/modules/hydroponics/grown/nettle.dm | 25 +++++++++---------- .../chemistry/machinery/reagentgrinder.dm | 4 +-- .../reagents/chemistry/reagents/food.dm | 25 +++++++++++++++++++ 4 files changed, 40 insertions(+), 16 deletions(-) diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index 42eb387d964..44c572b34e7 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -237,7 +237,7 @@ /datum/recipe/microwave/nettlesoup reagents = list("water" = 10) - items = list(/obj/item/reagent_containers/food/snacks/egg, /obj/item/reagent_containers/food/snacks/grown/nettle/basic, /obj/item/reagent_containers/food/snacks/grown/potato) + items = list(/obj/item/reagent_containers/food/snacks/egg, /obj/item/grown/nettle/basic, /obj/item/reagent_containers/food/snacks/grown/potato) result = /obj/item/reagent_containers/food/snacks/nettlesoup /datum/recipe/microwave/wishsoup diff --git a/code/modules/hydroponics/grown/nettle.dm b/code/modules/hydroponics/grown/nettle.dm index c95fa40449a..444939ca861 100644 --- a/code/modules/hydroponics/grown/nettle.dm +++ b/code/modules/hydroponics/grown/nettle.dm @@ -4,7 +4,7 @@ icon_state = "seed-nettle" species = "nettle" plantname = "Nettles" - product = /obj/item/reagent_containers/food/snacks/grown/nettle + product = /obj/item/grown/nettle/basic lifespan = 30 endurance = 40 // tuff like a toiger yield = 4 @@ -19,7 +19,7 @@ icon_state = "seed-deathnettle" species = "deathnettle" plantname = "Death Nettles" - product = /obj/item/reagent_containers/food/snacks/grown/nettle/death + product = /obj/item/grown/nettle/death endurance = 25 maturation = 8 yield = 2 @@ -28,8 +28,7 @@ reagents_add = list("facid" = 0.5, "sacid" = 0.5) rarity = 20 -/obj/item/reagent_containers/food/snacks/grown/nettle // "snack" - seed = /obj/item/seeds/nettle +/obj/item/grown/nettle //abstract type name = "nettle" desc = "It's probably not wise to touch it with bare hands..." icon = 'icons/obj/items.dmi' @@ -44,11 +43,11 @@ origin_tech = "combat=3" attack_verb = list("stung") -/obj/item/reagent_containers/food/snacks/grown/nettle/suicide_act(mob/user) +/obj/item/grown/nettle/suicide_act(mob/user) user.visible_message("[user] is eating some of the [src.name]! It looks like [user.p_theyre()] trying to commit suicide.") return BRUTELOSS|TOXLOSS -/obj/item/reagent_containers/food/snacks/grown/nettle/pickup(mob/living/user) +/obj/item/grown/nettle/pickup(mob/living/user) ..() if(!ishuman(user)) return TRUE @@ -65,7 +64,7 @@ -/obj/item/reagent_containers/food/snacks/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity) +/obj/item/grown/nettle/afterattack(atom/A as mob|obj, mob/user,proximity) if(!proximity) return if(force > 0) @@ -75,14 +74,14 @@ usr.unEquip(src) qdel(src) -/obj/item/reagent_containers/food/snacks/grown/nettle/basic +/obj/item/grown/nettle/basic seed = /obj/item/seeds/nettle -/obj/item/reagent_containers/food/snacks/grown/nettle/basic/add_juice() +/obj/item/grown/nettle/basic/add_juice() ..() force = round((5 + seed.potency / 5), 1) -/obj/item/reagent_containers/food/snacks/grown/nettle/death +/obj/item/grown/nettle/death seed = /obj/item/seeds/nettle/death name = "deathnettle" desc = "The glowing nettle incites rage in you just from looking at it!" @@ -91,11 +90,11 @@ throwforce = 15 origin_tech = "combat=5" -/obj/item/reagent_containers/food/snacks/grown/nettle/death/add_juice() +/obj/item/grown/nettle/death/add_juice() ..() force = round((5 + seed.potency / 2.5), 1) -/obj/item/reagent_containers/food/snacks/grown/nettle/death/pickup(mob/living/carbon/user) +/obj/item/grown/nettle/death/pickup(mob/living/carbon/user) . = ..() if(. && ishuman(user)) // If the pickup succeeded and is humanoid var/mob/living/carbon/human/H = user @@ -103,7 +102,7 @@ user.Paralyse(5) to_chat(user, "You are stunned by the Deathnettle when you try picking it up!") -/obj/item/reagent_containers/food/snacks/grown/nettle/death/attack(mob/living/carbon/M, mob/user) +/obj/item/grown/nettle/death/attack(mob/living/carbon/M, mob/user) ..() if(isliving(M)) to_chat(M, "You are stunned by the powerful acid of the Deathnettle!") diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 1324f468c4e..1e3bcb92db5 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -29,8 +29,8 @@ /obj/item/stack/sheet/mineral/tranquillite = list("nothing" = 20), /obj/item/stack/sheet/mineral/silver = list("silver" = 20), /obj/item/stack/sheet/mineral/gold = list("gold" = 20), - /obj/item/reagent_containers/food/snacks/grown/nettle/basic = list("sacid" = 0), - /obj/item/reagent_containers/food/snacks/grown/nettle/death = list("facid" = 0, "sacid" = 0), + /obj/item/grown/nettle/basic = list("sacid" = 0), + /obj/item/grown/nettle/death = list("facid" = 0, "sacid" = 0), /obj/item/grown/novaflower = list("capsaicin" = 0, "condensedcapsaicin" = 0), //Blender Stuff diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm index 1860b9e5825..4dcc8f15a42 100644 --- a/code/modules/reagents/chemistry/reagents/food.dm +++ b/code/modules/reagents/chemistry/reagents/food.dm @@ -336,6 +336,31 @@ M.bodytemperature = min(310, M.bodytemperature + (5 * TEMPERATURE_DAMAGE_COEFFICIENT)) return ..() +/datum/reagent/consumable/garlic + name = "Garlic Juice" + id = "garlic" + description = "Crushed garlic. Chefs love it, but it can make you smell bad." + color = "#FEFEFE" + taste_description = "garlic" + metabolization_rate = 0.15 * REAGENTS_METABOLISM + +/datum/reagent/consumable/garlic/on_mob_life(mob/living/carbon/M) + var/update_flags = STATUS_UPDATE_NONE + if(ishuman(M)) + var/mob/living/carbon/human/H = M + if(H.mind && H.mind.vampire && !H.mind.vampire.get_ability(/datum/vampire_passive/full)) //incapacitating but not lethal. + if(prob(min(25, current_cycle))) + to_chat(H, "You can't get the scent of garlic out of your nose! You can barely think...") + H.Weaken(1) + H.Jitter(10) + H.fakevomit() + else + if(H.job == "Chef") + if(prob(20)) //stays in the system much longer than sprinkles/banana juice, so heals slower to partially compensate + update_flags |= H.adjustBruteLoss(-1, FALSE) + update_flags |= H.adjustFireLoss(-1, FALSE) + return ..() | update_flags + /datum/reagent/consumable/sprinkles name = "Sprinkles" id = "sprinkles"