[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
@@ -146,3 +146,18 @@
|
||||
#define GRENADE_CLUMSY_FUMBLE 1
|
||||
#define GRENADE_NONCLUMSY_FUMBLE 2
|
||||
#define GRENADE_NO_FUMBLE 3
|
||||
|
||||
#define BODY_ZONE_HEAD "head"
|
||||
#define BODY_ZONE_CHEST "chest"
|
||||
#define BODY_ZONE_L_ARM "l_arm"
|
||||
#define BODY_ZONE_R_ARM "r_arm"
|
||||
#define BODY_ZONE_L_LEG "l_leg"
|
||||
#define BODY_ZONE_R_LEG "r_leg"
|
||||
|
||||
#define BODY_ZONE_PRECISE_EYES "eyes"
|
||||
#define BODY_ZONE_PRECISE_MOUTH "mouth"
|
||||
#define BODY_ZONE_PRECISE_GROIN "groin"
|
||||
#define BODY_ZONE_PRECISE_L_HAND "l_hand"
|
||||
#define BODY_ZONE_PRECISE_R_HAND "r_hand"
|
||||
#define BODY_ZONE_PRECISE_L_FOOT "l_foot"
|
||||
#define BODY_ZONE_PRECISE_R_FOOT "r_foot"
|
||||
|
||||
@@ -354,47 +354,47 @@
|
||||
return 0
|
||||
|
||||
if(bpc & FULL_BODY)
|
||||
covered_parts |= list("l_arm","r_arm","head","chest","l_leg","r_leg")
|
||||
covered_parts |= list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM,BODY_ZONE_HEAD,BODY_ZONE_CHEST,BODY_ZONE_L_LEG,BODY_ZONE_R_LEG)
|
||||
|
||||
else
|
||||
if(bpc & HEAD)
|
||||
covered_parts |= list("head")
|
||||
covered_parts |= list(BODY_ZONE_HEAD)
|
||||
if(bpc & CHEST)
|
||||
covered_parts |= list("chest")
|
||||
covered_parts |= list(BODY_ZONE_CHEST)
|
||||
if(bpc & GROIN)
|
||||
covered_parts |= list("chest")
|
||||
covered_parts |= list(BODY_ZONE_CHEST)
|
||||
|
||||
if(bpc & ARMS)
|
||||
covered_parts |= list("l_arm","r_arm")
|
||||
covered_parts |= list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM)
|
||||
else
|
||||
if(bpc & ARM_LEFT)
|
||||
covered_parts |= list("l_arm")
|
||||
covered_parts |= list(BODY_ZONE_L_ARM)
|
||||
if(bpc & ARM_RIGHT)
|
||||
covered_parts |= list("r_arm")
|
||||
covered_parts |= list(BODY_ZONE_R_ARM)
|
||||
|
||||
if(bpc & HANDS)
|
||||
covered_parts |= list("l_arm","r_arm")
|
||||
covered_parts |= list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM)
|
||||
else
|
||||
if(bpc & HAND_LEFT)
|
||||
covered_parts |= list("l_arm")
|
||||
covered_parts |= list(BODY_ZONE_L_ARM)
|
||||
if(bpc & HAND_RIGHT)
|
||||
covered_parts |= list("r_arm")
|
||||
covered_parts |= list(BODY_ZONE_R_ARM)
|
||||
|
||||
if(bpc & LEGS)
|
||||
covered_parts |= list("l_leg","r_leg")
|
||||
covered_parts |= list(BODY_ZONE_L_LEG,BODY_ZONE_R_LEG)
|
||||
else
|
||||
if(bpc & LEG_LEFT)
|
||||
covered_parts |= list("l_leg")
|
||||
covered_parts |= list(BODY_ZONE_L_LEG)
|
||||
if(bpc & LEG_RIGHT)
|
||||
covered_parts |= list("r_leg")
|
||||
covered_parts |= list(BODY_ZONE_R_LEG)
|
||||
|
||||
if(bpc & FEET)
|
||||
covered_parts |= list("l_leg","r_leg")
|
||||
covered_parts |= list(BODY_ZONE_L_LEG,BODY_ZONE_R_LEG)
|
||||
else
|
||||
if(bpc & FOOT_LEFT)
|
||||
covered_parts |= list("l_leg")
|
||||
covered_parts |= list(BODY_ZONE_L_LEG)
|
||||
if(bpc & FOOT_RIGHT)
|
||||
covered_parts |= list("r_leg")
|
||||
covered_parts |= list(BODY_ZONE_R_LEG)
|
||||
|
||||
return covered_parts
|
||||
|
||||
|
||||
@@ -736,21 +736,21 @@ Turf and target are separate in case you want to teleport some distance from a t
|
||||
return
|
||||
|
||||
/proc/parse_zone(zone)
|
||||
if(zone == "r_hand")
|
||||
if(zone == BODY_ZONE_PRECISE_R_HAND)
|
||||
return "right hand"
|
||||
else if (zone == "l_hand")
|
||||
else if (zone == BODY_ZONE_PRECISE_L_HAND)
|
||||
return "left hand"
|
||||
else if (zone == "l_arm")
|
||||
else if (zone == BODY_ZONE_L_ARM)
|
||||
return "left arm"
|
||||
else if (zone == "r_arm")
|
||||
else if (zone == BODY_ZONE_R_ARM)
|
||||
return "right arm"
|
||||
else if (zone == "l_leg")
|
||||
else if (zone == BODY_ZONE_L_LEG)
|
||||
return "left leg"
|
||||
else if (zone == "r_leg")
|
||||
else if (zone == BODY_ZONE_R_LEG)
|
||||
return "right leg"
|
||||
else if (zone == "l_foot")
|
||||
else if (zone == BODY_ZONE_PRECISE_L_FOOT)
|
||||
return "left foot"
|
||||
else if (zone == "r_foot")
|
||||
else if (zone == BODY_ZONE_PRECISE_R_FOOT)
|
||||
return "right foot"
|
||||
else
|
||||
return zone
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
if((flags & CALTROP_IGNORE_WALKERS) && H.m_intent == MOVE_INTENT_WALK)
|
||||
return
|
||||
|
||||
var/picked_def_zone = pick("l_leg", "r_leg")
|
||||
var/picked_def_zone = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
var/obj/item/bodypart/O = H.get_bodypart(picked_def_zone)
|
||||
if(!istype(O))
|
||||
return
|
||||
|
||||
@@ -1178,9 +1178,9 @@
|
||||
var/edit_action = input(usr, "What would you like to do?","Modify Body Part") as null|anything in list("add","remove", "augment")
|
||||
if(!edit_action)
|
||||
return
|
||||
var/list/limb_list = list("head", "l_arm", "r_arm", "l_leg", "r_leg")
|
||||
var/list/limb_list = list(BODY_ZONE_HEAD, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
if(edit_action == "augment")
|
||||
limb_list += "chest"
|
||||
limb_list += BODY_ZONE_CHEST
|
||||
var/result = input(usr, "Please choose which body part to [edit_action]","[capitalize(edit_action)] Body Part") as null|anything in limb_list
|
||||
|
||||
if(!C)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
D.visible_message("<span class='danger'>[A] [atk_verb] [D]!</span>", \
|
||||
"<span class='userdanger'>[A] [atk_verb] you!</span>")
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 40, 1, -1)
|
||||
D.apply_damage(rand(5,10), BRUTE, "head")
|
||||
A.apply_damage(rand(5,10), BRUTE, "head")
|
||||
D.apply_damage(rand(5,10), BRUTE, BODY_ZONE_HEAD)
|
||||
A.apply_damage(rand(5,10), BRUTE, BODY_ZONE_HEAD)
|
||||
if(!istype(D.head,/obj/item/clothing/head/helmet/) && !istype(D.head,/obj/item/clothing/head/hardhat))
|
||||
D.adjustBrainLoss(5)
|
||||
A.Stun(rand(10,45))
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
playsound(get_turf(A), 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
|
||||
D.emote("scream")
|
||||
D.dropItemToGround(D.get_active_held_item())
|
||||
D.apply_damage(5, BRUTE, pick("l_arm", "r_arm"))
|
||||
D.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
D.Knockdown(60)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
return 1
|
||||
add_logs(A, D, "wrist wrenched (Sleeping Carp)")
|
||||
@@ -78,7 +78,7 @@
|
||||
A.do_attack_animation(D, ATTACK_EFFECT_KICK)
|
||||
D.visible_message("<span class='warning'>[A] kicks [D] in the head!</span>", \
|
||||
"<span class='userdanger'>[A] kicks you in the jaw!</span>")
|
||||
D.apply_damage(20, BRUTE, "head")
|
||||
D.apply_damage(20, BRUTE, BODY_ZONE_HEAD)
|
||||
D.drop_all_held_items()
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 50, 1, -1)
|
||||
D.Knockdown(80)//CIT CHANGE - makes sleepingcarp use knockdown() for its stuns instead of stun()
|
||||
@@ -93,7 +93,7 @@
|
||||
"<span class='userdanger'>[A] piledrives you with their elbow!</span>")
|
||||
if(D.stat)
|
||||
D.death() //FINISH HIM!
|
||||
D.apply_damage(50, BRUTE, "chest")
|
||||
D.apply_damage(50, BRUTE, BODY_ZONE_CHEST)
|
||||
playsound(get_turf(D), 'sound/weapons/punch1.ogg', 75, 1, -1)
|
||||
return 1
|
||||
add_logs(A, D, "elbow dropped (Sleeping Carp)")
|
||||
@@ -202,7 +202,7 @@
|
||||
user.Knockdown(60)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, "head")
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
else
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
dna_block = NON_SCANNABLE
|
||||
text_gain_indication = "<span class='notice'>You feel pressure building up behind your eyes.</span>"
|
||||
layer_used = FRONT_MUTATIONS_LAYER
|
||||
limb_req = "head"
|
||||
limb_req = BODY_ZONE_HEAD
|
||||
|
||||
/datum/mutation/human/laser_eyes/New()
|
||||
..()
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
get_chance = 20
|
||||
lowest_value = 256 * 12
|
||||
text_gain_indication = "<span class='notice'>You feel smarter!</span>"
|
||||
limb_req = "head"
|
||||
limb_req = BODY_ZONE_HEAD
|
||||
|
||||
/datum/mutation/human/telekinesis/New()
|
||||
..()
|
||||
|
||||
@@ -499,11 +499,11 @@
|
||||
if(!itemUser.has_hand_for_held_index(hand))
|
||||
//If user does not have the corresponding hand anymore, give them one and return the rod to their hand
|
||||
if(((hand % 2) == 0))
|
||||
var/obj/item/bodypart/L = itemUser.newBodyPart("r_arm", FALSE, FALSE)
|
||||
var/obj/item/bodypart/L = itemUser.newBodyPart(BODY_ZONE_R_ARM, FALSE, FALSE)
|
||||
L.attach_limb(itemUser)
|
||||
itemUser.put_in_hand(newRod, hand, forced = TRUE)
|
||||
else
|
||||
var/obj/item/bodypart/L = itemUser.newBodyPart("l_arm", FALSE, FALSE)
|
||||
var/obj/item/bodypart/L = itemUser.newBodyPart(BODY_ZONE_L_ARM, FALSE, FALSE)
|
||||
L.attach_limb(itemUser)
|
||||
itemUser.put_in_hand(newRod, hand, forced = TRUE)
|
||||
to_chat(itemUser, "<span class='notice'>Your arm suddenly grows back with the Rod of Asclepius still attached!</span>")
|
||||
|
||||
@@ -130,11 +130,11 @@
|
||||
if(GLOB.ratvar_awakens)
|
||||
owner.Knockdown(20)
|
||||
if(iscultist(owner))
|
||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, "l_leg")
|
||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, "r_leg")
|
||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_L_LEG)
|
||||
owner.apply_damage(cultist_damage_on_toggle * 0.5, BURN, BODY_ZONE_R_LEG)
|
||||
else
|
||||
owner.apply_damage(leg_damage_on_toggle * 0.5, BURN, "l_leg")
|
||||
owner.apply_damage(leg_damage_on_toggle * 0.5, BURN, "r_leg")
|
||||
owner.apply_damage(leg_damage_on_toggle * 0.5, BURN, BODY_ZONE_L_LEG)
|
||||
owner.apply_damage(leg_damage_on_toggle * 0.5, BURN, BODY_ZONE_R_LEG)
|
||||
if(owner.m_intent != MOVE_INTENT_WALK)
|
||||
if(!iscultist(owner))
|
||||
to_chat(owner, "<span class='warning'>Your leg[number_legs > 1 ? "s shiver":" shivers"] with pain!</span>")
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
// brain function, they also have no limbs or internal organs.
|
||||
|
||||
if(!H.has_trait(TRAIT_NODISMEMBER))
|
||||
var/static/list/zones = list("r_arm", "l_arm", "r_leg", "l_leg")
|
||||
var/static/list/zones = list(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM, BODY_ZONE_R_LEG, BODY_ZONE_L_LEG)
|
||||
for(var/zone in zones)
|
||||
var/obj/item/bodypart/BP = H.get_bodypart(zone)
|
||||
if(BP)
|
||||
|
||||
@@ -746,7 +746,7 @@
|
||||
H.visible_message("<span class='danger'>[user] headbutts the airlock.</span>", \
|
||||
"<span class='userdanger'>You headbutt the airlock!</span>")
|
||||
H.Knockdown(100)
|
||||
H.apply_damage(10, BRUTE, "head")
|
||||
H.apply_damage(10, BRUTE, BODY_ZONE_HEAD)
|
||||
else
|
||||
visible_message("<span class='danger'>[user] headbutts the airlock. Good thing [user.p_theyre()] wearing a helmet.</span>")
|
||||
return
|
||||
@@ -1085,7 +1085,7 @@
|
||||
H.Unconscious(160)
|
||||
H.adjust_fire_stacks(20)
|
||||
H.IgniteMob() //Guaranteed knockout and ignition for nearby people
|
||||
H.apply_damage(40, BRUTE, "chest")
|
||||
H.apply_damage(40, BRUTE, BODY_ZONE_CHEST)
|
||||
return
|
||||
if(forced < 2)
|
||||
if(obj_flags & EMAGGED)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
|
||||
if(!(get_dist(src, attached) <= 1 && isturf(attached.loc)))
|
||||
to_chat(attached, "<span class='userdanger'>The IV drip needle is ripped out of you!</span>")
|
||||
attached.apply_damage(3, BRUTE, pick("r_arm", "l_arm"))
|
||||
attached.apply_damage(3, BRUTE, pick(BODY_ZONE_R_ARM, BODY_ZONE_L_ARM))
|
||||
attached = null
|
||||
update_icon()
|
||||
return PROCESS_KILL
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
target.gib()
|
||||
else
|
||||
//drill makes a hole
|
||||
var/obj/item/bodypart/target_part = target.get_bodypart(ran_zone("chest"))
|
||||
target.apply_damage(10, BRUTE, "chest", target.run_armor_check(target_part, "melee"))
|
||||
var/obj/item/bodypart/target_part = target.get_bodypart(ran_zone(BODY_ZONE_CHEST))
|
||||
target.apply_damage(10, BRUTE, BODY_ZONE_CHEST, target.run_armor_check(target_part, "melee"))
|
||||
|
||||
//blood splatters
|
||||
var/splatter_dir = get_dir(chassis, target)
|
||||
|
||||
@@ -482,7 +482,7 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
|
||||
/obj/item/proc/eyestab(mob/living/carbon/M, mob/living/carbon/user)
|
||||
|
||||
var/is_human_victim = 0
|
||||
var/obj/item/bodypart/affecting = M.get_bodypart("head")
|
||||
var/obj/item/bodypart/affecting = M.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(ishuman(M))
|
||||
if(!affecting) //no head!
|
||||
return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "body egg"
|
||||
desc = "All slimy and yuck."
|
||||
icon_state = "innards"
|
||||
zone = "chest"
|
||||
zone = BODY_ZONE_CHEST
|
||||
slot = "parasite_egg"
|
||||
|
||||
/obj/item/organ/body_egg/on_find(mob/living/finder)
|
||||
|
||||
@@ -129,7 +129,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
if(starts_lit)
|
||||
light()
|
||||
AddComponent(/datum/component/knockoff,90,list("mouth"),list(slot_wear_mask))//90% to knock off when wearing a mask
|
||||
AddComponent(/datum/component/knockoff,90,list(BODY_ZONE_PRECISE_MOUTH),list(slot_wear_mask))//90% to knock off when wearing a mask
|
||||
|
||||
/obj/item/clothing/mask/cigarette/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -546,7 +546,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
if(prot || prob(75))
|
||||
user.visible_message("After a few attempts, [user] manages to light [src].", "<span class='notice'>After a few attempts, you manage to light [src].</span>")
|
||||
else
|
||||
var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? "r_hand" : "l_hand"
|
||||
var/hitzone = user.held_index_to_dir(user.active_hand_index) == "r" ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND
|
||||
user.apply_damage(5, BURN, hitzone)
|
||||
user.visible_message("<span class='warning'>After a few attempts, [user] manages to light [src] - however, [user.p_they()] burn their finger in the process.</span>", "<span class='warning'>You burn yourself while lighting the lighter!</span>")
|
||||
GET_COMPONENT_FROM(mood, /datum/component/mood, user)
|
||||
@@ -800,7 +800,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
vapetime = 0
|
||||
if(prob(5))//small chance for the vape to break and deal damage if it's emagged
|
||||
playsound(get_turf(src), 'sound/effects/pop_expl.ogg', 50, 0)
|
||||
M.apply_damage(20, BURN, "head")
|
||||
M.apply_damage(20, BURN, BODY_ZONE_HEAD)
|
||||
M.Knockdown(300, 1, 0)
|
||||
var/datum/effect_system/spark_spread/sp = new /datum/effect_system/spark_spread
|
||||
sp.set_up(5, 1, src)
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
if(do_after(user, src.cleanspeed, target = target))
|
||||
to_chat(user, "<span class='notice'>You scrub \the [target.name] out.</span>")
|
||||
qdel(target)
|
||||
else if(ishuman(target) && user.zone_selected == "mouth")
|
||||
else if(ishuman(target) && user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
|
||||
var/mob/living/carbon/human/H = user
|
||||
user.visible_message("<span class='warning'>\the [user] washes \the [target]'s mouth out with [src.name]!</span>", "<span class='notice'>You wash \the [target]'s mouth out with [src.name]!</span>") //washes mouth out with soap sounds better than 'the soap' here
|
||||
H.lip_style = null //removes lipstick
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
//you can wipe off lipstick with paper!
|
||||
/obj/item/paper/attack(mob/M, mob/user)
|
||||
if(user.zone_selected == "mouth")
|
||||
if(user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
|
||||
if(!ismob(M))
|
||||
return
|
||||
|
||||
@@ -109,12 +109,12 @@
|
||||
|
||||
/obj/item/razor/suicide_act(mob/living/carbon/user)
|
||||
user.visible_message("<span class='suicide'>[user] begins shaving [user.p_them()]self without the razor guard! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
shave(user, "mouth")
|
||||
shave(user, "head")//doesnt need to be "head" specifically, but whatever
|
||||
shave(user, BODY_ZONE_PRECISE_MOUTH)
|
||||
shave(user, BODY_ZONE_HEAD)//doesnt need to be BODY_ZONE_HEAD specifically, but whatever
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = "mouth")
|
||||
if(location == "mouth")
|
||||
/obj/item/razor/proc/shave(mob/living/carbon/human/H, location = BODY_ZONE_PRECISE_MOUTH)
|
||||
if(location == BODY_ZONE_PRECISE_MOUTH)
|
||||
H.facial_hair_style = "Shaved"
|
||||
else
|
||||
H.hair_style = "Skinhead"
|
||||
@@ -127,10 +127,10 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
var/location = user.zone_selected
|
||||
if((location in list("eyes", "mouth", "head")) && !H.get_bodypart("head"))
|
||||
if((location in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_HEAD)) && !H.get_bodypart(BODY_ZONE_HEAD))
|
||||
to_chat(user, "<span class='warning'>[H] doesn't have a head!</span>")
|
||||
return
|
||||
if(location == "mouth")
|
||||
if(location == BODY_ZONE_PRECISE_MOUTH)
|
||||
if(!(FACEHAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no facial hair to shave!</span>")
|
||||
return
|
||||
@@ -158,7 +158,7 @@
|
||||
"<span class='notice'>You shave [H]'s facial hair clean off.</span>")
|
||||
shave(H, location)
|
||||
|
||||
else if(location == "head")
|
||||
else if(location == BODY_ZONE_HEAD)
|
||||
if(!(HAIR in H.dna.species.species_traits))
|
||||
to_chat(user, "<span class='warning'>There is no hair to shave!</span>")
|
||||
return
|
||||
|
||||
@@ -417,7 +417,7 @@
|
||||
var/mob/living/carbon/H = M
|
||||
|
||||
|
||||
if(user.zone_selected != "chest")
|
||||
if(user.zone_selected != BODY_ZONE_CHEST)
|
||||
to_chat(user, "<span class='warning'>You need to target your patient's chest with [src]!</span>")
|
||||
return
|
||||
|
||||
@@ -507,7 +507,7 @@
|
||||
H.visible_message("<span class='warning'>[H] thrashes wildly, clutching at their chest!</span>",
|
||||
"<span class='userdanger'>You feel a horrible agony in your chest!</span>")
|
||||
H.set_heartattack(TRUE)
|
||||
H.apply_damage(50, BURN, "chest")
|
||||
H.apply_damage(50, BURN, BODY_ZONE_CHEST)
|
||||
add_logs(user, H, "overloaded the heart of", defib)
|
||||
H.Knockdown(100)
|
||||
H.Jitter(100)
|
||||
@@ -626,7 +626,7 @@
|
||||
icon_state = "defibpaddles0"
|
||||
item_state = "defibpaddles0"
|
||||
req_defib = FALSE
|
||||
|
||||
|
||||
/obj/item/twohanded/shockpaddles/cyborg/attack(mob/M, mob/user)
|
||||
if(iscyborg(user))
|
||||
var/mob/living/silicon/robot/R = user
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
/obj/item/device/flashlight/attack(mob/living/carbon/M, mob/living/carbon/human/user)
|
||||
add_fingerprint(user)
|
||||
if(istype(M) && on && user.zone_selected in list("eyes", "mouth"))
|
||||
if(istype(M) && on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH))
|
||||
|
||||
if((user.has_trait(TRAIT_CLUMSY) || user.has_trait(TRAIT_DUMB)) && prob(50)) //too dumb to use flashlight properly
|
||||
return ..() //just hit them in the head
|
||||
@@ -56,7 +56,7 @@
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
if(!M.get_bodypart("head"))
|
||||
if(!M.get_bodypart(BODY_ZONE_HEAD))
|
||||
to_chat(user, "<span class='warning'>[M] doesn't have a head!</span>")
|
||||
return
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
return
|
||||
|
||||
switch(user.zone_selected)
|
||||
if("eyes")
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
if((M.head && M.head.flags_cover & HEADCOVERSEYES) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) || (M.glasses && M.glasses.flags_cover & GLASSESCOVERSEYES))
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSEYES) ? "helmet" : (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSEYES) ? "mask": "glasses"] first.</span>")
|
||||
return
|
||||
@@ -90,7 +90,7 @@
|
||||
else //they're okay!
|
||||
to_chat(user, "<span class='notice'>[M]'s pupils narrow.</span>")
|
||||
|
||||
if("mouth")
|
||||
if(BODY_ZONE_PRECISE_MOUTH)
|
||||
|
||||
if((M.head && M.head.flags_cover & HEADCOVERSMOUTH) || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
|
||||
to_chat(user, "<span class='notice'>You're going to need to remove that [(M.head && M.head.flags_cover & HEADCOVERSMOUTH) ? "helmet" : "mask"] first.</span>")
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
var/list/mouth_organs = new
|
||||
for(var/obj/item/organ/O in M.internal_organs)
|
||||
if(O.zone == "mouth")
|
||||
if(O.zone == BODY_ZONE_PRECISE_MOUTH)
|
||||
mouth_organs.Add(O)
|
||||
var/organ_list = ""
|
||||
var/organ_count = LAZYLEN(mouth_organs)
|
||||
@@ -372,7 +372,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/item/device/flashlight/emp/attack(mob/living/M, mob/living/user)
|
||||
if(on && user.zone_selected in list("eyes", "mouth")) // call original attack when examining organs
|
||||
if(on && user.zone_selected in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)) // call original attack when examining organs
|
||||
..()
|
||||
return
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
//human/alien mobs
|
||||
if(iscarbon(target))
|
||||
var/mob/living/carbon/C = target
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
|
||||
add_logs(user, C, "shone in the eyes", src)
|
||||
|
||||
var/severity = 1
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
jill.emote("scream")
|
||||
playsound(src, 'sound/effects/snap.ogg', 75, TRUE, frequency = 0.5)
|
||||
playsound(src, 'sound/effects/splat.ogg', 50, TRUE, frequency = 0.5)
|
||||
jill.apply_damage(9999, BRUTE, "head")
|
||||
jill.apply_damage(9999, BRUTE, BODY_ZONE_HEAD)
|
||||
jill.death() //just in case, for some reason, they're still alive
|
||||
flash_color(jill, flash_color = "#FF0000", flash_time = 100)
|
||||
|
||||
|
||||
@@ -266,12 +266,12 @@
|
||||
if(isliving(AM))
|
||||
var/mob/living/L = AM
|
||||
var/snap = 0
|
||||
var/def_zone = "chest"
|
||||
var/def_zone = BODY_ZONE_CHEST
|
||||
if(iscarbon(L))
|
||||
var/mob/living/carbon/C = L
|
||||
snap = 1
|
||||
if(!C.lying)
|
||||
def_zone = pick("l_leg", "r_leg")
|
||||
def_zone = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
if(!C.legcuffed && C.get_num_legs() >= 2) //beartrap can't cuff your leg if there's already a beartrap or legcuffs, or you don't have two legs.
|
||||
C.legcuffed = src
|
||||
forceMove(C)
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
icon_state = "fork"
|
||||
forkload = null
|
||||
|
||||
else if(user.zone_selected == "eyes")
|
||||
else if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
@@ -78,7 +78,7 @@
|
||||
AddComponent(/datum/component/butchering, 80 - force, 100, force - 10) //bonus chance increases depending on force
|
||||
|
||||
/obj/item/kitchen/knife/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(user.zone_selected == "eyes")
|
||||
if(user.zone_selected == BODY_ZONE_PRECISE_EYES)
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
M = user
|
||||
return eyestab(M,user)
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
user.Knockdown(60 * force)
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(2*force, BRUTE, "head")
|
||||
H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD)
|
||||
else
|
||||
user.take_bodypart_damage(2*force)
|
||||
return
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
switch(mode)
|
||||
if(0)
|
||||
if(M.health >= 0)
|
||||
if(user.zone_selected == "head")
|
||||
if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='notice'>[user] playfully boops [M] on the head!</span>", \
|
||||
"<span class='notice'>You playfully boop [M] on the head!</span>")
|
||||
user.do_attack_animation(M, ATTACK_EFFECT_BOOP)
|
||||
@@ -95,7 +95,7 @@
|
||||
if(M.lying)
|
||||
user.visible_message("<span class='notice'>[user] shakes [M] trying to get [M.p_them()] up!</span>", \
|
||||
"<span class='notice'>You shake [M] trying to get [M.p_them()] up!</span>")
|
||||
else if(user.zone_selected == "head")
|
||||
else if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='warning'>[user] bops [M] on the head!</span>", \
|
||||
"<span class='warning'>You bop [M] on the head!</span>")
|
||||
user.do_attack_animation(M, ATTACK_EFFECT_PUNCH)
|
||||
|
||||
@@ -215,7 +215,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "bible",
|
||||
uses -= 1
|
||||
to_chat(H, "<span class='userdanger'>You try to open the book AND IT BITES YOU!</span>")
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
H.apply_damage(5, BRUTE, pick("l_arm", "r_arm"))
|
||||
H.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
to_chat(H, "<span class='notice'>Your name appears on the inside cover, in blood.</span>")
|
||||
var/ownername = H.real_name
|
||||
desc += "<span class='warning'>The name [ownername] is written in blood inside the cover.</span>"
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
update_icon()
|
||||
|
||||
/obj/item/storage/box/suicide_act(mob/living/carbon/user)
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(myhead)
|
||||
user.visible_message("<span class='suicide'>[user] puts [user.p_their()] head into \the [src], and begins closing it! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
myhead.dismember()
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
if(!istype(M))
|
||||
return ..()
|
||||
if(user.zone_selected != "eyes" && user.zone_selected != "head")
|
||||
if(user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_HEAD)
|
||||
return ..()
|
||||
if(user.has_trait(TRAIT_CLUMSY) && prob(50))
|
||||
M = user
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart("head")
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
if(wielded)
|
||||
user.visible_message("<span class='suicide'>[user] begins spinning way too fast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart("head")//stole from chainsaw code
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)//stole from chainsaw code
|
||||
var/obj/item/organ/brain/B = user.getorganslot(ORGAN_SLOT_BRAIN)
|
||||
B.vital = FALSE//this cant possibly be a good idea
|
||||
var/randdir
|
||||
@@ -578,7 +578,7 @@
|
||||
if(on)
|
||||
user.visible_message("<span class='suicide'>[user] begins to tear [user.p_their()] head off with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(src, 'sound/weapons/chainsawhit.ogg', 100, 1)
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(myhead)
|
||||
myhead.dismember()
|
||||
else
|
||||
@@ -705,14 +705,14 @@
|
||||
"<span class='warning'>\"As you pick up [src] your arms ignite, reminding you of all your past sins.\"</span>")
|
||||
if(ishuman(U))
|
||||
var/mob/living/carbon/human/H = U
|
||||
H.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
|
||||
H.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
else
|
||||
U.adjustFireLoss(rand(force/2,force))
|
||||
|
||||
/obj/item/twohanded/pitchfork/demonic/attack(mob/target, mob/living/carbon/human/user)
|
||||
if(user.mind && user.owns_soul() && !is_devil(user))
|
||||
to_chat(user, "<span class ='warning'>[src] burns in your hands.</span>")
|
||||
user.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm"))
|
||||
user.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
..()
|
||||
|
||||
/obj/item/twohanded/pitchfork/demonic/ascended/afterattack(atom/target, mob/user, proximity)
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
return (BRUTELOSS|FIRELOSS|TOXLOSS|OXYLOSS)
|
||||
|
||||
/obj/item/banhammer/attack(mob/M, mob/user)
|
||||
if(user.zone_selected == "head")
|
||||
if(user.zone_selected == BODY_ZONE_HEAD)
|
||||
M.visible_message("<span class='danger'>[user] are stroking the head of [M] with a bangammer</span>", "<span class='userdanger'>[user] are stroking the head with a bangammer</span>", "you hear a bangammer stroking a head");
|
||||
else
|
||||
M.visible_message("<span class='danger'>[M] has been banned FOR NO REISIN by [user]</span>", "<span class='userdanger'>You have been banned FOR NO REISIN by [user]</span>", "you hear a banhammer banning someone")
|
||||
@@ -605,7 +605,7 @@
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/L = M
|
||||
L.endTailWag()
|
||||
if(user.a_intent != INTENT_HARM && ((user.zone_selected == "mouth") || (user.zone_selected == "eyes") || (user.zone_selected == "head")))
|
||||
if(user.a_intent != INTENT_HARM && ((user.zone_selected == BODY_ZONE_PRECISE_MOUTH) || (user.zone_selected == BODY_ZONE_PRECISE_EYES) || (user.zone_selected == BODY_ZONE_HEAD)))
|
||||
user.do_attack_animation(M)
|
||||
playsound(M, 'sound/weapons/slap.ogg', 50, 1, -1)
|
||||
user.visible_message("<span class='danger'>[user] slaps [M]!</span>",
|
||||
|
||||
@@ -217,7 +217,7 @@
|
||||
H.dna.update_ui_block(DNA_FACIAL_HAIR_COLOR_BLOCK)
|
||||
H.update_hair()
|
||||
|
||||
if("eyes")
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
var/new_eye_color = input(H, "Choose your eye color", "Eye Color","#"+H.eye_color) as color|null
|
||||
if(!Adjacent(user))
|
||||
return
|
||||
|
||||
@@ -466,7 +466,7 @@
|
||||
return
|
||||
var/selected_area = parse_zone(user.zone_selected)
|
||||
var/washing_face = 0
|
||||
if(selected_area in list("head", "mouth", "eyes"))
|
||||
if(selected_area in list(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_PRECISE_EYES))
|
||||
washing_face = 1
|
||||
user.visible_message("<span class='notice'>[user] starts washing their [washing_face ? "face" : "hands"]...</span>", \
|
||||
"<span class='notice'>You start washing your [washing_face ? "face" : "hands"]...</span>")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/datum/surgery/organ_extraction
|
||||
name = "experimental dissection"
|
||||
steps = list(/datum/surgery_step/incise, /datum/surgery_step/clamp_bleeders, /datum/surgery_step/retract_skin, /datum/surgery_step/incise, /datum/surgery_step/extract_organ, /datum/surgery_step/gland_insert)
|
||||
possible_locs = list("chest")
|
||||
possible_locs = list(BODY_ZONE_CHEST)
|
||||
ignore_clothes = 1
|
||||
|
||||
/datum/surgery/organ_extraction/can_start(mob/user, mob/living/carbon/target)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
if(alert("Are we sure we wish to kill ourself and create a headslug?",,"Yes", "No") == "No")
|
||||
return
|
||||
var/datum/mind/M = user.mind
|
||||
var/list/organs = user.getorganszone("head", 1)
|
||||
var/list/organs = user.getorganszone(BODY_ZONE_HEAD, 1)
|
||||
|
||||
for(var/obj/item/organ/I in organs)
|
||||
I.Remove(user, 1)
|
||||
|
||||
@@ -43,9 +43,9 @@
|
||||
return
|
||||
var/limb_regen = 0
|
||||
if(user.active_hand_index % 2 == 0) //we regen the arm before changing it into the weapon
|
||||
limb_regen = user.regenerate_limb("r_arm", 1)
|
||||
limb_regen = user.regenerate_limb(BODY_ZONE_R_ARM, 1)
|
||||
else
|
||||
limb_regen = user.regenerate_limb("l_arm", 1)
|
||||
limb_regen = user.regenerate_limb(BODY_ZONE_L_ARM, 1)
|
||||
if(limb_regen)
|
||||
user.visible_message("<span class='warning'>[user]'s missing arm reforms, making a loud, grotesque sound!</span>", "<span class='userdanger'>Your arm regrows, making a loud, crunchy sound and giving you great pain!</span>", "<span class='italics'>You hear organic matter ripping and tearing!</span>")
|
||||
user.emote("scream")
|
||||
@@ -307,7 +307,7 @@
|
||||
for(var/obj/item/I in H.held_items)
|
||||
if(I.is_sharp())
|
||||
C.visible_message("<span class='danger'>[H] impales [C] with [H.p_their()] [I.name]!</span>", "<span class='userdanger'>[H] impales you with [H.p_their()] [I.name]!</span>")
|
||||
C.apply_damage(I.force, BRUTE, "chest")
|
||||
C.apply_damage(I.force, BRUTE, BODY_ZONE_CHEST)
|
||||
H.do_item_attack_animation(C, used_item = I)
|
||||
H.add_mob_blood(C)
|
||||
playsound(get_turf(H),I.hitsound,75,1)
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
/obj/effect/proc_holder/changeling/revive
|
||||
name = "Revive"
|
||||
desc = "We regenerate, healing all damage from our form."
|
||||
helptext = "Does not regrow lost organs or a missing head."
|
||||
req_stat = DEAD
|
||||
always_keep = TRUE
|
||||
ignores_fakedeath = TRUE
|
||||
|
||||
//Revive from revival stasis
|
||||
/obj/effect/proc_holder/changeling/revive/sting_action(mob/living/carbon/user)
|
||||
user.cure_fakedeath("changeling")
|
||||
user.revive(full_heal = 1)
|
||||
var/list/missing = user.get_missing_limbs()
|
||||
missing -= "head" // headless changelings are funny
|
||||
if(missing.len)
|
||||
playsound(user, 'sound/magic/demon_consume.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user]'s missing limbs \
|
||||
reform, making a loud, grotesque sound!</span>",
|
||||
"<span class='userdanger'>Your limbs regrow, making a \
|
||||
loud, crunchy sound and giving you great pain!</span>",
|
||||
"<span class='italics'>You hear organic matter ripping \
|
||||
and tearing!</span>")
|
||||
user.emote("scream")
|
||||
user.regenerate_limbs(0, list("head"))
|
||||
user.regenerate_organs()
|
||||
to_chat(user, "<span class='notice'>We have revived ourselves.</span>")
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
changeling.purchasedpowers -= src
|
||||
return TRUE
|
||||
|
||||
/obj/effect/proc_holder/changeling/revive/can_be_used_by(mob/living/user)
|
||||
if((user.stat != DEAD) && !(user.has_trait(TRAIT_FAKEDEATH)))
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
changeling.purchasedpowers -= src
|
||||
return 0
|
||||
/obj/effect/proc_holder/changeling/revive
|
||||
name = "Revive"
|
||||
desc = "We regenerate, healing all damage from our form."
|
||||
helptext = "Does not regrow lost organs or a missing head."
|
||||
req_stat = DEAD
|
||||
always_keep = TRUE
|
||||
ignores_fakedeath = TRUE
|
||||
|
||||
//Revive from revival stasis
|
||||
/obj/effect/proc_holder/changeling/revive/sting_action(mob/living/carbon/user)
|
||||
user.cure_fakedeath("changeling")
|
||||
user.revive(full_heal = 1)
|
||||
var/list/missing = user.get_missing_limbs()
|
||||
missing -= BODY_ZONE_HEAD // headless changelings are funny
|
||||
if(missing.len)
|
||||
playsound(user, 'sound/magic/demon_consume.ogg', 50, 1)
|
||||
user.visible_message("<span class='warning'>[user]'s missing limbs \
|
||||
reform, making a loud, grotesque sound!</span>",
|
||||
"<span class='userdanger'>Your limbs regrow, making a \
|
||||
loud, crunchy sound and giving you great pain!</span>",
|
||||
"<span class='italics'>You hear organic matter ripping \
|
||||
and tearing!</span>")
|
||||
user.emote("scream")
|
||||
user.regenerate_limbs(0, list(BODY_ZONE_HEAD))
|
||||
user.regenerate_organs()
|
||||
to_chat(user, "<span class='notice'>We have revived ourselves.</span>")
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
changeling.purchasedpowers -= src
|
||||
return TRUE
|
||||
|
||||
/obj/effect/proc_holder/changeling/revive/can_be_used_by(mob/living/user)
|
||||
if((user.stat != DEAD) && !(user.has_trait(TRAIT_FAKEDEATH)))
|
||||
var/datum/antagonist/changeling/changeling = user.mind.has_antag_datum(/datum/antagonist/changeling)
|
||||
changeling.purchasedpowers -= src
|
||||
return 0
|
||||
. = ..()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
to_chat(user, "<span class='heavy_brass'>\"Do you have a hole in your head? You're about to.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>The helmet tries to drive a spike through your head as you scramble to remove it!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(30, BRUTE, "head")
|
||||
user.apply_damage(30, BRUTE, BODY_ZONE_HEAD)
|
||||
user.adjustBrainLoss(30)
|
||||
addtimer(CALLBACK(user, /mob/living.proc/dropItemToGround), src, 1) //equipped happens before putting stuff on(but not before picking items up), 1). thus, we need to wait for it to be on before forcing it off.
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
to_chat(user, "<span class='heavy_brass'>\"I think this armor is too hot for you to handle.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>The curiass emits a burst of flame as you scramble to get it off!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(15, BURN, "chest")
|
||||
user.apply_damage(15, BURN, BODY_ZONE_CHEST)
|
||||
user.adjust_fire_stacks(2)
|
||||
user.IgniteMob()
|
||||
addtimer(CALLBACK(user, /mob/living.proc/dropItemToGround, src, TRUE), 1)
|
||||
@@ -175,8 +175,8 @@
|
||||
to_chat(user, "<span class='heavy_brass'>\"Did you like having arms?\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>The gauntlets suddenly squeeze tight, crushing your arms before you manage to get them off!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(7, BRUTE, "l_arm")
|
||||
user.apply_damage(7, BRUTE, "r_arm")
|
||||
user.apply_damage(7, BRUTE, BODY_ZONE_L_ARM)
|
||||
user.apply_damage(7, BRUTE, BODY_ZONE_R_ARM)
|
||||
addtimer(CALLBACK(user, /mob/living.proc/dropItemToGround, src, TRUE), 1)
|
||||
|
||||
/obj/item/clothing/shoes/clockwork
|
||||
@@ -225,6 +225,6 @@
|
||||
to_chat(user, "<span class='heavy_brass'>\"Let's see if you can dance with these.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>The treads turn searing hot as you scramble to get them off!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(7, BURN, "l_leg")
|
||||
user.apply_damage(7, BURN, "r_leg")
|
||||
user.apply_damage(7, BURN, BODY_ZONE_L_LEG)
|
||||
user.apply_damage(7, BURN, BODY_ZONE_R_LEG)
|
||||
addtimer(CALLBACK(user, /mob/living.proc/dropItemToGround, src, TRUE), 1)
|
||||
|
||||
@@ -143,8 +143,8 @@
|
||||
playsound(get_turf(user), 'sound/weapons/sear.ogg', 50, 1)
|
||||
user.dropItemToGround(src)
|
||||
user.emote("scream")
|
||||
user.apply_damage(5, BURN, "l_arm")
|
||||
user.apply_damage(5, BURN, "r_arm")
|
||||
user.apply_damage(5, BURN, BODY_ZONE_L_ARM)
|
||||
user.apply_damage(5, BURN, BODY_ZONE_R_ARM)
|
||||
return 0
|
||||
if(!is_servant_of_ratvar(user))
|
||||
to_chat(user, "<span class='warning'>The information on [src]'s display shifts rapidly. After a moment, your head begins to pound, and you tear your eyes away.</span>")
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if(I.flags_inv & HIDEHAIR) //they're wearing a mask that covers their skull
|
||||
to_chat(user, "<span class='warning'>[H]'s head is covered, remove [H.wear_mask] first!</span>")
|
||||
return
|
||||
var/obj/item/bodypart/head/HE = H.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/HE = H.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(!HE) //literally headless
|
||||
to_chat(user, "<span class='warning'>[H] has no head, and thus no mind to claim!</span>")
|
||||
return
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
squirrel.emote("scream")
|
||||
playsound(squirrel, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
playsound(squirrel, 'sound/misc/desceration-03.ogg', 50, TRUE)
|
||||
squirrel.apply_damage(20, BRUTE, "chest")
|
||||
squirrel.apply_damage(20, BRUTE, BODY_ZONE_CHEST)
|
||||
mouse_opacity = MOUSE_OPACITY_OPAQUE //So players can interact with the tile it's on to pull them off
|
||||
buckle_mob(squirrel, TRUE)
|
||||
else
|
||||
@@ -96,7 +96,7 @@
|
||||
if(!do_after(user, 300, target = user))
|
||||
user.visible_message("<span class='warning'>[user] slides back down [src]!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(10, BRUTE, "chest")
|
||||
user.apply_damage(10, BRUTE, BODY_ZONE_CHEST)
|
||||
playsound(user, 'sound/misc/desceration-03.ogg', 50, TRUE)
|
||||
wiggle_wiggle = FALSE
|
||||
return
|
||||
|
||||
@@ -385,9 +385,9 @@
|
||||
user.whisper(invocation, language = /datum/language/common)
|
||||
if(health_cost)
|
||||
if(user.active_hand_index == 1)
|
||||
user.apply_damage(health_cost, BRUTE, "l_arm")
|
||||
user.apply_damage(health_cost, BRUTE, BODY_ZONE_L_ARM)
|
||||
else
|
||||
user.apply_damage(health_cost, BRUTE, "r_arm")
|
||||
user.apply_damage(health_cost, BRUTE, BODY_ZONE_R_ARM)
|
||||
if(uses <= 0)
|
||||
qdel(src)
|
||||
else if(source)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
"<span class='cultlarge'>\"You shouldn't play with sharp things. You'll poke someone's eye out.\"</span>")
|
||||
if(ishuman(user))
|
||||
var/mob/living/carbon/human/H = user
|
||||
H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm"))
|
||||
H.apply_damage(rand(force/2, force), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
else
|
||||
user.adjustBruteLoss(rand(force/2,force))
|
||||
return
|
||||
@@ -79,7 +79,7 @@
|
||||
to_chat(user, "<span class='cultlarge'>\"One of Ratvar's toys is trying to play with things [user.p_they()] shouldn't. Cute.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>A horrible force yanks at your arm!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(30, BRUTE, pick("l_arm", "r_arm"))
|
||||
user.apply_damage(30, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
user.dropItemToGround(src)
|
||||
|
||||
/obj/item/twohanded/required/cult_bastard
|
||||
@@ -147,7 +147,7 @@
|
||||
to_chat(user, "<span class='cultlarge'>\"One of Ratvar's toys is trying to play with things [user.p_they()] shouldn't. Cute.\"</span>")
|
||||
to_chat(user, "<span class='userdanger'>A horrible force yanks at your arm!</span>")
|
||||
user.emote("scream")
|
||||
user.apply_damage(30, BRUTE, pick("l_arm", "r_arm"))
|
||||
user.apply_damage(30, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
user.dropItemToGround(src, TRUE)
|
||||
user.Knockdown(50)
|
||||
return
|
||||
|
||||
@@ -114,7 +114,7 @@ This file contains the cult dagger and rune list code
|
||||
user.visible_message("<span class='warning'>[user] [user.blood_volume ? "cuts open their arm and begins writing in their own blood":"begins sketching out a strange design"]!</span>", \
|
||||
"<span class='cult'>You [user.blood_volume ? "slice open your arm and ":""]begin drawing a sigil of the Geometer.</span>")
|
||||
if(user.blood_volume)
|
||||
user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE, pick("l_arm", "r_arm"))
|
||||
user.apply_damage(initial(rune_to_scribe.scribe_damage), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
var/scribe_mod = initial(rune_to_scribe.scribe_delay)
|
||||
if(istype(get_turf(user), /turf/open/floor/engine/cult))
|
||||
scribe_mod *= 0.5
|
||||
|
||||
@@ -637,7 +637,7 @@ structure_check() searches for nearby cultist structures required for the invoca
|
||||
"<span class='cult italic'>You channel [carbon_user ? "your life ":""]energy into [src], [density ? "temporarily preventing" : "allowing"] passage above it.</span>")
|
||||
if(carbon_user)
|
||||
var/mob/living/carbon/C = user
|
||||
C.apply_damage(2, BRUTE, pick("l_arm", "r_arm"))
|
||||
C.apply_damage(2, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM))
|
||||
|
||||
/obj/effect/rune/wall/proc/spread_density()
|
||||
for(var/R in GLOB.wall_runes)
|
||||
|
||||
@@ -263,7 +263,7 @@
|
||||
target = input(user, "Select your victim!", "Voodoo") as null|anything in possible
|
||||
return
|
||||
|
||||
if(user.zone_selected == "chest")
|
||||
if(user.zone_selected == BODY_ZONE_CHEST)
|
||||
if(voodoo_link)
|
||||
target = null
|
||||
voodoo_link.forceMove(drop_location())
|
||||
@@ -274,24 +274,24 @@
|
||||
|
||||
if(target && cooldown < world.time)
|
||||
switch(user.zone_selected)
|
||||
if("mouth")
|
||||
if(BODY_ZONE_PRECISE_MOUTH)
|
||||
var/wgw = sanitize(input(user, "What would you like the victim to say", "Voodoo", null) as text)
|
||||
target.say(wgw)
|
||||
log_game("[user][user.key] made [target][target.key] say [wgw] with a voodoo doll.")
|
||||
if("eyes")
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
user.set_machine(src)
|
||||
user.reset_perspective(target)
|
||||
spawn(100)
|
||||
user.reset_perspective(null)
|
||||
user.unset_machine()
|
||||
if("r_leg","l_leg")
|
||||
if(BODY_ZONE_R_LEG,BODY_ZONE_L_LEG)
|
||||
to_chat(user, "<span class='notice'>You move the doll's legs around.</span>")
|
||||
var/turf/T = get_step(target,pick(GLOB.cardinals))
|
||||
target.Move(T)
|
||||
if("r_arm","l_arm")
|
||||
if(BODY_ZONE_R_ARM,BODY_ZONE_L_ARM)
|
||||
target.click_random_mob()
|
||||
GiveHint(target)
|
||||
if("head")
|
||||
if(BODY_ZONE_HEAD)
|
||||
to_chat(user, "<span class='notice'>You smack the doll's head with your hand.</span>")
|
||||
target.Dizzy(10)
|
||||
to_chat(target, "<span class='warning'>You suddenly feel as if your head was hit with a hammer!</span>")
|
||||
|
||||
@@ -1,142 +1,142 @@
|
||||
/obj/item/device/assembly/mousetrap
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
materials = list(MAT_METAL=100)
|
||||
attachable = 1
|
||||
var/armed = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/examine(mob/user)
|
||||
..()
|
||||
if(armed)
|
||||
to_chat(user, "The mousetrap is armed!")
|
||||
else
|
||||
to_chat(user, "The mousetrap is not armed.")
|
||||
|
||||
/obj/item/device/assembly/mousetrap/activate()
|
||||
if(..())
|
||||
armed = !armed
|
||||
if(!armed)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
|
||||
pulse(0)
|
||||
update_icon()
|
||||
if(usr)
|
||||
playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
/obj/item/device/assembly/mousetrap/describe()
|
||||
return "The pressure switch is [armed?"primed":"safe"]."
|
||||
|
||||
/obj/item/device/assembly/mousetrap/update_icon()
|
||||
if(armed)
|
||||
icon_state = "mousetraparmed"
|
||||
else
|
||||
icon_state = "mousetrap"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet")
|
||||
if(!armed)
|
||||
return
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.has_trait(TRAIT_PIERCEIMMUNE))
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
return 0
|
||||
switch(type)
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_bodypart(pick("l_leg", "r_leg"))
|
||||
H.Knockdown(60)
|
||||
if("l_hand", "r_hand")
|
||||
if(!H.gloves)
|
||||
affecting = H.get_bodypart(type)
|
||||
H.Stun(60)
|
||||
if(affecting)
|
||||
if(affecting.receive_damage(1, 0))
|
||||
H.update_damage_overlays()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
visible_message("<span class='boldannounce'>SPLAT!</span>")
|
||||
M.splat()
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
|
||||
if(!armed)
|
||||
to_chat(user, "<span class='notice'>You arm [src].</span>")
|
||||
else
|
||||
if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disarm [src].</span>")
|
||||
armed = !armed
|
||||
update_icon()
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
|
||||
if(armed)
|
||||
if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50))
|
||||
var/which_hand = "l_hand"
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = "r_hand"
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(armed)
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
else if(ismouse(MM))
|
||||
triggered(MM)
|
||||
else if(AM.density) // For mousetrap grenades, set off by anything heavy
|
||||
triggered(AM)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/on_found(mob/finder)
|
||||
if(armed)
|
||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
triggered(finder, (finder.active_hand_index % 2 == 0) ? "r_hand" : "l_hand")
|
||||
return 1 //end the search!
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
|
||||
if(!armed)
|
||||
return ..()
|
||||
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
|
||||
triggered(null)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/armed
|
||||
icon_state = "mousetraparmed"
|
||||
/obj/item/device/assembly/mousetrap
|
||||
name = "mousetrap"
|
||||
desc = "A handy little spring-loaded trap for catching pesty rodents."
|
||||
icon_state = "mousetrap"
|
||||
materials = list(MAT_METAL=100)
|
||||
attachable = 1
|
||||
var/armed = 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/examine(mob/user)
|
||||
..()
|
||||
if(armed)
|
||||
to_chat(user, "The mousetrap is armed!")
|
||||
else
|
||||
to_chat(user, "The mousetrap is not armed.")
|
||||
|
||||
/obj/item/device/assembly/mousetrap/activate()
|
||||
if(..())
|
||||
armed = !armed
|
||||
if(!armed)
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/user = usr
|
||||
if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50))
|
||||
to_chat(user, "<span class='warning'>Your hand slips, setting off the trigger!</span>")
|
||||
pulse(0)
|
||||
update_icon()
|
||||
if(usr)
|
||||
playsound(usr.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
/obj/item/device/assembly/mousetrap/describe()
|
||||
return "The pressure switch is [armed?"primed":"safe"]."
|
||||
|
||||
/obj/item/device/assembly/mousetrap/update_icon()
|
||||
if(armed)
|
||||
icon_state = "mousetraparmed"
|
||||
else
|
||||
icon_state = "mousetrap"
|
||||
if(holder)
|
||||
holder.update_icon()
|
||||
|
||||
/obj/item/device/assembly/mousetrap/proc/triggered(mob/target, type = "feet")
|
||||
if(!armed)
|
||||
return
|
||||
var/obj/item/bodypart/affecting = null
|
||||
if(ishuman(target))
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.has_trait(TRAIT_PIERCEIMMUNE))
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
return 0
|
||||
switch(type)
|
||||
if("feet")
|
||||
if(!H.shoes)
|
||||
affecting = H.get_bodypart(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG))
|
||||
H.Knockdown(60)
|
||||
if(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)
|
||||
if(!H.gloves)
|
||||
affecting = H.get_bodypart(type)
|
||||
H.Stun(60)
|
||||
if(affecting)
|
||||
if(affecting.receive_damage(1, 0))
|
||||
H.update_damage_overlays()
|
||||
else if(ismouse(target))
|
||||
var/mob/living/simple_animal/mouse/M = target
|
||||
visible_message("<span class='boldannounce'>SPLAT!</span>")
|
||||
M.splat()
|
||||
playsound(src.loc, 'sound/effects/snap.ogg', 50, 1)
|
||||
armed = 0
|
||||
update_icon()
|
||||
pulse(0)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_self(mob/living/carbon/human/user)
|
||||
if(!armed)
|
||||
to_chat(user, "<span class='notice'>You arm [src].</span>")
|
||||
else
|
||||
if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50))
|
||||
var/which_hand = BODY_ZONE_PRECISE_L_HAND
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = BODY_ZONE_PRECISE_R_HAND
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You disarm [src].</span>")
|
||||
armed = !armed
|
||||
update_icon()
|
||||
playsound(user.loc, 'sound/weapons/handcuffs.ogg', 30, 1, -3)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/attack_hand(mob/living/carbon/human/user)
|
||||
if(armed)
|
||||
if((user.has_trait(TRAIT_DUMB) || user.has_trait(TRAIT_CLUMSY)) && prob(50))
|
||||
var/which_hand = BODY_ZONE_PRECISE_L_HAND
|
||||
if(!(user.active_hand_index % 2))
|
||||
which_hand = BODY_ZONE_PRECISE_R_HAND
|
||||
triggered(user, which_hand)
|
||||
user.visible_message("<span class='warning'>[user] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/Crossed(atom/movable/AM as mob|obj)
|
||||
if(armed)
|
||||
if(ismob(AM))
|
||||
var/mob/MM = AM
|
||||
if(!(MM.movement_type & FLYING))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/H = AM
|
||||
if(H.m_intent == MOVE_INTENT_RUN)
|
||||
triggered(H)
|
||||
H.visible_message("<span class='warning'>[H] accidentally steps on [src].</span>", \
|
||||
"<span class='warning'>You accidentally step on [src]</span>")
|
||||
else if(ismouse(MM))
|
||||
triggered(MM)
|
||||
else if(AM.density) // For mousetrap grenades, set off by anything heavy
|
||||
triggered(AM)
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/on_found(mob/finder)
|
||||
if(armed)
|
||||
finder.visible_message("<span class='warning'>[finder] accidentally sets off [src], breaking their fingers.</span>", \
|
||||
"<span class='warning'>You accidentally trigger [src]!</span>")
|
||||
triggered(finder, (finder.active_hand_index % 2 == 0) ? BODY_ZONE_PRECISE_R_HAND : BODY_ZONE_PRECISE_L_HAND)
|
||||
return 1 //end the search!
|
||||
return 0
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/hitby(A as mob|obj)
|
||||
if(!armed)
|
||||
return ..()
|
||||
visible_message("<span class='warning'>[src] is triggered by [A].</span>")
|
||||
triggered(null)
|
||||
|
||||
|
||||
/obj/item/device/assembly/mousetrap/armed
|
||||
icon_state = "mousetraparmed"
|
||||
armed = 1
|
||||
|
||||
@@ -87,4 +87,4 @@
|
||||
if(pipe_air.temperature > heat_limit + 1)
|
||||
for(var/m in buckled_mobs)
|
||||
var/mob/living/buckled_mob = m
|
||||
buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest")
|
||||
buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BODY_ZONE_CHEST)
|
||||
|
||||
@@ -1069,7 +1069,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
undershirt = random_undershirt(gender)
|
||||
if("socks")
|
||||
socks = random_socks()
|
||||
if("eyes")
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
eye_color = random_eye_color()
|
||||
if("s_tone")
|
||||
skin_tone = random_skin_tone()
|
||||
@@ -1211,7 +1211,7 @@ GLOBAL_LIST_EMPTY(preferences_datums)
|
||||
if(new_socks)
|
||||
socks = new_socks
|
||||
|
||||
if("eyes")
|
||||
if(BODY_ZONE_PRECISE_EYES)
|
||||
var/new_eyes = input(user, "Choose your character's eye colour:", "Character Preference","#"+eye_color) as color|null
|
||||
if(new_eyes)
|
||||
eye_color = sanitize_hexcolor(new_eyes)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/obj/item/clothing/head
|
||||
name = "head"
|
||||
name = BODY_ZONE_HEAD
|
||||
icon = 'icons/obj/clothing/hats.dmi'
|
||||
icon_state = "top_hat"
|
||||
item_state = "that"
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
if(M.stat == DEAD && heart && world.time - M.timeofdeath < DEFIB_TIME_LIMIT * 10)
|
||||
heart_strength = "<span class='boldannounce'>a faint, fluttery</span>"
|
||||
|
||||
var/diagnosis = (body_part == "chest" ? "You hear [heart_strength] pulse and [lung_strength] respiration." : "You faintly hear [heart_strength] pulse.")
|
||||
var/diagnosis = (body_part == BODY_ZONE_CHEST ? "You hear [heart_strength] pulse and [lung_strength] respiration." : "You faintly hear [heart_strength] pulse.")
|
||||
user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "<span class='notice'>You place [src] against [M]'s [body_part]. [diagnosis]</span>")
|
||||
return
|
||||
return ..(M,user)
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
/obj/item/clothing/shoes/suicide_act(mob/living/carbon/user)
|
||||
if(rand(2)>1)
|
||||
user.visible_message("<span class='suicide'>[user] begins tying \the [src] up waaay too tightly! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
var/obj/item/bodypart/l_leg = user.get_bodypart("l_leg")
|
||||
var/obj/item/bodypart/r_leg = user.get_bodypart("r_leg")
|
||||
var/obj/item/bodypart/l_leg = user.get_bodypart(BODY_ZONE_L_LEG)
|
||||
var/obj/item/bodypart/r_leg = user.get_bodypart(BODY_ZONE_R_LEG)
|
||||
if(l_leg)
|
||||
l_leg.dismember()
|
||||
playsound(user,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
var/hit_reflect_chance = 40
|
||||
|
||||
/obj/item/clothing/suit/armor/laserproof/IsReflect(def_zone)
|
||||
if(!(def_zone in list("chest", "groin"))) //If not shot where ablative is covering you, you don't get the reflection bonus!
|
||||
if(!(def_zone in list(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN))) //If not shot where ablative is covering you, you don't get the reflection bonus!
|
||||
return 0
|
||||
if (prob(hit_reflect_chance))
|
||||
return 1
|
||||
|
||||
@@ -393,7 +393,7 @@
|
||||
return BRUTELOSS
|
||||
|
||||
/obj/item/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
|
||||
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head")
|
||||
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='warning'>[user] crushes the can of [src] on [user.p_their()] forehead!</span>", "<span class='notice'>You crush the can of [src] on your forehead.</span>")
|
||||
playsound(user.loc,'sound/weapons/pierce.ogg', rand(10,50), 1)
|
||||
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(user.loc)
|
||||
|
||||
@@ -67,7 +67,7 @@
|
||||
armor_block = H.run_armor_check(affecting, "melee","","",armour_penetration) // For normal attack damage
|
||||
|
||||
//If they have a hat/helmet and the user is targeting their head.
|
||||
if(istype(H.head, /obj/item/clothing/head) && affecting == "head")
|
||||
if(istype(H.head, /obj/item/clothing/head) && affecting == BODY_ZONE_HEAD)
|
||||
headarmor = H.head.armor.melee
|
||||
else
|
||||
headarmor = 0
|
||||
@@ -78,7 +78,7 @@
|
||||
else
|
||||
//Only humans can have armor, right?
|
||||
armor_block = target.run_armor_check(affecting, "melee")
|
||||
if(affecting == "head")
|
||||
if(affecting == BODY_ZONE_HEAD)
|
||||
armor_duration = duration + force
|
||||
|
||||
//Apply the damage!
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
// You are going to knock someone out for longer if they are not wearing a helmet.
|
||||
var/head_attack_message = ""
|
||||
if(affecting == "head" && istype(target, /mob/living/carbon/))
|
||||
if(affecting == BODY_ZONE_HEAD && istype(target, /mob/living/carbon/))
|
||||
head_attack_message = " on the head"
|
||||
//Knockdown the target for the duration that we calculated and divide it by 5.
|
||||
if(armor_duration)
|
||||
|
||||
@@ -142,7 +142,7 @@ God bless America.
|
||||
var/mob/living/carbon/C = user.pulling
|
||||
user.visible_message("<span class = 'danger'>[user] dunks [C]'s face in [src]!</span>")
|
||||
reagents.reaction(C, TOUCH)
|
||||
C.apply_damage(min(30, reagents.total_volume), BURN, "head")
|
||||
C.apply_damage(min(30, reagents.total_volume), BURN, BODY_ZONE_HEAD)
|
||||
reagents.remove_any((reagents.total_volume/2))
|
||||
C.Knockdown(60)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
user.visible_message("<span class='suicide'>[user] is beheading [user.p_them()]self with [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart("head")
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(src,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
user.visible_message("<span class='suicide'>[user] is beheading [user.p_them()]self with [src.name]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
var/obj/item/bodypart/BP = C.get_bodypart("head")
|
||||
var/obj/item/bodypart/BP = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
if(BP)
|
||||
BP.drop_limb()
|
||||
playsound(loc,pick('sound/misc/desceration-01.ogg','sound/misc/desceration-02.ogg','sound/misc/desceration-01.ogg') ,50, 1, -1)
|
||||
|
||||
@@ -486,7 +486,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
to_chat(C, "<span class='userdanger'>That was a really dumb idea.</span>")
|
||||
var/obj/item/bodypart/head/rip_u = C.get_bodypart("head")
|
||||
var/obj/item/bodypart/head/rip_u = C.get_bodypart(BODY_ZONE_HEAD)
|
||||
rip_u.dismember(BURN) //nice try jedi
|
||||
|
||||
/obj/machinery/power/supermatter_shard/attack_paw(mob/user)
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
return
|
||||
if(!ismob(target) || user.a_intent == INTENT_HARM) //melee attack
|
||||
return
|
||||
if(target == user && user.zone_selected != "mouth") //so we can't shoot ourselves (unless mouth selected)
|
||||
if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected)
|
||||
return
|
||||
|
||||
if(istype(user))//Check if the user can use the gun, if the user isn't alive(turrets) assume it can.
|
||||
@@ -151,7 +151,7 @@
|
||||
return
|
||||
|
||||
if(flag)
|
||||
if(user.zone_selected == "mouth")
|
||||
if(user.zone_selected == BODY_ZONE_PRECISE_MOUTH)
|
||||
handle_suicide(user, target, params)
|
||||
return
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
if(istype(user))
|
||||
if (user.has_trait(TRAIT_CLUMSY) && prob(40))
|
||||
to_chat(user, "<span class='userdanger'>You shoot yourself in the foot with [src]!</span>")
|
||||
var/shot_leg = pick("l_leg", "r_leg")
|
||||
var/shot_leg = pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
process_fire(user, user, FALSE, params, shot_leg)
|
||||
user.dropItemToGround(src, TRUE)
|
||||
return
|
||||
@@ -429,7 +429,7 @@
|
||||
|
||||
semicd = TRUE
|
||||
|
||||
if(!do_mob(user, target, 120) || user.zone_selected != "mouth")
|
||||
if(!do_mob(user, target, 120) || user.zone_selected != BODY_ZONE_PRECISE_MOUTH)
|
||||
if(user)
|
||||
if(user == target)
|
||||
user.visible_message("<span class='notice'>[user] decided not to shoot.</span>")
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
sleep(25)
|
||||
if(user.is_holding(src))
|
||||
var/turf/T = get_turf(user)
|
||||
process_fire(user, user, FALSE, null, "head")
|
||||
process_fire(user, user, FALSE, null, BODY_ZONE_HEAD)
|
||||
user.visible_message("<span class='suicide'>[user] blows [user.p_their()] brain[user.p_s()] out with [src]!</span>")
|
||||
var/turf/target = get_ranged_target_turf(user, turn(user.dir, 180), BRAINS_BLOWN_THROW_RANGE)
|
||||
B.Remove(user)
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
var/zone = check_zone(user.zone_selected)
|
||||
var/obj/item/bodypart/affecting = H.get_bodypart(zone)
|
||||
if(zone == "head" || zone == "eyes" || zone == "mouth")
|
||||
if(zone == BODY_ZONE_HEAD || zone == BODY_ZONE_PRECISE_EYES || zone == BODY_ZONE_PRECISE_MOUTH)
|
||||
shoot_self(user, affecting)
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user.name] cowardly fires [src] at [user.p_their()] [affecting.name]!</span>", "<span class='userdanger'>You cowardly fire [src] at your [affecting.name]!</span>", "<span class='italics'>You hear a gunshot!</span>")
|
||||
@@ -228,7 +228,7 @@
|
||||
user.visible_message("<span class='danger'>*click*</span>")
|
||||
playsound(src, "gun_dry_fire", 30, 1)
|
||||
|
||||
/obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head")
|
||||
/obj/item/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = BODY_ZONE_HEAD)
|
||||
user.apply_damage(300, BRUTE, affecting)
|
||||
user.visible_message("<span class='danger'>[user.name] fires [src] at [user.p_their()] head!</span>", "<span class='userdanger'>You fire [src] at your head!</span>", "<span class='italics'>You hear a gunshot!</span>")
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
/obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user)
|
||||
if((user.has_trait(TRAIT_CLUMSY)) || (user.mind && user.mind.assigned_role == "Clown"))
|
||||
return ..()
|
||||
if(process_fire(user, user, FALSE, null, "head"))
|
||||
if(process_fire(user, user, FALSE, null, BODY_ZONE_HEAD))
|
||||
user.visible_message("<span class='warning'>[user] somehow manages to shoot [user.p_them()]self in the face!</span>", "<span class='userdanger'>You somehow shoot yourself in the face! How the hell?!</span>")
|
||||
user.emote("scream")
|
||||
user.drop_all_held_items()
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
return
|
||||
if(!ismob(target) || user.a_intent == INTENT_HARM) //melee attack
|
||||
return
|
||||
if(target == user && user.zone_selected != "mouth") //so we can't shoot ourselves (unless mouth selected)
|
||||
if(target == user && user.zone_selected != BODY_ZONE_PRECISE_MOUTH) //so we can't shoot ourselves (unless mouth selected)
|
||||
return
|
||||
if(!passthrough && (aiming_time > aiming_time_fire_threshold))
|
||||
return
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
if(get_bodypart(hit_zone))
|
||||
return hit_zone
|
||||
else //when a limb is missing the damage is actually passed to the chest
|
||||
return "chest"
|
||||
return BODY_ZONE_CHEST
|
||||
|
||||
/obj/item/projectile/proc/prehit(atom/target)
|
||||
return TRUE
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user