[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
@@ -5,7 +5,7 @@
|
||||
throw_speed = 3
|
||||
throw_range = 5
|
||||
layer = ABOVE_MOB_LAYER
|
||||
zone = "head"
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = ORGAN_SLOT_BRAIN
|
||||
vital = TRUE
|
||||
attack_verb = list("attacked", "slapped", "whacked")
|
||||
@@ -112,7 +112,7 @@
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
if(user.zone_selected != "head")
|
||||
if(user.zone_selected != BODY_ZONE_HEAD)
|
||||
return ..()
|
||||
|
||||
if((C.head && (C.head.flags_cover & HEADCOVERSEYES)) || (C.wear_mask && (C.wear_mask.flags_cover & MASKCOVERSEYES)) || (C.glasses && (C.glasses.flags_1 & GLASSESCOVERSEYES)))
|
||||
@@ -122,7 +122,7 @@
|
||||
//since these people will be dead M != usr
|
||||
|
||||
if(!C.getorgan(/obj/item/organ/brain))
|
||||
if(!C.get_bodypart("head") || !user.temporarilyRemoveItemFromInventory(src))
|
||||
if(!C.get_bodypart(BODY_ZONE_HEAD) || !user.temporarilyRemoveItemFromInventory(src))
|
||||
return
|
||||
var/msg = "[C] has [src] inserted into [C.p_their()] head by [user]."
|
||||
if(C == user)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
name = "plasma vessel"
|
||||
icon_state = "plasma"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
zone = "chest"
|
||||
zone = BODY_ZONE_CHEST
|
||||
slot = "plasmavessel"
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/plant, /obj/effect/proc_holder/alien/transfer)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
/obj/item/organ/alien/hivenode
|
||||
name = "hive node"
|
||||
icon_state = "hivenode"
|
||||
zone = "head"
|
||||
zone = BODY_ZONE_HEAD
|
||||
slot = "hivenode"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
var/recent_queen_death = 0 //Indicates if the queen died recently, aliens are heavily weakened while this is active.
|
||||
@@ -156,7 +156,7 @@
|
||||
/obj/item/organ/alien/resinspinner
|
||||
name = "resin spinner"
|
||||
icon_state = "stomach-x"
|
||||
zone = "mouth"
|
||||
zone = BODY_ZONE_PRECISE_MOUTH
|
||||
slot = "resinspinner"
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/resin)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
/obj/item/organ/alien/acid
|
||||
name = "acid gland"
|
||||
icon_state = "acid"
|
||||
zone = "mouth"
|
||||
zone = BODY_ZONE_PRECISE_MOUTH
|
||||
slot = "acidgland"
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/acid)
|
||||
|
||||
@@ -172,7 +172,7 @@
|
||||
/obj/item/organ/alien/neurotoxin
|
||||
name = "neurotoxin gland"
|
||||
icon_state = "neurotox"
|
||||
zone = "mouth"
|
||||
zone = BODY_ZONE_PRECISE_MOUTH
|
||||
slot = "neurotoxingland"
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/neurotoxin)
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
/obj/item/organ/alien/eggsac
|
||||
name = "egg sac"
|
||||
icon_state = "eggsac"
|
||||
zone = "groin"
|
||||
zone = BODY_ZONE_PRECISE_GROIN
|
||||
slot = "eggsac"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
alien_powers = list(/obj/effect/proc_holder/alien/lay_egg)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
if(stage == 5 && prob(50))
|
||||
for(var/datum/surgery/S in owner.surgeries)
|
||||
if(S.location == "chest" && istype(S.get_surgery_step(), /datum/surgery_step/manipulate_organs))
|
||||
if(S.location == BODY_ZONE_CHEST && istype(S.get_surgery_step(), /datum/surgery_step/manipulate_organs))
|
||||
AttemptGrow(0)
|
||||
return
|
||||
AttemptGrow()
|
||||
|
||||
@@ -131,7 +131,7 @@
|
||||
return FALSE
|
||||
var/mob/living/carbon/target = M
|
||||
// gotta have a head to be implanted (no changelings or sentient plants)
|
||||
if(!target.get_bodypart("head"))
|
||||
if(!target.get_bodypart(BODY_ZONE_HEAD))
|
||||
return FALSE
|
||||
|
||||
if(target.getorgan(/obj/item/organ/alien/hivenode) || target.getorgan(/obj/item/organ/body_egg/alien_embryo))
|
||||
@@ -208,7 +208,7 @@
|
||||
Die()
|
||||
icon_state = "[initial(icon_state)]_impregnated"
|
||||
|
||||
var/obj/item/bodypart/chest/LC = target.get_bodypart("chest")
|
||||
var/obj/item/bodypart/chest/LC = target.get_bodypart(BODY_ZONE_CHEST)
|
||||
if((!LC || LC.status != BODYPART_ROBOTIC) && !target.getorgan(/obj/item/organ/body_egg/alien_embryo))
|
||||
new /obj/item/organ/body_egg/alien_embryo(target)
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
var/obj/item/I = user.get_active_held_item()
|
||||
if(I && I.force)
|
||||
var/d = rand(round(I.force / 4), I.force)
|
||||
var/obj/item/bodypart/BP = get_bodypart("chest")
|
||||
var/obj/item/bodypart/BP = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(BP.receive_damage(d, 0))
|
||||
update_damage_overlays()
|
||||
visible_message("<span class='danger'>[user] attacks [src]'s stomach wall with the [I.name]!</span>", \
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
if(get_dist(user, src) <= 1) //people with TK won't get smeared with blood
|
||||
user.add_mob_blood(src)
|
||||
|
||||
if(affecting.body_zone == "head")
|
||||
if(affecting.body_zone == BODY_ZONE_HEAD)
|
||||
if(wear_mask)
|
||||
wear_mask.add_mob_blood(src)
|
||||
update_inv_wear_mask()
|
||||
@@ -195,7 +195,7 @@
|
||||
var/list/things_to_ruin = shuffle(bodyparts.Copy())
|
||||
for(var/B in things_to_ruin)
|
||||
var/obj/item/bodypart/bodypart = B
|
||||
if(bodypart.body_zone == "head" || bodypart.body_zone == "chest")
|
||||
if(bodypart.body_zone == BODY_ZONE_HEAD || bodypart.body_zone == BODY_ZONE_CHEST)
|
||||
continue
|
||||
if(!affecting || ((affecting.get_damage() / affecting.max_damage) < (bodypart.get_damage() / bodypart.max_damage)))
|
||||
affecting = bodypart
|
||||
@@ -371,7 +371,7 @@
|
||||
if(damage_type != BRUTE && damage_type != BURN)
|
||||
return
|
||||
damage_amount *= 0.5 //0.5 multiplier for balance reason, we don't want clothes to be too easily destroyed
|
||||
if(!def_zone || def_zone == "head")
|
||||
if(!def_zone || def_zone == BODY_ZONE_HEAD)
|
||||
var/obj/item/clothing/hit_clothes
|
||||
if(wear_mask)
|
||||
hit_clothes = wear_mask
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
qdel(O) //so the brain isn't transfered to the head when the head drops.
|
||||
continue
|
||||
var/org_zone = check_zone(O.zone) //both groin and chest organs.
|
||||
if(org_zone == "chest")
|
||||
if(org_zone == BODY_ZONE_CHEST)
|
||||
O.Remove(src)
|
||||
O.forceMove(Tsec)
|
||||
O.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5)
|
||||
|
||||
@@ -28,12 +28,12 @@
|
||||
appears_dead = 1
|
||||
if(getorgan(/obj/item/organ/brain))
|
||||
msg += "<span class='deadsay'>[t_He] [t_is] limp and unresponsive, with no signs of life.</span>\n"
|
||||
else if(get_bodypart("head"))
|
||||
else if(get_bodypart(BODY_ZONE_HEAD))
|
||||
msg += "<span class='deadsay'>It appears that [t_his] brain is missing...</span>\n"
|
||||
|
||||
var/list/missing = get_missing_limbs()
|
||||
for(var/t in missing)
|
||||
if(t=="head")
|
||||
if(t==BODY_ZONE_HEAD)
|
||||
msg += "<span class='deadsay'><B>[t_His] [parse_zone(t)] is missing!</B></span>\n"
|
||||
continue
|
||||
msg += "<span class='warning'><B>[t_His] [parse_zone(t)] is missing!</B></span>\n"
|
||||
|
||||
@@ -131,14 +131,14 @@
|
||||
msg += " and [t_his] soul has departed"
|
||||
msg += "...</span>\n"
|
||||
|
||||
if(get_bodypart("head") && !getorgan(/obj/item/organ/brain))
|
||||
if(get_bodypart(BODY_ZONE_HEAD) && !getorgan(/obj/item/organ/brain))
|
||||
msg += "<span class='deadsay'>It appears that [t_his] brain is missing...</span>\n"
|
||||
|
||||
var/temp = getBruteLoss() //no need to calculate each of these twice
|
||||
|
||||
msg += "<span class='warning'>"
|
||||
|
||||
var/list/missing = list("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg")
|
||||
var/list/missing = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
missing -= BP.body_zone
|
||||
@@ -149,12 +149,12 @@
|
||||
var/l_limbs_missing = 0
|
||||
var/r_limbs_missing = 0
|
||||
for(var/t in missing)
|
||||
if(t=="head")
|
||||
if(t==BODY_ZONE_HEAD)
|
||||
msg += "<span class='deadsay'><B>[t_His] [parse_zone(t)] is missing!</B><span class='warning'>\n"
|
||||
continue
|
||||
if(t == "l_arm" || t == "l_leg")
|
||||
if(t == BODY_ZONE_L_ARM || t == BODY_ZONE_L_LEG)
|
||||
l_limbs_missing++
|
||||
else if(t == "r_arm" || t == "r_leg")
|
||||
else if(t == BODY_ZONE_R_ARM || t == BODY_ZONE_R_LEG)
|
||||
r_limbs_missing++
|
||||
|
||||
msg += "<B>[capitalize(t_his)] [parse_zone(t)] is missing!</B>\n"
|
||||
|
||||
@@ -203,10 +203,10 @@
|
||||
dna.species.spec_attack_hand(H, src)
|
||||
|
||||
/mob/living/carbon/human/attack_paw(mob/living/carbon/monkey/M)
|
||||
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 = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(M.a_intent == INTENT_HELP)
|
||||
..() //shaking
|
||||
return 0
|
||||
@@ -253,7 +253,7 @@
|
||||
return 0
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor_block = run_armor_check(affecting, "melee","","",10)
|
||||
|
||||
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
|
||||
@@ -288,7 +288,7 @@
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(L.zone_selected))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
@@ -299,12 +299,12 @@
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration))
|
||||
return FALSE
|
||||
var/dam_zone = dismembering_strike(M, pick("chest", "l_hand", "r_hand", "l_leg", "r_leg"))
|
||||
var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
if(!dam_zone) //Dismemberment successful
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration)
|
||||
apply_damage(damage, M.melee_damage_type, affecting, armor)
|
||||
|
||||
@@ -318,13 +318,13 @@
|
||||
if(check_shields(M, damage, "the [M.name]"))
|
||||
return 0
|
||||
|
||||
var/dam_zone = dismembering_strike(M, pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg"))
|
||||
var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
if(!dam_zone) //Dismemberment successful
|
||||
return 1
|
||||
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
var/armor_block = run_armor_check(affecting, "melee")
|
||||
apply_damage(damage, BRUTE, affecting, armor_block)
|
||||
|
||||
@@ -334,7 +334,7 @@
|
||||
M.do_attack_animation(src)
|
||||
if(M.damtype == "brute")
|
||||
step_away(src,M,15)
|
||||
var/obj/item/bodypart/temp = get_bodypart(pick("chest", "chest", "chest", "head"))
|
||||
var/obj/item/bodypart/temp = get_bodypart(pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_HEAD))
|
||||
if(temp)
|
||||
var/update = 0
|
||||
var/dmg = rand(M.force/2, M.force)
|
||||
@@ -416,7 +416,7 @@
|
||||
var/max_limb_loss = round(4/severity) //so you don't lose four limbs at severity 3.
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(prob(50/severity) && !prob(getarmor(BP, "bomb")) && BP.body_zone != "head" && BP.body_zone != "chest")
|
||||
if(prob(50/severity) && !prob(getarmor(BP, "bomb")) && BP.body_zone != BODY_ZONE_HEAD && BP.body_zone != BODY_ZONE_CHEST)
|
||||
BP.brute_dam = BP.max_damage
|
||||
BP.dismember()
|
||||
max_limb_loss--
|
||||
@@ -428,7 +428,7 @@
|
||||
if(stat == DEAD)
|
||||
return
|
||||
show_message("<span class='userdanger'>The blob attacks you!</span>")
|
||||
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 = get_bodypart(ran_zone(dam_zone))
|
||||
apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee"))
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
var/list/inventory_items_to_kill = list()
|
||||
var/acidity = acidpwr * min(acid_volume*0.005, 0.1)
|
||||
//HEAD//
|
||||
if(!bodyzone_hit || bodyzone_hit == "head") //only if we didn't specify a zone or if that zone is the head.
|
||||
if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_HEAD) //only if we didn't specify a zone or if that zone is the head.
|
||||
var/obj/item/clothing/head_clothes = null
|
||||
if(glasses)
|
||||
head_clothes = glasses
|
||||
@@ -509,14 +509,14 @@
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Your [head_clothes.name] protects your head and face from the acid!</span>")
|
||||
else
|
||||
. = get_bodypart("head")
|
||||
. = get_bodypart(BODY_ZONE_HEAD)
|
||||
if(.)
|
||||
damaged += .
|
||||
if(ears)
|
||||
inventory_items_to_kill += ears
|
||||
|
||||
//CHEST//
|
||||
if(!bodyzone_hit || bodyzone_hit == "chest")
|
||||
if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_CHEST)
|
||||
var/obj/item/clothing/chest_clothes = null
|
||||
if(w_uniform)
|
||||
chest_clothes = w_uniform
|
||||
@@ -530,7 +530,7 @@
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Your [chest_clothes.name] protects your body from the acid!</span>")
|
||||
else
|
||||
. = get_bodypart("chest")
|
||||
. = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(.)
|
||||
damaged += .
|
||||
if(wear_id)
|
||||
@@ -544,7 +544,7 @@
|
||||
|
||||
|
||||
//ARMS & HANDS//
|
||||
if(!bodyzone_hit || bodyzone_hit == "l_arm" || bodyzone_hit == "r_arm")
|
||||
if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_L_ARM || bodyzone_hit == BODY_ZONE_R_ARM)
|
||||
var/obj/item/clothing/arm_clothes = null
|
||||
if(gloves)
|
||||
arm_clothes = gloves
|
||||
@@ -562,16 +562,16 @@
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Your [arm_clothes.name] protects your arms and hands from the acid!</span>")
|
||||
else
|
||||
. = get_bodypart("r_arm")
|
||||
. = get_bodypart(BODY_ZONE_R_ARM)
|
||||
if(.)
|
||||
damaged += .
|
||||
. = get_bodypart("l_arm")
|
||||
. = get_bodypart(BODY_ZONE_L_ARM)
|
||||
if(.)
|
||||
damaged += .
|
||||
|
||||
|
||||
//LEGS & FEET//
|
||||
if(!bodyzone_hit || bodyzone_hit == "l_leg" || bodyzone_hit == "r_leg" || bodyzone_hit == "feet")
|
||||
if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_L_LEG || bodyzone_hit == BODY_ZONE_R_LEG || bodyzone_hit == "feet")
|
||||
var/obj/item/clothing/leg_clothes = null
|
||||
if(shoes)
|
||||
leg_clothes = shoes
|
||||
@@ -588,10 +588,10 @@
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Your [leg_clothes.name] protects your legs and feet from the acid!</span>")
|
||||
else
|
||||
. = get_bodypart("r_leg")
|
||||
. = get_bodypart(BODY_ZONE_R_LEG)
|
||||
if(.)
|
||||
damaged += .
|
||||
. = get_bodypart("l_leg")
|
||||
. = get_bodypart(BODY_ZONE_L_LEG)
|
||||
if(.)
|
||||
damaged += .
|
||||
|
||||
@@ -600,7 +600,7 @@
|
||||
for(var/obj/item/bodypart/affecting in damaged)
|
||||
affecting.receive_damage(acidity, 2*acidity)
|
||||
|
||||
if(affecting.name == "head")
|
||||
if(affecting.name == BODY_ZONE_HEAD)
|
||||
if(prob(min(acidpwr*acid_volume/10, 90))) //Applies disfigurement
|
||||
affecting.receive_damage(acidity, 2*acidity)
|
||||
emote("scream")
|
||||
@@ -645,7 +645,7 @@
|
||||
visible_message("[src] examines [p_them()]self.", \
|
||||
"<span class='notice'>You check yourself for injuries.</span>")
|
||||
|
||||
var/list/missing = list("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg")
|
||||
var/list/missing = list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/LB = X
|
||||
missing -= LB.body_zone
|
||||
@@ -732,7 +732,7 @@
|
||||
var/list/torn_items = list()
|
||||
|
||||
//HEAD//
|
||||
if(!def_zone || def_zone == "head")
|
||||
if(!def_zone || def_zone == BODY_ZONE_HEAD)
|
||||
var/obj/item/clothing/head_clothes = null
|
||||
if(glasses)
|
||||
head_clothes = glasses
|
||||
@@ -748,7 +748,7 @@
|
||||
torn_items += ears
|
||||
|
||||
//CHEST//
|
||||
if(!def_zone || def_zone == "chest")
|
||||
if(!def_zone || def_zone == BODY_ZONE_CHEST)
|
||||
var/obj/item/clothing/chest_clothes = null
|
||||
if(w_uniform)
|
||||
chest_clothes = w_uniform
|
||||
@@ -758,7 +758,7 @@
|
||||
torn_items += chest_clothes
|
||||
|
||||
//ARMS & HANDS//
|
||||
if(!def_zone || def_zone == "l_arm" || def_zone == "r_arm")
|
||||
if(!def_zone || def_zone == BODY_ZONE_L_ARM || def_zone == BODY_ZONE_R_ARM)
|
||||
var/obj/item/clothing/arm_clothes = null
|
||||
if(gloves)
|
||||
arm_clothes = gloves
|
||||
@@ -770,7 +770,7 @@
|
||||
torn_items += arm_clothes
|
||||
|
||||
//LEGS & FEET//
|
||||
if(!def_zone || def_zone == "l_leg" || def_zone == "r_leg")
|
||||
if(!def_zone || def_zone == BODY_ZONE_L_LEG || def_zone == BODY_ZONE_R_LEG)
|
||||
var/obj/item/clothing/leg_clothes = null
|
||||
if(shoes)
|
||||
leg_clothes = shoes
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
return if_no_face
|
||||
if( head && (head.flags_inv&HIDEFACE) )
|
||||
return if_no_face //Likewise for hats
|
||||
var/obj/item/bodypart/O = get_bodypart("head")
|
||||
var/obj/item/bodypart/O = get_bodypart(BODY_ZONE_HEAD)
|
||||
if( !O || (has_trait(TRAIT_DISFIGURED)) || (O.brutestate+O.burnstate)>2 || cloneloss>50 || !real_name ) //disfigured. use id-name if possible
|
||||
return if_no_face
|
||||
return real_name
|
||||
|
||||
@@ -221,7 +221,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
tail = new mutanttail()
|
||||
tail.Insert(C)
|
||||
|
||||
if(C.get_bodypart("head"))
|
||||
if(C.get_bodypart(BODY_ZONE_HEAD))
|
||||
if(eyes && (replace_current || !should_have_eyes))
|
||||
eyes.Remove(C,1)
|
||||
QDEL_NULL(eyes)
|
||||
@@ -315,7 +315,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
/datum/species/proc/handle_hair(mob/living/carbon/human/H, forced_colour)
|
||||
H.remove_overlay(HAIR_LAYER)
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(!HD) //Decapitated
|
||||
return
|
||||
|
||||
@@ -458,7 +458,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
|
||||
var/list/standing = list()
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
|
||||
if(HD && !(H.has_trait(TRAIT_HUSK)))
|
||||
// lipstick
|
||||
@@ -526,7 +526,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(!mutant_bodyparts)
|
||||
return
|
||||
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/HD = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
|
||||
if("tail_lizard" in mutant_bodyparts)
|
||||
if(H.wear_suit && (H.wear_suit.flags_inv & HIDEJUMPSUIT) || (!H.dna.features["taur"] == "None"))
|
||||
@@ -897,7 +897,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_MASK) )
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
if(!H.get_bodypart(BODY_ZONE_HEAD))
|
||||
return 0
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_neck)
|
||||
@@ -942,7 +942,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(H.belt)
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart("chest")
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
@@ -956,7 +956,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_EYES) )
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
if(!H.get_bodypart(BODY_ZONE_HEAD))
|
||||
return 0
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_head)
|
||||
@@ -964,7 +964,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_HEAD) )
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
if(!H.get_bodypart(BODY_ZONE_HEAD))
|
||||
return 0
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_ears)
|
||||
@@ -972,7 +972,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
return 0
|
||||
if( !(I.slot_flags & SLOT_EARS) )
|
||||
return 0
|
||||
if(!H.get_bodypart("head"))
|
||||
if(!H.get_bodypart(BODY_ZONE_HEAD))
|
||||
return 0
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
if(slot_w_uniform)
|
||||
@@ -985,7 +985,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(H.wear_id)
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart("chest")
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
@@ -999,7 +999,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(H.l_store)
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart("l_leg")
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_L_LEG)
|
||||
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
@@ -1015,7 +1015,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(H.r_store)
|
||||
return 0
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart("r_leg")
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_R_LEG)
|
||||
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
@@ -1584,7 +1584,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
user.add_mob_blood(H)
|
||||
|
||||
switch(hit_area)
|
||||
if("head")
|
||||
if(BODY_ZONE_HEAD)
|
||||
if(H.stat == CONSCIOUS && armor_block < 50)
|
||||
if(prob(I.force))
|
||||
H.visible_message("<span class='danger'>[H] has been knocked senseless!</span>", \
|
||||
@@ -1614,7 +1614,7 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
H.glasses.add_mob_blood(H)
|
||||
H.update_inv_glasses()
|
||||
|
||||
if("chest")
|
||||
if(BODY_ZONE_CHEST)
|
||||
if(H.stat == CONSCIOUS && armor_block < 50)
|
||||
if(prob(I.force))
|
||||
H.visible_message("<span class='danger'>[H] has been knocked down!</span>", \
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
/datum/species/dullahan/on_species_gain(mob/living/carbon/human/H, datum/species/old_species)
|
||||
. = ..()
|
||||
H.flags_1 &= ~HEAR_1
|
||||
var/obj/item/bodypart/head/head = H.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/head = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(head)
|
||||
head.drop_limb()
|
||||
head.flags_1 = HEAR_1
|
||||
@@ -42,14 +42,14 @@
|
||||
myhead = null
|
||||
DR.owner = null
|
||||
qdel(DR)
|
||||
H.regenerate_limb("head",FALSE)
|
||||
H.regenerate_limb(BODY_ZONE_HEAD,FALSE)
|
||||
..()
|
||||
|
||||
/datum/species/dullahan/spec_life(mob/living/carbon/human/H)
|
||||
if(QDELETED(myhead))
|
||||
myhead = null
|
||||
H.gib()
|
||||
var/obj/item/bodypart/head/head2 = H.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/head2 = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(head2)
|
||||
myhead = null
|
||||
H.gib()
|
||||
|
||||
@@ -59,13 +59,13 @@
|
||||
regenerate_limbs.UpdateButtonIcon()
|
||||
|
||||
/datum/species/jelly/proc/Cannibalize_Body(mob/living/carbon/human/H)
|
||||
var/list/limbs_to_consume = list("r_arm", "l_arm", "r_leg", "l_leg") - H.get_missing_limbs()
|
||||
var/list/limbs_to_consume = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG) - H.get_missing_limbs()
|
||||
var/obj/item/bodypart/consumed_limb
|
||||
if(!limbs_to_consume.len)
|
||||
H.losebreath++
|
||||
return
|
||||
if(H.get_num_legs()) //Legs go before arms
|
||||
limbs_to_consume -= list("r_arm", "l_arm")
|
||||
limbs_to_consume -= list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM)
|
||||
consumed_limb = H.get_bodypart(pick(limbs_to_consume))
|
||||
consumed_limb.drop_limb()
|
||||
to_chat(H, "<span class='userdanger'>Your [consumed_limb] is drawn back into your body, unable to maintain its shape!</span>")
|
||||
|
||||
@@ -208,7 +208,7 @@ There are several things that need to be remembered:
|
||||
/mob/living/carbon/human/update_inv_glasses()
|
||||
remove_overlay(GLASSES_LAYER)
|
||||
|
||||
if(!get_bodypart("head")) //decapitated
|
||||
if(!get_bodypart(BODY_ZONE_HEAD)) //decapitated
|
||||
return
|
||||
|
||||
if(client && hud_used)
|
||||
@@ -235,7 +235,7 @@ There are several things that need to be remembered:
|
||||
/mob/living/carbon/human/update_inv_ears()
|
||||
remove_overlay(EARS_LAYER)
|
||||
|
||||
if(!get_bodypart("head")) //decapitated
|
||||
if(!get_bodypart(BODY_ZONE_HEAD)) //decapitated
|
||||
return
|
||||
|
||||
if(client && hud_used)
|
||||
|
||||
@@ -7,10 +7,10 @@
|
||||
|
||||
/mob/living/carbon/monkey/attack_paw(mob/living/M)
|
||||
if(..()) //successful monkey bite.
|
||||
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 = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(M.limb_destroyer)
|
||||
dismembering_strike(M, affecting.body_zone)
|
||||
if(stat != DEAD)
|
||||
@@ -24,7 +24,7 @@
|
||||
L.amount_grown = min(L.amount_grown + damage, L.max_grown)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(L.zone_selected))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
|
||||
/mob/living/carbon/monkey/attack_hand(mob/living/carbon/human/M)
|
||||
@@ -52,7 +52,7 @@
|
||||
"<span class='userdanger'>[M] has knocked out [name]!</span>", null, 5)
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
add_logs(M, src, "attacked")
|
||||
|
||||
@@ -92,7 +92,7 @@
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(M.zone_selected))
|
||||
add_logs(M, src, "attacked")
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!dismembering_strike(M, affecting.body_zone)) //Dismemberment successful
|
||||
return 1
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
@@ -123,12 +123,12 @@
|
||||
. = ..()
|
||||
if(.)
|
||||
var/damage = rand(M.melee_damage_lower, M.melee_damage_upper)
|
||||
var/dam_zone = dismembering_strike(M, pick("chest", "l_hand", "r_hand", "l_leg", "r_leg"))
|
||||
var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
if(!dam_zone) //Dismemberment successful
|
||||
return TRUE
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
apply_damage(damage, M.melee_damage_type, affecting)
|
||||
|
||||
/mob/living/carbon/monkey/attack_slime(mob/living/simple_animal/slime/M)
|
||||
@@ -136,17 +136,17 @@
|
||||
var/damage = rand(5, 35)
|
||||
if(M.is_adult)
|
||||
damage = rand(20, 40)
|
||||
var/dam_zone = dismembering_strike(M, pick("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg"))
|
||||
var/dam_zone = dismembering_strike(M, pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
if(!dam_zone) //Dismemberment successful
|
||||
return 1
|
||||
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
|
||||
if(!affecting)
|
||||
affecting = get_bodypart("chest")
|
||||
affecting = get_bodypart(BODY_ZONE_CHEST)
|
||||
apply_damage(damage, BRUTE, affecting)
|
||||
|
||||
/mob/living/carbon/monkey/acid_act(acidpwr, acid_volume, bodyzone_hit)
|
||||
. = 1
|
||||
if(!bodyzone_hit || bodyzone_hit == "head")
|
||||
if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_HEAD)
|
||||
if(wear_mask)
|
||||
if(!(wear_mask.resistance_flags & UNACIDABLE))
|
||||
wear_mask.acid_act(acidpwr, acid_volume)
|
||||
@@ -192,7 +192,7 @@
|
||||
var/max_limb_loss = round(4/severity) //so you don't lose four limbs at severity 3.
|
||||
for(var/X in bodyparts)
|
||||
var/obj/item/bodypart/BP = X
|
||||
if(prob(50/severity) && BP.body_zone != "chest")
|
||||
if(prob(50/severity) && BP.body_zone != BODY_ZONE_CHEST)
|
||||
BP.brute_dam = BP.max_damage
|
||||
BP.dismember()
|
||||
max_limb_loss--
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
/mob/living/carbon/monkey/update_hair()
|
||||
remove_overlay(HAIR_LAYER)
|
||||
|
||||
var/obj/item/bodypart/head/HD = get_bodypart("head")
|
||||
var/obj/item/bodypart/head/HD = get_bodypart(BODY_ZONE_HEAD)
|
||||
if(!HD) //Decapitated
|
||||
return
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
/mob/living/carbon/update_inv_wear_mask()
|
||||
remove_overlay(FACEMASK_LAYER)
|
||||
|
||||
if(!get_bodypart("head")) //Decapitated
|
||||
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
|
||||
return
|
||||
|
||||
if(client && hud_used && hud_used.inv_slots[slot_wear_mask])
|
||||
@@ -159,7 +159,7 @@
|
||||
/mob/living/carbon/update_inv_head()
|
||||
remove_overlay(HEAD_LAYER)
|
||||
|
||||
if(!get_bodypart("head")) //Decapitated
|
||||
if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated
|
||||
return
|
||||
|
||||
if(client && hud_used && hud_used.inv_slots[slot_back])
|
||||
|
||||
@@ -446,8 +446,8 @@
|
||||
/mob/living/proc/get_organ_target()
|
||||
var/mob/shooter = src
|
||||
var/t = shooter.zone_selected
|
||||
if ((t in list( "eyes", "mouth" )))
|
||||
t = "head"
|
||||
if ((t in list( BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH )))
|
||||
t = BODY_ZONE_HEAD
|
||||
var/def_zone = ran_zone(t)
|
||||
return def_zone
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
/mob/living/hitby(atom/movable/AM, skipcatch, hitpush = TRUE, blocked = FALSE)
|
||||
if(istype(AM, /obj/item))
|
||||
var/obj/item/I = AM
|
||||
var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest
|
||||
var/zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest
|
||||
var/dtype = BRUTE
|
||||
var/volume = I.get_volume_by_throwforce_and_or_w_class()
|
||||
dtype = I.damtype
|
||||
|
||||
@@ -641,12 +641,12 @@
|
||||
playsound(loc, 'sound/effects/splat.ogg', 50, 1)
|
||||
|
||||
var/damage = rand(5,15)
|
||||
H.apply_damage(2*damage, BRUTE, "head", run_armor_check("head", "melee"))
|
||||
H.apply_damage(2*damage, BRUTE, "chest", run_armor_check("chest", "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, "l_leg", run_armor_check("l_leg", "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, "r_leg", run_armor_check("r_leg", "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, "l_arm", run_armor_check("l_arm", "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, "r_arm", run_armor_check("r_arm", "melee"))
|
||||
H.apply_damage(2*damage, BRUTE, BODY_ZONE_HEAD, run_armor_check(BODY_ZONE_HEAD, "melee"))
|
||||
H.apply_damage(2*damage, BRUTE, BODY_ZONE_CHEST, run_armor_check(BODY_ZONE_CHEST, "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_LEG, run_armor_check(BODY_ZONE_L_LEG, "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_LEG, run_armor_check(BODY_ZONE_R_LEG, "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_ARM, run_armor_check(BODY_ZONE_L_ARM, "melee"))
|
||||
H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_ARM, run_armor_check(BODY_ZONE_R_ARM, "melee"))
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
T.add_mob_blood(H)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
var/armorval = 0
|
||||
|
||||
if(def_zone)
|
||||
if(def_zone == "head")
|
||||
if(def_zone == BODY_ZONE_HEAD)
|
||||
if(inventory_head)
|
||||
armorval = inventory_head.armor.getRating(type)
|
||||
else
|
||||
@@ -139,7 +139,7 @@
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
if("head")
|
||||
if(BODY_ZONE_HEAD)
|
||||
if(inventory_head)
|
||||
inventory_head.forceMove(drop_location())
|
||||
inventory_head = null
|
||||
@@ -168,7 +168,7 @@
|
||||
var/add_to = href_list["add_inv"]
|
||||
|
||||
switch(add_to)
|
||||
if("head")
|
||||
if(BODY_ZONE_HEAD)
|
||||
place_on_head(usr.get_active_held_item(),usr)
|
||||
|
||||
if("back")
|
||||
|
||||
@@ -252,7 +252,7 @@ Difficulty: Hard
|
||||
if(!faction_check_mob(L))
|
||||
to_chat(L, "<span class='userdanger'>[src] rends you!</span>")
|
||||
playsound(T, attack_sound, 100, 1, -1)
|
||||
var/limb_to_hit = L.get_bodypart(pick("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg"))
|
||||
var/limb_to_hit = L.get_bodypart(pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG))
|
||||
L.apply_damage(25, BRUTE, limb_to_hit, L.run_armor_check(limb_to_hit, "melee", null, null, armour_penetration))
|
||||
sleep(3)
|
||||
|
||||
|
||||
@@ -628,7 +628,7 @@ Difficulty: Hard
|
||||
flash_color(L.client, "#660099", 1)
|
||||
playsound(L,'sound/weapons/sear.ogg', 50, 1, -4)
|
||||
to_chat(L, "<span class='userdanger'>You're struck by a [name]!</span>")
|
||||
var/limb_to_hit = L.get_bodypart(pick("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg"))
|
||||
var/limb_to_hit = L.get_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/armor = L.run_armor_check(limb_to_hit, "melee", "Your armor absorbs [src]!", "Your armor blocks part of [src]!", 50, "Your armor was penetrated by [src]!")
|
||||
L.apply_damage(damage, BURN, limb_to_hit, armor)
|
||||
if(ishostile(L))
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
var/parrot_state = PARROT_WANDER //Hunt for a perch when created
|
||||
var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in life() being run every single tick.
|
||||
var/parrot_sleep_dur = 25 //Same as above, this is the var that physically counts down
|
||||
var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack
|
||||
var/parrot_dam_zone = list(BODY_ZONE_CHEST, BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_ARM, BODY_ZONE_R_LEG) //For humans, select a bodypart to attack
|
||||
|
||||
var/parrot_speed = 5 //"Delay in world ticks between movement." according to byond. Yeah, that's BS but it does directly affect movement. Higher number = slower.
|
||||
var/parrot_lastmove = null //Updates/Stores position of the parrot while it's moving
|
||||
|
||||
@@ -16,22 +16,22 @@
|
||||
|
||||
/proc/check_zone(zone)
|
||||
if(!zone)
|
||||
return "chest"
|
||||
return BODY_ZONE_CHEST
|
||||
switch(zone)
|
||||
if("eyes")
|
||||
zone = "head"
|
||||
if("mouth")
|
||||
zone = "head"
|
||||
if("l_hand")
|
||||
zone = "l_arm"
|
||||
if("r_hand")
|
||||
zone = "r_arm"
|
||||
if("l_foot")
|
||||
zone = "l_leg"
|
||||
if("r_foot")
|
||||
zone = "r_leg"
|
||||
if("groin")
|
||||
zone = "chest"
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
zone = BODY_ZONE_HEAD
|
||||
if(BODY_ZONE_PRECISE_MOUTH)
|
||||
zone = BODY_ZONE_HEAD
|
||||
if(BODY_ZONE_PRECISE_L_HAND)
|
||||
zone = BODY_ZONE_L_ARM
|
||||
if(BODY_ZONE_PRECISE_R_HAND)
|
||||
zone = BODY_ZONE_R_ARM
|
||||
if(BODY_ZONE_PRECISE_L_FOOT)
|
||||
zone = BODY_ZONE_L_LEG
|
||||
if(BODY_ZONE_PRECISE_R_FOOT)
|
||||
zone = BODY_ZONE_R_LEG
|
||||
if(BODY_ZONE_PRECISE_GROIN)
|
||||
zone = BODY_ZONE_CHEST
|
||||
return zone
|
||||
|
||||
|
||||
@@ -45,22 +45,22 @@
|
||||
var/t = rand(1, 18) // randomly pick a different zone, or maybe the same one
|
||||
switch(t)
|
||||
if(1)
|
||||
return "head"
|
||||
return BODY_ZONE_HEAD
|
||||
if(2)
|
||||
return "chest"
|
||||
return BODY_ZONE_CHEST
|
||||
if(3 to 6)
|
||||
return "l_arm"
|
||||
return BODY_ZONE_L_ARM
|
||||
if(7 to 10)
|
||||
return "r_arm"
|
||||
return BODY_ZONE_R_ARM
|
||||
if(11 to 14)
|
||||
return "l_leg"
|
||||
return BODY_ZONE_L_LEG
|
||||
if(15 to 18)
|
||||
return "r_leg"
|
||||
return BODY_ZONE_R_LEG
|
||||
|
||||
return zone
|
||||
|
||||
/proc/above_neck(zone)
|
||||
var/list/zones = list("head", "mouth", "eyes")
|
||||
var/list/zones = list(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_PRECISE_EYES)
|
||||
if(zones.Find(zone))
|
||||
return 1
|
||||
else
|
||||
|
||||
@@ -282,12 +282,12 @@
|
||||
|
||||
var/next_in_line
|
||||
switch(mob.zone_selected)
|
||||
if("head")
|
||||
next_in_line = "eyes"
|
||||
if("eyes")
|
||||
next_in_line = "mouth"
|
||||
if(BODY_ZONE_HEAD)
|
||||
next_in_line = BODY_ZONE_PRECISE_EYES
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
next_in_line = BODY_ZONE_PRECISE_MOUTH
|
||||
else
|
||||
next_in_line = "head"
|
||||
next_in_line = BODY_ZONE_HEAD
|
||||
|
||||
var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
|
||||
selector.set_selected_zone(next_in_line, mob)
|
||||
@@ -300,7 +300,7 @@
|
||||
return
|
||||
|
||||
var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
|
||||
selector.set_selected_zone("r_arm", mob)
|
||||
selector.set_selected_zone(BODY_ZONE_R_ARM, mob)
|
||||
|
||||
/client/verb/body_chest()
|
||||
set name = "body-chest"
|
||||
@@ -310,7 +310,7 @@
|
||||
return
|
||||
|
||||
var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
|
||||
selector.set_selected_zone("chest", mob)
|
||||
selector.set_selected_zone(BODY_ZONE_CHEST, mob)
|
||||
|
||||
/client/verb/body_l_arm()
|
||||
set name = "body-l-arm"
|
||||
@@ -320,7 +320,7 @@
|
||||
return
|
||||
|
||||
var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
|
||||
selector.set_selected_zone("l_arm", mob)
|
||||
selector.set_selected_zone(BODY_ZONE_L_ARM, mob)
|
||||
|
||||
/client/verb/body_r_leg()
|
||||
set name = "body-r-leg"
|
||||
@@ -330,7 +330,7 @@
|
||||
return
|
||||
|
||||
var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
|
||||
selector.set_selected_zone("r_leg", mob)
|
||||
selector.set_selected_zone(BODY_ZONE_R_LEG, mob)
|
||||
|
||||
/client/verb/body_groin()
|
||||
set name = "body-groin"
|
||||
@@ -340,7 +340,7 @@
|
||||
return
|
||||
|
||||
var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
|
||||
selector.set_selected_zone("groin", mob)
|
||||
selector.set_selected_zone(BODY_ZONE_PRECISE_GROIN, mob)
|
||||
|
||||
/client/verb/body_l_leg()
|
||||
set name = "body-l-leg"
|
||||
@@ -350,7 +350,7 @@
|
||||
return
|
||||
|
||||
var/obj/screen/zone_sel/selector = mob.hud_used.zone_select
|
||||
selector.set_selected_zone("l_leg", mob)
|
||||
selector.set_selected_zone(BODY_ZONE_L_LEG, mob)
|
||||
|
||||
/client/verb/toggle_walk_run()
|
||||
set name = "toggle-walk-run"
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
var/obj/item/cavity_object
|
||||
|
||||
var/obj/item/bodypart/chest/CH = get_bodypart("chest")
|
||||
var/obj/item/bodypart/chest/CH = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(CH.cavity_item)
|
||||
cavity_object = CH.cavity_item
|
||||
CH.cavity_item = null
|
||||
@@ -107,7 +107,7 @@
|
||||
var/obj/item/organ/I = X
|
||||
I.Insert(O, 1)
|
||||
|
||||
var/obj/item/bodypart/chest/torso = O.get_bodypart("chest")
|
||||
var/obj/item/bodypart/chest/torso = O.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(cavity_object)
|
||||
torso.cavity_item = cavity_object //cavity item is given to the new chest
|
||||
cavity_object.forceMove(O)
|
||||
@@ -167,7 +167,7 @@
|
||||
|
||||
var/obj/item/cavity_object
|
||||
|
||||
var/obj/item/bodypart/chest/CH = get_bodypart("chest")
|
||||
var/obj/item/bodypart/chest/CH = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(CH.cavity_item)
|
||||
cavity_object = CH.cavity_item
|
||||
CH.cavity_item = null
|
||||
@@ -266,7 +266,7 @@
|
||||
I.Insert(O, 1)
|
||||
|
||||
|
||||
var/obj/item/bodypart/chest/torso = get_bodypart("chest")
|
||||
var/obj/item/bodypart/chest/torso = get_bodypart(BODY_ZONE_CHEST)
|
||||
if(cavity_object)
|
||||
torso.cavity_item = cavity_object //cavity item is given to the new chest
|
||||
cavity_object.forceMove(O)
|
||||
|
||||
Reference in New Issue
Block a user