[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
+13 -13
View File
@@ -374,7 +374,7 @@
name = "damage zone"
icon_state = "zone_sel"
screen_loc = ui_zonesel
var/selecting = "chest"
var/selecting = BODY_ZONE_CHEST
/obj/screen/zone_sel/Click(location, control,params)
if(isobserver(usr))
@@ -389,44 +389,44 @@
if(1 to 9) //Legs
switch(icon_x)
if(10 to 15)
choice = "r_leg"
choice = BODY_ZONE_R_LEG
if(17 to 22)
choice = "l_leg"
choice = BODY_ZONE_L_LEG
else
return 1
if(10 to 13) //Hands and groin
switch(icon_x)
if(8 to 11)
choice = "r_arm"
choice = BODY_ZONE_R_ARM
if(12 to 20)
choice = "groin"
choice = BODY_ZONE_PRECISE_GROIN
if(21 to 24)
choice = "l_arm"
choice = BODY_ZONE_L_ARM
else
return 1
if(14 to 22) //Chest and arms to shoulders
switch(icon_x)
if(8 to 11)
choice = "r_arm"
choice = BODY_ZONE_R_ARM
if(12 to 20)
choice = "chest"
choice = BODY_ZONE_CHEST
if(21 to 24)
choice = "l_arm"
choice = BODY_ZONE_L_ARM
else
return 1
if(23 to 30) //Head, but we need to check for eye or mouth
if(icon_x in 12 to 20)
choice = "head"
choice = BODY_ZONE_HEAD
switch(icon_y)
if(23 to 24)
if(icon_x in 15 to 17)
choice = "mouth"
choice = BODY_ZONE_PRECISE_MOUTH
if(26) //Eyeline, eyes are on 15 and 17
if(icon_x in 14 to 18)
choice = "eyes"
choice = BODY_ZONE_PRECISE_EYES
if(25 to 27)
if(icon_x in 15 to 17)
choice = "eyes"
choice = BODY_ZONE_PRECISE_EYES
return set_selected_zone(choice, usr)
+1 -1
View File
@@ -91,7 +91,7 @@
return
var/mob/living/carbon/ML = A
if(istype(ML))
var/dam_zone = pick("chest", "l_hand", "r_hand", "l_leg", "r_leg")
var/dam_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/obj/item/bodypart/affecting = null
if(ishuman(ML))
var/mob/living/carbon/human/H = ML