mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-24 04:27:35 +01:00
Merge pull request #511 from Fox-McCloud/Life-Proc-Work
Life Proc Changes--Cold Space and and Temp Handling
This commit is contained in:
@@ -246,7 +246,7 @@ BLIND // can't see anything
|
||||
var/mask_adjusted = 0
|
||||
var/ignore_maskadjust = 1
|
||||
var/adjusted_flags = null
|
||||
|
||||
|
||||
//Proc that moves gas/breath masks out of the way
|
||||
/obj/item/clothing/mask/proc/adjustmask(var/mob/user)
|
||||
if(!ignore_maskadjust)
|
||||
@@ -334,7 +334,7 @@ BLIND // can't see anything
|
||||
permeability_coefficient = 0.02
|
||||
flags = STOPSPRESSUREDMAGE | THICKMATERIAL
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank)
|
||||
slowdown = 2
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT||HIDETAIL
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
item_state = "eng_hardsuit"
|
||||
slowdown = 2
|
||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/t_scanner, /obj/item/weapon/rcd, /obj/item/device/suit_cooling_unit)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/t_scanner, /obj/item/weapon/rcd)
|
||||
|
||||
species_restricted = list("exclude","Unathi","Tajaran","Skrell","Diona","Vox")
|
||||
sprite_sheets = list(
|
||||
@@ -320,7 +320,7 @@
|
||||
item_state = "eng_hardsuit"
|
||||
slowdown = 2
|
||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 75)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/device/t_scanner, /obj/item/weapon/rcd)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/t_scanner, /obj/item/weapon/rcd)
|
||||
|
||||
//Chief Engineer's rig
|
||||
/obj/item/clothing/head/helmet/space/rig/elite
|
||||
@@ -497,7 +497,7 @@
|
||||
desc = "A special helmet designed for work in a hazardous, low pressure environment. Built with lightweight materials for extra comfort."
|
||||
item_state = "medical_hardsuit"
|
||||
slowdown = 1
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/storage/firstaid,/obj/item/device/healthanalyzer,/obj/item/stack/medical)
|
||||
armor = list(melee = 10, bullet = 5, laser = 10, energy = 5, bomb = 10, bio = 100, rad = 50)
|
||||
|
||||
//Security
|
||||
@@ -516,7 +516,7 @@
|
||||
desc = "A special suit that protects against hazardous, low pressure environments. Has an additional layer of armor."
|
||||
item_state = "sec_hardsuit"
|
||||
armor = list(melee = 30, bullet = 15, laser = 30, energy = 10, bomb = 10, bio = 100, rad = 50)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit,/obj/item/weapon/melee/baton,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/restraints/handcuffs)
|
||||
allowed = list(/obj/item/weapon/gun,/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/weapon/melee/baton,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/restraints/handcuffs)
|
||||
siemens_coefficient = 0.7
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
opacity = 1
|
||||
density = 1
|
||||
blocks_air = 1
|
||||
temperature = T0C
|
||||
temperature = TCMB
|
||||
var/mineral/mineral
|
||||
var/mined_ore = 0
|
||||
var/last_act = 0
|
||||
@@ -392,7 +392,7 @@
|
||||
icon_state = "asteroid"
|
||||
oxygen = 0.01
|
||||
nitrogen = 0.01
|
||||
temperature = T0C
|
||||
temperature = TCMB
|
||||
icon_plating = "asteroid"
|
||||
var/dug = 0 //0 = has not yet been dug, 1 = has already been dug
|
||||
has_resources = 1
|
||||
|
||||
@@ -485,6 +485,36 @@
|
||||
legcuffed = null
|
||||
update_inv_legcuffed(1)
|
||||
|
||||
/mob/living/carbon/proc/get_temperature(var/datum/gas_mixture/environment)
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
var/obj/mecha/M = loc
|
||||
loc_temp = M.return_temperature()
|
||||
|
||||
else if(istype(loc, /obj/spacepod))
|
||||
var/obj/spacepod/S = loc
|
||||
loc_temp = S.return_temperature()
|
||||
|
||||
else if(istype(loc, /obj/structure/transit_tube_pod))
|
||||
loc_temp = environment.temperature
|
||||
|
||||
else if(istype(get_turf(src), /turf/space))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
var/obj/machinery/atmospherics/unary/cryo_cell/C = loc
|
||||
|
||||
if(C.air_contents.total_moles() < 10)
|
||||
loc_temp = environment.temperature
|
||||
else
|
||||
loc_temp = C.air_contents.temperature
|
||||
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
return loc_temp
|
||||
|
||||
/mob/living/carbon/show_inv(mob/living/carbon/user as mob)
|
||||
user.set_machine(src)
|
||||
var/dat = {"
|
||||
|
||||
@@ -141,72 +141,19 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
handle_vampire()
|
||||
|
||||
|
||||
//Much like get_heat_protection(), this returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
/mob/living/carbon/human/proc/get_pressure_protection()
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
|
||||
..()
|
||||
var/pressure_difference = abs( pressure - ONE_ATMOSPHERE )
|
||||
|
||||
var/pressure_adjustment_coefficient = 1 //Determins how much the clothing you are wearing protects you in percent.
|
||||
|
||||
if(head && (head.flags & STOPSPRESSUREDMAGE))
|
||||
pressure_adjustment_coefficient -= PRESSURE_HEAD_REDUCTION_COEFFICIENT
|
||||
|
||||
if(wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE))
|
||||
pressure_adjustment_coefficient -= PRESSURE_SUIT_REDUCTION_COEFFICIENT
|
||||
|
||||
//Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure reduction.
|
||||
if(istype(wear_suit,/obj/item/clothing/suit/space))
|
||||
var/obj/item/clothing/suit/space/S = wear_suit
|
||||
if(S.can_breach && S.damage)
|
||||
var/pressure_loss = S.damage * 0.1
|
||||
pressure_adjustment_coefficient += pressure_loss
|
||||
|
||||
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) //So it isn't less than 0 or larger than 1.
|
||||
|
||||
return 1 - pressure_adjustment_coefficient //want 0 to be bad protection, 1 to be good protection
|
||||
|
||||
// Calculate how vulnerable the human is to under- and overpressure.
|
||||
// Returns 0 (equals 0 %) if sealed in an undamaged suit, 1 if unprotected (equals 100%).
|
||||
// Suitdamage can modifiy this in 10% steps.
|
||||
/mob/living/carbon/human/proc/get_pressure_weakness()
|
||||
|
||||
var/pressure_adjustment_coefficient = 1 // Assume no protection at first.
|
||||
|
||||
if(wear_suit && (wear_suit.flags & STOPSPRESSUREDMAGE) && head && (head.flags & STOPSPRESSUREDMAGE)) // Complete set of pressure-proof suit worn, assume fully sealed.
|
||||
pressure_adjustment_coefficient = 0
|
||||
|
||||
// Handles breaches in your space suit. 10 suit damage equals a 100% loss of pressure protection.
|
||||
if(istype(wear_suit,/obj/item/clothing/suit/space))
|
||||
var/obj/item/clothing/suit/space/S = wear_suit
|
||||
if(S.can_breach && S.damage)
|
||||
pressure_adjustment_coefficient += S.damage * 0.1
|
||||
|
||||
pressure_adjustment_coefficient = min(1,max(pressure_adjustment_coefficient,0)) // So it isn't less than 0 or larger than 1.
|
||||
|
||||
return pressure_adjustment_coefficient
|
||||
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(var/pressure)
|
||||
var/pressure_difference
|
||||
|
||||
// First get the absolute pressure difference.
|
||||
if(pressure < ONE_ATMOSPHERE) // We are in an underpressure.
|
||||
pressure_difference = ONE_ATMOSPHERE - pressure
|
||||
|
||||
else //We are in an overpressure or standard atmosphere.
|
||||
pressure_difference = pressure - ONE_ATMOSPHERE
|
||||
|
||||
if(pressure_difference < 5) // If the difference is small, don't bother calculating the fraction.
|
||||
pressure_difference = 0
|
||||
|
||||
else
|
||||
// Otherwise calculate how much of that absolute pressure difference affects us, can be 0 to 1 (equals 0% to 100%).
|
||||
// This is our relative difference.
|
||||
pressure_difference *= get_pressure_weakness()
|
||||
|
||||
// The difference is always positive to avoid extra calculations.
|
||||
// Apply the relative difference on a standard atmosphere to get the final result.
|
||||
// The return value will be the adjusted_pressure of the human that is the basis of pressure warnings and damage.
|
||||
if(pressure < ONE_ATMOSPHERE)
|
||||
return ONE_ATMOSPHERE - pressure_difference
|
||||
else
|
||||
pressure_adjustment_coefficient = max(pressure_adjustment_coefficient,0) //So it isn't less than 0
|
||||
pressure_difference = pressure_difference * pressure_adjustment_coefficient
|
||||
if(pressure > ONE_ATMOSPHERE)
|
||||
return ONE_ATMOSPHERE + pressure_difference
|
||||
else
|
||||
return ONE_ATMOSPHERE - pressure_difference
|
||||
|
||||
|
||||
/mob/living/carbon/human
|
||||
@@ -526,50 +473,25 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(!environment)
|
||||
return
|
||||
|
||||
//Moved pressure calculations here for use in skip-processing check.
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure)
|
||||
var/loc_temp = get_temperature(environment)
|
||||
//world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)] - Heat capacity: [environment_heat_capacity] - Location: [loc] - src: [src]"
|
||||
|
||||
if(!istype(get_turf(src), /turf/space)) //space is not meant to change your body temperature.
|
||||
var/loc_temp = T0C
|
||||
if(istype(loc, /obj/mecha))
|
||||
var/obj/mecha/M = loc
|
||||
loc_temp = M.return_temperature()
|
||||
//Body temperature is adjusted in two steps. Firstly your body tries to stabilize itself a bit.
|
||||
if(stat != 2)
|
||||
stabilize_temperature_from_calories()
|
||||
|
||||
if(istype(loc, /obj/spacepod))
|
||||
var/obj/spacepod/S = loc
|
||||
loc_temp = S.return_temperature()
|
||||
//else if(istype(get_turf(src), /turf/space))
|
||||
|
||||
else if(istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
|
||||
loc_temp = loc:air_contents.temperature
|
||||
//After then, it reacts to the surrounding atmosphere based on your thermal protection
|
||||
if(!on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
|
||||
if(loc_temp < bodytemperature)
|
||||
//Place is colder than we are
|
||||
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR), BODYTEMP_COOLING_MAX)
|
||||
else
|
||||
loc_temp = environment.temperature
|
||||
|
||||
if(adjusted_pressure < species.warning_high_pressure && adjusted_pressure > species.warning_low_pressure && abs(loc_temp - bodytemperature) < 20 && bodytemperature < species.heat_level_1 && bodytemperature > species.cold_level_1 && environment.toxins < MOLES_PLASMA_VISIBLE)
|
||||
pressure_alert = 0
|
||||
return // Temperatures are within normal ranges, fuck all this processing. ~Ccomp
|
||||
|
||||
if(!on_fire) //If you're on fire, you do not heat up or cool down based on surrounding gases
|
||||
//Body temperature adjusts depending on surrounding atmosphere based on your thermal protection
|
||||
var/temp_adj = 0
|
||||
if(loc_temp < bodytemperature) //Place is colder than we are
|
||||
var/thermal_protection = get_cold_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_COLD_DIVISOR) //this will be negative
|
||||
else if (loc_temp > bodytemperature) //Place is hotter than we are
|
||||
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
temp_adj = (1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR)
|
||||
|
||||
//Use heat transfer as proportional to the gas density. However, we only care about the relative density vs standard 101 kPa/20 C air. Therefore we can use mole ratios
|
||||
var/relative_density = environment.total_moles() / MOLES_CELLSTANDARD
|
||||
temp_adj *= relative_density
|
||||
|
||||
if (temp_adj > BODYTEMP_HEATING_MAX) temp_adj = BODYTEMP_HEATING_MAX
|
||||
if (temp_adj < BODYTEMP_COOLING_MAX) temp_adj = BODYTEMP_COOLING_MAX
|
||||
//world << "Environment: [loc_temp], [src]: [bodytemperature], Adjusting: [temp_adj]"
|
||||
bodytemperature += temp_adj
|
||||
//Place is hotter than we are
|
||||
var/thermal_protection = get_heat_protection(loc_temp) //This returns a 0 - 1 value, which corresponds to the percentage of protection based on what you're wearing and what you're exposed to.
|
||||
if(thermal_protection < 1)
|
||||
bodytemperature += min((1-thermal_protection) * ((loc_temp - bodytemperature) / BODYTEMP_HEAT_DIVISOR), BODYTEMP_HEATING_MAX)
|
||||
|
||||
// +/- 50 degrees from 310.15K is the 'safe' zone, where no damage is dealt.
|
||||
if(bodytemperature > species.heat_level_1)
|
||||
@@ -607,6 +529,9 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
// Account for massive pressure differences. Done by Polymorph
|
||||
// Made it possible to actually have something that can protect against high pressure... Done by Errorage. Polymorph now has an axe sticking from his head for his previous hardcoded nonsense!
|
||||
|
||||
var/pressure = environment.return_pressure()
|
||||
var/adjusted_pressure = calculate_affecting_pressure(pressure) //Returns how much pressure actually affects the mob.
|
||||
if(status_flags & GODMODE) return 1 //godmode
|
||||
|
||||
if(adjusted_pressure >= species.hazard_high_pressure)
|
||||
@@ -620,14 +545,12 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
else if(adjusted_pressure >= species.hazard_low_pressure)
|
||||
pressure_alert = -1
|
||||
else
|
||||
if( !(RESIST_COLD in mutations))
|
||||
if(RESIST_COLD in mutations)
|
||||
pressure_alert = -1
|
||||
else
|
||||
take_overall_damage(brute=LOW_PRESSURE_DAMAGE, used_weapon = "Low Pressure")
|
||||
pressure_alert = -2
|
||||
else
|
||||
pressure_alert = -1
|
||||
|
||||
if(environment.toxins > MOLES_PLASMA_VISIBLE)
|
||||
pl_effects()
|
||||
return
|
||||
|
||||
///FIRE CODE
|
||||
@@ -671,39 +594,20 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
return temp_change
|
||||
*/
|
||||
|
||||
proc/stabilize_body_temperature()
|
||||
//TODO find a better place to put this
|
||||
if (s_store && istype(s_store, /obj/item/device/suit_cooling_unit))
|
||||
var/obj/item/device/suit_cooling_unit/CU = s_store
|
||||
CU.cool_mob(src)
|
||||
|
||||
// if (species.flags & IS_SYNTHETIC)
|
||||
// bodytemperature += species.synth_temp_gain //that CPU/posibrain just keeps putting out heat. // commented out as making synthetics unplayable until cooling system sorted out
|
||||
// return
|
||||
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
|
||||
if (abs(body_temperature_difference) < 0.5)
|
||||
return //fuck this precision
|
||||
|
||||
if(bodytemperature < species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
|
||||
proc/stabilize_temperature_from_calories()
|
||||
if(bodytemperature <= species.cold_level_1) //260.15 is 310.15 - 50, the temperature where you start to feel effects.
|
||||
if(nutrition >= 2) //If we are very, very cold we'll use up quite a bit of nutriment to heat us up.
|
||||
nutrition -= 2
|
||||
var/recovery_amt = max((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
//world << "Cold. Difference = [body_temperature_difference]. Recovering [recovery_amt]"
|
||||
// log_debug("Cold. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
bodytemperature += recovery_amt
|
||||
else if(species.cold_level_1 <= bodytemperature && bodytemperature <= species.heat_level_1)
|
||||
var/recovery_amt = body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR
|
||||
//world << "Norm. Difference = [body_temperature_difference]. Recovering [recovery_amt]"
|
||||
// log_debug("Norm. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
bodytemperature += recovery_amt
|
||||
else if(bodytemperature > species.heat_level_1) //360.15 is 310.15 + 50, the temperature where you start to feel effects.
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
bodytemperature += max((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), BODYTEMP_AUTORECOVERY_MINIMUM)
|
||||
if(bodytemperature >= species.cold_level_1 && bodytemperature <= species.heat_level_1)
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
bodytemperature += body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR
|
||||
if(bodytemperature >= species.heat_level_1) //360.15 is 310.15 + 50, the temperature where you start to feel effects.
|
||||
//We totally need a sweat system cause it totally makes sense...~
|
||||
var/recovery_amt = min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
|
||||
//world << "Hot. Difference = [body_temperature_difference]. Recovering [recovery_amt]"
|
||||
// log_debug("Hot. Difference = [body_temperature_difference]. Recovering [recovery_amt]")
|
||||
bodytemperature += recovery_amt
|
||||
var/body_temperature_difference = species.body_temperature - bodytemperature
|
||||
bodytemperature += min((body_temperature_difference / BODYTEMP_AUTORECOVERY_DIVISOR), -BODYTEMP_AUTORECOVERY_MINIMUM) //We're dealing with negative numbers
|
||||
|
||||
|
||||
//This proc returns a number made up of the flags for body parts which you are protected on. (such as HEAD, UPPER_TORSO, LOWER_TORSO, etc. See setup.dm for the full list)
|
||||
proc/get_heat_protection_flags(temperature) //Temperature is the temperature you're being exposed to.
|
||||
@@ -1041,7 +945,6 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
|
||||
updatehealth() //TODO
|
||||
if(!in_stasis)
|
||||
stabilize_body_temperature() //Body temperature adjusts itself
|
||||
handle_organs() //Optimized.
|
||||
handle_blood()
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
|
||||
var/heat_level_1 = 360 // Heat damage level 1 above this point.
|
||||
var/heat_level_2 = 400 // Heat damage level 2 above this point.
|
||||
var/heat_level_3 = 1000 // Heat damage level 2 above this point.
|
||||
var/heat_level_3 = 460 // Heat damage level 3 above this point; used for body temperature
|
||||
var/heat_level_3_breathe = 1000 // Heat damage level 3 above this point; used for breathed air temperature
|
||||
|
||||
var/body_temperature = 310.15 //non-IS_SYNTHETIC species will try to stabilize at this temperature. (also affects temperature processing)
|
||||
var/synth_temp_gain = 0 //IS_SYNTHETIC species will gain this much temperature every second
|
||||
@@ -105,8 +106,7 @@
|
||||
var/safe_oxygen_min = 16 // Minimum safe partial pressure of O2, in kPa
|
||||
//var/safe_oxygen_max = 140 // Maximum safe partial pressure of O2, in kPa (Not used for now)
|
||||
var/safe_co2_max = 10 // Yes it's an arbitrary value who cares?
|
||||
var/safe_toxins_max = 0.5
|
||||
var/safe_toxins_mask = 5
|
||||
var/safe_toxins_max = 0.005
|
||||
var/SA_para_min = 1
|
||||
var/SA_sleep_min = 5
|
||||
var/oxygen_used = 0
|
||||
@@ -179,16 +179,9 @@
|
||||
if(Toxins_pp > safe_toxins_max) // Too much toxins
|
||||
var/ratio = (breath.toxins/safe_toxins_max) * 10
|
||||
//adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE)) //Limit amount of damage toxin exposure can do per second
|
||||
if(H.wear_mask)
|
||||
if(H.wear_mask.flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
if(breath.toxins > safe_toxins_mask)
|
||||
ratio = (breath.toxins/safe_toxins_mask) * 10
|
||||
else
|
||||
ratio = 0
|
||||
if(ratio)
|
||||
if(H.reagents)
|
||||
H.reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
H.toxins_alert = max(H.toxins_alert, 1)
|
||||
if(H.reagents)
|
||||
H.reagents.add_reagent("plasma", Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
H.toxins_alert = max(H.toxins_alert, 1)
|
||||
else if(O2_pp > vox_oxygen_max && name == "Vox") //Oxygen is toxic to vox.
|
||||
var/ratio = (breath.oxygen/vox_oxygen_max) * 1000
|
||||
H.adjustToxLoss(Clamp(ratio, MIN_PLASMA_DAMAGE, MAX_PLASMA_DAMAGE))
|
||||
@@ -202,12 +195,16 @@
|
||||
if(SA_pp > SA_para_min) // Enough to make us paralysed for a bit
|
||||
H.Paralyse(3) // 3 gives them one second to wake up and run away a bit!
|
||||
if(SA_pp > SA_sleep_min) // Enough to make us sleep as well
|
||||
H.sleeping = min(H.sleeping+2, 10)
|
||||
else if(SA_pp > 0.15) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
H.sleeping = max(H.sleeping+2, 10)
|
||||
else if(SA_pp > 0.01) // There is sleeping gas in their lungs, but only a little, so give them a bit of a warning
|
||||
if(prob(20))
|
||||
spawn(0) H.emote(pick("giggle", "laugh"))
|
||||
SA.moles = 0
|
||||
|
||||
handle_temperature(breath, H)
|
||||
|
||||
return 1
|
||||
|
||||
/datum/species/proc/handle_temperature(datum/gas_mixture/breath, var/mob/living/carbon/human/H) // called by human/life, handles temperatures
|
||||
if( (abs(310.15 - breath.temperature) > 50) && !(RESIST_HEAT in H.mutations)) // Hot air hurts :(
|
||||
if(H.status_flags & GODMODE) return 1 //godmode
|
||||
if(breath.temperature < cold_level_1)
|
||||
@@ -243,14 +240,14 @@
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, "head", used_weapon = "Excessive Heat")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
|
||||
if(heat_level_2 to heat_level_3)
|
||||
if(heat_level_2 to heat_level_3_breathe)
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, "head", used_weapon = "Excessive Heat")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
|
||||
if(heat_level_3 to INFINITY)
|
||||
if(heat_level_3_breathe to INFINITY)
|
||||
H.apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, "head", used_weapon = "Excessive Heat")
|
||||
H.fire_alert = max(H.fire_alert, 2)
|
||||
return 1
|
||||
return
|
||||
|
||||
/datum/species/proc/handle_post_spawn(var/mob/living/carbon/C) //Handles anything not already covered by basic species assignment.
|
||||
handle_dna(C)
|
||||
@@ -315,11 +312,12 @@
|
||||
|
||||
cold_level_1 = 280 //Default 260 - Lower is better
|
||||
cold_level_2 = 220 //Default 200
|
||||
cold_level_3 = 130 //Default 120
|
||||
cold_level_3 = 140 //Default 120
|
||||
|
||||
heat_level_1 = 420 //Default 360 - Higher is better
|
||||
heat_level_2 = 480 //Default 400
|
||||
heat_level_3 = 1100 //Default 1000
|
||||
heat_level_1 = 380 //Default 360 - Higher is better
|
||||
heat_level_2 = 420 //Default 400
|
||||
heat_level_3 = 480 //Default 460
|
||||
heat_level_3_breathe = 1100 //Default 1000
|
||||
|
||||
flesh_color = "#34AF10"
|
||||
|
||||
@@ -343,13 +341,14 @@
|
||||
of family and politics. They prefer colder environments, and speak a variety of languages, mostly Siik'Maas, \
|
||||
using unique inflections their mouths form."
|
||||
|
||||
cold_level_1 = 200
|
||||
cold_level_2 = 140
|
||||
cold_level_3 = 80
|
||||
cold_level_1 = 240
|
||||
cold_level_2 = 180
|
||||
cold_level_3 = 100
|
||||
|
||||
heat_level_1 = 330
|
||||
heat_level_1 = 340
|
||||
heat_level_2 = 380
|
||||
heat_level_3 = 800
|
||||
heat_level_3 = 440
|
||||
heat_level_3_breathe = 900
|
||||
|
||||
primitive = /mob/living/carbon/monkey/tajara
|
||||
|
||||
@@ -462,6 +461,7 @@
|
||||
heat_level_1 = 2000
|
||||
heat_level_2 = 3000
|
||||
heat_level_3 = 4000
|
||||
heat_level_3_breathe = 4000
|
||||
|
||||
brute_mod = 0.2
|
||||
burn_mod = 0.2
|
||||
@@ -590,8 +590,9 @@
|
||||
cold_level_3 = -1
|
||||
|
||||
heat_level_1 = 300
|
||||
heat_level_2 = 350
|
||||
heat_level_3 = 700
|
||||
heat_level_2 = 340
|
||||
heat_level_3 = 400
|
||||
heat_level_3_breathe = 700
|
||||
|
||||
blurb = "Commonly referred to (erroneously) as 'plant people', the Dionaea are a strange space-dwelling collective \
|
||||
species hailing from Epsilon Ursae Minoris. Each 'diona' is a cluster of numerous cat-sized organisms called nymphs; \
|
||||
@@ -657,8 +658,9 @@
|
||||
cold_level_3 = -1
|
||||
|
||||
heat_level_1 = 500 //gives them about 25 seconds in space before taking damage
|
||||
heat_level_2 = 1000
|
||||
heat_level_3 = 2000
|
||||
heat_level_2 = 540
|
||||
heat_level_3 = 600
|
||||
heat_level_3_breathe = 600
|
||||
|
||||
synth_temp_gain = 10 //this should cause IPCs to stabilize at ~80 C in a 20 C environment.
|
||||
|
||||
|
||||
@@ -2329,18 +2329,19 @@ datum
|
||||
if(!data) data = 1
|
||||
switch(data)
|
||||
if(1 to 15)
|
||||
M.bodytemperature -= 5 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(holder.has_reagent("capsaicin"))
|
||||
holder.remove_reagent("capsaicin", 5)
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(5,20)
|
||||
if(15 to 25)
|
||||
M.bodytemperature -= 10 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(10,20)
|
||||
if(25 to INFINITY)
|
||||
M.bodytemperature -= 15 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1)) M.emote("shiver")
|
||||
M.bodytemperature -= 20 * TEMPERATURE_DAMAGE_COEFFICIENT
|
||||
if(prob(1))
|
||||
M.emote("shiver")
|
||||
if(istype(M, /mob/living/carbon/slime))
|
||||
M.bodytemperature -= rand(15,20)
|
||||
data++
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
icon_state = "cespace_suit"
|
||||
item_state = "cespace_suit"
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 100)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank,/obj/item/device/suit_cooling_unit)
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank)
|
||||
|
||||
/obj/item/clothing/head/helmet/space/eva/anomaly
|
||||
name = "Excavation hood"
|
||||
|
||||
Reference in New Issue
Block a user