Skip to content
This repository has been archived by the owner on Apr 16, 2021. It is now read-only.

UM-029 - Grapefruit #174

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
31 changes: 31 additions & 0 deletions code/datums/chemistry/Reagents-FoodDrink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2248,6 +2248,37 @@ datum
boutput(M, "<span style=\"color:red\">Your eyes sting!</span>")
M.change_eye_blurry(rand(5, 20))

fooddrink/juice_grapefruit
name = "grapefruit juice"
id = "juice_grapefruit"
fluid_r = 238
fluid_g = 120
fluid_b = 92
description = "A citric beverage extracted from grapefruit."
reagent_state = LIQUID
thirst_value = 1.5

on_mob_life(var/mob/M)
if(!M) M = holder.my_atom
for(var/reagent_id in M.reagents.reagent_list)
if(reagent_id != id) // you know, just in case juice_grapefruit gets added to the whitelist :rolling_eyes:
if(reagent_id in chem_whitelist) // I can't be fucked to limit it to just the ones that make sense. This is a fucking fruit from a space grape, deal with it.
M.reagents.remove_reagent(reagent_id, 0.5) //grapefruit juice is known to reduce the effectiveness of a wide variety of medications
..(M)
return

reaction_mob(var/mob/M, var/method=TOUCH, var/volume)
if(method == TOUCH)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.wear_mask) return
if(H.head) return
if(prob(75))
M.emote("gasp")
boutput(M, "<span style=\"color:red\">Your eyes sting!</span>")
M.change_eye_blurry(rand(5, 20))


fooddrink/juice_tomato
name = "tomato juice"
id = "juice_tomato"
Expand Down
23 changes: 23 additions & 0 deletions code/datums/chemistry/tools/food_and_drink.dm
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,15 @@
src.update_icon()
qdel(W)

else if (istype(W, /obj/item/reagent_containers/food/snacks/plant/grapefruit/wedge))
if (src.wedge)
boutput(user, "<span style=\"color:red\">You can't add another wedge to [src], that would just look silly!!</span>")
return
boutput(user, "<span style=\"color:blue\">You add [W] to the lip of [src].</span>")
src.wedge = "grapefruit"
src.update_icon()
qdel(W)

else if (istype(W, /obj/item/reagent_containers/food/snacks/plant/orange) && !istype(W, /obj/item/reagent_containers/food/snacks/plant/orange/wedge))
if (src.reagents.total_volume >= src.reagents.maximum_volume)
boutput(user, "<span style=\"color:red\">[src] is full.</span>")
Expand All @@ -662,6 +671,14 @@
W.reagents.trans_to(src, W.reagents.total_volume)
qdel(W)

else if (istype(W, /obj/item/reagent_containers/food/snacks/plant/grapefruit) && !istype(W, /obj/item/reagent_containers/food/snacks/plant/grapefruit/wedge))
if (src.reagents.total_volume >= src.reagents.maximum_volume)
boutput(user, "<span style=\"color:red\">[src] is full.</span>")
return
boutput(user, "<span style=\"color:blue\">You squeeze [W] into [src].</span>")
W.reagents.trans_to(src, W.reagents.total_volume)
qdel(W)

else if (istype(W, /obj/item/cocktail_stuff))
if (src.umbrella || src.in_glass)
boutput(user, "<span style=\"color:red\">There's not enough room to put that in [src]!</span>")
Expand Down Expand Up @@ -776,6 +793,10 @@
eat_message = "orange wedge off"
H.reagents.add_reagent("juice_orange", 5)
src.wedge = null
if ("eat the grapefruit wedge")
eat_message = "grapefruit wedge off"
H.reagents.add_reagent("juice_grapefruit", 5)
src.wedge = null

