More Reagent Fixes/Tweaks (#7014)

Fixes service module cyborgs dispensing drinks at the wrong temperature.
    Reagents that should be at room temperature will no longer be described as lukewarm.
This commit is contained in:
MarinaGryphon
2019-09-21 12:30:11 -05:00
committed by Erki
parent 68d9f474b5
commit fd49c178dc
3 changed files with 20 additions and 8 deletions
+7 -3
View File
@@ -22,6 +22,7 @@ calculate text size per text.
var/list/out = list()
var/list/tastes = list() //descriptor = strength
var/lukewarm = 0 // should we allow it to be lukewarm or not
if(minimum_percent <= 100)
for(var/datum/reagent/R in reagent_list)
if(!R.taste_mult)
@@ -40,6 +41,8 @@ calculate text size per text.
tastes[taste_desc] += taste_amount
else
tastes[taste_desc] = taste_amount
if(!(R.default_temperature in (T0C + 15 to T0C + 25)))
lukewarm = 1
//deal with percentages
var/total_taste = 0
@@ -72,16 +75,17 @@ calculate text size per text.
if(T0C to T0C + 15)
temp_text = "cool"
if(T0C + 15 to T0C + 25)
temp_text = "lukewarm"
if(lukewarm)
temp_text = "lukewarm"
if(T0C + 25 to T0C + 40)
temp_text = "warm"
if(T0C + 40 to T0C + 100)
temp_text = "hot"
if(T0C + 100 to T0C + 120)
temp_text = "scolding hot"
temp_text = "scalding hot"
if(T0C + 120 to T0C + 200)
temp_text = "molten hot"
if(T0C + 200 to INFINITY)
temp_text = "lethally hot"
return "[temp_text] [english_list(out, "something indescribable")]."
return "[temp_text][temp_text ? " " : ""][english_list(out, "something indescribable")]."
@@ -120,7 +120,7 @@
/obj/item/weapon/reagent_containers/borghypo/service
name = "cyborg drink synthesizer"
desc = "A portable drink dispencer."
desc = "A portable drink dispenser."
icon = 'icons/obj/drinks.dmi'
icon_state = "shaker"
charge_cost = 20
@@ -147,8 +147,11 @@
to_chat(user, "<span class='notice'>[target] is full.</span>")
return
var/t = min(amount_per_transfer_from_this, reagent_volumes[reagent_ids[mode]])
target.reagents.add_reagent(reagent_ids[mode], t)
reagent_volumes[reagent_ids[mode]] -= t
to_chat(user, "<span class='notice'>You transfer [t] units of the solution to [target].</span>")
var/rid = reagent_ids[mode]
var/datum/reagent/R = SSchemistry.chemical_reagents[rid]
var/temp = R.default_temperature
var/amt = min(amount_per_transfer_from_this, reagent_volumes[rid])
target.reagents.add_reagent(rid, amt, temperature = temp)
reagent_volumes[rid] -= amt
to_chat(user, "<span class='notice'>You transfer [amt] units of the solution to [target].</span>")
return