mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge remote-tracking branch 'upstream/master' into updateicons
This commit is contained in:
@@ -1236,3 +1236,107 @@
|
||||
drink_icon = "synthignonglass"
|
||||
drink_name = "Glass of Synthignon"
|
||||
drink_desc = "Someone mixed good wine and robot booze. Romantic, but atrocious."
|
||||
|
||||
/datum/reagent/consumable/ethanol/fruit_wine
|
||||
name = "Fruit Wine"
|
||||
id = "fruit_wine"
|
||||
description = "A wine made from grown plants."
|
||||
color = "#FFFFFF"
|
||||
alcohol_perc = 0.35
|
||||
taste_message = "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.
|
||||
|
||||
/datum/reagent/consumable/ethanol/fruit_wine/on_new(list/data)
|
||||
names = data["names"]
|
||||
tastes = data["tastes"]
|
||||
alcohol_perc = data["alcohol_perc"]
|
||||
color = data["color"]
|
||||
generate_data_info(data)
|
||||
|
||||
/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
|
||||
|
||||
alcohol_perc *= oldvolume
|
||||
var/newzepwr = data["alcohol_perc"] * amount
|
||||
alcohol_perc += newzepwr
|
||||
alcohol_perc /= volume //Blending alcohol percentage 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()
|
||||
drink_name = "glass of [name]"
|
||||
drink_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(alcohol_perc)
|
||||
if(1.2 to INFINITY)
|
||||
alcohol_description = "suicidally strong"
|
||||
if(0.9 to 1.2)
|
||||
alcohol_description = "rather strong"
|
||||
if(0.7 to 0.9)
|
||||
alcohol_description = "strong"
|
||||
if(0.4 to 0.7)
|
||||
alcohol_description = "rich"
|
||||
if(0.2 to 0.4)
|
||||
alcohol_description = "mild"
|
||||
if(0 to 0.2)
|
||||
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_message = flavor
|
||||
if(holder.my_atom)
|
||||
holder.my_atom.on_reagent_change()
|
||||
|
||||
@@ -163,12 +163,12 @@
|
||||
|
||||
/datum/reagent/consumable/drink/cold/rewriter
|
||||
name = "Rewriter"
|
||||
description = "The secert of the sanctuary of the Libarian..."
|
||||
description = "The secret of the sanctuary of the Librarian..."
|
||||
id = "rewriter"
|
||||
color = "#485000" // rgb:72, 080, 0
|
||||
drink_icon = "rewriter"
|
||||
drink_name = "Rewriter"
|
||||
drink_desc = "The secert of the sanctuary of the Libarian..."
|
||||
drink_desc = "The secret of the sanctuary of the Librarian..."
|
||||
taste_message = "coffee...soda?"
|
||||
|
||||
/datum/reagent/consumable/drink/cold/rewriter/on_mob_life(mob/living/M)
|
||||
|
||||
@@ -275,6 +275,13 @@
|
||||
color = "#FFFFFF"
|
||||
taste_message = "the rainbow"
|
||||
|
||||
/datum/reagent/colorful_reagent/on_mob_life(mob/living/M)
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(!(NO_BLOOD in H.dna.species.species_traits) && !H.dna.species.exotic_blood)
|
||||
H.dna.species.blood_color = "#[num2hex(rand(0, 255))][num2hex(rand(0, 255))][num2hex(rand(0, 255))]"
|
||||
return ..()
|
||||
|
||||
/datum/reagent/colorful_reagent/reaction_mob(mob/living/simple_animal/M, method=TOUCH, volume)
|
||||
if(isanimal(M))
|
||||
M.color = pick(random_color_list)
|
||||
|
||||
@@ -116,6 +116,12 @@
|
||||
reagent_state = LIQUID
|
||||
color = "#FFA500"
|
||||
|
||||
/datum/reagent/sorium_vortex
|
||||
name = "sorium_vortex"
|
||||
id = "sorium_vortex"
|
||||
reagent_state = LIQUID
|
||||
color = "#FFA500"
|
||||
|
||||
/datum/reagent/liquid_dark_matter
|
||||
name = "Liquid Dark Matter"
|
||||
id = "liquid_dark_matter"
|
||||
@@ -124,6 +130,12 @@
|
||||
color = "#800080"
|
||||
taste_message = "the end of the world"
|
||||
|
||||
/datum/reagent/ldm_vortex
|
||||
name = "LDM Vortex"
|
||||
id = "ldm_vortex"
|
||||
reagent_state = LIQUID
|
||||
color = "#800080"
|
||||
|
||||
/datum/reagent/blackpowder
|
||||
name = "Black Powder"
|
||||
id = "blackpowder"
|
||||
|
||||
@@ -104,13 +104,15 @@
|
||||
/datum/chemical_reaction/sorium_vortex
|
||||
name = "sorium_vortex"
|
||||
id = "sorium_vortex"
|
||||
result = null
|
||||
result = "sorium_vortex"
|
||||
required_reagents = list("sorium" = 1)
|
||||
result_amount = 1
|
||||
min_temp = 474
|
||||
|
||||
/datum/chemical_reaction/sorium_vortex/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
goonchem_vortex(T, 1, min(10, created_volume), min(11, created_volume + 1))
|
||||
holder.remove_reagent("sorium_vortex", created_volume)
|
||||
|
||||
/datum/chemical_reaction/liquid_dark_matter
|
||||
name = "Liquid Dark Matter"
|
||||
@@ -129,13 +131,15 @@
|
||||
/datum/chemical_reaction/ldm_vortex
|
||||
name = "LDM Vortex"
|
||||
id = "ldm_vortex"
|
||||
result = null
|
||||
result = "ldm_vortex"
|
||||
required_reagents = list("liquid_dark_matter" = 1)
|
||||
result_amount = 1
|
||||
min_temp = 474
|
||||
|
||||
/datum/chemical_reaction/ldm_vortex/on_reaction(datum/reagents/holder, created_volume)
|
||||
var/turf/simulated/T = get_turf(holder.my_atom)
|
||||
goonchem_vortex(T, 0, min(10, created_volume), min(11, created_volume + 1))
|
||||
holder.remove_reagent("ldm_vortex", created_volume)
|
||||
|
||||
/datum/chemical_reaction/blackpowder
|
||||
name = "Black Powder"
|
||||
|
||||
@@ -95,7 +95,6 @@
|
||||
spawn(5) reagents.clear_reagents()
|
||||
return
|
||||
else if(istype(target, /obj/structure/reagent_dispensers)) //A dispenser. Transfer FROM it TO us.
|
||||
|
||||
if(target.reagents && !target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty and can't be refilled!</span>")
|
||||
return
|
||||
@@ -107,7 +106,7 @@
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] unit\s of the contents of [target].</span>")
|
||||
|
||||
else if(target.is_open_container() && target.reagents) //Something like a glass. Player probably wants to transfer TO it.
|
||||
else if(target.is_refillable() && is_drainable()) //Something like a glass. Player probably wants to transfer TO it.
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[src] is empty.</span>")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user