mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 01:49:19 +00:00
TG Sync 12/15/17
s s
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
/datum/reagents/New(maximum=100)
|
||||
maximum_volume = maximum
|
||||
|
||||
|
||||
//I dislike having these here but map-objects are initialised before world/New() is called. >_>
|
||||
if(!GLOB.chemical_reagents_list)
|
||||
//Chemical Reagents - Initialises all /datum/reagent into a list indexed by reagent id
|
||||
@@ -228,8 +229,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
|
||||
@@ -283,6 +283,7 @@
|
||||
C.update_stamina()
|
||||
update_total()
|
||||
|
||||
|
||||
/datum/reagents/proc/set_reacting(react = TRUE)
|
||||
if(react)
|
||||
flags &= ~(REAGENT_NOREACT)
|
||||
@@ -732,6 +733,15 @@
|
||||
|
||||
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()
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user