[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
+3 -3
View File
@@ -47,13 +47,13 @@
if(satiety>0 && prob(satiety/10)) // positive satiety makes it harder to contract the disease.
return
if(!target_zone)
target_zone = pick(head_ch;"head",body_ch;"body",hands_ch;"hands",feet_ch;"feet")
target_zone = pick(head_ch;BODY_ZONE_HEAD,body_ch;"body",hands_ch;"hands",feet_ch;"feet")
if(ishuman(src))
var/mob/living/carbon/human/H = src
switch(target_zone)
if("head")
if(BODY_ZONE_HEAD)
if(isobj(H.head) && !istype(H.head, /obj/item/paper))
Cl = H.head
passed = prob((Cl.permeability_coefficient*100) - 1)
@@ -90,7 +90,7 @@
else if(ismonkey(src))
var/mob/living/carbon/monkey/M = src
switch(target_zone)
if("head")
if(BODY_ZONE_HEAD)
if(M.wear_mask && isobj(M.wear_mask))
Cl = M.wear_mask
passed = prob((Cl.permeability_coefficient*100) - 1)
@@ -45,7 +45,7 @@ BONUS
if(!..())
return
var/mob/living/carbon/M = A.affected_mob
var/picked_bodypart = pick("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg")
var/picked_bodypart = pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
var/obj/item/bodypart/bodypart = M.get_bodypart(picked_bodypart)
if(bodypart && bodypart.status == BODYPART_ORGANIC && !bodypart.is_pseudopart) //robotic limbs will mean less scratching overall
var/can_scratch = scratch && !M.incapacitated() && get_location_accessible(M, picked_bodypart)