Skip to content

Commit

Permalink
Merge branch 'master' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
funkyfranky committed Jan 14, 2025
2 parents 1b25220 + b2dc7bc commit 2e77988
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Moose Development/Moose/Functional/Artillery.lua
Original file line number Diff line number Diff line change
Expand Up @@ -695,7 +695,7 @@ ARTY.db={

--- Arty script version.
-- @field #string version
ARTY.version="1.3.1"
ARTY.version="1.3.2"

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Expand Down Expand Up @@ -3049,7 +3049,7 @@ function ARTY:onafterOpenFire(Controllable, From, Event, To, target)
local nfire=Narty
local _type="shots"
if target.weapontype==ARTY.WeaponType.Auto then
nfire=Narty
nfire=Nammo -- We take everything that is available
_type="shots"
elseif target.weapontype==ARTY.WeaponType.Cannon then
nfire=Narty
Expand All @@ -3070,6 +3070,8 @@ function ARTY:onafterOpenFire(Controllable, From, Event, To, target)
nfire=Nmissiles
_type="cruise missiles"
end

--env.info(string.format("FF type=%s, Nrockets=%d, Nfire=%d target.nshells=%d", _type, Nrockets, nfire, target.nshells))

-- Adjust if less than requested ammo is left.
target.nshells=math.min(target.nshells, nfire)
Expand Down

0 comments on commit 2e77988

Please sign in to comment.