[MIRROR] Replaced body zone magic strings with defines (#6004)

* Replaced body zone magic strings with defines

* merge conflicts
This commit is contained in:
CitadelStationBot
2018-03-19 21:18:57 -05:00
committed by Poojawa
parent 9338d18a28
commit 3d26cd4a6f
148 changed files with 687 additions and 672 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
/obj/item/clothing/head
name = "head"
name = BODY_ZONE_HEAD
icon = 'icons/obj/clothing/hats.dmi'
icon_state = "top_hat"
item_state = "that"
+1 -1
View File
@@ -79,7 +79,7 @@
if(M.stat == DEAD && heart && world.time - M.timeofdeath < DEFIB_TIME_LIMIT * 10)
heart_strength = "<span class='boldannounce'>a faint, fluttery</span>"
var/diagnosis = (body_part == "chest" ? "You hear [heart_strength] pulse and [lung_strength] respiration." : "You faintly hear [heart_strength] pulse.")
var/diagnosis = (body_part == BODY_ZONE_CHEST ? "You hear [heart_strength] pulse and [lung_strength] respiration." : "You faintly hear [heart_strength] pulse.")
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "<span class='notice'>You place [src] against [M]'s [body_part]. [diagnosis]</span>")
return
return ..(M,user)
+2 -2
View File
@@ -22,8 +22,8 @@
/obj/item/clothing/shoes/suicide_act(mob/living/carbon/user)
if(rand(2)>1)
user.visible_message("<span class='suicide'>[user] begins tying \the [src] up waaay too tightly! It looks like [user.p_theyre()] trying to commit suicide!</span>")
var/obj/item/bodypart/l_leg = user.get_bodypart("l_leg")
var/obj/item/bodypart/r_leg = user.get_bodypart("r_leg")
var/obj/item/bodypart/l_leg = user.get_bodypart(BODY_ZONE_L_LEG)
var/obj/item/bodypart/r_leg = user.get_bodypart(BODY_ZONE_R_LEG)
if(l_leg)
l_leg.dismember()
playsound(user,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
+1 -1
View File
@@ -149,7 +149,7 @@
var/hit_reflect_chance = 40
/obj/item/clothing/suit/armor/laserproof/IsReflect(def_zone)
if(!(def_zone in list("chest", "groin"))) //If not shot where ablative is covering you, you don't get the reflection bonus!
if(!(def_zone in list(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN))) //If not shot where ablative is covering you, you don't get the reflection bonus!
return 0
if (prob(hit_reflect_chance))
return 1