[MIRROR] Replaced body zone magic strings with defines (#6004)
* Replaced body zone magic strings with defines * merge conflicts
This commit is contained in:
committed by
Poojawa
parent
9338d18a28
commit
3d26cd4a6f
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user