Skip to content

Commit

Permalink
[MIRROR] Fix Kinetic Projectiles in non PKAs breaking (#1656)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
2 people authored and StealsThePRs committed Mar 27, 2024
1 parent c527703 commit ea9339b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions code/modules/projectiles/guns/energy/kinetic_accelerator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea9339b

Please sign in to comment.