Update holder.dm

This commit is contained in:
LetterJay
2017-12-19 17:16:45 -06:00
committed by GitHub
parent 5e0ddfce60
commit 9e452adcc8
+11 -2
View File
@@ -241,8 +241,7 @@
var/list/cached_reagents = reagent_list
var/list/cached_addictions = addiction_list
if(C)
chem_temp = C.bodytemperature
handle_reactions()
expose_temperature(C.bodytemperature, 0.25)
var/need_mob_update = 0
for(var/reagent in cached_reagents)
var/datum/reagent/R = reagent
@@ -744,6 +743,16 @@
out += "[taste_desc]"
return english_list(out, "something indescribable")
/datum/reagents/proc/expose_temperature(var/temperature, var/coeff=0.02)
var/temp_delta = (temperature - chem_temp) * coeff
if(temp_delta > 0)
chem_temp = min(chem_temp + max(temp_delta, 1), temperature)
else
chem_temp = max(chem_temp + min(temp_delta, -1), temperature)
chem_temp = round(chem_temp)
handle_reactions()
///////////////////////////////////////////////////////////////////////////////////