From 24aa127d676f512eb5b447450a6b0ac9226dfbff Mon Sep 17 00:00:00 2001 From: Novacat <35587478+Novacat@users.noreply.github.com> Date: Sun, 8 May 2022 21:07:08 -0400 Subject: [PATCH] Chest -> Torso Targeting Fixes --- code/_helpers/mobs.dm | 4 +- code/game/objects/items/devices/scanners.dm | 2 +- .../food/kitchen/cooking_machines/fryer.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 4 +- code/modules/mob/mob_helpers.dm | 37 +++++++++++++------ .../spells/targeted/projectile/projectile.dm | 2 +- 6 files changed, 33 insertions(+), 18 deletions(-) diff --git a/code/_helpers/mobs.dm b/code/_helpers/mobs.dm index ae6b5c15f3..222e22d590 100644 --- a/code/_helpers/mobs.dm +++ b/code/_helpers/mobs.dm @@ -151,9 +151,9 @@ Proc for attack log creation, because really why not /proc/get_exposed_defense_zone(var/atom/movable/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. - 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 - 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) if(!user || !target) diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 3bbab99926..08952cb094 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -240,7 +240,7 @@ HALOGEN COUNTER - Radcount on mobs continue // Broken limbs 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 += "Unsecured fracture in subject [e.name]. Splinting recommended for transport.
" else if(advscan >= 1 && showadvscan == 1) fracture_dat += "Bone fractures detected in subject [e.name].
" diff --git a/code/modules/food/kitchen/cooking_machines/fryer.dm b/code/modules/food/kitchen/cooking_machines/fryer.dm index bcaad4e693..bfc237df73 100644 --- a/code/modules/food/kitchen/cooking_machines/fryer.dm +++ b/code/modules/food/kitchen/cooking_machines/fryer.dm @@ -206,7 +206,7 @@ var/obj/item/organ/external/E 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 E = H.get_organ(user.zone_sel.selecting) if(!E || E.species.flags & NO_PAIN) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 03261da6b6..674c61b886 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -323,7 +323,7 @@ emp_act if(!stat) 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)) apply_effect(20, PARALYZE, blocked, soaked) visible_message("\The [src] has been knocked unconscious!") @@ -337,7 +337,7 @@ emp_act if(glasses && prob(33)) glasses.add_blood(src) 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)) apply_effect(6, WEAKEN, blocked, soaked) visible_message("\The [src] has been knocked down!") diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 1777e1578a..d255a4e436 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -604,6 +604,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) //The base miss chance for the different defence zones var/list/global/base_miss_chance = list( +<<<<<<< HEAD "head" = 40, "torso" = 10, "groin" = 20, @@ -616,21 +617,35 @@ var/list/global/base_miss_chance = list( "l_foot" = 50, "r_foot" = 50, ) //CHOMPEDIT - Changed "chest" to "torso", as chest is a typo. How long has this bug been here? +======= + BP_HEAD = 40, + BP_TORSO = 10, + BP_GROIN = 20, + BP_L_LEG = 20, + BP_R_LEG = 20, + BP_L_ARM = 20, + BP_R_ARM = 20, + BP_L_HAND = 50, + BP_R_HAND = 50, + BP_L_FOOT = 50, + BP_R_FOOT = 50, +) +>>>>>>> afd673c6f6... Merge pull request #12934 from KillianKirilenko/kk-hitfixes //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. var/list/global/organ_rel_size = list( - "head" = 25, - "chest" = 70, - "groin" = 30, - "l_leg" = 25, - "r_leg" = 25, - "l_arm" = 25, - "r_arm" = 25, - "l_hand" = 10, - "r_hand" = 10, - "l_foot" = 10, - "r_foot" = 10, + BP_HEAD = 25, + BP_TORSO = 70, + BP_GROIN = 30, + BP_L_LEG = 25, + BP_R_LEG = 25, + BP_L_ARM = 25, + BP_R_ARM = 25, + BP_L_HAND = 10, + BP_R_HAND = 10, + BP_L_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) diff --git a/code/modules/spells/targeted/projectile/projectile.dm b/code/modules/spells/targeted/projectile/projectile.dm index 7181d3c140..f98b71598c 100644 --- a/code/modules/spells/targeted/projectile/projectile.dm +++ b/code/modules/spells/targeted/projectile/projectile.dm @@ -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)) var/obj/item/projectile/spell_projectile/SP = projectile 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.fire()