Merge pull request #4227 from CHOMPStation2/upstream-merge-12934

[MIRROR] Chest -> Torso Targeting Fixes
This commit is contained in:
Razgriz
2022-05-11 10:04:45 -07:00
committed by GitHub
6 changed files with 31 additions and 31 deletions

View File

@@ -151,9 +151,9 @@ Proc for attack log creation, because really why not
/proc/get_exposed_defense_zone(var/atom/movable/target) /proc/get_exposed_defense_zone(var/atom/movable/target)
var/obj/item/weapon/grab/G = locate() in target var/obj/item/weapon/grab/G = locate() in target
if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people. if(G && G.state >= GRAB_NECK) //works because mobs are currently not allowed to upgrade to NECK if they are grabbing two people.
return pick("head", "l_hand", "r_hand", "l_foot", "r_foot", "l_arm", "r_arm", "l_leg", "r_leg") return pick(BP_HEAD, BP_L_HAND, BP_R_HAND, BP_L_FOOT, BP_R_FOOT, BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG)
else else
return pick("chest", "groin") return pick(BP_TORSO, BP_GROIN)
/proc/do_mob(mob/user , mob/target, time = 30, target_zone = 0, uninterruptible = FALSE, progress = TRUE, ignore_movement = FALSE, exclusive = FALSE) /proc/do_mob(mob/user , mob/target, time = 30, target_zone = 0, uninterruptible = FALSE, progress = TRUE, ignore_movement = FALSE, exclusive = FALSE)
if(!user || !target) if(!user || !target)

View File

@@ -240,7 +240,7 @@ HALOGEN COUNTER - Radcount on mobs
continue continue
// Broken limbs // Broken limbs
if(e.status & ORGAN_BROKEN) if(e.status & ORGAN_BROKEN)
if((e.name in list("l_arm", "r_arm", "l_leg", "r_leg", "head", "chest", "groin")) && (!e.splinted)) if((e.name in list(BP_L_ARM, BP_R_ARM, BP_L_LEG, BP_R_LEG, BP_HEAD, BP_TORSO, BP_GROIN)) && (!e.splinted))
fracture_dat += "<span class='warning'>Unsecured fracture in subject [e.name]. Splinting recommended for transport.</span><br>" fracture_dat += "<span class='warning'>Unsecured fracture in subject [e.name]. Splinting recommended for transport.</span><br>"
else if(advscan >= 1 && showadvscan == 1) else if(advscan >= 1 && showadvscan == 1)
fracture_dat += "<span class='warning'>Bone fractures detected in subject [e.name].</span><br>" fracture_dat += "<span class='warning'>Bone fractures detected in subject [e.name].</span><br>"

View File

@@ -206,7 +206,7 @@
var/obj/item/organ/external/E var/obj/item/organ/external/E
var/nopain var/nopain
if(ishuman(victim) && user.zone_sel.selecting != "groin" && user.zone_sel.selecting != "chest") if(ishuman(victim) && user.zone_sel.selecting != BP_GROIN && user.zone_sel.selecting != BP_TORSO)
var/mob/living/carbon/human/H = victim var/mob/living/carbon/human/H = victim
E = H.get_organ(user.zone_sel.selecting) E = H.get_organ(user.zone_sel.selecting)
if(!E || E.species.flags & NO_PAIN) if(!E || E.species.flags & NO_PAIN)

View File

@@ -323,7 +323,7 @@ emp_act
if(!stat) if(!stat)
switch(hit_zone) switch(hit_zone)
if("head")//Harder to score a stun but if you do it lasts a bit longer if(BP_HEAD)//Harder to score a stun but if you do it lasts a bit longer
if(prob(effective_force)) if(prob(effective_force))
apply_effect(20, PARALYZE, blocked, soaked) apply_effect(20, PARALYZE, blocked, soaked)
visible_message("<span class='danger'>\The [src] has been knocked unconscious!</span>") visible_message("<span class='danger'>\The [src] has been knocked unconscious!</span>")
@@ -337,7 +337,7 @@ emp_act
if(glasses && prob(33)) if(glasses && prob(33))
glasses.add_blood(src) glasses.add_blood(src)
update_inv_glasses(0) update_inv_glasses(0)
if("chest")//Easier to score a stun but lasts less time if(BP_TORSO)//Easier to score a stun but lasts less time
if(prob(effective_force + 10)) if(prob(effective_force + 10))
apply_effect(6, WEAKEN, blocked, soaked) apply_effect(6, WEAKEN, blocked, soaked)
visible_message("<span class='danger'>\The [src] has been knocked down!</span>") visible_message("<span class='danger'>\The [src] has been knocked down!</span>")

View File

@@ -604,33 +604,33 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
//The base miss chance for the different defence zones //The base miss chance for the different defence zones
var/list/global/base_miss_chance = list( var/list/global/base_miss_chance = list(
"head" = 40, BP_HEAD = 40,
"torso" = 10, BP_TORSO = 10,
"groin" = 20, BP_GROIN = 20,
"l_leg" = 20, BP_L_LEG = 20,
"r_leg" = 20, BP_R_LEG = 20,
"l_arm" = 20, BP_L_ARM = 20,
"r_arm" = 20, BP_R_ARM = 20,
"l_hand" = 50, BP_L_HAND = 50,
"r_hand" = 50, BP_R_HAND = 50,
"l_foot" = 50, BP_L_FOOT = 50,
"r_foot" = 50, BP_R_FOOT = 50,
) //CHOMPEDIT - Changed "chest" to "torso", as chest is a typo. How long has this bug been here? )
//Used to weight organs when an organ is hit randomly (i.e. not a directed, aimed attack). //Used to weight organs when an organ is hit randomly (i.e. not a directed, aimed attack).
//Also used to weight the protection value that armour provides for covering that body part when calculating protection from full-body effects. //Also used to weight the protection value that armour provides for covering that body part when calculating protection from full-body effects.
var/list/global/organ_rel_size = list( var/list/global/organ_rel_size = list(
"head" = 25, BP_HEAD = 25,
"chest" = 70, BP_TORSO = 70,
"groin" = 30, BP_GROIN = 30,
"l_leg" = 25, BP_L_LEG = 25,
"r_leg" = 25, BP_R_LEG = 25,
"l_arm" = 25, BP_L_ARM = 25,
"r_arm" = 25, BP_R_ARM = 25,
"l_hand" = 10, BP_L_HAND = 10,
"r_hand" = 10, BP_R_HAND = 10,
"l_foot" = 10, BP_L_FOOT = 10,
"r_foot" = 10, BP_R_FOOT = 10,
) )
/mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash) /mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /obj/screen/fullscreen/flash)
@@ -689,4 +689,4 @@ var/global/image/backplane
item.screen_loc = screen_place item.screen_loc = screen_place
/mob/proc/can_feed() /mob/proc/can_feed()
return TRUE return TRUE

View File

@@ -33,7 +33,7 @@ If the spell_projectile is seeking, it will update its target every process and
if(istype(projectile, /obj/item/projectile/spell_projectile)) if(istype(projectile, /obj/item/projectile/spell_projectile))
var/obj/item/projectile/spell_projectile/SP = projectile var/obj/item/projectile/spell_projectile/SP = projectile
SP.carried = src //casting is magical SP.carried = src //casting is magical
projectile.def_zone = check_zone("chest") projectile.def_zone = check_zone(BP_TORSO)
projectile.old_style_target(target) projectile.old_style_target(target)
projectile.fire() projectile.fire()