Files
2026-10-27 17:27:44 -04:00

28 lines
1.2 KiB
Lua

require "KFT_Ferret"
local F = KFTFerret
local function persistTurret(module, command, player, args)
if module ~= "turret_sync" or command ~= "syncAnim" or not args then return end
if type(args.vehicleID) ~= "number" or type(args.animID) ~= "string" then return end
local value = tonumber(args.animID)
if not value or value % 2 ~= 0 or value < 2 or value > 360 then return end
local vehicle = getVehicleById(args.vehicleID)
if F.isGunner(vehicle, player) then F.savePose(vehicle, string.format("%03d", value)) end
end
Events.OnClientCommand.Add(persistTurret)
-- MTK supplies the ammunition items and unpacking recipes. Give them a modest
-- source in military ammunition stores even when the M41 is not enabled.
require "Items/ProceduralDistributions"
local supplies = ProceduralDistributions.list.ArmyStorageAmmunition
if supplies and supplies.items then
local alreadyPresent = false
for index = 1, #supplies.items, 2 do
if supplies.items[index] == "Base.762x63mmCarton" then alreadyPresent = true end
end
if not alreadyPresent then
table.insert(supplies.items, "Base.762x63mmCarton")
table.insert(supplies.items, 3)
end
end