H.visible_message("<B>[H]</B> plucks the [eat_message] of [src] and eats it.")
playsound(H.loc, "sound/items/eatfood.ogg", rand(10,50), 1)
Expand Down Expand Up @@ -816,6 +837,8 @@
new /obj/item/reagent_containers/food/snacks/plant/lime/wedge(T)
if (src.wedge == "orange")
new /obj/item/reagent_containers/food/snacks/plant/orange/wedge(T)
if (src.wedge == "grapefruit")
new /obj/item/reagent_containers/food/snacks/plant/grapefruit/wedge(T)
qdel(src)

throw_impact(var/turf/T)
Expand Down
6 changes: 6 additions & 0 deletions code/datums/hydroponics/plant_mutations.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,12 @@
crop = /obj/item/reagent_containers/food/snacks/plant/grape/green
iconmod = "Ggrape"

/datum/plantmutation/grapes/fruit
name = "Grapefruit"
crop = /obj/item/reagent_containers/food/snacks/plant/grapefruit
iconmod = "Grapefruit"
assoc_reagents = list("juice_grapefruit")

// Orange Mutations

/datum/plantmutation/orange/blood
Expand Down
2 changes: 1 addition & 1 deletion code/datums/hydroponics/plants_fruit.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
endurance = 0
genome = 20
nectarlevel = 10
mutations = list(/datum/plantmutation/grapes/green)
mutations = list(/datum/plantmutation/grapes/green,/datum/plantmutation/grapes/fruit)
commuts = list(/datum/plant_gene_strain/metabolism_fast,/datum/plant_gene_strain/seedless)

/datum/plant/orange
Expand Down
41 changes: 41 additions & 0 deletions code/obj/item/food/plants.dm
Original file line number Diff line number Diff line change
Expand Up @@ -597,6 +597,47 @@
..()
reagents.add_reagent("juice_lemon",5)

/obj/item/reagent_containers/food/snacks/plant/grapefruit/
name = "grapefruit"
desc = "A delicious grape fruit."
icon_state = "grapefruit"
planttype = /datum/plant/grape
amount = 3
heal_amt = 1
food_color = "#F69C42"
plant_reagent = "juice_grapefruit"

attackby(obj/item/W as obj, mob/user as mob)
if (istype(W, /obj/item/axe) || istype(W, /obj/item/circular_saw) || istype(W, /obj/item/kitchen/utensil/knife) || istype(W, /obj/item/scalpel) || istype(W, /obj/item/sword) || istype(W,/obj/item/saw) || istype(W,/obj/item/knife_butcher))
if (istype (src, /obj/item/reagent_containers/food/snacks/plant/grapefruit/wedge))
boutput(user, "<span style=\"color:red\">You can't cut wedges into wedges! What kind of insanity is that!?</span>")
return
var/turf/T = get_turf(src)
user.visible_message("[user] cuts [src] into slices.", "You cut [src] into slices.")
var/makeslices = 6
while (makeslices > 0)
var/obj/item/reagent_containers/food/snacks/plant/grapefruit/wedge/P = new(T)
var/datum/plantgenes/DNA = src.plantgenes
var/datum/plantgenes/PDNA = P.plantgenes
HYPpassplantgenes(DNA,PDNA)
makeslices -= 1
qdel (src)
..()

/obj/item/reagent_containers/food/snacks/plant/grapefruit/wedge
name = "grapefruit wedge"
icon = 'icons/obj/drink.dmi'
icon_state = "old-grapefruit"
throwforce = 0
w_class = 1.0
amount = 1
initial_volume = 6

New()
..()
reagents.add_reagent("juice_grapefruit",5)


/obj/item/reagent_containers/food/snacks/plant/slurryfruit/
name = "slurrypod"
desc = "An extremely poisonous, bitter fruit. The slurrypod fruit is regarded as a delicacy in some outer colony worlds."
Expand Down
Binary file modified icons/obj/foodNdrink/food_produce.dmi
Binary file not shown.
Binary file modified icons/obj/hydroponics/hydro_mutants.dmi
Binary file not shown.