Reworking the taste system to allow for species-level taste definitions.

Reworking how data is initialized and handled by reagents.

Post-rebase update for taste PR.

Further work on the taste system.

Updating taste strings. God help me.
This commit is contained in:
MistakeNot4892
2023-08-30 20:45:57 +10:00
parent c8d8d55c29
commit f01fbaa902
15 changed files with 697 additions and 273 deletions
+1 -25
View File
@@ -103,7 +103,6 @@
update_total()
/* Holder-to-chemical */
/datum/reagents/proc/add_reagent(var/id, var/amount, var/data = null, var/safety = 0)
if(!isnum(amount) || amount <= 0)
return 0
@@ -111,34 +110,11 @@
update_total()
amount = min(amount, get_free_space())
if(istype(my_atom,/obj/item/reagent_containers/food)) //The following code is targeted specifically at getting allergen reagents into food items, since for the most part they're not applied by default.
var/list/add_reagents = list()
var/totalnum = 0
for(var/item in data) //Try to find the ID
var/add_reagent_id = null
if(item in SSchemistry.chemical_reagents)
add_reagent_id = item
else if("[item]juice" in SSchemistry.chemical_reagents)
add_reagent_id = "[item]juice"
if(add_reagent_id) //If we did find it, add it to our list of reagents to add, and add the number to our total.
add_reagents[add_reagent_id] += data[item]
totalnum += data[item]
if(totalnum)
var/multconst = amount/totalnum //We're going to add these extra reagents so that they share the ratio described, but only add up to 1x the existing amount at the most
for(var/item in add_reagents)
add_reagent(item,add_reagents[item]*multconst)
for(var/datum/reagent/current in reagent_list)
if(current.id == id)
if(current.id == "blood")
if(LAZYLEN(data) && !isnull(data["species"]) && !isnull(current.data["species"]) && data["species"] != current.data["species"]) // Species bloodtypes are already incompatible, this just stops it from mixing into the one already in a container.
continue
current.volume += amount
if(!isnull(data)) // For all we know, it could be zero or empty string and meaningful
current.mix_data(data, amount)
@@ -154,7 +130,7 @@
reagent_list += R
R.holder = src
R.volume = amount
R.initialize_data(data)
R.initialize_data(R.get_initial_data(data))
update_total()
if(!safety)
handle_reactions()
+81 -8
View File
@@ -1,5 +1,66 @@
var/global/list/_cached_taste_data = list()
/proc/get_cached_taste_data(var/rid, var/list/input, var/list/existing)
// Generate our cache key.
var/cache_key = list(rid)
if(input)
cache_key += json_encode(input)
if(existing)
cache_key += json_encode(existing)
cache_key = jointext(cache_key, null)
if(!global._cached_taste_data[cache_key])
// Ensure taste data is an associative list of categories to
// associative lists of taste strings to numerical weights.
// ie. list(TASTE_STRING_DEFAULT = list("foo" = 1, "bar" = 10))
// Validate input is structured as expected and set our cached value.
// Take a deep copy to avoid accidental mutation elsewhere.
var/list/taste = list()
if(!input)
taste = list()
else if(!islist(input))
taste = list(input)
else
taste = deepCopyList(input)
if(!taste[TASTE_STRING_DEFAULT])
taste = list(TASTE_STRING_DEFAULT = taste)
// Wrap single values in lists for categories.
for(var/taste_cat in taste)
if(isnull(taste[taste_cat]))
taste -= taste_cat
else if(!islist(taste[taste_cat]))
taste[taste_cat] = list(taste[taste_cat])
// Update with pre-existing info.
if(existing)
for(var/taste_cat in existing)
if(taste[taste_cat])
// Mix
for(var/taste_string in existing[taste_cat])
if(!isnum(taste[taste_cat][taste_string]))
taste[taste_cat][taste_string] = 1
if(isnum(existing[taste_cat][taste_string]))
taste[taste_cat][taste_string] += existing[taste_cat][taste_string]
else
taste[taste_cat][taste_string] += 1
else
// Wholesale copy
taste[taste_cat] = existing[taste_cat]
// Make sure every string has a numerical weighting.
for(var/taste_cat in taste)
for(var/taste_string in taste[taste_cat])
if(!isnum(taste[taste_cat][taste_string]))
taste[taste_cat][taste_string] = 1
// Cache our generated taste data for later.
global._cached_taste_data[cache_key] = json_encode(taste)
return global._cached_taste_data[cache_key]
/datum/reagent
var/name = "Reagent"
@@ -195,19 +256,31 @@
M.adjustToxLoss(min(removed * overdose_mod * round(3 + 3 * volume / overdose), 3.6))
/datum/reagent/proc/initialize_data(var/newdata) // Called when the reagent is created.
if(!isnull(newdata))
SHOULD_CALL_PARENT(TRUE)
if(islist(newdata) && length(newdata))
data = newdata
return
// Returns FALSE if no further mixing is needed, TRUE if it is.
/datum/reagent/proc/mix_data(var/newdata, var/newamount) // You have a reagent with data, and new reagent with its own data get added, how do you deal with that?
return
SHOULD_CALL_PARENT(TRUE)
if(!islist(data) && islist(newdata) && length(newdata))
initialize_data(newdata)
return FALSE
return TRUE
/datum/reagent/proc/get_initial_data(var/list/newdata)
if(taste_description)
var/newtastedata = get_cached_taste_data(id, taste_description, LAZYACCESS(newdata, TASTE_DATA_FIELD))
taste_description = null // This proc is never called except after new(), so ditch this to avoid memory use.
LAZYSET(newdata, TASTE_DATA_FIELD, newtastedata)
return newdata
/datum/reagent/proc/get_data() // Just in case you have a reagent that handles data differently.
if(data && istype(data, /list))
return data.Copy()
else if(data)
return data
return null
return islist(data) && length(data) ? data.Copy() : null
/datum/reagent/proc/get_taste_data()
var/list/ret = get_data()
return LAZYACCESS(ret, TASTE_DATA_FIELD)
/datum/reagent/Destroy() // This should only be called by the holder, so it's already handled clearing its references
holder = null
+6 -17
View File
@@ -15,18 +15,8 @@
glass_desc = "Are you sure this is tomato juice?"
/datum/reagent/blood/initialize_data(var/newdata)
..()
if(data && data["blood_colour"])
color = data["blood_colour"]
return
/datum/reagent/blood/get_data() // Just in case you have a reagent that handles data differently.
var/t = data.Copy()
if(t["virus2"])
var/list/v = t["virus2"]
t["virus2"] = v.Copy()
return t
. = ..()
color = LAZYACCESS(data, "blood_colour") || COLOR_RED
/datum/reagent/blood/touch_turf(var/turf/simulated/T)
if(!istype(T) || volume < 3)
@@ -116,11 +106,10 @@
/datum/reagent/blood/synthblood/initialize_data(var/newdata)
..()
if(data && !data["blood_type"])
data["blood_type"] = "O-"
if(data && data["species"])
data["species"] = null
return
if(data)
if(!data["blood_type"])
data["blood_type"] = "O-"
data -= "species"
/datum/reagent/blood/synthblood/dilute
name = "synthetic plasma"
+8 -2
View File
@@ -299,7 +299,10 @@
name = "Potassium"
id = "potassium"
description = "A soft, low-melting solid that can easily be cut with a knife. Reacts violently with water."
taste_description = "sweetness" //potassium is bitter in higher doses but sweet in lower ones.
taste_description = list(
TASTE_STRING_DEFAULT = "sweetness",
SPECIES_TESHARI = "mild bitterness"
) //potassium is bitter in higher doses but sweet in lower ones.
reagent_state = SOLID
color = "#A0A0A0"
@@ -445,7 +448,10 @@
name = "Sugar"
id = "sugar"
description = "The organic compound commonly known as table sugar and sometimes called saccharose. This white, odorless, crystalline powder has a pleasing, sweet taste."
taste_description = "sugar"
taste_description = list(
SPECIES_TESHARI = "chalk",
TASTE_STRING_DEFAULT = "sugar"
)
taste_mult = 1.8
reagent_state = SOLID
color = "#FFFFFF"
+274 -110
View File
@@ -8,33 +8,62 @@
reagent_state = SOLID
metabolism = REM * 4
ingest_met = REM * 4
taste_description = null
var/nutriment_factor = 30 // Per unit
var/injectable = 0
color = "#664330"
/datum/reagent/nutriment/mix_data(var/list/newdata, var/newamount)
if(!islist(newdata) || !newdata.len)
. = ..(newdata)
var/list/adding_flavours = LAZYACCESS(newdata, TASTE_DATA_FIELD)
if(!. || !adding_flavours)
return
adding_flavours = cached_json_decode(adding_flavours)
if(!islist(adding_flavours) || !length(adding_flavours))
return
//add the new taste data
if(islist(data))
for(var/taste in newdata)
if(taste in data)
data[taste] += newdata[taste]
else
data[taste] = newdata[taste]
// Get our existing taste data. This will be reencoded and rewritten after we update it.
var/list/existing_taste_data = LAZYACCESS(data, TASTE_DATA_FIELD)
if(existing_taste_data)
existing_taste_data = cached_json_decode(existing_taste_data)
else
initialize_data(newdata)
existing_taste_data = list()
//cull all tastes below 5% of total
var/totalFlavor = 0
for(var/taste in data)
totalFlavor += data[taste]
if(totalFlavor) //Let's not divide by zero for things w/o taste
for(var/taste in data)
if(data[taste]/totalFlavor < 0.05)
data -= taste
// Mix in any supplied flavours.
var/added_taste = FALSE
for(var/taste in adding_flavours)
var/taste_data = adding_flavours[taste]
if(islist(taste_data))
var/list/existing_taste_category = existing_taste_data[taste]
if(!existing_taste_category)
existing_taste_category = list()
existing_taste_data[taste] = existing_taste_category
added_taste = TRUE
for(var/taste_string in taste_data)
existing_taste_category[taste_string] += taste_data[taste_string]
added_taste = TRUE
// Cull all tastes below 10% of total.
for(var/taste_cat in existing_taste_data)
var/total_flavor = 0
var/list/taste_data = existing_taste_data[taste_cat]
if(!length(taste_data))
continue
for(var/taste_string in taste_data)
total_flavor += taste_data[taste_string]
if(total_flavor <= 0) //Let's not divide by zero for things w/o taste
continue
for(var/taste_string in taste_data)
if(taste_data[taste_string] /total_flavor < 0.05)
taste_data -= taste_string
added_taste = TRUE
if(!length(taste_data))
existing_taste_data -= taste_cat
added_taste = TRUE
// Save our mixed data if needed.
if(added_taste)
LAZYSET(data, TASTE_DATA_FIELD, json_encode(existing_taste_data))
#define ANIMAL_NUTRITION_MULTIPLIER 0.5
/datum/reagent/nutriment/affect_animal(var/mob/living/simple_mob/animal/M, var/removed)
@@ -96,27 +125,20 @@
..()
/datum/reagent/nutriment/coating/initialize_data(var/newdata) // Called when the reagent is created.
..()
if (!data)
data = list()
else
if (isnull(data["cooked"]))
data["cooked"] = 0
return
data["cooked"] = 0
if (holder && holder.my_atom && istype(holder.my_atom,/obj/item/reagent_containers/food/snacks))
data["cooked"] = 1
. = ..()
LAZYINITLIST(data)
if(holder && holder.my_atom && istype(holder.my_atom,/obj/item/reagent_containers/food/snacks))
data["cooked"] = TRUE
name = cooked_name
else
data["cooked"] = FALSE
//Batter which is part of objects at compiletime spawns in a cooked state
//Handles setting the temperature when oils are mixed
/datum/reagent/nutriment/coating/mix_data(var/newdata, var/newamount)
if (!data)
data = list()
data["cooked"] = newdata["cooked"]
. = ..()
if(. && LAZYACCESS(newdata, "cooked") != null)
LAZYSET(data, "cooked", newdata["cooked"])
/datum/reagent/nutriment/coating/batter
name = "batter mix"
@@ -187,28 +209,17 @@
T.wet_floor(2)
/datum/reagent/nutriment/triglyceride/oil/initialize_data(var/newdata) // Called when the reagent is created.
..()
if (!data)
data = list("temperature" = T20C)
. = ..()
LAZYSET(data, "temperature", T20C)
//Handles setting the temperature when oils are mixed
/datum/reagent/nutriment/triglyceride/oil/mix_data(var/newdata, var/newamount)
if (!data)
data = list()
var/ouramount = volume - newamount
if (ouramount <= 0 || !data["temperature"] || !volume)
//If we get here, then this reagent has just been created, just copy the temperature exactly
data["temperature"] = newdata["temperature"]
else
//Our temperature is set to the mean of the two mixtures, taking volume into account
var/total = (data["temperature"] * ouramount) + (newdata["temperature"] * newamount)
data["temperature"] = total / volume
return ..()
. = ..()
if(.)
var/newtemp = LAZYACCESS(newdata, "temperature")
if(newtemp != null)
var/total = ((LAZYACCESS(data, "temperature") * (volume - newamount)) + (newtemp * newamount)) / volume
LAZYSET(data, "temperature", total)
//Calculates a scaling factor for scalding damage, based on the temperature of the oil and creature's heat resistance
/datum/reagent/nutriment/triglyceride/oil/proc/heatdamage(var/mob/living/carbon/M)
@@ -261,7 +272,10 @@
/datum/reagent/nutriment/glucose
name = "Glucose"
id = "glucose"
taste_description = "sweetness"
taste_description = list(
TASTE_STRING_DEFAULT = "sweetness",
SPECIES_TESHARI = "blandness"
)
color = "#FFFFFF"
injectable = 1
@@ -314,7 +328,10 @@
name = "Honey"
id = "honey"
description = "A golden yellow syrup, loaded with sugary sweetness."
taste_description = "sweetness"
taste_description = list(
SPECIES_TESHARI = "floral notes",
TASTE_STRING_DEFAULT = "sweetness"
)
nutriment_factor = 10
color = "#FFFF00"
@@ -445,14 +462,20 @@
name = "Watermelon Juice Powder"
id = "instantwatermelon"
description = "Dehydrated, powdered watermelon juice."
taste_description = "dry sweet watermelon"
taste_description = list(
SPECIES_TESHARI = "dry watermelon",
TASTE_STRING_DEFAULT = "dry sweet watermelon"
)
color = "#b83333"
/datum/reagent/nutriment/instantjuice/apple
name = "Apple Juice Powder"
id = "instantapple"
description = "Dehydrated, powdered apple juice."
taste_description = "dry sweet apples"
taste_description = list(
SPECIES_TESHARI = "dry apples",
TASTE_STRING_DEFAULT = "dry sweet apples"
)
color = "#c07c40"
/datum/reagent/nutriment/soysauce
@@ -549,7 +572,10 @@
name = "Durian Paste"
id = "durianpaste"
description = "A strangely sweet and savory paste."
taste_description = "sweet and savory"
taste_description = list(
SPECIES_TESHARI = "an odd savoury flavour",
TASTE_STRING_DEFAULT = "sweet and savory flavours"
)
color = "#757631"
glass_name = "durian paste"
@@ -587,7 +613,10 @@
name = "Sprinkles"
id = "sprinkles"
description = "Multi-colored little bits of sugar, commonly found on donuts. Loved by cops."
taste_description = "sugar"
taste_description = list(
SPECIES_TESHARI = "crunchy chalk",
TASTE_STRING_DEFAULT = "crunchy sugar"
)
nutriment_factor = 1
color = "#FF00FF"
@@ -646,7 +675,10 @@
name = "Universal Enzyme"
id = "enzyme"
description = "A universal enzyme used in the preperation of certain chemicals and foods."
taste_description = "sweetness"
taste_description = list(
SPECIES_TESHARI = "a tingling sensation",
TASTE_STRING_DEFAULT = "sweetness"
)
taste_mult = 0.7
reagent_state = LIQUID
color = "#365E30"
@@ -1157,7 +1189,10 @@
name = "Watermelon Juice"
id = "watermelonjuice"
description = "Delicious juice made from watermelon."
taste_description = "sweet watermelon"
taste_description = list(
SPECIES_TESHARI = "watermelon",
TASTE_STRING_DEFAULT = "sweet watermelon"
)
color = "#B83333"
glass_name = "watermelon juice"
@@ -1278,7 +1313,10 @@
name = "Iced Tea"
id = "icetea"
description = "No relation to a certain rap artist/ actor."
taste_description = "sweet tea"
taste_description = list(
SPECIES_TESHARI = "bitter tea",
TASTE_STRING_DEFAULT = "sweet tea"
)
color = "#AC7F24" // rgb: 16, 64, 56
adj_temp = -5
@@ -1455,8 +1493,10 @@
id = "chaitea"
description = "A milky tea spiced with cinnamon and cloves."
color = "#A8442C"
taste_description = "creamy cinnamon and spice"
taste_description = list(
SPECIES_TESHARI = "creamy cinnamon",
TASTE_STRING_DEFAULT = "creamy cinnamon and spice"
)
glass_name = "chai tea"
glass_desc = "A milky tea spiced with cinnamon and cloves."
@@ -1706,7 +1746,10 @@
name = "Pineappleade"
id = "pineappleade"
description = "Pineapple, juiced up."
taste_description = "sweet`n`sour pineapples"
taste_description = list(
SPECIES_TESHARI = "sour pineapples",
TASTE_STRING_DEFAULT = "sweet and sour pineapples"
)
color = "#FFFF00"
adj_temp = -5
@@ -1719,7 +1762,10 @@
name = "Kira Special"
id = "kiraspecial"
description = "Long live the guy who everyone had mistaken for a girl. Baka!"
taste_description = "fruity sweetness"
taste_description = list(
SPECIES_TESHARI = "fruity flavours",
TASTE_STRING_DEFAULT = "fruity sweetness"
)
color = "#CCCC99"
adj_temp = -5
@@ -1964,7 +2010,10 @@
name = "Orange Soda"
id = "orangesoda"
description = "Soda made using fresh picked oranges."
taste_description = "sweet and citrusy"
taste_description = list(
SPECIES_TESHARI = "citrus",
TASTE_STRING_DEFAULT = "sweet citrus"
)
reagent_state = LIQUID
color = "#ff992c"
adj_drowsy = -3
@@ -2008,7 +2057,10 @@
name = "Bacon Soda"
id = "porksoda"
description = "Soda made using pork like flavoring."
taste_description = "sugar coated bacon"
taste_description = list(
SPECIES_TESHARI = "reconstituted pork",
TASTE_STRING_DEFAULT = "sugar-coated bacon"
)
reagent_state = LIQUID
color = "ff8080"
adj_drowsy = -3
@@ -2022,7 +2074,11 @@
name = "Mountain Wind"
id = "spacemountainwind"
description = "Blows right through you like a space wind."
taste_description = "sweet citrus soda"
taste_description = list(
SPECIES_TESHARI = "fizzy citrus",
TASTE_STRING_DEFAULT = "fizzy, sweet citrus"
)
color = "#102000"
adj_drowsy = -7
adj_sleepy = -1
@@ -2098,8 +2154,10 @@
name = "Diet Dr. Gibb"
id = "diet_dr_gibb"
color = "#102000"
taste_description = "chemically sweetened cherry soda"
taste_description = list(
SPECIES_TESHARI = "cherries",
TASTE_STRING_DEFAULT = "sweet cherries"
)
glass_name = "glass of Diet Dr. Gibb"
glass_desc = "Regular Dr.Gibb is probably healthier than this cocktail of artificial flavors."
glass_special = list(DRINK_FIZZ)
@@ -2108,7 +2166,10 @@
name = "Shirley Temple"
id = "shirley_temple"
description = "A sweet concotion hated even by its namesake."
taste_description = "sweet ginger ale"
taste_description = list(
SPECIES_TESHARI = "ginger ale",
TASTE_STRING_DEFAULT = "sweet ginger ale"
)
color = "#EF304F"
adj_temp = -8
@@ -2146,7 +2207,10 @@
name = "Arnold Palmer"
id = "arnold_palmer"
description = "Tastes just like the old man."
taste_description = "lemon and sweet tea"
taste_description = list(
SPECIES_TESHARI = "lemon tea",
TASTE_STRING_DEFAULT = "lemon and sweet tea"
)
color = "#AF5517"
adj_temp = -8
@@ -2203,7 +2267,10 @@
name = "Hell Ramen"
id = "hell_ramen"
description = "The noodles are boiled, the flavors are artificial, just like being back in school."
taste_description = "noodles and spice"
taste_description = list(
SPECIES_TESHARI = "noodles with a strange aftertaste",
TASTE_STRING_DEFAULT = "noodles and spice"
)
taste_mult = 1.7
reagent_state = LIQUID
color = "#302000"
@@ -2218,8 +2285,11 @@
/datum/reagent/drink/sweetsundaeramen
name = "Dessert Ramen"
id = "dessertramen"
description = "How many things can you add to a cup of ramen before it begins to question its exitance?"
taste_description = "unbearable sweetness"
description = "How many things can you add to a cup of ramen before it begins to question its existence?"
taste_description = list(
SPECIES_TESHARI = "bland, sticky slime",
TASTE_STRING_DEFAULT = "unbearable sweetness"
)
color = "#4444FF"
nutrition = 5
@@ -2270,7 +2340,10 @@
name = "Dream Cream"
id = "dreamcream"
description = "A smoothy, silky mix of honey and dairy."
taste_description = "sweet, soothing dairy"
taste_description = list(
SPECIES_TESHARI = "bland dairy",
TASTE_STRING_DEFAULT = "sweet, soothing dairy"
)
color = "#fcfcc9" // rgb(252, 252, 201)
glass_name = "Dream Cream"
@@ -2293,7 +2366,11 @@
name = "Ent's Draught"
id = "entdraught"
description = "A natural, earthy combination of all things peaceful."
taste_description = "fresh rain and sweet memories"
// Pedantic to make Tesh not taste sweet in the context of a metaphor, but this is similar to chivalry below, what does it taste like?
taste_description = list(
SPECIES_TESHARI = "petrichor and distant tundra",
TASTE_STRING_DEFAULT = "fresh rain and sweet memories"
)
color = "#3a6617" // rgb(58, 102, 23)
glass_name = "Ent's Draught"
@@ -2457,7 +2534,11 @@
name = "Berry Cordial"
id = "berrycordial"
description = "How <font face='comic sans ms'>berry cordial</font> of you."
taste_description = "sweet chivalry"
// Pedantic to make Tesh not taste sweet in the context of a metaphor, but what the hell does 'sweet chivalry' taste like anyway?
taste_description = list(
SPECIES_TESHARI = "chivalry",
TASTE_STRING_DEFAULT = "sweet chivalry"
)
color = "#D26EB8"
glass_name = "berry cordial"
@@ -2812,7 +2893,11 @@
name = "Red Wine"
id = "redwine"
description = "An premium alcoholic beverage made from distilled grape juice."
taste_description = "bitter sweetness"
taste_description = list(
SPECIES_TESHARI = "cloying bitterness",
TASTE_STRING_DEFAULT = "bitter sweetness"
)
color = "#7E4043" // rgb: 126, 64, 67
strength = 15
@@ -2838,7 +2923,10 @@
name = "Carnoth"
id = "carnoth"
description = "An premium alcoholic beverage made with multiple hybridized species of grapes that give it a dark maroon coloration."
taste_description = "alcoholic sweet flavor"
taste_description = list(
SPECIES_TESHARI = "cloying fumes",
TASTE_STRING_DEFAULT = "alcoholic sweetness"
)
color = "#5B0000" // rgb: 0, 100, 35
strength = 20
@@ -2877,7 +2965,10 @@
name = "Champagne"
id = "champagne"
description = "A sparkling wine made with Pinot Noir, Pinot Meunier, and Chardonnay."
taste_description = "fizzy bitter sweetness"
taste_description = list(
SPECIES_TESHARI = "bitter fizziness",
TASTE_STRING_DEFAULT = "fizzy, bitter sweetness"
)
color = "#D1B166"
glass_name = "champagne"
@@ -2920,7 +3011,10 @@
name = "Allies Cocktail"
id = "alliescocktail"
description = "A drink made from your allies, not as sweet as when made from your enemies."
taste_description = "bitter sweetness"
taste_description = list(
SPECIES_TESHARI = "bitterness",
TASTE_STRING_DEFAULT = "bitter sweetness"
)
color = "#D8AC45"
strength = 25
@@ -2933,7 +3027,10 @@
name = "Aloe"
id = "aloe"
description = "So very, very, very good."
taste_description = "sweet and creamy"
taste_description = list(
SPECIES_TESHARI = "creamy blandness",
TASTE_STRING_DEFAULT = "creamy sweetness"
)
color = "#B7EA75"
strength = 15
@@ -2946,7 +3043,7 @@
name = "Amasec"
id = "amasec"
description = "Official drink of the Gun Club!"
taste_description = "dark and metallic"
taste_description = "metallic darkness"
reagent_state = LIQUID
color = "#FF975D"
strength = 25
@@ -3030,7 +3127,10 @@
name = "Banana Mama"
id = "bananahonk"
description = "A drink from Clown Heaven."
taste_description = "bananas and sugar"
taste_description = list(
SPECIES_TESHARI = "bananas",
TASTE_STRING_DEFAULT = "sweet bananas"
)
nutriment_factor = 1
color = "#FFFF91"
strength = 12
@@ -3116,7 +3216,10 @@
name = "Booger"
id = "booger"
description = "Ewww..."
taste_description = "sweet 'n creamy"
taste_description = list(
SPECIES_TESHARI = "creamy blandness",
TASTE_STRING_DEFAULT = "creamy sweetness"
)
color = "#8CFF8C"
strength = 30
@@ -3191,7 +3294,10 @@
name = "Demons Blood"
id = "demonsblood"
description = "This thing makes the hair on the back of your neck stand up."
taste_description = "sweet tasting iron"
taste_description = list(
SPECIES_TESHARI = "metallic notes",
TASTE_STRING_DEFAULT = "metallic sweetness"
)
taste_mult = 1.5
color = "#820000"
strength = 15
@@ -3392,7 +3498,10 @@
name = "Long Island Iced Tea"
id = "longislandicedtea"
description = "The liquor cabinet, brought together in a delicious mix. Intended for middle-aged alcoholic women only."
taste_description = "sweet tea, with a kick"
taste_description = list(
SPECIES_TESHARI = "powerfully alcoholic tea",
TASTE_STRING_DEFAULT = "sweet tea, with a kick"
)
color = "#895B1F"
strength = 12
@@ -3457,7 +3566,10 @@
name = "Mead"
id = "mead"
description = "A Viking's drink, though a cheap one."
taste_description = "sweet yet alcoholic"
taste_description = list(
SPECIES_TESHARI = "floral alcohol",
TASTE_STRING_DEFAULT = "cloyingly sweet alcohol"
)
reagent_state = LIQUID
color = "#FFBB00"
strength = 30
@@ -3513,7 +3625,10 @@
name = "Red Mead"
id = "red_mead"
description = "The true Viking's drink! Even though it has a strange red color."
taste_description = "sweet and salty alcohol"
taste_description = list(
SPECIES_TESHARI = "salty alcohol",
TASTE_STRING_DEFAULT = "sweet, salty alcohol"
)
color = "#C73C00"
strength = 30
@@ -3524,7 +3639,10 @@
name = "Sbiten"
id = "sbiten"
description = "A spicy Vodka! Might be a bit hot for the little guys!"
taste_description = "hot and spice"
taste_description = list(
SPECIES_TESHARI = "powerful alcohol",
TASTE_STRING_DEFAULT = "hot and spice"
)
color = "#FFA371"
strength = 15
adj_temp = 50
@@ -3643,7 +3761,10 @@
name = "Toxins Special"
id = "phoronspecial"
description = "This thing is literally on fire!"
taste_description = "spicy toxins"
taste_description = list(
SPECIES_TESHARI = "pure poison",
TASTE_STRING_DEFAULT = "spicy toxins"
)
reagent_state = LIQUID
color = "#7F00FF"
strength = 10
@@ -3788,7 +3909,10 @@
name = "Ginza Mary"
id = "ginzamary"
description = "An alcoholic drink made with vodka, sake, and juices."
taste_description = "spicy tomato sake"
taste_description = list(
SPECIES_TESHARI = "tomato sake",
TASTE_STRING_DEFAULT = "spicy tomato sake"
)
color = "#FF3232"
strength = 25
@@ -3893,7 +4017,10 @@
name = "Xanadu Cannon"
id = "xanaducannon"
description = "Common in the entertainment districts of Titan."
taste_description = "sweet alcohol"
taste_description = list(
SPECIES_TESHARI = "alcohol",
TASTE_STRING_DEFAULT = "sweet alcohol"
)
color = "#614126"
strength = 50
@@ -3985,7 +4112,10 @@
name = "Wine Brandy"
id = "winebrandy"
description = "A premium spirit made from distilled wine."
taste_description = "very sweet dried fruit with many elegant notes"
taste_description = list(
SPECIES_TESHARI = "complex, fruity alcohol",
TASTE_STRING_DEFAULT = "sweet alcohol with elegant notes of dried fruit"
)
color = "#4C130B" // rgb(76,19,11)
strength = 20
@@ -4108,7 +4238,10 @@
name = "Clover Club"
id = "cloverclub"
description = "A light and refreshing raspberry cocktail."
taste_description = "sweet raspberry"
taste_description = list(
SPECIES_TESHARI = "raspberries",
TASTE_STRING_DEFAULT = "sweet raspberry"
)
color = "#dd00a6" // rgb(221, 0, 166)
strength = 30
@@ -4200,8 +4333,11 @@
/datum/reagent/ethanol/piscosour
name = "Pisco Sour"
id = "piscosour"
description = "Wine Brandy, Lemon, and a dream. A South American classic"
taste_description = "light sweetness"
description = "Wine brandy, lemon, and a dream. A South American classic"
taste_description = list(
SPECIES_TESHARI = "light, refreshing alcohol",
TASTE_STRING_DEFAULT = "light sweetness"
)
color = "#f9f96b" // rgb(249, 249, 107)
strength = 30
@@ -4306,10 +4442,13 @@
allergen_type = ALLERGEN_FRUIT|ALLERGEN_GRAINS //Made from vodka(grain), holy wine(fruit), and lime juice(fruit)
/datum/reagent/ethanol/angelswrath
name = "Angels Wrath"
name = "Angel's Wrath"
id = "angelswrath"
description = "This thing makes the hair on the back of your neck stand up."
taste_description = "sweet victory and sour iron"
taste_description = list(
SPECIES_TESHARI = "hot victory and bitter iron",
TASTE_STRING_DEFAULT = "sweet victory and sour iron"
)
taste_mult = 1.5
color = "#F3C906"
strength = 30
@@ -4322,10 +4461,13 @@
allergen_type = ALLERGEN_FRUIT|ALLERGEN_STIMULANT //Made from space mountain wind(fruit), dr.gibb(caffine) and holy wine(fruit)
/datum/reagent/ethanol/angelskiss
name = "Angels Kiss"
name = "Angel's Kiss"
id = "angelskiss"
description = "Miracle time!"
taste_description = "sweet forgiveness and bitter iron"
taste_description = list(
SPECIES_TESHARI = "warm forgiveness and bitter iron",
TASTE_STRING_DEFAULT = "sweet forgiveness and bitter iron"
)
color = "#AD772B"
strength = 25
@@ -4375,7 +4517,10 @@
name = "Lemonade Schnapps"
id = "schnapps_lem"
description = "Childhood memories are not included."
taste_description = "sweet, lemon-y alcohol"
taste_description = list(
SPECIES_TESHARI = "sour lemon with a kick",
TASTE_STRING_DEFAULT = "sweet lemon with a kick"
)
color = "#FFFF00"
strength = 25
@@ -4436,7 +4581,10 @@
name = "Kompot"
id = "kompot"
description = "A traditional Eastern European beverage once used to preserve fruit in the 1980s"
taste_description = "refreshingly sweet and fruity"
taste_description = list(
SPECIES_TESHARI = "sticky, fruity flavours",
TASTE_STRING_DEFAULT = "sweet, fresh and fruity flavours"
)
color = "#ed9415" // rgb: 237, 148, 21
adj_drowsy = -1
adj_temp = -6
@@ -4492,7 +4640,10 @@
name = "Qa'zal flour"
id = "qazal_flour"
description = "Harvested from ground qa'zal, this is one of the main ingredients in qa'zal bread."
taste_description = "chalky, sweet dryness"
taste_description = list(
SPECIES_TESHARI = "bland, chalky dryness",
TASTE_STRING_DEFAULT = "sweet, chalky dryness"
)
reagent_state = SOLID
nutriment_factor = 1
color = "#c499bc"
@@ -4501,7 +4652,10 @@
name = "Kirani jelly"
id = "kirani_jelly"
description = "Sticky, sweet jelly from ground kiriani fruits."
taste_description = "ultra-sweet fruity jelly"
taste_description = list(
SPECIES_TESHARI = "a melange of subtle, fruity flavours",
TASTE_STRING_DEFAULT = "ultra-sweet jelly"
)
color = "#993c5c"
/datum/reagent/drink/gauli_juice
@@ -4515,7 +4669,11 @@
name = "Kirani cider"
id = "kirani_cider"
description = "Fermented kirani jelly, popular among teshari packs."
taste_description = "sweet, tangy, fruity alcohol"
taste_description = list(
TASTE_STRING_DEFAULT = list("sweet, tangy, fruity alcohol"),
SPECIES_TESHARI = list("subtle floral tones", "tangy, fruity alcohol", "mild bitterness")
)
color = "#993c5c"
strength = 10
glass_name = "kirani cider"
@@ -4526,7 +4684,10 @@
name = "Sirisaii pole"
id = "sirisaii_pole"
description = "Fermented kirani mixed with ga'uli and ice, for a fruity cocktail as cold as Sirisai's poles."
taste_description = "chilled, minty, sweet fruit with an alcoholic kick"
taste_description = list(
TASTE_STRING_DEFAULT = list("chilled, minty, sweet fruit with an alcoholic kick"),
SPECIES_TESHARI = list("complex floral undertones", "chilled, minty fruit with an alcoholic kick")
)
color = "#993c5c"
strength = 10
adj_temp = -20
@@ -4539,7 +4700,10 @@
name = "Kiraniade"
id = "kiraniade"
description = "Kirani jelly mixed with soda water into a more drinkable form, sweet enough to not even need extra sugar added."
taste_description = "super sweet, fizzy fruit"
taste_description = list(
TASTE_STRING_DEFAULT = list("super sweet, fizzy fruit"),
SPECIES_TESHARI = list("strong, fizzy, fruity flavours")
)
color = "#993c5c"
adj_temp = -5
glass_name = "kiraniade"
+13 -11
View File
@@ -128,19 +128,16 @@
if(istype(M) && !istype(M, /mob/observer)) //painting ghosts: not allowed
M.color = color //maybe someday change this to paint only clothes and exposed body parts for human mobs.
/datum/reagent/paint/get_data()
return color
/datum/reagent/paint/initialize_data(var/newdata)
color = newdata
return
. = ..()
color = LAZYACCESS(data, "color") || COLOR_WHITE
/datum/reagent/paint/mix_data(var/newdata, var/newamount)
. = ..()
var/list/colors = list(0, 0, 0, 0)
var/tot_w = 0
var/hex1 = uppertext(color)
var/hex2 = uppertext(newdata)
var/hex2 = uppertext(LAZYACCESS(newdata, "color") || COLOR_WHITE)
if(length(hex1) == 7)
hex1 += "FF"
if(length(hex2) == 7)
@@ -157,9 +154,8 @@
colors[3] += hex2num(copytext(hex2, 6, 8)) * newamount
colors[4] += hex2num(copytext(hex2, 8, 10)) * newamount
tot_w += newamount
color = rgb(colors[1] / tot_w, colors[2] / tot_w, colors[3] / tot_w, colors[4] / tot_w)
return
LAZYSET(data, "color", color)
/* Things that didn't fit anywhere else */
@@ -416,7 +412,10 @@
name = "Thermite"
id = "thermite"
description = "Thermite produces an aluminothermic reaction known as a thermite reaction. Can be used to melt walls."
taste_description = "sweet tasting metal"
taste_description = list(
SPECIES_TESHARI = "metallic tones",
TASTE_STRING_DEFAULT = "metallic sweetness"
)
reagent_state = SOLID
color = "#673910"
touch_met = 50
@@ -552,7 +551,10 @@
name = "Glycerol"
id = "glycerol"
description = "Glycerol is a simple polyol compound. Glycerol is sweet-tasting and of low toxicity."
taste_description = "sweetness"
taste_description = list(
SPECIES_TESHARI = "blandness",
TASTE_STRING_DEFAULT = "sweetness"
)
reagent_state = LIQUID
color = "#808080"
+8 -2
View File
@@ -222,7 +222,10 @@
name = "Stimm"
id = "stimm"
description = "A homemade stimulant with some serious side-effects."
taste_description = "sweetness"
taste_description = list(
SPECIES_TESHARI = "chalk",
TASTE_STRING_DEFAULT = "sweetness"
)
taste_mult = 1.8
color = "#d0583a"
metabolism = REM * 3
@@ -489,7 +492,10 @@
name = "Pyrotoxin"
id = "thermite_v"
description = "A biologically produced compound capable of melting steel or other metals, similarly to thermite."
taste_description = "sweet chalk"
taste_description = list(
SPECIES_TESHARI = "chalk",
TASTE_STRING_DEFAULT = "sweet chalk"
)
reagent_state = SOLID
color = "#673910"
touch_met = 50
+4 -1
View File
@@ -36,7 +36,10 @@
/datum/reagent/toxin/voxmeds
name = "repair gel"
id = "voxmeds"
taste_description = "fizzing sweetness"
taste_description = list(
SPECIES_TESHARI = "fizziness",
TASTE_STRING_DEFAULT = "fizzing sweetness"
)
description = "A complex serum composed of vox-manufactured nanomachines, complex protein chains and microscopic bundles of metallic fibers."
strength = 8
scannable = FALSE