[MIRROR] Cleaned up some decimal values. (#2797)
* Cleaned up some decimal values. * Update gas_mixture.dm * Update color.dm * Update medsci.dm
This commit is contained in:
committed by
Poojawa
parent
2d7ead37d5
commit
4bc6e9d522
@@ -1,482 +1,482 @@
|
||||
/*
|
||||
What are the archived variables for?
|
||||
Calculations are done using the archived variables with the results merged into the regular variables.
|
||||
This prevents race conditions that arise based on the order of tile processing.
|
||||
*/
|
||||
#define MINIMUM_HEAT_CAPACITY 0.0003
|
||||
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
|
||||
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
|
||||
|
||||
GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm
|
||||
GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
|
||||
|
||||
/proc/init_gaslist_cache()
|
||||
. = list()
|
||||
for(var/id in GLOB.meta_gas_info)
|
||||
var/list/cached_gas = new(3)
|
||||
|
||||
.[id] = cached_gas
|
||||
|
||||
cached_gas[MOLES] = 0
|
||||
cached_gas[ARCHIVE] = 0
|
||||
cached_gas[GAS_META] = GLOB.meta_gas_info[id]
|
||||
|
||||
#define GASLIST(id, out_list)\
|
||||
var/list/tmp_gaslist = GLOB.gaslist_cache[id];\
|
||||
out_list = tmp_gaslist.Copy();
|
||||
|
||||
/datum/gas_mixture
|
||||
var/list/gases
|
||||
var/temperature //kelvins
|
||||
var/tmp/temperature_archived
|
||||
var/volume //liters
|
||||
var/last_share
|
||||
var/list/reaction_results
|
||||
|
||||
/datum/gas_mixture/New(volume = CELL_VOLUME)
|
||||
gases = new
|
||||
temperature = 0
|
||||
temperature_archived = 0
|
||||
src.volume = volume
|
||||
last_share = 0
|
||||
reaction_results = new
|
||||
|
||||
//listmos procs
|
||||
|
||||
//assert_gas(gas_id) - used to guarantee that the gas list for this id exists.
|
||||
//Must be used before adding to a gas. May be used before reading from a gas.
|
||||
/datum/gas_mixture/proc/assert_gas(gas_id)
|
||||
var/cached_gases = gases
|
||||
if(cached_gases[gas_id])
|
||||
return
|
||||
GASLIST(gas_id, cached_gases[gas_id])
|
||||
|
||||
//assert_gases(args) - shorthand for calling assert_gas() once for each gas type.
|
||||
/datum/gas_mixture/proc/assert_gases()
|
||||
for(var/id in args)
|
||||
assert_gas(id)
|
||||
|
||||
//add_gas(gas_id) - similar to assert_gas(), but does not check for an existing
|
||||
//gas list for this id. This can clobber existing gases.
|
||||
//Used instead of assert_gas() when you know the gas does not exist. Faster than assert_gas().
|
||||
/datum/gas_mixture/proc/add_gas(gas_id)
|
||||
GASLIST(gas_id, gases[gas_id])
|
||||
|
||||
//add_gases(args) - shorthand for calling add_gas() once for each gas_type.
|
||||
/datum/gas_mixture/proc/add_gases()
|
||||
var/cached_gases = gases
|
||||
for(var/id in args)
|
||||
GASLIST(id, cached_gases[id])
|
||||
|
||||
//garbage_collect() - removes any gas list which is empty.
|
||||
//If called with a list as an argument, only removes gas lists with IDs from that list.
|
||||
//Must be used after subtracting from a gas. Must be used after assert_gas()
|
||||
//if assert_gas() was called only to read from the gas.
|
||||
//By removing empty gases, processing speed is increased.
|
||||
/datum/gas_mixture/proc/garbage_collect(list/tocheck)
|
||||
var/list/cached_gases = gases
|
||||
for(var/id in (tocheck || cached_gases))
|
||||
if(cached_gases[id][MOLES] <= 0 && cached_gases[id][ARCHIVE] <= 0)
|
||||
cached_gases -= id
|
||||
|
||||
//PV = nRT
|
||||
/datum/gas_mixture/proc/heat_capacity() //joules per kelvin
|
||||
var/list/cached_gases = gases
|
||||
. = 0
|
||||
for(var/id in cached_gases)
|
||||
var/gas_data = cached_gases[id]
|
||||
. += gas_data[MOLES] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
|
||||
|
||||
/datum/gas_mixture/proc/heat_capacity_archived() //joules per kelvin
|
||||
var/list/cached_gases = gases
|
||||
. = 0
|
||||
for(var/id in cached_gases)
|
||||
var/gas_data = cached_gases[id]
|
||||
. += gas_data[ARCHIVE] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
|
||||
|
||||
//prefer this in performance critical areas
|
||||
#define TOTAL_MOLES(cached_gases, out_var)\
|
||||
out_var = 0;\
|
||||
for(var/total_moles_id in cached_gases){\
|
||||
out_var += cached_gases[total_moles_id][MOLES];\
|
||||
}
|
||||
|
||||
/datum/gas_mixture/proc/total_moles()
|
||||
var/cached_gases = gases
|
||||
TOTAL_MOLES(cached_gases, .)
|
||||
|
||||
/datum/gas_mixture/proc/return_pressure() //kilopascals
|
||||
if(volume > 0) // to prevent division by zero
|
||||
var/cached_gases = gases
|
||||
TOTAL_MOLES(cached_gases, .)
|
||||
. *= R_IDEAL_GAS_EQUATION * temperature / volume
|
||||
return
|
||||
return 0
|
||||
|
||||
/datum/gas_mixture/proc/return_temperature() //kelvins
|
||||
return temperature
|
||||
|
||||
/datum/gas_mixture/proc/return_volume() //liters
|
||||
return max(0, volume)
|
||||
|
||||
/datum/gas_mixture/proc/thermal_energy() //joules
|
||||
return temperature * heat_capacity()
|
||||
|
||||
/datum/gas_mixture/proc/archive()
|
||||
//Update archived versions of variables
|
||||
//Returns: 1 in all cases
|
||||
|
||||
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
|
||||
//Merges all air from giver into self. Deletes giver.
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/remove(amount)
|
||||
//Proportionally removes amount of gas from the gas_mixture
|
||||
//Returns: gas_mixture with the gases removed
|
||||
|
||||
/datum/gas_mixture/proc/remove_ratio(ratio)
|
||||
//Proportionally removes amount of gas from the gas_mixture
|
||||
//Returns: gas_mixture with the gases removed
|
||||
|
||||
/datum/gas_mixture/proc/copy()
|
||||
//Creates new, identical gas mixture
|
||||
//Returns: duplicate gas mixture
|
||||
|
||||
/datum/gas_mixture/proc/copy_from(datum/gas_mixture/sample)
|
||||
//Copies variables from sample
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/copy_from_turf(turf/model)
|
||||
//Copies all gas info from the turf into the gas list along with temperature
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/parse_gas_string(gas_string)
|
||||
//Copies variables from a particularly formatted string.
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/share(datum/gas_mixture/sharer)
|
||||
//Performs air sharing calculations between two gas_mixtures assuming only 1 boundary length
|
||||
//Returns: amount of gas exchanged (+ if sharer received)
|
||||
|
||||
/datum/gas_mixture/proc/after_share(datum/gas_mixture/sharer)
|
||||
//called on share's sharer to let it know it just got some gases
|
||||
|
||||
/datum/gas_mixture/proc/temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
|
||||
//Performs temperature sharing calculations (via conduction) between two gas_mixtures assuming only 1 boundary length
|
||||
//Returns: new temperature of the sharer
|
||||
|
||||
/datum/gas_mixture/proc/compare(datum/gas_mixture/sample)
|
||||
//Compares sample to self to see if within acceptable ranges that group processing may be enabled
|
||||
//Returns: a string indicating what check failed, or "" if check passes
|
||||
|
||||
/datum/gas_mixture/proc/react(turf/open/dump_location)
|
||||
//Performs various reactions such as combustion or fusion (LOL)
|
||||
//Returns: 1 if any reaction took place; 0 otherwise
|
||||
|
||||
/datum/gas_mixture/archive()
|
||||
var/list/cached_gases = gases
|
||||
|
||||
temperature_archived = temperature
|
||||
for(var/id in cached_gases)
|
||||
cached_gases[id][ARCHIVE] = cached_gases[id][MOLES]
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/merge(datum/gas_mixture/giver)
|
||||
if(!giver)
|
||||
return 0
|
||||
|
||||
//heat transfer
|
||||
if(abs(temperature - giver.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/self_heat_capacity = heat_capacity()
|
||||
var/giver_heat_capacity = giver.heat_capacity()
|
||||
var/combined_heat_capacity = giver_heat_capacity + self_heat_capacity
|
||||
if(combined_heat_capacity)
|
||||
temperature = (giver.temperature * giver_heat_capacity + temperature * self_heat_capacity) / combined_heat_capacity
|
||||
|
||||
var/list/cached_gases = gases //accessing datum vars is slower than proc vars
|
||||
var/list/giver_gases = giver.gases
|
||||
//gas transfer
|
||||
for(var/giver_id in giver_gases)
|
||||
assert_gas(giver_id)
|
||||
cached_gases[giver_id][MOLES] += giver_gases[giver_id][MOLES]
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/remove(amount)
|
||||
var/sum
|
||||
var/list/cached_gases = gases
|
||||
TOTAL_MOLES(cached_gases, sum)
|
||||
amount = min(amount, sum) //Can not take more air than tile has!
|
||||
if(amount <= 0)
|
||||
return null
|
||||
var/datum/gas_mixture/removed = new
|
||||
var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
|
||||
|
||||
removed.temperature = temperature
|
||||
for(var/id in cached_gases)
|
||||
removed.add_gas(id)
|
||||
removed_gases[id][MOLES] = QUANTIZE((cached_gases[id][MOLES] / sum) * amount)
|
||||
cached_gases[id][MOLES] -= removed_gases[id][MOLES]
|
||||
garbage_collect()
|
||||
|
||||
return removed
|
||||
|
||||
/datum/gas_mixture/remove_ratio(ratio)
|
||||
if(ratio <= 0)
|
||||
return null
|
||||
ratio = min(ratio, 1)
|
||||
|
||||
var/list/cached_gases = gases
|
||||
var/datum/gas_mixture/removed = new
|
||||
var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
|
||||
|
||||
removed.temperature = temperature
|
||||
for(var/id in cached_gases)
|
||||
removed.add_gas(id)
|
||||
removed_gases[id][MOLES] = QUANTIZE(cached_gases[id][MOLES] * ratio)
|
||||
cached_gases[id][MOLES] -= removed_gases[id][MOLES]
|
||||
|
||||
garbage_collect()
|
||||
|
||||
return removed
|
||||
|
||||
/datum/gas_mixture/copy()
|
||||
var/list/cached_gases = gases
|
||||
var/datum/gas_mixture/copy = new
|
||||
var/list/copy_gases = copy.gases
|
||||
|
||||
copy.temperature = temperature
|
||||
for(var/id in cached_gases)
|
||||
copy.add_gas(id)
|
||||
copy_gases[id][MOLES] = cached_gases[id][MOLES]
|
||||
|
||||
return copy
|
||||
|
||||
/datum/gas_mixture/copy_from(datum/gas_mixture/sample)
|
||||
var/list/cached_gases = gases //accessing datum vars is slower than proc vars
|
||||
var/list/sample_gases = sample.gases
|
||||
|
||||
temperature = sample.temperature
|
||||
for(var/id in sample_gases)
|
||||
assert_gas(id)
|
||||
cached_gases[id][MOLES] = sample_gases[id][MOLES]
|
||||
|
||||
//remove all gases not in the sample
|
||||
cached_gases &= sample_gases
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/copy_from_turf(turf/model)
|
||||
parse_gas_string(model.initial_gas_mix)
|
||||
|
||||
//acounts for changes in temperature
|
||||
var/turf/model_parent = model.parent_type
|
||||
if(model.temperature != initial(model.temperature) || model.temperature != initial(model_parent.temperature))
|
||||
temperature = model.temperature
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/parse_gas_string(gas_string)
|
||||
var/list/gases = src.gases
|
||||
var/list/gas = params2list(gas_string)
|
||||
if(gas["TEMP"])
|
||||
temperature = text2num(gas["TEMP"])
|
||||
gas -= "TEMP"
|
||||
gases.Cut()
|
||||
for(var/id in gas)
|
||||
add_gas(id)
|
||||
gases[id][MOLES] = text2num(gas[id])
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
if(!sharer)
|
||||
return 0
|
||||
|
||||
var/list/cached_gases = gases
|
||||
var/list/sharer_gases = sharer.gases
|
||||
|
||||
var/temperature_delta = temperature_archived - sharer.temperature_archived
|
||||
var/abs_temperature_delta = abs(temperature_delta)
|
||||
|
||||
var/old_self_heat_capacity = 0
|
||||
var/old_sharer_heat_capacity = 0
|
||||
if(abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
old_self_heat_capacity = heat_capacity()
|
||||
old_sharer_heat_capacity = sharer.heat_capacity()
|
||||
|
||||
var/heat_capacity_self_to_sharer = 0 //heat capacity of the moles transferred from us to the sharer
|
||||
var/heat_capacity_sharer_to_self = 0 //heat capacity of the moles transferred from the sharer to us
|
||||
|
||||
var/moved_moles = 0
|
||||
var/abs_moved_moles = 0
|
||||
|
||||
//GAS TRANSFER
|
||||
for(var/id in sharer_gases - cached_gases) // create gases not in our cache
|
||||
add_gas(id)
|
||||
for(var/id in cached_gases) // transfer gases
|
||||
if(!sharer_gases[id]) //checking here prevents an uneeded proc call if the check fails.
|
||||
sharer.add_gas(id)
|
||||
|
||||
var/gas = cached_gases[id]
|
||||
var/sharergas = sharer_gases[id]
|
||||
|
||||
var/delta = QUANTIZE(gas[ARCHIVE] - sharergas[ARCHIVE])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures
|
||||
|
||||
if(delta && abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/gas_heat_capacity = delta * gas[GAS_META][META_GAS_SPECIFIC_HEAT]
|
||||
if(delta > 0)
|
||||
heat_capacity_self_to_sharer += gas_heat_capacity
|
||||
else
|
||||
heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative. saves a proc call.
|
||||
|
||||
gas[MOLES] -= delta
|
||||
sharergas[MOLES] += delta
|
||||
moved_moles += delta
|
||||
abs_moved_moles += abs(delta)
|
||||
|
||||
last_share = abs_moved_moles
|
||||
|
||||
//THERMAL ENERGY TRANSFER
|
||||
if(abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/new_self_heat_capacity = old_self_heat_capacity + heat_capacity_sharer_to_self - heat_capacity_self_to_sharer
|
||||
var/new_sharer_heat_capacity = old_sharer_heat_capacity + heat_capacity_self_to_sharer - heat_capacity_sharer_to_self
|
||||
|
||||
//transfer of thermal energy (via changed heat capacity) between self and sharer
|
||||
if(new_self_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
temperature = (old_self_heat_capacity*temperature - heat_capacity_self_to_sharer*temperature_archived + heat_capacity_sharer_to_self*sharer.temperature_archived)/new_self_heat_capacity
|
||||
|
||||
if(new_sharer_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
sharer.temperature = (old_sharer_heat_capacity*sharer.temperature-heat_capacity_sharer_to_self*sharer.temperature_archived + heat_capacity_self_to_sharer*temperature_archived)/new_sharer_heat_capacity
|
||||
//thermal energy of the system (self and sharer) is unchanged
|
||||
|
||||
if(abs(old_sharer_heat_capacity) > MINIMUM_HEAT_CAPACITY)
|
||||
if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.10) // <10% change in sharer heat capacity
|
||||
temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT)
|
||||
|
||||
var/list/unique_gases = cached_gases ^ sharer_gases
|
||||
if(unique_gases.len) //if all gases were present in both mixtures, we know that no gases are 0
|
||||
garbage_collect(cached_gases - sharer_gases) //any gases the sharer had, we are guaranteed to have. gases that it didn't have we are not.
|
||||
sharer.garbage_collect(sharer_gases - cached_gases) //the reverse is equally true
|
||||
sharer.after_share(src, atmos_adjacent_turfs)
|
||||
if(temperature_delta > MINIMUM_TEMPERATURE_TO_MOVE || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
|
||||
var/our_moles
|
||||
TOTAL_MOLES(cached_gases,our_moles)
|
||||
var/their_moles
|
||||
TOTAL_MOLES(sharer_gases,their_moles)
|
||||
var/delta_pressure = temperature_archived*(our_moles + moved_moles) - sharer.temperature_archived*(their_moles - moved_moles)
|
||||
return delta_pressure * R_IDEAL_GAS_EQUATION / volume
|
||||
|
||||
/datum/gas_mixture/after_share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
return
|
||||
|
||||
/datum/gas_mixture/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
|
||||
//transfer of thermal energy (via conduction) between self and sharer
|
||||
if(sharer)
|
||||
sharer_temperature = sharer.temperature_archived
|
||||
var/temperature_delta = temperature_archived - sharer_temperature
|
||||
if(abs(temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/self_heat_capacity = heat_capacity_archived()
|
||||
sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity_archived()
|
||||
|
||||
if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
|
||||
var/heat = conduction_coefficient*temperature_delta* \
|
||||
(self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity))
|
||||
|
||||
temperature = max(temperature - heat/self_heat_capacity, TCMB)
|
||||
sharer_temperature = max(sharer_temperature + heat/sharer_heat_capacity, TCMB)
|
||||
if(sharer)
|
||||
sharer.temperature = sharer_temperature
|
||||
return sharer_temperature
|
||||
//thermal energy of the system (self and sharer) is unchanged
|
||||
|
||||
/datum/gas_mixture/compare(datum/gas_mixture/sample)
|
||||
var/list/sample_gases = sample.gases //accessing datum vars is slower than proc vars
|
||||
var/list/cached_gases = gases
|
||||
|
||||
for(var/id in cached_gases | sample_gases) // compare gases from either mixture
|
||||
var/gas_moles = cached_gases[id]
|
||||
gas_moles = gas_moles ? gas_moles[MOLES] : 0
|
||||
var/sample_moles = sample_gases[id]
|
||||
sample_moles = sample_moles ? sample_moles[MOLES] : 0
|
||||
var/delta = abs(gas_moles - sample_moles)
|
||||
if(delta > MINIMUM_MOLES_DELTA_TO_MOVE && \
|
||||
delta > gas_moles * MINIMUM_AIR_RATIO_TO_MOVE)
|
||||
return id
|
||||
|
||||
var/our_moles
|
||||
TOTAL_MOLES(cached_gases, our_moles)
|
||||
if(our_moles > MINIMUM_MOLES_DELTA_TO_MOVE)
|
||||
var/temp = temperature
|
||||
var/sample_temp = sample.temperature
|
||||
|
||||
var/temperature_delta = abs(temp - sample_temp)
|
||||
if(temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND)
|
||||
return "temp"
|
||||
|
||||
return ""
|
||||
|
||||
/datum/gas_mixture/react(turf/open/dump_location)
|
||||
. = 0
|
||||
if(temperature < TCMB) //just for safety
|
||||
temperature = TCMB
|
||||
reaction_results = new
|
||||
|
||||
var/list/cached_gases = gases
|
||||
var/temp = temperature
|
||||
var/ener = thermal_energy()
|
||||
|
||||
reaction_loop:
|
||||
for(var/r in SSair.gas_reactions)
|
||||
var/datum/gas_reaction/reaction = r
|
||||
|
||||
var/list/min_reqs = reaction.min_requirements.Copy()
|
||||
if((min_reqs["TEMP"] && temp < min_reqs["TEMP"]) \
|
||||
|| (min_reqs["ENER"] && ener < min_reqs["ENER"]))
|
||||
continue
|
||||
min_reqs -= "TEMP"
|
||||
min_reqs -= "ENER"
|
||||
|
||||
for(var/id in min_reqs)
|
||||
if(!cached_gases[id] || cached_gases[id][MOLES] < min_reqs[id])
|
||||
continue reaction_loop
|
||||
//at this point, all minimum requirements for the reaction are satisfied.
|
||||
|
||||
/* currently no reactions have maximum requirements, so we can leave the checks commented out for a slight performance boost
|
||||
var/list/max_reqs = reaction.max_requirements.Copy()
|
||||
if((max_reqs["TEMP"] && temp > max_reqs["TEMP"]) \
|
||||
|| (max_reqs["ENER"] && ener > max_reqs["ENER"]))
|
||||
continue
|
||||
max_reqs -= "TEMP"
|
||||
max_reqs -= "ENER"
|
||||
|
||||
for(var/id in max_reqs)
|
||||
if(cached_gases[id] && cached_gases[id][MOLES] > max_reqs[id])
|
||||
continue reaction_loop
|
||||
//at this point, all requirements for the reaction are satisfied. we can now react()
|
||||
*/
|
||||
|
||||
. |= reaction.react(src, dump_location)
|
||||
if(.)
|
||||
garbage_collect()
|
||||
|
||||
//Takes the amount of the gas you want to PP as an argument
|
||||
//So I don't have to do some hacky switches/defines/magic strings
|
||||
//eg:
|
||||
//Tox_PP = get_partial_pressure(gas_mixture.toxins)
|
||||
//O2_PP = get_partial_pressure(gas_mixture.oxygen)
|
||||
|
||||
/datum/gas_mixture/proc/get_breath_partial_pressure(gas_pressure)
|
||||
return (gas_pressure * R_IDEAL_GAS_EQUATION * temperature) / BREATH_VOLUME
|
||||
//inverse
|
||||
/datum/gas_mixture/proc/get_true_breath_pressure(partial_pressure)
|
||||
return (partial_pressure * BREATH_VOLUME) / (R_IDEAL_GAS_EQUATION * temperature)
|
||||
|
||||
//Mathematical proofs:
|
||||
/*
|
||||
get_breath_partial_pressure(gas_pp) --> gas_pp/total_moles()*breath_pp = pp
|
||||
get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
|
||||
|
||||
10/20*5 = 2.5
|
||||
10 = 2.5/5*20
|
||||
*/
|
||||
/*
|
||||
What are the archived variables for?
|
||||
Calculations are done using the archived variables with the results merged into the regular variables.
|
||||
This prevents race conditions that arise based on the order of tile processing.
|
||||
*/
|
||||
#define MINIMUM_HEAT_CAPACITY 0.0003
|
||||
#define QUANTIZE(variable) (round(variable,0.0000001))/*I feel the need to document what happens here. Basically this is used to catch most rounding errors, however it's previous value made it so that
|
||||
once gases got hot enough, most procedures wouldnt occur due to the fact that the mole counts would get rounded away. Thus, we lowered it a few orders of magnititude */
|
||||
|
||||
GLOBAL_LIST_INIT(meta_gas_info, meta_gas_list()) //see ATMOSPHERICS/gas_types.dm
|
||||
GLOBAL_LIST_INIT(gaslist_cache, init_gaslist_cache())
|
||||
|
||||
/proc/init_gaslist_cache()
|
||||
. = list()
|
||||
for(var/id in GLOB.meta_gas_info)
|
||||
var/list/cached_gas = new(3)
|
||||
|
||||
.[id] = cached_gas
|
||||
|
||||
cached_gas[MOLES] = 0
|
||||
cached_gas[ARCHIVE] = 0
|
||||
cached_gas[GAS_META] = GLOB.meta_gas_info[id]
|
||||
|
||||
#define GASLIST(id, out_list)\
|
||||
var/list/tmp_gaslist = GLOB.gaslist_cache[id];\
|
||||
out_list = tmp_gaslist.Copy();
|
||||
|
||||
/datum/gas_mixture
|
||||
var/list/gases
|
||||
var/temperature //kelvins
|
||||
var/tmp/temperature_archived
|
||||
var/volume //liters
|
||||
var/last_share
|
||||
var/list/reaction_results
|
||||
|
||||
/datum/gas_mixture/New(volume = CELL_VOLUME)
|
||||
gases = new
|
||||
temperature = 0
|
||||
temperature_archived = 0
|
||||
src.volume = volume
|
||||
last_share = 0
|
||||
reaction_results = new
|
||||
|
||||
//listmos procs
|
||||
|
||||
//assert_gas(gas_id) - used to guarantee that the gas list for this id exists.
|
||||
//Must be used before adding to a gas. May be used before reading from a gas.
|
||||
/datum/gas_mixture/proc/assert_gas(gas_id)
|
||||
var/cached_gases = gases
|
||||
if(cached_gases[gas_id])
|
||||
return
|
||||
GASLIST(gas_id, cached_gases[gas_id])
|
||||
|
||||
//assert_gases(args) - shorthand for calling assert_gas() once for each gas type.
|
||||
/datum/gas_mixture/proc/assert_gases()
|
||||
for(var/id in args)
|
||||
assert_gas(id)
|
||||
|
||||
//add_gas(gas_id) - similar to assert_gas(), but does not check for an existing
|
||||
//gas list for this id. This can clobber existing gases.
|
||||
//Used instead of assert_gas() when you know the gas does not exist. Faster than assert_gas().
|
||||
/datum/gas_mixture/proc/add_gas(gas_id)
|
||||
GASLIST(gas_id, gases[gas_id])
|
||||
|
||||
//add_gases(args) - shorthand for calling add_gas() once for each gas_type.
|
||||
/datum/gas_mixture/proc/add_gases()
|
||||
var/cached_gases = gases
|
||||
for(var/id in args)
|
||||
GASLIST(id, cached_gases[id])
|
||||
|
||||
//garbage_collect() - removes any gas list which is empty.
|
||||
//If called with a list as an argument, only removes gas lists with IDs from that list.
|
||||
//Must be used after subtracting from a gas. Must be used after assert_gas()
|
||||
//if assert_gas() was called only to read from the gas.
|
||||
//By removing empty gases, processing speed is increased.
|
||||
/datum/gas_mixture/proc/garbage_collect(list/tocheck)
|
||||
var/list/cached_gases = gases
|
||||
for(var/id in (tocheck || cached_gases))
|
||||
if(cached_gases[id][MOLES] <= 0 && cached_gases[id][ARCHIVE] <= 0)
|
||||
cached_gases -= id
|
||||
|
||||
//PV = nRT
|
||||
/datum/gas_mixture/proc/heat_capacity() //joules per kelvin
|
||||
var/list/cached_gases = gases
|
||||
. = 0
|
||||
for(var/id in cached_gases)
|
||||
var/gas_data = cached_gases[id]
|
||||
. += gas_data[MOLES] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
|
||||
|
||||
/datum/gas_mixture/proc/heat_capacity_archived() //joules per kelvin
|
||||
var/list/cached_gases = gases
|
||||
. = 0
|
||||
for(var/id in cached_gases)
|
||||
var/gas_data = cached_gases[id]
|
||||
. += gas_data[ARCHIVE] * gas_data[GAS_META][META_GAS_SPECIFIC_HEAT]
|
||||
|
||||
//prefer this in performance critical areas
|
||||
#define TOTAL_MOLES(cached_gases, out_var)\
|
||||
out_var = 0;\
|
||||
for(var/total_moles_id in cached_gases){\
|
||||
out_var += cached_gases[total_moles_id][MOLES];\
|
||||
}
|
||||
|
||||
/datum/gas_mixture/proc/total_moles()
|
||||
var/cached_gases = gases
|
||||
TOTAL_MOLES(cached_gases, .)
|
||||
|
||||
/datum/gas_mixture/proc/return_pressure() //kilopascals
|
||||
if(volume > 0) // to prevent division by zero
|
||||
var/cached_gases = gases
|
||||
TOTAL_MOLES(cached_gases, .)
|
||||
. *= R_IDEAL_GAS_EQUATION * temperature / volume
|
||||
return
|
||||
return 0
|
||||
|
||||
/datum/gas_mixture/proc/return_temperature() //kelvins
|
||||
return temperature
|
||||
|
||||
/datum/gas_mixture/proc/return_volume() //liters
|
||||
return max(0, volume)
|
||||
|
||||
/datum/gas_mixture/proc/thermal_energy() //joules
|
||||
return temperature * heat_capacity()
|
||||
|
||||
/datum/gas_mixture/proc/archive()
|
||||
//Update archived versions of variables
|
||||
//Returns: 1 in all cases
|
||||
|
||||
/datum/gas_mixture/proc/merge(datum/gas_mixture/giver)
|
||||
//Merges all air from giver into self. Deletes giver.
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/remove(amount)
|
||||
//Proportionally removes amount of gas from the gas_mixture
|
||||
//Returns: gas_mixture with the gases removed
|
||||
|
||||
/datum/gas_mixture/proc/remove_ratio(ratio)
|
||||
//Proportionally removes amount of gas from the gas_mixture
|
||||
//Returns: gas_mixture with the gases removed
|
||||
|
||||
/datum/gas_mixture/proc/copy()
|
||||
//Creates new, identical gas mixture
|
||||
//Returns: duplicate gas mixture
|
||||
|
||||
/datum/gas_mixture/proc/copy_from(datum/gas_mixture/sample)
|
||||
//Copies variables from sample
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/copy_from_turf(turf/model)
|
||||
//Copies all gas info from the turf into the gas list along with temperature
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/parse_gas_string(gas_string)
|
||||
//Copies variables from a particularly formatted string.
|
||||
//Returns: 1 if we are mutable, 0 otherwise
|
||||
|
||||
/datum/gas_mixture/proc/share(datum/gas_mixture/sharer)
|
||||
//Performs air sharing calculations between two gas_mixtures assuming only 1 boundary length
|
||||
//Returns: amount of gas exchanged (+ if sharer received)
|
||||
|
||||
/datum/gas_mixture/proc/after_share(datum/gas_mixture/sharer)
|
||||
//called on share's sharer to let it know it just got some gases
|
||||
|
||||
/datum/gas_mixture/proc/temperature_share(datum/gas_mixture/sharer, conduction_coefficient)
|
||||
//Performs temperature sharing calculations (via conduction) between two gas_mixtures assuming only 1 boundary length
|
||||
//Returns: new temperature of the sharer
|
||||
|
||||
/datum/gas_mixture/proc/compare(datum/gas_mixture/sample)
|
||||
//Compares sample to self to see if within acceptable ranges that group processing may be enabled
|
||||
//Returns: a string indicating what check failed, or "" if check passes
|
||||
|
||||
/datum/gas_mixture/proc/react(turf/open/dump_location)
|
||||
//Performs various reactions such as combustion or fusion (LOL)
|
||||
//Returns: 1 if any reaction took place; 0 otherwise
|
||||
|
||||
/datum/gas_mixture/archive()
|
||||
var/list/cached_gases = gases
|
||||
|
||||
temperature_archived = temperature
|
||||
for(var/id in cached_gases)
|
||||
cached_gases[id][ARCHIVE] = cached_gases[id][MOLES]
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/merge(datum/gas_mixture/giver)
|
||||
if(!giver)
|
||||
return 0
|
||||
|
||||
//heat transfer
|
||||
if(abs(temperature - giver.temperature) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/self_heat_capacity = heat_capacity()
|
||||
var/giver_heat_capacity = giver.heat_capacity()
|
||||
var/combined_heat_capacity = giver_heat_capacity + self_heat_capacity
|
||||
if(combined_heat_capacity)
|
||||
temperature = (giver.temperature * giver_heat_capacity + temperature * self_heat_capacity) / combined_heat_capacity
|
||||
|
||||
var/list/cached_gases = gases //accessing datum vars is slower than proc vars
|
||||
var/list/giver_gases = giver.gases
|
||||
//gas transfer
|
||||
for(var/giver_id in giver_gases)
|
||||
assert_gas(giver_id)
|
||||
cached_gases[giver_id][MOLES] += giver_gases[giver_id][MOLES]
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/remove(amount)
|
||||
var/sum
|
||||
var/list/cached_gases = gases
|
||||
TOTAL_MOLES(cached_gases, sum)
|
||||
amount = min(amount, sum) //Can not take more air than tile has!
|
||||
if(amount <= 0)
|
||||
return null
|
||||
var/datum/gas_mixture/removed = new
|
||||
var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
|
||||
|
||||
removed.temperature = temperature
|
||||
for(var/id in cached_gases)
|
||||
removed.add_gas(id)
|
||||
removed_gases[id][MOLES] = QUANTIZE((cached_gases[id][MOLES] / sum) * amount)
|
||||
cached_gases[id][MOLES] -= removed_gases[id][MOLES]
|
||||
garbage_collect()
|
||||
|
||||
return removed
|
||||
|
||||
/datum/gas_mixture/remove_ratio(ratio)
|
||||
if(ratio <= 0)
|
||||
return null
|
||||
ratio = min(ratio, 1)
|
||||
|
||||
var/list/cached_gases = gases
|
||||
var/datum/gas_mixture/removed = new
|
||||
var/list/removed_gases = removed.gases //accessing datum vars is slower than proc vars
|
||||
|
||||
removed.temperature = temperature
|
||||
for(var/id in cached_gases)
|
||||
removed.add_gas(id)
|
||||
removed_gases[id][MOLES] = QUANTIZE(cached_gases[id][MOLES] * ratio)
|
||||
cached_gases[id][MOLES] -= removed_gases[id][MOLES]
|
||||
|
||||
garbage_collect()
|
||||
|
||||
return removed
|
||||
|
||||
/datum/gas_mixture/copy()
|
||||
var/list/cached_gases = gases
|
||||
var/datum/gas_mixture/copy = new
|
||||
var/list/copy_gases = copy.gases
|
||||
|
||||
copy.temperature = temperature
|
||||
for(var/id in cached_gases)
|
||||
copy.add_gas(id)
|
||||
copy_gases[id][MOLES] = cached_gases[id][MOLES]
|
||||
|
||||
return copy
|
||||
|
||||
/datum/gas_mixture/copy_from(datum/gas_mixture/sample)
|
||||
var/list/cached_gases = gases //accessing datum vars is slower than proc vars
|
||||
var/list/sample_gases = sample.gases
|
||||
|
||||
temperature = sample.temperature
|
||||
for(var/id in sample_gases)
|
||||
assert_gas(id)
|
||||
cached_gases[id][MOLES] = sample_gases[id][MOLES]
|
||||
|
||||
//remove all gases not in the sample
|
||||
cached_gases &= sample_gases
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/copy_from_turf(turf/model)
|
||||
parse_gas_string(model.initial_gas_mix)
|
||||
|
||||
//acounts for changes in temperature
|
||||
var/turf/model_parent = model.parent_type
|
||||
if(model.temperature != initial(model.temperature) || model.temperature != initial(model_parent.temperature))
|
||||
temperature = model.temperature
|
||||
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/parse_gas_string(gas_string)
|
||||
var/list/gases = src.gases
|
||||
var/list/gas = params2list(gas_string)
|
||||
if(gas["TEMP"])
|
||||
temperature = text2num(gas["TEMP"])
|
||||
gas -= "TEMP"
|
||||
gases.Cut()
|
||||
for(var/id in gas)
|
||||
add_gas(id)
|
||||
gases[id][MOLES] = text2num(gas[id])
|
||||
return 1
|
||||
|
||||
/datum/gas_mixture/share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
if(!sharer)
|
||||
return 0
|
||||
|
||||
var/list/cached_gases = gases
|
||||
var/list/sharer_gases = sharer.gases
|
||||
|
||||
var/temperature_delta = temperature_archived - sharer.temperature_archived
|
||||
var/abs_temperature_delta = abs(temperature_delta)
|
||||
|
||||
var/old_self_heat_capacity = 0
|
||||
var/old_sharer_heat_capacity = 0
|
||||
if(abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
old_self_heat_capacity = heat_capacity()
|
||||
old_sharer_heat_capacity = sharer.heat_capacity()
|
||||
|
||||
var/heat_capacity_self_to_sharer = 0 //heat capacity of the moles transferred from us to the sharer
|
||||
var/heat_capacity_sharer_to_self = 0 //heat capacity of the moles transferred from the sharer to us
|
||||
|
||||
var/moved_moles = 0
|
||||
var/abs_moved_moles = 0
|
||||
|
||||
//GAS TRANSFER
|
||||
for(var/id in sharer_gases - cached_gases) // create gases not in our cache
|
||||
add_gas(id)
|
||||
for(var/id in cached_gases) // transfer gases
|
||||
if(!sharer_gases[id]) //checking here prevents an uneeded proc call if the check fails.
|
||||
sharer.add_gas(id)
|
||||
|
||||
var/gas = cached_gases[id]
|
||||
var/sharergas = sharer_gases[id]
|
||||
|
||||
var/delta = QUANTIZE(gas[ARCHIVE] - sharergas[ARCHIVE])/(atmos_adjacent_turfs+1) //the amount of gas that gets moved between the mixtures
|
||||
|
||||
if(delta && abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/gas_heat_capacity = delta * gas[GAS_META][META_GAS_SPECIFIC_HEAT]
|
||||
if(delta > 0)
|
||||
heat_capacity_self_to_sharer += gas_heat_capacity
|
||||
else
|
||||
heat_capacity_sharer_to_self -= gas_heat_capacity //subtract here instead of adding the absolute value because we know that delta is negative. saves a proc call.
|
||||
|
||||
gas[MOLES] -= delta
|
||||
sharergas[MOLES] += delta
|
||||
moved_moles += delta
|
||||
abs_moved_moles += abs(delta)
|
||||
|
||||
last_share = abs_moved_moles
|
||||
|
||||
//THERMAL ENERGY TRANSFER
|
||||
if(abs_temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/new_self_heat_capacity = old_self_heat_capacity + heat_capacity_sharer_to_self - heat_capacity_self_to_sharer
|
||||
var/new_sharer_heat_capacity = old_sharer_heat_capacity + heat_capacity_self_to_sharer - heat_capacity_sharer_to_self
|
||||
|
||||
//transfer of thermal energy (via changed heat capacity) between self and sharer
|
||||
if(new_self_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
temperature = (old_self_heat_capacity*temperature - heat_capacity_self_to_sharer*temperature_archived + heat_capacity_sharer_to_self*sharer.temperature_archived)/new_self_heat_capacity
|
||||
|
||||
if(new_sharer_heat_capacity > MINIMUM_HEAT_CAPACITY)
|
||||
sharer.temperature = (old_sharer_heat_capacity*sharer.temperature-heat_capacity_sharer_to_self*sharer.temperature_archived + heat_capacity_self_to_sharer*temperature_archived)/new_sharer_heat_capacity
|
||||
//thermal energy of the system (self and sharer) is unchanged
|
||||
|
||||
if(abs(old_sharer_heat_capacity) > MINIMUM_HEAT_CAPACITY)
|
||||
if(abs(new_sharer_heat_capacity/old_sharer_heat_capacity - 1) < 0.1) // <10% change in sharer heat capacity
|
||||
temperature_share(sharer, OPEN_HEAT_TRANSFER_COEFFICIENT)
|
||||
|
||||
var/list/unique_gases = cached_gases ^ sharer_gases
|
||||
if(unique_gases.len) //if all gases were present in both mixtures, we know that no gases are 0
|
||||
garbage_collect(cached_gases - sharer_gases) //any gases the sharer had, we are guaranteed to have. gases that it didn't have we are not.
|
||||
sharer.garbage_collect(sharer_gases - cached_gases) //the reverse is equally true
|
||||
sharer.after_share(src, atmos_adjacent_turfs)
|
||||
if(temperature_delta > MINIMUM_TEMPERATURE_TO_MOVE || abs(moved_moles) > MINIMUM_MOLES_DELTA_TO_MOVE)
|
||||
var/our_moles
|
||||
TOTAL_MOLES(cached_gases,our_moles)
|
||||
var/their_moles
|
||||
TOTAL_MOLES(sharer_gases,their_moles)
|
||||
var/delta_pressure = temperature_archived*(our_moles + moved_moles) - sharer.temperature_archived*(their_moles - moved_moles)
|
||||
return delta_pressure * R_IDEAL_GAS_EQUATION / volume
|
||||
|
||||
/datum/gas_mixture/after_share(datum/gas_mixture/sharer, atmos_adjacent_turfs = 4)
|
||||
return
|
||||
|
||||
/datum/gas_mixture/temperature_share(datum/gas_mixture/sharer, conduction_coefficient, sharer_temperature, sharer_heat_capacity)
|
||||
//transfer of thermal energy (via conduction) between self and sharer
|
||||
if(sharer)
|
||||
sharer_temperature = sharer.temperature_archived
|
||||
var/temperature_delta = temperature_archived - sharer_temperature
|
||||
if(abs(temperature_delta) > MINIMUM_TEMPERATURE_DELTA_TO_CONSIDER)
|
||||
var/self_heat_capacity = heat_capacity_archived()
|
||||
sharer_heat_capacity = sharer_heat_capacity || sharer.heat_capacity_archived()
|
||||
|
||||
if((sharer_heat_capacity > MINIMUM_HEAT_CAPACITY) && (self_heat_capacity > MINIMUM_HEAT_CAPACITY))
|
||||
var/heat = conduction_coefficient*temperature_delta* \
|
||||
(self_heat_capacity*sharer_heat_capacity/(self_heat_capacity+sharer_heat_capacity))
|
||||
|
||||
temperature = max(temperature - heat/self_heat_capacity, TCMB)
|
||||
sharer_temperature = max(sharer_temperature + heat/sharer_heat_capacity, TCMB)
|
||||
if(sharer)
|
||||
sharer.temperature = sharer_temperature
|
||||
return sharer_temperature
|
||||
//thermal energy of the system (self and sharer) is unchanged
|
||||
|
||||
/datum/gas_mixture/compare(datum/gas_mixture/sample)
|
||||
var/list/sample_gases = sample.gases //accessing datum vars is slower than proc vars
|
||||
var/list/cached_gases = gases
|
||||
|
||||
for(var/id in cached_gases | sample_gases) // compare gases from either mixture
|
||||
var/gas_moles = cached_gases[id]
|
||||
gas_moles = gas_moles ? gas_moles[MOLES] : 0
|
||||
var/sample_moles = sample_gases[id]
|
||||
sample_moles = sample_moles ? sample_moles[MOLES] : 0
|
||||
var/delta = abs(gas_moles - sample_moles)
|
||||
if(delta > MINIMUM_MOLES_DELTA_TO_MOVE && \
|
||||
delta > gas_moles * MINIMUM_AIR_RATIO_TO_MOVE)
|
||||
return id
|
||||
|
||||
var/our_moles
|
||||
TOTAL_MOLES(cached_gases, our_moles)
|
||||
if(our_moles > MINIMUM_MOLES_DELTA_TO_MOVE)
|
||||
var/temp = temperature
|
||||
var/sample_temp = sample.temperature
|
||||
|
||||
var/temperature_delta = abs(temp - sample_temp)
|
||||
if(temperature_delta > MINIMUM_TEMPERATURE_DELTA_TO_SUSPEND)
|
||||
return "temp"
|
||||
|
||||
return ""
|
||||
|
||||
/datum/gas_mixture/react(turf/open/dump_location)
|
||||
. = 0
|
||||
if(temperature < TCMB) //just for safety
|
||||
temperature = TCMB
|
||||
reaction_results = new
|
||||
|
||||
var/list/cached_gases = gases
|
||||
var/temp = temperature
|
||||
var/ener = thermal_energy()
|
||||
|
||||
reaction_loop:
|
||||
for(var/r in SSair.gas_reactions)
|
||||
var/datum/gas_reaction/reaction = r
|
||||
|
||||
var/list/min_reqs = reaction.min_requirements.Copy()
|
||||
if((min_reqs["TEMP"] && temp < min_reqs["TEMP"]) \
|
||||
|| (min_reqs["ENER"] && ener < min_reqs["ENER"]))
|
||||
continue
|
||||
min_reqs -= "TEMP"
|
||||
min_reqs -= "ENER"
|
||||
|
||||
for(var/id in min_reqs)
|
||||
if(!cached_gases[id] || cached_gases[id][MOLES] < min_reqs[id])
|
||||
continue reaction_loop
|
||||
//at this point, all minimum requirements for the reaction are satisfied.
|
||||
|
||||
/* currently no reactions have maximum requirements, so we can leave the checks commented out for a slight performance boost
|
||||
var/list/max_reqs = reaction.max_requirements.Copy()
|
||||
if((max_reqs["TEMP"] && temp > max_reqs["TEMP"]) \
|
||||
|| (max_reqs["ENER"] && ener > max_reqs["ENER"]))
|
||||
continue
|
||||
max_reqs -= "TEMP"
|
||||
max_reqs -= "ENER"
|
||||
|
||||
for(var/id in max_reqs)
|
||||
if(cached_gases[id] && cached_gases[id][MOLES] > max_reqs[id])
|
||||
continue reaction_loop
|
||||
//at this point, all requirements for the reaction are satisfied. we can now react()
|
||||
*/
|
||||
|
||||
. |= reaction.react(src, dump_location)
|
||||
if(.)
|
||||
garbage_collect()
|
||||
|
||||
//Takes the amount of the gas you want to PP as an argument
|
||||
//So I don't have to do some hacky switches/defines/magic strings
|
||||
//eg:
|
||||
//Tox_PP = get_partial_pressure(gas_mixture.toxins)
|
||||
//O2_PP = get_partial_pressure(gas_mixture.oxygen)
|
||||
|
||||
/datum/gas_mixture/proc/get_breath_partial_pressure(gas_pressure)
|
||||
return (gas_pressure * R_IDEAL_GAS_EQUATION * temperature) / BREATH_VOLUME
|
||||
//inverse
|
||||
/datum/gas_mixture/proc/get_true_breath_pressure(partial_pressure)
|
||||
return (partial_pressure * BREATH_VOLUME) / (R_IDEAL_GAS_EQUATION * temperature)
|
||||
|
||||
//Mathematical proofs:
|
||||
/*
|
||||
get_breath_partial_pressure(gas_pp) --> gas_pp/total_moles()*breath_pp = pp
|
||||
get_true_breath_pressure(pp) --> gas_pp = pp/breath_pp*total_moles()
|
||||
|
||||
10/20*5 = 2.5
|
||||
10 = 2.5/5*20
|
||||
*/
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
var/datum/radio_frequency/radio_connection
|
||||
|
||||
var/list/TLV = list( // Breathable air.
|
||||
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE* 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20), // kPa
|
||||
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
|
||||
"temperature" = new/datum/tlv(T0C, T0C+10, T0C+40, T0C+66), // K
|
||||
"o2" = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
|
||||
"n2" = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
|
||||
@@ -101,7 +101,7 @@
|
||||
|
||||
/obj/machinery/airalarm/kitchen_cold_room // Copypasta: to check temperatures.
|
||||
TLV = list(
|
||||
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.80, ONE_ATMOSPHERE* 0.90, ONE_ATMOSPHERE * 1.10, ONE_ATMOSPHERE * 1.20), // kPa
|
||||
"pressure" = new/datum/tlv(ONE_ATMOSPHERE * 0.8, ONE_ATMOSPHERE* 0.9, ONE_ATMOSPHERE * 1.1, ONE_ATMOSPHERE * 1.2), // kPa
|
||||
"temperature" = new/datum/tlv(200,210,273.15,283.15), // K
|
||||
"o2" = new/datum/tlv(16, 19, 135, 140), // Partial pressure, kpa
|
||||
"n2" = new/datum/tlv(-1, -1, 1000, 1000), // Partial pressure, kpa
|
||||
|
||||
@@ -214,7 +214,7 @@ BLIND // can't see anything
|
||||
gender = PLURAL //Carn: for grammarically correct text-parsing
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
icon = 'icons/obj/clothing/gloves.dmi'
|
||||
siemens_coefficient = 0.50
|
||||
siemens_coefficient = 0.5
|
||||
body_parts_covered = HANDS
|
||||
slot_flags = SLOT_GLOVES
|
||||
attack_verb = list("challenged")
|
||||
@@ -361,7 +361,7 @@ BLIND // can't see anything
|
||||
body_parts_covered = FEET
|
||||
slot_flags = SLOT_FEET
|
||||
|
||||
permeability_coefficient = 0.50
|
||||
permeability_coefficient = 0.5
|
||||
slowdown = SHOES_SLOWDOWN
|
||||
var/blood_state = BLOOD_STATE_NOT_BLOODY
|
||||
var/list/bloody_shoes = list(BLOOD_STATE_HUMAN = 0,BLOOD_STATE_XENO = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0)
|
||||
@@ -503,7 +503,7 @@ BLIND // can't see anything
|
||||
icon = 'icons/obj/clothing/uniforms.dmi'
|
||||
name = "under"
|
||||
body_parts_covered = CHEST|GROIN|LEGS|ARMS
|
||||
permeability_coefficient = 0.90
|
||||
permeability_coefficient = 0.9
|
||||
slot_flags = SLOT_ICLOTHING
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
var/fitted = FEMALE_UNIFORM_FULL // For use in alternate clothing styles for women
|
||||
|
||||
@@ -1,213 +1,213 @@
|
||||
/obj/item/clothing/gloves/color/yellow
|
||||
desc = "These gloves will protect the wearer from electric shock."
|
||||
name = "insulated gloves"
|
||||
icon_state = "yellow"
|
||||
item_state = "ygloves"
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.05
|
||||
item_color="yellow"
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow //Cheap Chinese Crap
|
||||
desc = "These gloves are cheap knockoffs of the coveted ones - no way this can end badly."
|
||||
name = "budget insulated gloves"
|
||||
icon_state = "yellow"
|
||||
item_state = "ygloves"
|
||||
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
|
||||
permeability_coefficient = 0.05
|
||||
item_color="yellow"
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow/New()
|
||||
..()
|
||||
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow/old
|
||||
desc = "Old and worn out insulated gloves, hopefully they still work."
|
||||
name = "worn out insulated gloves"
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow/old/Initialize()
|
||||
. = ..()
|
||||
siemens_coefficient = pick(0,0,0,0.5,0.5,0.5,0.75)
|
||||
|
||||
/obj/item/clothing/gloves/color/black
|
||||
desc = "These gloves are fire-resistant."
|
||||
name = "black gloves"
|
||||
icon_state = "black"
|
||||
item_state = "blackgloves"
|
||||
item_color="black"
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
resistance_flags = 0
|
||||
var/can_be_cut = 1
|
||||
|
||||
/obj/item/clothing/gloves/color/black/hos
|
||||
item_color = "hosred" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/black/ce
|
||||
item_color = "chief" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/black/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
|
||||
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
|
||||
playsound(user.loc, W.usesound, rand(10,50), 1)
|
||||
new /obj/item/clothing/gloves/fingerless(user.loc)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/color/orange
|
||||
name = "orange gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "orange"
|
||||
item_state = "orangegloves"
|
||||
item_color="orange"
|
||||
|
||||
/obj/item/clothing/gloves/color/red
|
||||
name = "red gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "red"
|
||||
item_state = "redgloves"
|
||||
item_color = "red"
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/color/red/insulated
|
||||
name = "insulated gloves"
|
||||
desc = "These gloves will protect the wearer from electric shock."
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.05
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/rainbow
|
||||
name = "rainbow gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "rainbow"
|
||||
item_state = "rainbowgloves"
|
||||
item_color = "rainbow"
|
||||
|
||||
/obj/item/clothing/gloves/color/rainbow/clown
|
||||
item_color = "clown"
|
||||
|
||||
/obj/item/clothing/gloves/color/blue
|
||||
name = "blue gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "blue"
|
||||
item_state = "bluegloves"
|
||||
item_color="blue"
|
||||
|
||||
/obj/item/clothing/gloves/color/purple
|
||||
name = "purple gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "purple"
|
||||
item_state = "purplegloves"
|
||||
item_color="purple"
|
||||
|
||||
/obj/item/clothing/gloves/color/green
|
||||
name = "green gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "green"
|
||||
item_state = "greengloves"
|
||||
item_color="green"
|
||||
|
||||
/obj/item/clothing/gloves/color/grey
|
||||
name = "grey gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "gray"
|
||||
item_state = "graygloves"
|
||||
item_color="grey"
|
||||
|
||||
/obj/item/clothing/gloves/color/grey/rd
|
||||
item_color = "director" //Exists for washing machines. Is not different from gray gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/grey/hop
|
||||
item_color = "hop" //Exists for washing machines. Is not different from gray gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/light_brown
|
||||
name = "light brown gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "lightbrown"
|
||||
item_state = "lightbrowngloves"
|
||||
item_color="light brown"
|
||||
|
||||
/obj/item/clothing/gloves/color/brown
|
||||
name = "brown gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "brown"
|
||||
item_state = "browngloves"
|
||||
item_color="brown"
|
||||
|
||||
/obj/item/clothing/gloves/color/brown/cargo
|
||||
item_color = "cargo" //Exists for washing machines. Is not different from brown gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/captain
|
||||
desc = "Regal blue gloves, with a nice gold trim. Swanky."
|
||||
name = "captain's gloves"
|
||||
icon_state = "captain"
|
||||
item_state = "egloves"
|
||||
item_color = "captain"
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.05
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
strip_delay = 60
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 50)
|
||||
|
||||
/obj/item/clothing/gloves/color/latex
|
||||
name = "latex gloves"
|
||||
desc = "Cheap sterile gloves made from latex."
|
||||
icon_state = "latex"
|
||||
item_state = "lgloves"
|
||||
siemens_coefficient = 0.30
|
||||
permeability_coefficient = 0.01
|
||||
item_color="white"
|
||||
transfer_prints = TRUE
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/latex/nitrile
|
||||
name = "nitrile gloves"
|
||||
desc = "Pricy sterile gloves that are stronger than latex."
|
||||
icon_state = "nitrile"
|
||||
item_state = "nitrilegloves"
|
||||
item_color = "cmo"
|
||||
transfer_prints = FALSE
|
||||
|
||||
/obj/item/clothing/gloves/color/white
|
||||
name = "white gloves"
|
||||
desc = "These look pretty fancy."
|
||||
icon_state = "white"
|
||||
item_state = "wgloves"
|
||||
item_color="mime"
|
||||
|
||||
/obj/item/clothing/gloves/color/white/redcoat
|
||||
item_color = "redcoat" //Exists for washing machines. Is not different from white gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/random
|
||||
name = "random gloves"
|
||||
desc = "These gloves are supposed to be a random color..."
|
||||
icon_state = "white"
|
||||
item_state = "wgloves"
|
||||
item_color = "mime"
|
||||
|
||||
/obj/item/clothing/gloves/color/random/New()
|
||||
..()
|
||||
var/list/gloves = list(
|
||||
/obj/item/clothing/gloves/color/orange = 1,
|
||||
/obj/item/clothing/gloves/color/red = 1,
|
||||
/obj/item/clothing/gloves/color/blue = 1,
|
||||
/obj/item/clothing/gloves/color/purple = 1,
|
||||
/obj/item/clothing/gloves/color/green = 1,
|
||||
/obj/item/clothing/gloves/color/grey = 1,
|
||||
/obj/item/clothing/gloves/color/light_brown = 1,
|
||||
/obj/item/clothing/gloves/color/brown = 1)
|
||||
|
||||
var/obj/item/clothing/gloves/color/selected = pick(gloves)
|
||||
|
||||
name = initial(selected.name)
|
||||
desc = initial(selected.desc)
|
||||
icon_state = initial(selected.icon_state)
|
||||
item_state = initial(selected.item_state)
|
||||
item_color = initial(selected.item_color)
|
||||
/obj/item/clothing/gloves/color/yellow
|
||||
desc = "These gloves will protect the wearer from electric shock."
|
||||
name = "insulated gloves"
|
||||
icon_state = "yellow"
|
||||
item_state = "ygloves"
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.5
|
||||
item_color="yellow"
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow //Cheap Chinese Crap
|
||||
desc = "These gloves are cheap knockoffs of the coveted ones - no way this can end badly."
|
||||
name = "budget insulated gloves"
|
||||
icon_state = "yellow"
|
||||
item_state = "ygloves"
|
||||
siemens_coefficient = 1 //Set to a default of 1, gets overridden in New()
|
||||
permeability_coefficient = 0.5
|
||||
item_color="yellow"
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow/New()
|
||||
..()
|
||||
siemens_coefficient = pick(0,0.5,0.5,0.5,0.5,0.75,1.5)
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow/old
|
||||
desc = "Old and worn out insulated gloves, hopefully they still work."
|
||||
name = "worn out insulated gloves"
|
||||
|
||||
/obj/item/clothing/gloves/color/fyellow/old/Initialize()
|
||||
. = ..()
|
||||
siemens_coefficient = pick(0,0,0,0.5,0.5,0.5,0.75)
|
||||
|
||||
/obj/item/clothing/gloves/color/black
|
||||
desc = "These gloves are fire-resistant."
|
||||
name = "black gloves"
|
||||
icon_state = "black"
|
||||
item_state = "blackgloves"
|
||||
item_color="black"
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
resistance_flags = 0
|
||||
var/can_be_cut = 1
|
||||
|
||||
/obj/item/clothing/gloves/color/black/hos
|
||||
item_color = "hosred" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/black/ce
|
||||
item_color = "chief" //Exists for washing machines. Is not different from black gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/black/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/wirecutters))
|
||||
if(can_be_cut && icon_state == initial(icon_state))//only if not dyed
|
||||
to_chat(user, "<span class='notice'>You snip the fingertips off of [src].</span>")
|
||||
playsound(user.loc, W.usesound, rand(10,50), 1)
|
||||
new /obj/item/clothing/gloves/fingerless(user.loc)
|
||||
qdel(src)
|
||||
..()
|
||||
|
||||
/obj/item/clothing/gloves/color/orange
|
||||
name = "orange gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "orange"
|
||||
item_state = "orangegloves"
|
||||
item_color="orange"
|
||||
|
||||
/obj/item/clothing/gloves/color/red
|
||||
name = "red gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "red"
|
||||
item_state = "redgloves"
|
||||
item_color = "red"
|
||||
|
||||
|
||||
/obj/item/clothing/gloves/color/red/insulated
|
||||
name = "insulated gloves"
|
||||
desc = "These gloves will protect the wearer from electric shock."
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.5
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/rainbow
|
||||
name = "rainbow gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "rainbow"
|
||||
item_state = "rainbowgloves"
|
||||
item_color = "rainbow"
|
||||
|
||||
/obj/item/clothing/gloves/color/rainbow/clown
|
||||
item_color = "clown"
|
||||
|
||||
/obj/item/clothing/gloves/color/blue
|
||||
name = "blue gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "blue"
|
||||
item_state = "bluegloves"
|
||||
item_color="blue"
|
||||
|
||||
/obj/item/clothing/gloves/color/purple
|
||||
name = "purple gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "purple"
|
||||
item_state = "purplegloves"
|
||||
item_color="purple"
|
||||
|
||||
/obj/item/clothing/gloves/color/green
|
||||
name = "green gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "green"
|
||||
item_state = "greengloves"
|
||||
item_color="green"
|
||||
|
||||
/obj/item/clothing/gloves/color/grey
|
||||
name = "grey gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "gray"
|
||||
item_state = "graygloves"
|
||||
item_color="grey"
|
||||
|
||||
/obj/item/clothing/gloves/color/grey/rd
|
||||
item_color = "director" //Exists for washing machines. Is not different from gray gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/grey/hop
|
||||
item_color = "hop" //Exists for washing machines. Is not different from gray gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/light_brown
|
||||
name = "light brown gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "lightbrown"
|
||||
item_state = "lightbrowngloves"
|
||||
item_color="light brown"
|
||||
|
||||
/obj/item/clothing/gloves/color/brown
|
||||
name = "brown gloves"
|
||||
desc = "A pair of gloves, they don't look special in any way."
|
||||
icon_state = "brown"
|
||||
item_state = "browngloves"
|
||||
item_color="brown"
|
||||
|
||||
/obj/item/clothing/gloves/color/brown/cargo
|
||||
item_color = "cargo" //Exists for washing machines. Is not different from brown gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/captain
|
||||
desc = "Regal blue gloves, with a nice gold trim. Swanky."
|
||||
name = "captain's gloves"
|
||||
icon_state = "captain"
|
||||
item_state = "egloves"
|
||||
item_color = "captain"
|
||||
siemens_coefficient = 0
|
||||
permeability_coefficient = 0.5
|
||||
cold_protection = HANDS
|
||||
min_cold_protection_temperature = GLOVES_MIN_TEMP_PROTECT
|
||||
heat_protection = HANDS
|
||||
max_heat_protection_temperature = GLOVES_MAX_TEMP_PROTECT
|
||||
strip_delay = 60
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 70, acid = 50)
|
||||
|
||||
/obj/item/clothing/gloves/color/latex
|
||||
name = "latex gloves"
|
||||
desc = "Cheap sterile gloves made from latex."
|
||||
icon_state = "latex"
|
||||
item_state = "lgloves"
|
||||
siemens_coefficient = 0.3
|
||||
permeability_coefficient = 0.1
|
||||
item_color="white"
|
||||
transfer_prints = TRUE
|
||||
resistance_flags = 0
|
||||
|
||||
/obj/item/clothing/gloves/color/latex/nitrile
|
||||
name = "nitrile gloves"
|
||||
desc = "Pricy sterile gloves that are stronger than latex."
|
||||
icon_state = "nitrile"
|
||||
item_state = "nitrilegloves"
|
||||
item_color = "cmo"
|
||||
transfer_prints = FALSE
|
||||
|
||||
/obj/item/clothing/gloves/color/white
|
||||
name = "white gloves"
|
||||
desc = "These look pretty fancy."
|
||||
icon_state = "white"
|
||||
item_state = "wgloves"
|
||||
item_color="mime"
|
||||
|
||||
/obj/item/clothing/gloves/color/white/redcoat
|
||||
item_color = "redcoat" //Exists for washing machines. Is not different from white gloves in any way.
|
||||
|
||||
/obj/item/clothing/gloves/color/random
|
||||
name = "random gloves"
|
||||
desc = "These gloves are supposed to be a random color..."
|
||||
icon_state = "white"
|
||||
item_state = "wgloves"
|
||||
item_color = "mime"
|
||||
|
||||
/obj/item/clothing/gloves/color/random/New()
|
||||
..()
|
||||
var/list/gloves = list(
|
||||
/obj/item/clothing/gloves/color/orange = 1,
|
||||
/obj/item/clothing/gloves/color/red = 1,
|
||||
/obj/item/clothing/gloves/color/blue = 1,
|
||||
/obj/item/clothing/gloves/color/purple = 1,
|
||||
/obj/item/clothing/gloves/color/green = 1,
|
||||
/obj/item/clothing/gloves/color/grey = 1,
|
||||
/obj/item/clothing/gloves/color/light_brown = 1,
|
||||
/obj/item/clothing/gloves/color/brown = 1)
|
||||
|
||||
var/obj/item/clothing/gloves/color/selected = pick(gloves)
|
||||
|
||||
name = initial(selected.name)
|
||||
desc = initial(selected.desc)
|
||||
icon_state = initial(selected.icon_state)
|
||||
item_state = initial(selected.item_state)
|
||||
item_color = initial(selected.item_color)
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
flags_1 = MASKINTERNALS_1
|
||||
visor_flags = MASKINTERNALS_1
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
gas_transfer_coefficient = 0.10
|
||||
permeability_coefficient = 0.50
|
||||
gas_transfer_coefficient = 0.1
|
||||
permeability_coefficient = 0.5
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
flags_cover = MASKCOVERSMOUTH
|
||||
visor_flags_cover = MASKCOVERSMOUTH
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
item_state = "blindfold"
|
||||
flags_cover = MASKCOVERSMOUTH
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
gas_transfer_coefficient = 0.90
|
||||
gas_transfer_coefficient = 0.9
|
||||
equip_delay_other = 20
|
||||
|
||||
/obj/item/clothing/mask/muzzle/attack_paw(mob/user)
|
||||
@@ -26,7 +26,7 @@
|
||||
flags_cover = MASKCOVERSMOUTH
|
||||
visor_flags_inv = HIDEFACE
|
||||
visor_flags_cover = MASKCOVERSMOUTH
|
||||
gas_transfer_coefficient = 0.90
|
||||
gas_transfer_coefficient = 0.9
|
||||
permeability_coefficient = 0.01
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 25, rad = 0, fire = 0, acid = 0)
|
||||
actions_types = list(/datum/action/item_action/adjust)
|
||||
|
||||
@@ -362,7 +362,7 @@
|
||||
icon_state = "heavy"
|
||||
item_state = "swat_suit"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
gas_transfer_coefficient = 0.90
|
||||
gas_transfer_coefficient = 0.9
|
||||
flags_1 = THICKMATERIAL_1
|
||||
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
slowdown = 3
|
||||
|
||||
@@ -70,8 +70,8 @@
|
||||
desc = "An apron-jacket used by a high class chef."
|
||||
icon_state = "chef"
|
||||
item_state = "chef"
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.50
|
||||
gas_transfer_coefficient = 0.9
|
||||
permeability_coefficient = 0.5
|
||||
body_parts_covered = CHEST|GROIN|ARMS
|
||||
allowed = list(/obj/item/kitchen)
|
||||
togglename = "sleeves"
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
icon_state = "fire"
|
||||
item_state = "ro_suit"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.50
|
||||
gas_transfer_coefficient = 0.9
|
||||
permeability_coefficient = 0.5
|
||||
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/extinguisher, /obj/item/crowbar)
|
||||
slowdown = 1
|
||||
@@ -122,8 +122,8 @@
|
||||
icon_state = "rad"
|
||||
item_state = "rad_suit"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.50
|
||||
gas_transfer_coefficient = 0.9
|
||||
permeability_coefficient = 0.5
|
||||
flags_1 = THICKMATERIAL_1
|
||||
body_parts_covered = CHEST|GROIN|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/device/flashlight, /obj/item/tank/internals/emergency_oxygen, /obj/item/device/geiger_counter)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
icon_state = "hydroponics"
|
||||
item_state = "g_suit"
|
||||
item_color = "hydroponics"
|
||||
permeability_coefficient = 0.50
|
||||
permeability_coefficient = 0.5
|
||||
|
||||
/obj/item/clothing/under/rank/janitor
|
||||
desc = "It's the official uniform of the station's janitor. It has minor protection from biohazards."
|
||||
|
||||
@@ -1,121 +1,121 @@
|
||||
/*
|
||||
* Science
|
||||
*/
|
||||
/obj/item/clothing/under/rank/research_director
|
||||
desc = "It's a suit worn by those with the know-how to achieve the position of \"Research Director\". Its fabric provides minor protection from biological contaminants."
|
||||
name = "research director's vest suit"
|
||||
icon_state = "director"
|
||||
item_state = "lb_suit"
|
||||
item_color = "director"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 10, rad = 0, fire = 0, acid = 35)
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/research_director/alt
|
||||
desc = "Maybe you'll engineer your own half-man, half-pig creature some day. Its fabric provides minor protection from biological contaminants."
|
||||
name = "research director's tan suit"
|
||||
icon_state = "rdwhimsy"
|
||||
item_state = "rdwhimsy"
|
||||
item_color = "rdwhimsy"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
can_adjust = 1
|
||||
alt_covers_chest = 1
|
||||
|
||||
/obj/item/clothing/under/rank/research_director/turtleneck
|
||||
desc = "A dark purple turtleneck and tan khakis, for a director with a superior sense of style."
|
||||
name = "research director's turtleneck"
|
||||
icon_state = "rdturtle"
|
||||
item_state = "p_suit"
|
||||
item_color = "rdturtle"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
can_adjust = 1
|
||||
alt_covers_chest = 1
|
||||
|
||||
/obj/item/clothing/under/rank/scientist
|
||||
desc = "It's made of a special fiber that provides minor protection against explosives. It has markings that denote the wearer as a scientist."
|
||||
name = "scientist's jumpsuit"
|
||||
icon_state = "toxins"
|
||||
item_state = "w_suit"
|
||||
item_color = "toxinswhite"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
|
||||
/obj/item/clothing/under/rank/chemist
|
||||
desc = "It's made of a special fiber that gives special protection against biohazards. It has a chemist rank stripe on it."
|
||||
name = "chemist's jumpsuit"
|
||||
icon_state = "chemistry"
|
||||
item_state = "w_suit"
|
||||
item_color = "chemistrywhite"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 50, acid = 65)
|
||||
|
||||
/*
|
||||
* Medical
|
||||
*/
|
||||
/obj/item/clothing/under/rank/chief_medical_officer
|
||||
desc = "It's a jumpsuit worn by those with the experience to be \"Chief Medical Officer\". It provides minor biological protection."
|
||||
name = "chief medical officer's jumpsuit"
|
||||
icon_state = "cmo"
|
||||
item_state = "w_suit"
|
||||
item_color = "cmo"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/geneticist
|
||||
desc = "It's made of a special fiber that gives special protection against biohazards. It has a genetics rank stripe on it."
|
||||
name = "geneticist's jumpsuit"
|
||||
icon_state = "genetics"
|
||||
item_state = "w_suit"
|
||||
item_color = "geneticswhite"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/virologist
|
||||
desc = "It's made of a special fiber that gives special protection against biohazards. It has a virologist rank stripe on it."
|
||||
name = "virologist's jumpsuit"
|
||||
icon_state = "virology"
|
||||
item_state = "w_suit"
|
||||
item_color = "virologywhite"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/nursesuit
|
||||
desc = "It's a jumpsuit commonly worn by nursing staff in the medical department."
|
||||
name = "nurse's suit"
|
||||
icon_state = "nursesuit"
|
||||
item_state = "w_suit"
|
||||
item_color = "nursesuit"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
fitted = NO_FEMALE_UNIFORM
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/medical
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. It has a cross on the chest denoting that the wearer is trained medical personnel."
|
||||
name = "medical doctor's jumpsuit"
|
||||
icon_state = "medical"
|
||||
item_state = "w_suit"
|
||||
item_color = "medical"
|
||||
permeability_coefficient = 0.50
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/medical/blue
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in baby blue."
|
||||
icon_state = "scrubsblue"
|
||||
item_color = "scrubsblue"
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/medical/green
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in dark green."
|
||||
icon_state = "scrubsgreen"
|
||||
item_color = "scrubsgreen"
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/medical/purple
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in deep purple."
|
||||
icon_state = "scrubspurple"
|
||||
item_color = "scrubspurple"
|
||||
can_adjust = 0
|
||||
/*
|
||||
* Science
|
||||
*/
|
||||
/obj/item/clothing/under/rank/research_director
|
||||
desc = "It's a suit worn by those with the know-how to achieve the position of \"Research Director\". Its fabric provides minor protection from biological contaminants."
|
||||
name = "research director's vest suit"
|
||||
icon_state = "director"
|
||||
item_state = "lb_suit"
|
||||
item_color = "director"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 10, rad = 0, fire = 0, acid = 35)
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/research_director/alt
|
||||
desc = "Maybe you'll engineer your own half-man, half-pig creature some day. Its fabric provides minor protection from biological contaminants."
|
||||
name = "research director's tan suit"
|
||||
icon_state = "rdwhimsy"
|
||||
item_state = "rdwhimsy"
|
||||
item_color = "rdwhimsy"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
can_adjust = 1
|
||||
alt_covers_chest = 1
|
||||
|
||||
/obj/item/clothing/under/rank/research_director/turtleneck
|
||||
desc = "A dark purple turtleneck and tan khakis, for a director with a superior sense of style."
|
||||
name = "research director's turtleneck"
|
||||
icon_state = "rdturtle"
|
||||
item_state = "p_suit"
|
||||
item_color = "rdturtle"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 10, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
can_adjust = 1
|
||||
alt_covers_chest = 1
|
||||
|
||||
/obj/item/clothing/under/rank/scientist
|
||||
desc = "It's made of a special fiber that provides minor protection against explosives. It has markings that denote the wearer as a scientist."
|
||||
name = "scientist's jumpsuit"
|
||||
icon_state = "toxins"
|
||||
item_state = "w_suit"
|
||||
item_color = "toxinswhite"
|
||||
permeability_coefficient = 0.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 10, bio = 0, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
|
||||
/obj/item/clothing/under/rank/chemist
|
||||
desc = "It's made of a special fiber that gives special protection against biohazards. It has a chemist rank stripe on it."
|
||||
name = "chemist's jumpsuit"
|
||||
icon_state = "chemistry"
|
||||
item_state = "w_suit"
|
||||
item_color = "chemistrywhite"
|
||||
permeability_coefficient = 0.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 50, acid = 65)
|
||||
|
||||
/*
|
||||
* Medical
|
||||
*/
|
||||
/obj/item/clothing/under/rank/chief_medical_officer
|
||||
desc = "It's a jumpsuit worn by those with the experience to be \"Chief Medical Officer\". It provides minor biological protection."
|
||||
name = "chief medical officer's jumpsuit"
|
||||
icon_state = "cmo"
|
||||
item_state = "w_suit"
|
||||
item_color = "cmo"
|
||||
permeability_coefficient = 0.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/geneticist
|
||||
desc = "It's made of a special fiber that gives special protection against biohazards. It has a genetics rank stripe on it."
|
||||
name = "geneticist's jumpsuit"
|
||||
icon_state = "genetics"
|
||||
item_state = "w_suit"
|
||||
item_color = "geneticswhite"
|
||||
permeability_coefficient = 0.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/virologist
|
||||
desc = "It's made of a special fiber that gives special protection against biohazards. It has a virologist rank stripe on it."
|
||||
name = "virologist's jumpsuit"
|
||||
icon_state = "virology"
|
||||
item_state = "w_suit"
|
||||
item_color = "virologywhite"
|
||||
permeability_coefficient = 0.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/nursesuit
|
||||
desc = "It's a jumpsuit commonly worn by nursing staff in the medical department."
|
||||
name = "nurse's suit"
|
||||
icon_state = "nursesuit"
|
||||
item_state = "w_suit"
|
||||
item_color = "nursesuit"
|
||||
permeability_coefficient = 0.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
fitted = NO_FEMALE_UNIFORM
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/medical
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. It has a cross on the chest denoting that the wearer is trained medical personnel."
|
||||
name = "medical doctor's jumpsuit"
|
||||
icon_state = "medical"
|
||||
item_state = "w_suit"
|
||||
item_color = "medical"
|
||||
permeability_coefficient = 0.5
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 10, rad = 0, fire = 0, acid = 0)
|
||||
|
||||
/obj/item/clothing/under/rank/medical/blue
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in baby blue."
|
||||
icon_state = "scrubsblue"
|
||||
item_color = "scrubsblue"
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/medical/green
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in dark green."
|
||||
icon_state = "scrubsgreen"
|
||||
item_color = "scrubsgreen"
|
||||
can_adjust = 0
|
||||
|
||||
/obj/item/clothing/under/rank/medical/purple
|
||||
name = "medical scrubs"
|
||||
desc = "It's made of a special fiber that provides minor protection against biohazards. This one is in deep purple."
|
||||
icon_state = "scrubspurple"
|
||||
item_color = "scrubspurple"
|
||||
can_adjust = 0
|
||||
|
||||
@@ -622,7 +622,7 @@
|
||||
adjustHealth(round(salt * 0.25))
|
||||
if (myseed)
|
||||
myseed.adjust_production(-round(salt/100)-prob(salt%100))
|
||||
myseed.adjust_potency(round(salt*0.50))
|
||||
myseed.adjust_potency(round(salt*0.5))
|
||||
// Ash is also used IRL in gardening, as a fertilizer enhancer and weed killer
|
||||
if(S.has_reagent("ash", 1))
|
||||
adjustHealth(round(S.get_reagent_amount("ash") * 0.25))
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
name = "Plasteel Golem"
|
||||
id = "plasteel golem"
|
||||
fixed_mut_color = "bbb"
|
||||
stunmod = 0.40
|
||||
stunmod = 0.4
|
||||
punchdamagelow = 12
|
||||
punchdamagehigh = 21
|
||||
punchstunthreshold = 18 //still 40% stun chance
|
||||
|
||||
@@ -352,9 +352,9 @@ Difficulty: Medium
|
||||
|
||||
/obj/effect/temp_visual/dragon_flight/proc/flight(negative)
|
||||
if(negative)
|
||||
animate(src, pixel_x = -DRAKE_SWOOP_HEIGHT*0.10, pixel_z = DRAKE_SWOOP_HEIGHT*0.15, time = 3, easing = BOUNCE_EASING)
|
||||
animate(src, pixel_x = -DRAKE_SWOOP_HEIGHT*0.1, pixel_z = DRAKE_SWOOP_HEIGHT*0.15, time = 3, easing = BOUNCE_EASING)
|
||||
else
|
||||
animate(src, pixel_x = DRAKE_SWOOP_HEIGHT*0.10, pixel_z = DRAKE_SWOOP_HEIGHT*0.15, time = 3, easing = BOUNCE_EASING)
|
||||
animate(src, pixel_x = DRAKE_SWOOP_HEIGHT*0.1, pixel_z = DRAKE_SWOOP_HEIGHT*0.15, time = 3, easing = BOUNCE_EASING)
|
||||
sleep(3)
|
||||
icon_state = "swoop"
|
||||
if(negative)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
else
|
||||
var/datum/status_effect/crusher_damage/C = has_status_effect(STATUS_EFFECT_CRUSHERDAMAGETRACKING)
|
||||
if(C && crusher_loot)
|
||||
if(C.total_damage >= maxHealth * 0.60) //if you do at least 60% of its health with the crusher, you'll get the item
|
||||
if(C.total_damage >= maxHealth * 0.6) //if you do at least 60% of its health with the crusher, you'll get the item
|
||||
spawn_crusher_loot()
|
||||
if(!admin_spawned)
|
||||
SSblackbox.set_details("megafauna_kills","[initial(name)]")
|
||||
|
||||
@@ -10,11 +10,11 @@
|
||||
circuit = /obj/item/circuitboard/machine/chem_heater
|
||||
var/obj/item/reagent_containers/beaker = null
|
||||
var/target_temperature = 300
|
||||
var/heater_coefficient = 0.10
|
||||
var/heater_coefficient = 0.1
|
||||
var/on = FALSE
|
||||
|
||||
/obj/machinery/chem_heater/RefreshParts()
|
||||
heater_coefficient = 0.10
|
||||
heater_coefficient = 0.1
|
||||
for(var/obj/item/stock_parts/micro_laser/M in component_parts)
|
||||
heater_coefficient *= M.rating
|
||||
|
||||
|
||||
@@ -69,7 +69,7 @@ All effects don't start immediately, but rather get worse over time; the rate is
|
||||
|
||||
for(var/s in C.surgeries)
|
||||
var/datum/surgery/S = s
|
||||
S.success_multiplier = max(0.10*power_multiplier, S.success_multiplier)
|
||||
S.success_multiplier = max(0.1*power_multiplier, S.success_multiplier)
|
||||
// +10% success propability on each step, useful while operating in less-than-perfect conditions
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -353,7 +353,7 @@
|
||||
var/mob/living/carbon/C = M
|
||||
for(var/s in C.surgeries)
|
||||
var/datum/surgery/S = s
|
||||
S.success_multiplier = max(0.10, S.success_multiplier)
|
||||
S.success_multiplier = max(0.1, S.success_multiplier)
|
||||
// +10% success propability on each step, useful while operating in less-than-perfect conditions
|
||||
|
||||
if(show_message)
|
||||
|
||||
@@ -797,7 +797,7 @@
|
||||
var/mob/living/carbon/C = M
|
||||
for(var/s in C.surgeries)
|
||||
var/datum/surgery/S = s
|
||||
S.success_multiplier = max(0.20, S.success_multiplier)
|
||||
S.success_multiplier = max(0.2, S.success_multiplier)
|
||||
// +20% success propability on each step, useful while operating in less-than-perfect conditions
|
||||
..()
|
||||
|
||||
|
||||
@@ -429,8 +429,8 @@
|
||||
icon_state = "golem"
|
||||
item_state = "golem"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
gas_transfer_coefficient = 0.90
|
||||
permeability_coefficient = 0.50
|
||||
gas_transfer_coefficient = 0.9
|
||||
permeability_coefficient = 0.5
|
||||
body_parts_covered = FULL_BODY
|
||||
flags_inv = HIDEGLOVES | HIDESHOES | HIDEJUMPSUIT
|
||||
resistance_flags = LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
else
|
||||
if(C.ears && (C.ears.flags_2 & HEALS_EARS_2))
|
||||
deaf = max(deaf - 1, 1)
|
||||
ear_damage = max(ear_damage - 0.10, 0)
|
||||
ear_damage = max(ear_damage - 0.1, 0)
|
||||
// if higher than UNHEALING_EAR_DAMAGE, no natural healing occurs.
|
||||
if(ear_damage < UNHEALING_EAR_DAMAGE)
|
||||
ear_damage = max(ear_damage - 0.05, 0)
|
||||
|
||||
Reference in New Issue
Block a user