mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
CHIEF - Option to allow ground transport. Set CAS speed to 70% max as Russian Helos are overly slow
This commit is contained in:
parent
3fb22b7c55
commit
897df1b8fa
@ -180,7 +180,7 @@ CHIEF.Strategy = {
|
|||||||
|
|
||||||
--- CHIEF class version.
|
--- CHIEF class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CHIEF.version="0.0.2"
|
CHIEF.version="0.0.3"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
-- TODO list
|
-- TODO list
|
||||||
@ -238,6 +238,7 @@ function CHIEF:New(Coalition, AgentSet, Alias)
|
|||||||
-- Init stuff.
|
-- Init stuff.
|
||||||
self.Defcon=CHIEF.DEFCON.GREEN
|
self.Defcon=CHIEF.DEFCON.GREEN
|
||||||
self.strategy=CHIEF.Strategy.DEFENSIVE
|
self.strategy=CHIEF.Strategy.DEFENSIVE
|
||||||
|
self.TransportCategories = {Group.Category.HELICOPTER}
|
||||||
|
|
||||||
-- Create a new COMMANDER.
|
-- Create a new COMMANDER.
|
||||||
self.commander=COMMANDER:New(Coalition)
|
self.commander=COMMANDER:New(Coalition)
|
||||||
@ -986,6 +987,23 @@ function CHIEF:AddAttackZone(Zone)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Allow chief to use GROUND units for transport tasks. Helicopters are still preferred, and be aware there's no check as of now
|
||||||
|
-- if a destination can be reached on land.
|
||||||
|
-- @param #CHIEF self
|
||||||
|
-- @return #CHIEF self
|
||||||
|
function CHIEF:AllowGroundTransport()
|
||||||
|
self.TransportCategories = {Group.Category.GROUND, Group.Category.HELICOPTER}
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- Forbid chief to use GROUND units for transport tasks. Restrict to Helicopters. This is the default
|
||||||
|
-- @param #CHIEF self
|
||||||
|
-- @return #CHIEF self
|
||||||
|
function CHIEF:ForbidGroundTransport()
|
||||||
|
self.TransportCategories = {Group.Category.HELICOPTER}
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Check if current strategy is passive.
|
--- Check if current strategy is passive.
|
||||||
-- @param #CHIEF self
|
-- @param #CHIEF self
|
||||||
-- @return #boolean If `true`, strategy is passive.
|
-- @return #boolean If `true`, strategy is passive.
|
||||||
@ -2191,7 +2209,7 @@ function CHIEF:RecruitAssetsForZone(StratZone, MissionType, NassetsMin, NassetsM
|
|||||||
|
|
||||||
-- Categories. Currently only helicopters are allowed due to problems with ground transports (might get stuck, might not be a land connection.
|
-- Categories. Currently only helicopters are allowed due to problems with ground transports (might get stuck, might not be a land connection.
|
||||||
-- TODO: Check if ground transport is possible. For example, by trying land.getPathOnRoad or something.
|
-- TODO: Check if ground transport is possible. For example, by trying land.getPathOnRoad or something.
|
||||||
local Categories={Group.Category.HELICOPTER}
|
local Categories={self.TransportCategories}
|
||||||
--local Categories={Group.Category.HELICOPTER, Group.Category.GROUND}
|
--local Categories={Group.Category.HELICOPTER, Group.Category.GROUND}
|
||||||
|
|
||||||
-- Recruit transport assets for infantry.
|
-- Recruit transport assets for infantry.
|
||||||
@ -2243,10 +2261,14 @@ function CHIEF:RecruitAssetsForZone(StratZone, MissionType, NassetsMin, NassetsM
|
|||||||
local mission=AUFTRAG:NewPATROLZONE(caszone)
|
local mission=AUFTRAG:NewPATROLZONE(caszone)
|
||||||
mission:SetEngageDetected(25, {"Ground Units", "Light armed ships", "Helicopters"})
|
mission:SetEngageDetected(25, {"Ground Units", "Light armed ships", "Helicopters"})
|
||||||
mission:SetWeaponExpend(AI.Task.WeaponExpend.ALL)
|
mission:SetWeaponExpend(AI.Task.WeaponExpend.ALL)
|
||||||
|
|
||||||
-- Add assets to mission.
|
-- Add assets to mission.
|
||||||
for _,asset in pairs(assets) do
|
for _,asset in pairs(assets) do
|
||||||
mission:AddAsset(asset)
|
mission:AddAsset(asset)
|
||||||
|
if asset.speedmax then
|
||||||
|
local speed = UTILS.KmphToKnots(asset.speedmax * 0.7) or 100
|
||||||
|
mission:SetMissionSpeed(speed)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Assign mission to legions.
|
-- Assign mission to legions.
|
||||||
|
|||||||
@ -1565,7 +1565,7 @@ do -- Cargo
|
|||||||
["KrAZ6322"] = 12,
|
["KrAZ6322"] = 12,
|
||||||
["M 818"] = 12,
|
["M 818"] = 12,
|
||||||
["Tigr_233036"] = 6,
|
["Tigr_233036"] = 6,
|
||||||
["TPZ"] = 10,
|
["TPZ"] = 10, -- Fuchs
|
||||||
["UAZ-469"] = 4, -- new by kappa
|
["UAZ-469"] = 4, -- new by kappa
|
||||||
["Ural-375"] = 12,
|
["Ural-375"] = 12,
|
||||||
["Ural-4320-31"] = 14,
|
["Ural-4320-31"] = 14,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user