[MIRROR] Converts several species traits into generic traits (#5710)
* Converts several species traits into generic traits * Update traits.dm * Update mousetrap.dm * Update corporate.dm * Update jellypeople.dm * snowflake fix
This commit is contained in:
committed by
Poojawa
parent
536537a0a4
commit
6134f79a26
@@ -313,11 +313,7 @@
|
||||
/obj/item/organ/lungs/proc/handle_breath_temperature(datum/gas_mixture/breath, mob/living/carbon/human/H) // called by human/life, handles temperatures
|
||||
var/breath_temperature = breath.temperature
|
||||
|
||||
var/species_traits = list()
|
||||
if(H && H.dna && H.dna.species && H.dna.species.species_traits)
|
||||
species_traits = H.dna.species.species_traits
|
||||
|
||||
if(!(GLOB.mutations_list[COLDRES] in H.dna.mutations) && !(RESISTCOLD in species_traits)) // COLD DAMAGE
|
||||
if(!H.has_trait(TRAIT_RESISTCOLD)) // COLD DAMAGE
|
||||
var/cold_modifier = H.dna.species.coldmod
|
||||
if(breath_temperature < cold_level_3_threshold)
|
||||
H.apply_damage_type(cold_level_3_damage*cold_modifier, cold_damage_type)
|
||||
@@ -329,7 +325,7 @@
|
||||
if(prob(20))
|
||||
to_chat(H, "<span class='warning'>You feel [cold_message] in your [name]!</span>")
|
||||
|
||||
if(!(RESISTHOT in species_traits)) // HEAT DAMAGE
|
||||
if(!H.has_trait(TRAIT_RESISTHEAT)) // HEAT DAMAGE
|
||||
var/heat_modifier = H.dna.species.heatmod
|
||||
if(breath_temperature > heat_level_1_threshold && breath_temperature < heat_level_2_threshold)
|
||||
H.apply_damage_type(heat_level_1_damage*heat_modifier, heat_damage_type)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
var/breathes = TRUE
|
||||
var/blooded = TRUE
|
||||
if(dna && dna.species)
|
||||
if(NOBREATH in dna.species.species_traits)
|
||||
if(has_trait(TRAIT_NOBREATH, SPECIES_TRAIT))
|
||||
breathes = FALSE
|
||||
if(NOBLOOD in dna.species.species_traits)
|
||||
blooded = FALSE
|
||||
|
||||
Reference in New Issue
Block a user