Skip to content

Commit

Permalink
Makes chocolate, avocados, peanuts, garlic and grapes harmful to dogs…
Browse files Browse the repository at this point in the history
… (plus their products) (#37104)

* Makes chocolate and grapes harmful to corgis

* updates to spec, now for testing

* more flexible code, plus more types as requested

* consistency

* get this outta here

* cleaner

* adds more types

---------

Co-authored-by: SECBATON-GRIFFON <[email protected]>
  • Loading branch information
SECBATON-GRIFFON and SECBATON-GRIFFON committed Sep 22, 2024
1 parent 32e3b2f commit 3d68582
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
10 changes: 10 additions & 0 deletions code/modules/mob/living/simple_animal/simple_animal.dm
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,16 @@ var/global/list/animal_count = list() //Stores types, and amount of animals of t
else
return FALSE

/mob/living/simple_animal/proc/atepoison() //reusable function
health -= 5
if(prob(10))
if(istype(loc, /turf/simulated))
var/turf/simulated/T = loc
T.add_vomit_floor(src, 1, 0, 1)
Stun(5)
visible_message("<span class='warning'>[src] throws up!</span>","<span class='danger'>You throw up!</span>")
playsound(loc, 'sound/effects/splat.ogg', 50, 1)

// Simplemobs do not have hands.
/mob/living/simple_animal/put_in_hand_check(obj/item/W, index)
return 0
Expand Down
4 changes: 4 additions & 0 deletions code/modules/reagents/Chemistry-Reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
var/nutriment_factor = 0
var/pain_resistance = 0
var/sport = SPORTINESS_NONE //High sport helps you show off on a treadmill. Multiplicative
var/harms_animal_type //What kind of animal does this harm?
var/custom_metabolism = REAGENTS_METABOLISM
var/overdose_am = 0
var/overdose_tick = 0
Expand Down Expand Up @@ -139,6 +140,9 @@

M.reagent_act(self.id, method, volume)

if(self.harms_animal_type && istype(M,self.harms_animal_type))
M.atepoison()

/datum/reagent/proc/reaction_obj(var/obj/O, var/volume, var/list/splashplosion=list())
set waitfor = 0

Expand Down
13 changes: 13 additions & 0 deletions code/modules/reagents/reagent_containers/food/snacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
var/wrapped = 0 //Is the food wrapped (preventing one from eating until unwrapped)
var/dried_type = null //What can we dry the food into
var/deepfried = 0 //Is the food deep-fried ?
var/harmfultocorgis = 0 //Is it harmful for corgis to eat?
var/filling_color = "#FFFFFF" //What color would a filling of this item be ?
var/list/random_filling_colors = list()
var/plate_offset_y = 0
Expand Down Expand Up @@ -718,6 +719,9 @@
after_consume(M, reagents)
playsound(M,'sound/items/eatfood.ogg', rand(10,50), 1)
M.delayNextAttack(10)
if(harmfultocorgis)
var/mob/living/simple_animal/corgi/C = M
C.atepoison()
if(!reagents || !reagents.total_volume)
M.visible_message("[M] [pick("burps from enjoyment", "yaps for more", "woofs twice", "looks at the area where \the [src] was")].", "<span class='notice'>You swallow up the last of \the [src].")
qdel(src)
Expand Down Expand Up @@ -1663,6 +1667,7 @@
icon_state = "avocadoburger"
food_flags = FOOD_MEAT
base_crumb_chance = 20
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/avocadoburger/New()
..()
Expand Down Expand Up @@ -2917,6 +2922,7 @@
crumb_icon = "dribbles"
filling_color = "#CBD15B"
valid_utensils = UTENSILE_SPOON
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/avocadosoup/New()
..()
Expand Down Expand Up @@ -3236,6 +3242,7 @@
desc = "Salted avocado on a slice of toast. For the authentic experience, make sure you pay an exorbitant price for it."
icon_state = "avocadotoast"
food_flags = FOOD_DIPPABLE
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/avocadotoast/New()
..()
Expand Down Expand Up @@ -5762,6 +5769,7 @@
base_crumb_chance = 0
crumb_icon = "dribbles"
valid_utensils = UTENSILE_SPOON
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/avocadomilkshake/New()
..()
Expand Down Expand Up @@ -6318,6 +6326,7 @@
icon_state = "garlicbread"
bitesize = 3
food_flags = FOOD_DIPPABLE
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/garlicbread/New()
..()
Expand Down Expand Up @@ -7264,6 +7273,7 @@ var/global/list/bomb_like_items = list(/obj/item/device/transfer_valve, /obj/ite
desc = "A simple sushi consisting of avocado and rice."
icon = 'icons/obj/seafood.dmi'
icon_state = "sushi_avocado"
harmfultocorgis = TRUE

//// END SUSHI ////

Expand Down Expand Up @@ -7713,6 +7723,7 @@ var/global/list/bomb_like_items = list(/obj/item/device/transfer_valve, /obj/ite
icon = 'icons/obj/food2.dmi'
icon_state = "peanutbutter"
base_crumb_chance = 0
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/peanutbutter/New()
..()
Expand All @@ -7725,6 +7736,7 @@ var/global/list/bomb_like_items = list(/obj/item/device/transfer_valve, /obj/ite
icon = 'icons/obj/food2.dmi'
icon_state = "saltednuts"
base_crumb_chance = 0
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/saltednuts/New()
..()
Expand All @@ -7738,6 +7750,7 @@ var/global/list/bomb_like_items = list(/obj/item/device/transfer_valve, /obj/ite
icon = 'icons/obj/food2.dmi'
icon_state = "pbj"
base_crumb_chance = 0
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/pbj/New()
..()
Expand Down
6 changes: 6 additions & 0 deletions code/modules/reagents/reagent_containers/food/snacks/grown.dm
Original file line number Diff line number Diff line change
Expand Up @@ -394,20 +394,23 @@ var/list/strange_seed_product_blacklist = subtypesof(/obj/item/weapon/reagent_co
desc = "Nutritious!"
filling_color = "#A332AD"
plantname = "grapes"
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/grown/greengrapes
name = "bunch of green grapes"
desc = "Nutritious!"
potency = 25
filling_color = "#A6FFA3"
plantname = "greengrapes"
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/grown/peanut
name = "peanut"
desc = "Nuts!"
filling_color = "857e27"
potency = 25
plantname = "peanut"
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/grown/rocknut
name = "rocknut"
Expand Down Expand Up @@ -486,6 +489,7 @@ var/list/strange_seed_product_blacklist = subtypesof(/obj/item/weapon/reagent_co
potency = 50
filling_color = "#9C8E54"
plantname = "cocoa"
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/grown/sugarcane
name = "sugarcane"
Expand Down Expand Up @@ -902,6 +906,7 @@ var/list/strange_seed_product_blacklist = subtypesof(/obj/item/weapon/reagent_co
filling_color = "EDEDE1"
plantname = "garlic"
hydroflags = HYDRO_VOX
harmfultocorgis = TRUE

/obj/item/weapon/reagent_containers/food/snacks/grown/breadfruit
name = "breadfruit"
Expand Down Expand Up @@ -1041,6 +1046,7 @@ var/list/strange_seed_product_blacklist = subtypesof(/obj/item/weapon/reagent_co
icon = 'icons/obj/hydroponics/avocado.dmi'
filling_color = "#EAE791"
plantname = "avocado"
harmfultocorgis = TRUE
var/cant_eat_msg = "'s skin is much too tough to chew."
var/cut = FALSE

Expand Down
2 changes: 2 additions & 0 deletions code/modules/reagents/reagents/reagents_drink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -183,13 +183,15 @@
description = "Freshly squeezed juice from red grapes. Quite sweet."
color = "#512284" //rgb: 81, 34, 132
nutriment_factor = 2.5 * REAGENTS_METABOLISM
harms_animal_type = /mob/living/simple_animal/corgi

/datum/reagent/drink/ggrapejuice
name = "Green Grape Juice"
id = GGRAPEJUICE
description = "Freshly squeezed juice from green grapes. Smoothly sweet."
color = "#B79E42" //rgb: 183, 158, 66
nutriment_factor = 2.5 * REAGENTS_METABOLISM
harms_animal_type = /mob/living/simple_animal/corgi

/datum/reagent/drink/berryjuice
name = "Berry Juice"
Expand Down
1 change: 1 addition & 0 deletions code/modules/reagents/reagents/reagents_food.dm
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
reagent_state = REAGENT_STATE_SOLID
nutriment_factor = 5 * REAGENTS_METABOLISM
color = "#302000" //rgb: 48, 32, 0
harms_animal_type = /mob/living/simple_animal/corgi

/datum/reagent/condensedcapsaicin
name = "Condensed Capsaicin"
Expand Down

0 comments on commit 3d68582

Please sign in to comment.