[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
+5 -5
View File
@@ -85,21 +85,21 @@
var/slot_string = "limb"
/datum/trait/prosthetic_limb/on_spawn()
var/limb_slot = pick("l_arm", "r_arm", "l_leg", "r_leg")
var/limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
var/mob/living/carbon/human/H = trait_holder
var/obj/item/bodypart/old_part = H.get_bodypart(limb_slot)
var/obj/item/bodypart/prosthetic
switch(limb_slot)
if("l_arm")
if(BODY_ZONE_L_ARM)
prosthetic = new/obj/item/bodypart/l_arm/robot/surplus(trait_holder)
slot_string = "left arm"
if("r_arm")
if(BODY_ZONE_R_ARM)
prosthetic = new/obj/item/bodypart/r_arm/robot/surplus(trait_holder)
slot_string = "right arm"
if("l_leg")
if(BODY_ZONE_L_LEG)
prosthetic = new/obj/item/bodypart/l_leg/robot/surplus(trait_holder)
slot_string = "left leg"
if("r_leg")
if(BODY_ZONE_R_LEG)
prosthetic = new/obj/item/bodypart/r_leg/robot/surplus(trait_holder)
slot_string = "right leg"
prosthetic.replace_limb(H)