Merge pull request #3973 from Anewbe/breath_temp

Splits cold/heat processing into breath and body vars, species temp tweaks
This commit is contained in:
Neerti
2017-10-03 22:57:56 -04:00
committed by GitHub
4 changed files with 106 additions and 42 deletions

View File

@@ -515,31 +515,31 @@
// Hot air hurts :(
if((breath.temperature < species.cold_level_1 || breath.temperature > species.heat_level_1) && !(COLD_RESISTANCE in mutations))
if((breath.temperature < species.breath_cold_level_1 || breath.temperature > species.breath_heat_level_1) && !(COLD_RESISTANCE in mutations))
if(breath.temperature <= species.cold_level_1)
if(breath.temperature <= species.breath_cold_level_1)
if(prob(20))
src << "<span class='danger'>You feel your face freezing and icicles forming in your lungs!</span>"
else if(breath.temperature >= species.heat_level_1)
else if(breath.temperature >= species.breath_heat_level_1)
if(prob(20))
src << "<span class='danger'>You feel your face burning and a searing heat in your lungs!</span>"
if(breath.temperature >= species.heat_level_1)
if(breath.temperature < species.heat_level_2)
if(breath.temperature >= species.breath_heat_level_1)
if(breath.temperature < species.breath_heat_level_2)
apply_damage(HEAT_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Heat")
fire_alert = max(fire_alert, 2)
else if(breath.temperature < species.heat_level_3)
else if(breath.temperature < species.breath_heat_level_3)
apply_damage(HEAT_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Heat")
fire_alert = max(fire_alert, 2)
else
apply_damage(HEAT_GAS_DAMAGE_LEVEL_3, BURN, BP_HEAD, used_weapon = "Excessive Heat")
fire_alert = max(fire_alert, 2)
else if(breath.temperature <= species.cold_level_1)
if(breath.temperature > species.cold_level_2)
else if(breath.temperature <= species.breath_cold_level_1)
if(breath.temperature > species.breath_cold_level_2)
apply_damage(COLD_GAS_DAMAGE_LEVEL_1, BURN, BP_HEAD, used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
else if(breath.temperature > species.cold_level_3)
else if(breath.temperature > species.breath_cold_level_3)
apply_damage(COLD_GAS_DAMAGE_LEVEL_2, BURN, BP_HEAD, used_weapon = "Excessive Cold")
fire_alert = max(fire_alert, 1)
else
@@ -629,34 +629,42 @@
fire_alert = max(fire_alert, 1)
if(status_flags & GODMODE)
return 1 //godmode
var/burn_dam = 0
// switch() can't access numbers inside variables, so we need to use some ugly if() spam ladder.
if(bodytemperature >= species.heat_level_3)
burn_dam = HEAT_DAMAGE_LEVEL_3
else if(bodytemperature >= species.heat_level_2)
burn_dam = HEAT_DAMAGE_LEVEL_2
else if(bodytemperature >= species.heat_level_1)
burn_dam = HEAT_DAMAGE_LEVEL_1
if(bodytemperature >= species.heat_level_1)
if(bodytemperature >= species.heat_level_2)
if(bodytemperature >= species.heat_level_3)
burn_dam = HEAT_DAMAGE_LEVEL_3
else
burn_dam = HEAT_DAMAGE_LEVEL_2
else
burn_dam = HEAT_DAMAGE_LEVEL_1
take_overall_damage(burn=burn_dam, used_weapon = "High Body Temperature")
fire_alert = max(fire_alert, 2)
else if(bodytemperature <= species.cold_level_1)
//Body temperature is too cold.
fire_alert = max(fire_alert, 1)
if(status_flags & GODMODE)
return 1 //godmode
if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell))
var/burn_dam = 0
if(bodytemperature <= species.cold_level_3)
burn_dam = COLD_DAMAGE_LEVEL_3
else if(bodytemperature <= species.cold_level_2)
burn_dam = COLD_DAMAGE_LEVEL_2
else if(bodytemperature <= species.heat_level_1)
burn_dam = COLD_DAMAGE_LEVEL_1
var/cold_dam = 0
if(bodytemperature <= species.cold_level_1)
if(bodytemperature <= species.cold_level_2)
if(bodytemperature <= species.cold_level_3)
cold_dam = COLD_DAMAGE_LEVEL_3
else
cold_dam = COLD_DAMAGE_LEVEL_2
else
cold_dam = COLD_DAMAGE_LEVEL_1
take_overall_damage(burn=burn_dam, used_weapon = "Low Body Temperature")
take_overall_damage(burn=cold_dam, used_weapon = "Low Body Temperature")
fire_alert = max(fire_alert, 1)
// Account for massive pressure differences. Done by Polymorph

View File

@@ -92,33 +92,50 @@
var/breath_type = "oxygen" // Non-oxygen gas breathed, if any.
var/poison_type = "phoron" // Poisonous air.
var/exhale_type = "carbon_dioxide" // Exhaled gas type.
var/body_temperature = 310.15 // Species will try to stabilize at this temperature. (also affects temperature processing)
// Cold
var/cold_level_1 = 260 // Cold damage level 1 below this point.
var/cold_level_2 = 200 // Cold damage level 2 below this point.
var/cold_level_3 = 120 // Cold damage level 3 below this point.
var/breath_cold_level_1 = 240 // Cold gas damage level 1 below this point.
var/breath_cold_level_2 = 180 // Cold gas damage level 2 below this point.
var/breath_cold_level_3 = 100 // Cold gas damage level 3 below this point.
var/cold_discomfort_level = 285 // Aesthetic messages about feeling chilly.
var/list/cold_discomfort_strings = list(
"You feel chilly.",
"You shiver suddenly.",
"Your chilly flesh stands out in goosebumps."
)
// Hot
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 3 above this point.
var/breath_heat_level_1 = 380 // Heat gas damage level 1 below this point.
var/breath_heat_level_2 = 450 // Heat gas damage level 2 below this point.
var/breath_heat_level_3 = 1250 // Heat gas damage level 3 below this point.
var/heat_discomfort_level = 315 // Aesthetic messages about feeling warm.
var/list/heat_discomfort_strings = list(
"You feel sweat drip down your neck.",
"You feel uncomfortably warm.",
"Your skin prickles in the heat."
)
var/passive_temp_gain = 0 // Species will gain this much temperature every second
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
var/warning_high_pressure = WARNING_HIGH_PRESSURE // High pressure warning.
var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning.
var/hazard_low_pressure = HAZARD_LOW_PRESSURE // Dangerously low pressure.
var/light_dam // If set, mob will be damaged in light over this value and heal in light below its negative.
var/body_temperature = 310.15 // Species will try to stabilize at this temperature. (also affects temperature processing)
var/minimum_breath_pressure = 16 // Minimum required pressure for breath, in kPa
var/heat_discomfort_level = 315 // Aesthetic messages about feeling warm.
var/cold_discomfort_level = 285 // Aesthetic messages about feeling chilly.
var/list/heat_discomfort_strings = list(
"You feel sweat drip down your neck.",
"You feel uncomfortably warm.",
"Your skin prickles in the heat."
)
var/list/cold_discomfort_strings = list(
"You feel chilly.",
"You shiver suddenly.",
"Your chilly flesh stands out in goosebumps."
)
var/metabolic_rate = 1

View File

@@ -54,12 +54,22 @@
swap_flags = MONKEY|SLIME|SIMPLE_ANIMAL
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL|ALIEN
cold_level_1 = 180
cold_level_2 = 130
cold_level_3 = 70
heat_level_1 = 320
heat_level_2 = 370
heat_level_3 = 600
cold_level_1 = 180 //Default 260
cold_level_2 = 130 //Default 200
cold_level_3 = 70 //Default 120
breath_cold_level_1 = 180 //Default 240 - Lower is better
breath_cold_level_2 = 100 //Default 180
breath_cold_level_3 = 60 //Default 100
heat_level_1 = 320 //Default 360
heat_level_2 = 370 //Default 400
heat_level_3 = 600 //Default 1000
breath_heat_level_1 = 350 //Default 380 - Higher is better
breath_heat_level_2 = 400 //Default 450
breath_heat_level_3 = 800 //Default 1250
heat_discomfort_level = 295
heat_discomfort_strings = list(
"Your feathers prickle in the heat.",

View File

@@ -56,12 +56,22 @@
cold_level_2 = 220 //Default 200
cold_level_3 = 130 //Default 120
breath_cold_level_1 = 260 //Default 240 - Lower is better
breath_cold_level_2 = 200 //Default 180
breath_cold_level_3 = 120 //Default 100
heat_level_1 = 420 //Default 360 - Higher is better
heat_level_2 = 480 //Default 400
heat_level_3 = 1100 //Default 1000
breath_heat_level_1 = 450 //Default 380 - Higher is better
breath_heat_level_2 = 530 //Default 450
breath_heat_level_3 = 1400 //Default 1250
minimum_breath_pressure = 18 //Bigger, means they need more air
body_temperature = T20C
spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED
appearance_flags = HAS_HAIR_COLOR | HAS_LIPS | HAS_UNDERWEAR | HAS_SKIN_COLOR | HAS_EYE_COLOR
@@ -142,14 +152,24 @@
governments, something that permeates even to today's times. They prefer colder, tundra-like climates, much like their \
home worlds and speak a variety of languages, especially Siik and Akhani."
body_temperature = 320.15 //Even more cold resistant, even more flammable
cold_level_1 = 200 //Default 260
cold_level_2 = 140 //Default 200
cold_level_3 = 80 //Default 120
breath_cold_level_1 = 180 //Default 240 - Lower is better
breath_cold_level_2 = 100 //Default 180
breath_cold_level_3 = 60 //Default 100
heat_level_1 = 330 //Default 360
heat_level_2 = 380 //Default 400
heat_level_3 = 800 //Default 1000
breath_heat_level_1 = 360 //Default 380 - Higher is better
breath_heat_level_2 = 430 //Default 450
breath_heat_level_3 = 1000 //Default 1250
primitive_form = "Farwa"
spawn_flags = SPECIES_CAN_JOIN | SPECIES_IS_WHITELISTED
@@ -166,6 +186,7 @@
"You feel uncomfortably warm.",
"Your overheated skin itches."
)
cold_discomfort_level = 275
has_organ = list( //No appendix.
@@ -218,10 +239,18 @@
cold_level_2 = 220 //Default 200
cold_level_3 = 130 //Default 120
breath_cold_level_1 = 250 //Default 240 - Lower is better
breath_cold_level_2 = 190 //Default 180
breath_cold_level_3 = 120 //Default 100
heat_level_1 = 420 //Default 360 - Higher is better
heat_level_2 = 480 //Default 400
heat_level_3 = 1100 //Default 1000
breath_heat_level_1 = 400 //Default 380 - Higher is better
breath_heat_level_2 = 500 //Default 450
breath_heat_level_3 = 1350 //Default 1250
reagent_tag = IS_SKRELL
has_limbs = list(