mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge branch 'master' into FC/HotFix-Cargo-Transport_(Issue_#821)
This commit is contained in:
commit
5120088b66
@ -1289,7 +1289,10 @@ function CARGO_GROUP:onafterBoarding( From, Event, To, CargoCarrier, NearRadius,
|
|||||||
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
|
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
|
||||||
for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do
|
for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do
|
||||||
self:T( { Cargo:GetName(), Cargo.current } )
|
self:T( { Cargo:GetName(), Cargo.current } )
|
||||||
if not Cargo:is( "Loaded" ) then
|
|
||||||
|
|
||||||
|
if not Cargo:is( "Loaded" )
|
||||||
|
and (not Cargo:is( "Destroyed" )) then -- If one or more units of a group defined as CARGO_GROUP died, the CARGO_GROUP:Board() command does not trigger the CARGO_GRUOP:OnEnterLoaded() function.
|
||||||
Boarded = false
|
Boarded = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@ -618,10 +618,11 @@ function ZONE_RADIUS:Scan( ObjectCategories )
|
|||||||
}
|
}
|
||||||
|
|
||||||
local function EvaluateZone( ZoneObject )
|
local function EvaluateZone( ZoneObject )
|
||||||
if ZoneObject:isExist() then
|
--if ZoneObject:isExist() then --FF: isExist always returns false for SCENERY objects since DCS 2.2 and still in DCS 2.5
|
||||||
|
if ZoneObject then
|
||||||
local ObjectCategory = ZoneObject:getCategory()
|
local ObjectCategory = ZoneObject:getCategory()
|
||||||
if ( ObjectCategory == Object.Category.UNIT and ZoneObject:isActive() ) or
|
if ( ObjectCategory == Object.Category.UNIT and ZoneObject:isExist() and ZoneObject:isActive() ) or
|
||||||
ObjectCategory == Object.Category.STATIC then
|
(ObjectCategory == Object.Category.STATIC and ZoneObject:isExist()) then
|
||||||
local CoalitionDCSUnit = ZoneObject:getCoalition()
|
local CoalitionDCSUnit = ZoneObject:getCoalition()
|
||||||
self.ScanData.Coalitions[CoalitionDCSUnit] = true
|
self.ScanData.Coalitions[CoalitionDCSUnit] = true
|
||||||
self:E( { Name = ZoneObject:getName(), Coalition = CoalitionDCSUnit } )
|
self:E( { Name = ZoneObject:getName(), Coalition = CoalitionDCSUnit } )
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
--- **Functional** -- Management of target **Designation**. Lase, smoke and illuminate targets.
|
--- **Functional** -- Management of target **Designation**. Lase, smoke and illuminate targets.
|
||||||
--
|
--
|
||||||
-- --
|
-- 
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
@ -40,12 +40,9 @@ do -- DESIGNATE
|
|||||||
|
|
||||||
--- # DESIGNATE class, extends @{Fsm#FSM}
|
--- # DESIGNATE class, extends @{Fsm#FSM}
|
||||||
--
|
--
|
||||||
-- DESIGNATE is orchestrating the designation of potential targets executed by a Recce group,
|
-- DESIGNATE is managing the designation of detected targets.
|
||||||
-- and communicates these to a dedicated attacking group of players,
|
-- Targets detected by recce will be communicated to a group of attacking players.
|
||||||
-- so that following a dynamically generated menu system,
|
-- A menu system is made available that allows to:
|
||||||
-- each detected set of potential targets can be lased or smoked...
|
|
||||||
--
|
|
||||||
-- Targets can be:
|
|
||||||
--
|
--
|
||||||
-- * **Lased** for a period of time.
|
-- * **Lased** for a period of time.
|
||||||
-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
|
-- * **Smoked**. Artillery or airplanes with Illuminatino ordonance need to be present. (WIP, but early demo ready.)
|
||||||
@ -55,8 +52,8 @@ do -- DESIGNATE
|
|||||||
--
|
--
|
||||||
-- * The **DesignateObject** is the object of the DESIGNATE class, which is this class explained in the document.
|
-- * The **DesignateObject** is the object of the DESIGNATE class, which is this class explained in the document.
|
||||||
-- * The **DetectionObject** is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into _DetectionItems_.
|
-- * The **DetectionObject** is the object of a DETECTION_ class (DETECTION_TYPES, DETECTION_AREAS, DETECTION_UNITS), which is executing the detection and grouping of Targets into _DetectionItems_.
|
||||||
-- * **DetectionItems** is the list of detected target groupings by the _DetectionObject_. Each _DetectionItem_ contains a _TargetSet_.
|
-- * **TargetGroups** is the list of detected target groupings by the _DetectionObject_. Each _TargetGroup_ contains a _TargetSet_.
|
||||||
-- * **DetectionItem** is one element of the _DetectionItems_ list, and contains a _TargetSet_.
|
-- * **TargetGroup** is one element of the __TargetGroups__ list, and contains a _TargetSet_.
|
||||||
-- * The **TargetSet** is a SET_UNITS collection of _Targets_, that have been detected by the _DetectionObject_.
|
-- * The **TargetSet** is a SET_UNITS collection of _Targets_, that have been detected by the _DetectionObject_.
|
||||||
-- * A **Target** is a detected UNIT object by the _DetectionObject_.
|
-- * A **Target** is a detected UNIT object by the _DetectionObject_.
|
||||||
-- * A **Threat Level** is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
|
-- * A **Threat Level** is a number from 0 to 10 that is calculated based on the threat of the Target in an Air to Ground battle scenario.
|
||||||
@ -67,39 +64,122 @@ do -- DESIGNATE
|
|||||||
-- * A **Player** is an active CLIENT object containing a human player.
|
-- * A **Player** is an active CLIENT object containing a human player.
|
||||||
-- * A **Designate Menu** is the menu that is dynamically created during the designation process for each _AttackGroup_.
|
-- * A **Designate Menu** is the menu that is dynamically created during the designation process for each _AttackGroup_.
|
||||||
--
|
--
|
||||||
-- The RecceSet is continuously detecting for potential Targets, executing its task as part of the DetectionObject.
|
-- ## 0. Player Manual
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- A typical mission setup would require Recce (a @{Set} of Recce) to be detecting potential targets.
|
||||||
|
-- The DetectionObject will group the detected targets based on the detection method being used.
|
||||||
|
-- Possible detection methods could be by Area, by Type or by Unit.
|
||||||
|
-- Each grouping will result in a **TargetGroup**, for terminology and clarity we will use this term throughout the document.
|
||||||
|
--
|
||||||
|
-- **Recce** require to have Line of Sight (LOS) towards the targets.
|
||||||
|
-- The **Recce** will report any detected targets to the Players (on the picture Observers).
|
||||||
|
-- When targets are detected, a menu will be made available that allows those **TargetGroups** to be designated.
|
||||||
|
-- Designation can be done by Lasing, Smoking and Illumination.
|
||||||
|
-- Smoking is useful during the day, while illumination is recommended to be used during the night.
|
||||||
|
-- Smoking can designate specific targets, but not very precise, while lasing is very accurate and allows to
|
||||||
|
-- players to attack the targets using laser guided bombs or rockets.
|
||||||
|
-- Illumination will lighten up the Target Area.
|
||||||
|
--
|
||||||
|
-- **Recce** can be ground based or airborne. Airborne **Recce** (AFAC) can be really useful to designate a large amount of targets
|
||||||
|
-- in a wide open area, as airborne **Recce** has a large LOS.
|
||||||
|
-- However, ground based **Recce** are very useful to smoke or illuminate targets, as they can be much closer
|
||||||
|
-- to the Target Area.
|
||||||
|
--
|
||||||
|
-- It is recommended to make the **Recce** invisible and immortal using the Mission Editor in DCS World.
|
||||||
|
-- This will ensure that the detection process won't be interrupted and that targets can be designated.
|
||||||
|
-- However, you don't have to, so to simulate a more real-word situation or simulation, **Recce can also be destroyed**!
|
||||||
|
--
|
||||||
|
-- ### 0.1. Player View (Observer)
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- The RecceSet is continuously detecting for potential Targets,
|
||||||
|
-- executing its task as part of the DetectionObject.
|
||||||
-- Once Targets have been detected, the DesignateObject will trigger the **Detect Event**.
|
-- Once Targets have been detected, the DesignateObject will trigger the **Detect Event**.
|
||||||
--
|
--
|
||||||
-- In order to prevent an overflow in the DesignateObject of detected targets, there is a maximum
|
-- In order to prevent an overflow in the DesignateObject of detected targets,
|
||||||
-- amount of DetectionItems that can be put in **scope** of the DesignateObject.
|
-- there is a maximum amount of TargetGroups
|
||||||
|
-- that can be put in **scope** of the DesignateObject.
|
||||||
-- We call this the **MaximumDesignations** term.
|
-- We call this the **MaximumDesignations** term.
|
||||||
--
|
--
|
||||||
-- As part of the Detect Event, the DetectionItems list is used by the DesignateObject to provide the Players with:
|
-- ### 0.2. Designate Menu
|
||||||
--
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- For each detected TargetGroup, there is:
|
||||||
|
--
|
||||||
|
-- * A **Designate Menu** are created and continuously refreshed, containing the **DesignationID** and the **Designation Status**.
|
||||||
-- * The RecceGroups are reporting to each AttackGroup, sending **Messages** containing the Threat Level and the TargetSet composition.
|
-- * The RecceGroups are reporting to each AttackGroup, sending **Messages** containing the Threat Level and the TargetSet composition.
|
||||||
-- * **Menu options** are created and updated for each AttackGroup, containing the Detection ID and the Coordinates.
|
|
||||||
--
|
--
|
||||||
-- A Player can then select an action from the Designate Menu.
|
-- A Player can then select an action from the **Designate Menu**.
|
||||||
|
-- The Designation Status is shown between the ( ).
|
||||||
--
|
--
|
||||||
-- **Note that each selected action will be executed for a TargetSet, thus the Target grouping done by the DetectionObject.**
|
-- It indicates for each TargetGroup the current active designation action applied:
|
||||||
--
|
--
|
||||||
-- Each **Menu Option** in the Designate Menu has two modes:
|
-- * An "I" for Illumnation designation.
|
||||||
|
-- * An "S" for Smoking designation.
|
||||||
|
-- * An "L" for Lasing designation.
|
||||||
--
|
--
|
||||||
-- 1. If the TargetSet **is not being designated**, then the **Designate Menu** option for the target Set will provide options to **Lase** or **Smoke** the targets.
|
-- Note that multiple designation methods can be active at the same time!
|
||||||
-- 2. If the Target Set **is being designated**, then the **Designate Menu** option will provide an option to stop or cancel the designation.
|
-- Note the **Auto Lase** option. When switched on, the available **Recce** will lase
|
||||||
|
-- Targets when detected.
|
||||||
--
|
--
|
||||||
-- While designating, the RecceGroups will report any change in TargetSet composition or Target presence.
|
-- Targets are designated per **Threat Level**.
|
||||||
|
-- The most threatening targets from an Air to Ground perspective, are designated first!
|
||||||
|
-- This is for all designation methods.
|
||||||
--
|
--
|
||||||
-- The following logic is executed when a TargetSet is selected to be *lased* from the Designation Menu:
|
-- 
|
||||||
--
|
--
|
||||||
-- * The RecceSet is searched for any Recce that is within *designation distance* from a Target in the TargetSet that is currently not being designated.
|
-- Each Designate Menu has a sub menu structure, which allows specific actions to be triggered:
|
||||||
|
--
|
||||||
|
-- * Lase Targets using a specific laser code.
|
||||||
|
-- * Smoke Targets using a specific smoke color.
|
||||||
|
-- * Illuminate areas.
|
||||||
|
--
|
||||||
|
-- ### 0.3. Lasing Targets
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- Lasing targets is done as expected. Each available Recce can lase only ONE target through!
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- Lasing can be done for specific laser codes. The Su-25T requires laser code 1113, while the A-10A requires laser code 1680.
|
||||||
|
-- For those, specific menu options can be made available for players to lase with these codes.
|
||||||
|
-- Auto Lase (as explained above), will ensure continuous lasing of available targets.
|
||||||
|
-- The status report shows which targets are being designated.
|
||||||
|
--
|
||||||
|
-- The following logic is executed when a TargetGroup is selected to be *lased* from the Designation Menu:
|
||||||
|
--
|
||||||
|
-- * The RecceSet is searched for any Recce that is within *designation distance* from a Target in the TargetGroup that is currently not being designated.
|
||||||
-- * If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated.
|
-- * If there is a Recce found that is currently no designating a target, and is within designation distance from the Target, then that Target will be designated.
|
||||||
-- * During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given.
|
-- * During designation, any Recce that does not have Line of Sight (LOS) and is not within disignation distance from the Target, will stop designating the Target, and a report is given.
|
||||||
-- * When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event.
|
-- * When a Recce is designating a Target, and that Target is destroyed, then the Recce will stop designating the Target, and will report the event.
|
||||||
-- * When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting.
|
-- * When a Recce is designating a Target, and that Recce is destroyed, then the Recce will be removed from the RecceSet and designation will stop without reporting.
|
||||||
-- * When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported.
|
-- * When all RecceGroups are destroyed from the RecceSet, then the DesignationObject will stop functioning, and nothing will be reported.
|
||||||
--
|
--
|
||||||
-- In this way, the DesignationObject assists players to designate ground targets for a coordinated attack!
|
-- In this way, DESIGNATE assists players to designate ground targets for a coordinated attack!
|
||||||
|
--
|
||||||
|
-- ### 0.4. Illuminating Targets
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- Illumination bombs are fired between 500 and 700 meters altitude and will burn about 2 minutes, while slowly decending.
|
||||||
|
-- Each available recce within range will fire an illumination bomb.
|
||||||
|
-- Illumination bombs can be fired in while lasing targets.
|
||||||
|
-- When illumination bombs are fired, it will take about 2 minutes until a sequent bomb run can be requested using the menus.
|
||||||
|
--
|
||||||
|
-- ### 0.5. Smoking Targets
|
||||||
|
--
|
||||||
|
-- 
|
||||||
|
--
|
||||||
|
-- Smoke will fire for 5 minutes.
|
||||||
|
-- Each available recce within range will smoke a target.
|
||||||
|
-- Smoking can be requested while lasing targets.
|
||||||
|
-- Smoke will appear “around” the targets, because of accuracy limitations.
|
||||||
|
--
|
||||||
--
|
--
|
||||||
-- Have FUN!
|
-- Have FUN!
|
||||||
--
|
--
|
||||||
@ -109,7 +189,7 @@ do -- DESIGNATE
|
|||||||
--
|
--
|
||||||
-- ## 2. DESIGNATE is a FSM
|
-- ## 2. DESIGNATE is a FSM
|
||||||
--
|
--
|
||||||
-- 
|
-- Designate is a finite state machine, which allows for controlled transitions of states.
|
||||||
--
|
--
|
||||||
-- ### 2.1 DESIGNATE States
|
-- ### 2.1 DESIGNATE States
|
||||||
--
|
--
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -7,7 +7,7 @@ __Moose = {}
|
|||||||
__Moose.Include = function( IncludeFile )
|
__Moose.Include = function( IncludeFile )
|
||||||
if not __Moose.Includes[ IncludeFile ] then
|
if not __Moose.Includes[ IncludeFile ] then
|
||||||
__Moose.Includes[IncludeFile] = IncludeFile
|
__Moose.Includes[IncludeFile] = IncludeFile
|
||||||
local f = assert( base.loadfile( __Moose.ProgramPath .. IncludeFile ) )
|
local f = assert( base.loadfile( IncludeFile ) )
|
||||||
if f == nil then
|
if f == nil then
|
||||||
error ("Moose: Could not load Moose file " .. IncludeFile )
|
error ("Moose: Could not load Moose file " .. IncludeFile )
|
||||||
else
|
else
|
||||||
@ -17,6 +17,4 @@ __Moose.Include = function( IncludeFile )
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
__Moose.ProgramPath = "Scripts/Moose/"
|
|
||||||
|
|
||||||
__Moose.Includes = {}
|
__Moose.Includes = {}
|
||||||
|
|||||||
@ -47,7 +47,7 @@ while( MooseSource ) do
|
|||||||
local MooseFilePath = MooseDevelopmentPath .. "/" .. MooseSource
|
local MooseFilePath = MooseDevelopmentPath .. "/" .. MooseSource
|
||||||
if MooseDynamicStatic == "D" then
|
if MooseDynamicStatic == "D" then
|
||||||
print( "Load dynamic: " .. MooseSource )
|
print( "Load dynamic: " .. MooseSource )
|
||||||
MooseFile:write( "__Moose.Include( '" .. MooseSource .. "' )\n" )
|
MooseFile:write( "__Moose.Include( 'Scripts/Moose/" .. MooseSource .. "' )\n" )
|
||||||
end
|
end
|
||||||
if MooseDynamicStatic == "S" then
|
if MooseDynamicStatic == "S" then
|
||||||
print( "Load static: " .. MooseSource )
|
print( "Load static: " .. MooseSource )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user