This commit is contained in:
Putnam3145
2021-06-21 02:19:51 -07:00
194 changed files with 13560 additions and 2048 deletions
@@ -2196,7 +2196,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
if(prob(10))
stored_teleports += rand(2,6)
if(prob(70))
M.vomit()
M.vomit(vomit_type = VOMIT_PURPLE)
return ..()
/datum/reagent/consumable/ethanol/planet_cracker
@@ -2516,101 +2516,19 @@ All effects don't start immediately, but rather get worse over time; the rate is
color = "#FFFFFF"
boozepwr = 35
quality = DRINK_GOOD
taste_description = "bad coding"
can_synth = FALSE
var/list/names = list("null fruit" = 1) //Names of the fruits used. Associative list where name is key, value is the percentage of that fruit.
var/list/tastes = list("bad coding" = 1) //List of tastes. See above.
pH = 4
taste_description = "a delightful softened punch"
glass_icon_state = "godfather"
glass_name = "Godfather"
glass_desc = "A classic from old Italy and enjoyed by gangsters, pray the orange peel doesnt end up in your mouth."
/datum/reagent/consumable/ethanol/fruit_wine/on_new(list/data)
names = data["names"]
tastes = data["tastes"]
boozepwr = data["boozepwr"]
color = data["color"]
generate_data_info(data)
/datum/reagent/consumable/ethanol/godmother
name = "Godmother"
description = "A twist on a classic, liked more by mature women."
boozepwr = 50
color = "#E68F00"
quality = DRINK_GOOD
taste_description = "sweetness and a zesty twist"
glass_icon_state = "godmother"
glass_name = "Godmother"
glass_desc = "A lovely fresh smelling cocktail, a true Sicilian delight."
/datum/reagent/consumable/ethanol/fruit_wine/on_merge(list/data, amount)
var/diff = (amount/volume)
if(diff < 1)
color = BlendRGB(color, data["color"], diff/2) //The percentage difference over two, so that they take average if equal.
else
color = BlendRGB(color, data["color"], (1/diff)/2) //Adjust so it's always blending properly.
var/oldvolume = volume-amount
var/list/cachednames = data["names"]
for(var/name in names | cachednames)
names[name] = ((names[name] * oldvolume) + (cachednames[name] * amount)) / volume
var/list/cachedtastes = data["tastes"]
for(var/taste in tastes | cachedtastes)
tastes[taste] = ((tastes[taste] * oldvolume) + (cachedtastes[taste] * amount)) / volume
boozepwr *= oldvolume
var/newzepwr = data["boozepwr"] * amount
boozepwr += newzepwr
boozepwr /= volume //Blending boozepwr to volume.
generate_data_info(data)
/datum/reagent/consumable/ethanol/fruit_wine/proc/generate_data_info(list/data)
var/minimum_percent = 0.15 //Percentages measured between 0 and 1.
var/list/primary_tastes = list()
var/list/secondary_tastes = list()
glass_name = "glass of [name]"
glass_desc = description
for(var/taste in tastes)
switch(tastes[taste])
if(minimum_percent*2 to INFINITY)
primary_tastes += taste
if(minimum_percent to minimum_percent*2)
secondary_tastes += taste
var/minimum_name_percent = 0.35
name = ""
var/list/names_in_order = sortTim(names, /proc/cmp_numeric_dsc, TRUE)
var/named = FALSE
for(var/fruit_name in names)
if(names[fruit_name] >= minimum_name_percent)
name += "[fruit_name] "
named = TRUE
if(named)
name += "wine"
else
name = "mixed [names_in_order[1]] wine"
var/alcohol_description
switch(boozepwr)
if(120 to INFINITY)
alcohol_description = "suicidally strong"
if(90 to 120)
alcohol_description = "rather strong"
if(70 to 90)
alcohol_description = "strong"
if(40 to 70)
alcohol_description = "rich"
if(20 to 40)
alcohol_description = "mild"
if(0 to 20)
alcohol_description = "sweet"
else
alcohol_description = "watery" //How the hell did you get negative boozepwr?
var/list/fruits = list()
if(names_in_order.len <= 3)
fruits = names_in_order
else
for(var/i in 1 to 3)
fruits += names_in_order[i]
fruits += "other plants"
var/fruit_list = english_list(fruits)
description = "A [alcohol_description] wine brewed from [fruit_list]."
var/flavor = ""
if(!primary_tastes.len)
primary_tastes = list("[alcohol_description] alcohol")
flavor += english_list(primary_tastes)
if(secondary_tastes.len)
flavor += ", with a hint of "
flavor += english_list(secondary_tastes)
taste_description = flavor
if(holder.my_atom)
holder.my_atom.on_reagent_change()
@@ -735,7 +735,7 @@
/datum/reagent/toxin/spewium/on_mob_life(mob/living/carbon/C)
.=..()
if(current_cycle >=11 && prob(min(50,current_cycle)))
C.vomit(10, prob(10), prob(50), rand(0,4), TRUE, prob(30))
C.vomit(10, prob(10), prob(50), rand(0,4), TRUE)
for(var/datum/reagent/toxin/R in C.reagents.reagent_list)
if(R != src)
C.reagents.remove_reagent(R.type,1)