[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
@@ -62,7 +62,7 @@
|
||||
/obj/item/bodypart/attack(mob/living/carbon/C, mob/user)
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(EASYLIMBATTACHMENT in H.dna.species.species_traits)
|
||||
if(C.has_trait(TRAIT_LIMBATTACHMENT))
|
||||
if(!H.get_bodypart(body_zone) && !animal_origin)
|
||||
if(H == user)
|
||||
H.visible_message("<span class='warning'>[H] jams [src] into [H.p_their()] empty socket!</span>",\
|
||||
|
||||
@@ -6,16 +6,14 @@
|
||||
//Dismember a limb
|
||||
/obj/item/bodypart/proc/dismember(dam_type = BRUTE)
|
||||
if(!owner)
|
||||
return 0
|
||||
return FALSE
|
||||
var/mob/living/carbon/C = owner
|
||||
if(!dismemberable)
|
||||
return 0
|
||||
return FALSE
|
||||
if(C.status_flags & GODMODE)
|
||||
return 0
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(NODISMEMBER in H.dna.species.species_traits) // species don't allow dismemberment
|
||||
return 0
|
||||
return FALSE
|
||||
if(C.has_trait(TRAIT_NODISMEMBER))
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/affecting = C.get_bodypart("chest")
|
||||
affecting.receive_damage(CLAMP(brute_dam/2, 15, 50), CLAMP(burn_dam/2, 0, 50)) //Damage the chest based on limb's existing damage
|
||||
@@ -46,14 +44,12 @@
|
||||
|
||||
/obj/item/bodypart/chest/dismember()
|
||||
if(!owner)
|
||||
return 0
|
||||
return FALSE
|
||||
var/mob/living/carbon/C = owner
|
||||
if(!dismemberable)
|
||||
return 0
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if(NODISMEMBER in H.dna.species.species_traits) // species don't allow dismemberment
|
||||
return 0
|
||||
return FALSE
|
||||
if(C.has_trait(TRAIT_NODISMEMBER))
|
||||
return FALSE
|
||||
|
||||
var/organ_spilled = 0
|
||||
var/turf/T = get_turf(C)
|
||||
|
||||
@@ -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