Updates has_trait to HAS_TRAIT

This commit is contained in:
Fermi
2019-06-17 12:02:39 +01:00
parent e607cd3c7d
commit 2681a8f7a9
+8 -8
View File
@@ -88,7 +88,7 @@
/obj/item/bodypart/attack(mob/living/carbon/C, mob/user)
if(ishuman(C))
var/mob/living/carbon/human/H = C
if(C.has_trait(TRAIT_LIMBATTACHMENT))
if(HAS_TRAIT(C, 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>",\
@@ -225,9 +225,9 @@
set_disabled(is_disabled())
/obj/item/bodypart/proc/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS))
if(HAS_TRAIT(owner, TRAIT_PARALYSIS))
return BODYPART_DISABLED_PARALYSIS
if(can_dismember() && !owner.has_trait(TRAIT_NODISMEMBER))
if(can_dismember() && !HAS_TRAIT(owner, TRAIT_NODISMEMBER))
. = disabled //inertia, to avoid limbs healing 0.1 damage and being re-enabled
if((get_damage(TRUE) >= max_damage))
return BODYPART_DISABLED_DAMAGE
@@ -293,7 +293,7 @@
C = owner
no_update = FALSE
if(C.has_trait(TRAIT_HUSK) && is_organic_limb())
if(HAS_TRAIT(C, TRAIT_HUSK) && is_organic_limb())
species_id = "husk" //overrides species_id
dmg_overlay_type = "" //no damage overlay shown when husked
should_draw_gender = FALSE
@@ -607,7 +607,7 @@
stam_heal_tick = 2
/obj/item/bodypart/l_arm/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS_L_ARM))
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_ARM))
return BODYPART_DISABLED_PARALYSIS
return ..()
@@ -672,7 +672,7 @@
max_stamina_damage = 50
/obj/item/bodypart/r_arm/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS_R_ARM))
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_ARM))
return BODYPART_DISABLED_PARALYSIS
return ..()
@@ -735,7 +735,7 @@
max_stamina_damage = 50
/obj/item/bodypart/l_leg/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS_L_LEG))
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_L_LEG))
return BODYPART_DISABLED_PARALYSIS
return ..()
@@ -795,7 +795,7 @@
stam_heal_tick = 2
/obj/item/bodypart/r_leg/is_disabled()
if(owner.has_trait(TRAIT_PARALYSIS_R_LEG))
if(HAS_TRAIT(owner, TRAIT_PARALYSIS_R_LEG))
return BODYPART_DISABLED_PARALYSIS
return ..()