Skip to content

Commit

Permalink
fixed shield collision for piercing
Browse files Browse the repository at this point in the history
  • Loading branch information
ChronoVortex committed Jun 29, 2023
1 parent b4451ae commit 49c3bbe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions data/vertex_module/tags/particleEmitters.lua
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,12 @@ local function logic()
script.on_internal_event(Defines.InternalEvents.PROJECTILE_COLLISION, function(thisProjectile, otherProjectile, damage, response)
emitter_explosion(thisProjectile)
end)
script.on_internal_event(Defines.InternalEvents.SHIELD_COLLISION, function(ship, projectile, damage, response)
emitter_explosion(projectile)
script.on_internal_event(Defines.InternalEvents.SHIELD_COLLISION_PRE, function(ship, projectile, damage, response)
local shieldPower = nil
pcall(function() shieldPower = ship.shieldSystem.shields.power end)
if not shieldPower or shieldPower.super.first > 0 or shieldPower.first > damage.iShieldPiercing then
emitter_explosion(projectile)
end
end)
script.on_internal_event(Defines.InternalEvents.DAMAGE_AREA_HIT, function(ship, projectile, damage, response)
emitter_explosion(projectile)
Expand Down
2 changes: 1 addition & 1 deletion mod-appendix/metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<title><![CDATA[ Vertex Tags and Utility Functions ]]></title>
<threadUrl><![CDATA[ https://github.com/ChronoVortex/FTL-HS-Vertex ]]></threadUrl>
<author><![CDATA[ Vertaalfout, Chrono Vortex ]]></author>
<version><![CDATA[ 3.1 ]]></version>
<version><![CDATA[ 3.2 ]]></version>
<description>
<![CDATA[
This mod has no content, instead adding new tags and LUA utility functions for other mods to build off of.
Expand Down

0 comments on commit 49c3bbe

Please sign in to comment.