From ea9339bf6bdd6acda3b7d1e966ad15509830aa15 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:23:06 -0400 Subject: [PATCH] [MIRROR] Fix Kinetic Projectiles in non PKAs breaking (#1656) * Fix Kinetic Projectiles in non PKAs breaking (#82243) ## About The Pull Request Kinetic blasts are fired from things which are not PKAs sometimes which makes this runtime ![image](https://github.com/tgstation/tgstation/assets/51863163/53d3fe5f-7ab8-4e0d-ba81-36d148d671ae) ## Changelog :cl: Melbert fix: Non-PKA kinetic blasts should work better /:cl: * Fix Kinetic Projectiles in non PKAs breaking --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> --- .../modules/projectiles/guns/energy/kinetic_accelerator.dm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index 2ea13ac0e18..5037d26d144 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -191,14 +191,13 @@ return ..() /obj/projectile/kinetic/prehit_pierce(atom/target) - if(is_type_in_typecache(target, kinetic_gun.ignored_mob_types)) + if(is_type_in_typecache(target, kinetic_gun?.ignored_mob_types)) return PROJECTILE_PIERCE_PHASE . = ..() if(. == PROJECTILE_PIERCE_PHASE) return - if(kinetic_gun) - for(var/obj/item/borg/upgrade/modkit/modkit_upgrade as anything in kinetic_gun.modkits) - modkit_upgrade.projectile_prehit(src, target, kinetic_gun) + for(var/obj/item/borg/upgrade/modkit/modkit_upgrade as anything in kinetic_gun?.modkits) + modkit_upgrade.projectile_prehit(src, target, kinetic_gun) if(!pressure_decrease_active && !lavaland_equipment_pressure_check(get_turf(target))) name = "weakened [name]" damage = damage * pressure_decrease