Compare commits

...

59 Commits

Author SHA1 Message Date
Frank
28ae63bd8d Update Airboss.lua 2025-06-23 22:39:52 +02:00
Frank
42e7e3f94f Update Airboss.lua 2025-06-23 22:28:48 +02:00
Frank
24b47b02e0 AIRBOSS
- Essex
- Corsair
2025-06-22 22:29:52 +02:00
Applevangelist
cbcc893ce5 #CTLD - avoid smoking runways on airbase zones 2025-06-15 17:01:58 +02:00
Applevangelist
382b049c5f #AIRBASE - Syria and Sinai few names corrected 2025-06-15 15:38:12 +02:00
Thomas
a53763221c Update Airbase.lua
Correct afb name gor Borg al arab on Sinai
2025-06-15 13:14:05 +02:00
Thomas
b7bac28113 Merge pull request #2313 from FlightControl-Master/Applevangelist-patch-1
Update CSAR.lua
2025-06-15 10:18:01 +02:00
Thomas
a9edb16554 Update CSAR.lua
Make static and zone mash SETs dynamic
2025-06-15 10:17:32 +02:00
Applevangelist
0aeb1fc6af #UTILS - Small fix for GetReportingName to distinguish Shark from Mainstay 2025-06-10 18:05:02 +02:00
Applevangelist
eeeeda4e5e #POINT - Offset options for smoke 2025-06-08 18:43:01 +02:00
Applevangelist
f5881eda53 AIRBOSS - Remove useless E Messages for non-debug 2025-06-01 12:19:42 +02:00
Thomas
c1997d9f70 Merge pull request #2311 from FlightControl-Master/Applevangelist-patch-1
Update CSAR.lua
2025-05-30 18:37:50 +02:00
Thomas
bb1caa6642 Update CSAR.lua 2025-05-30 18:37:38 +02:00
Applevangelist
dd5ca93f26 CSAR Small addition 2025-05-30 11:13:50 +02:00
Thomas
1889df4952 Merge pull request #2308 from shaji-Dev/master
[FIXED] Velocity is taking into account dead units for GROUP
2025-05-25 09:12:04 +02:00
shaji
7ca219748d [FIXED] Velocity is taking into account dead units for GROUP 2025-05-24 19:46:20 +02:00
Applevangelist
2fc16ba694 Runway text duplication 2025-05-24 15:53:43 +02:00
Applevangelist
a4feafab8e #POINT - improved IsDay() for Kola 2025-05-21 10:21:48 +02:00
Applevangelist
997baf21a0 #CSAR fix for ADF beacons 2025-05-21 10:04:58 +02:00
Applevangelist
b126cc00d0 xx 2025-05-16 13:43:03 +02:00
Applevangelist
09b7922b84 Small fixes 2025-05-16 11:58:40 +02:00
Applevangelist
7a5b9a75f3 #AIRBASE - added Syria Marka AFB 2025-05-15 17:07:55 +02:00
Applevangelist
4bab2ee1de Add deprecated banner 2025-05-15 13:19:42 +02:00
Applevangelist
d7defe6f7f xx 2025-05-15 11:42:05 +02:00
Applevangelist
db869bcb6d #MANTIS - Make DLINK caching (DEV version) configureable 2025-05-15 08:51:30 +02:00
Thomas
ea4a1f9ff9 Merge pull request #2305 from shaji-Dev/master
[FIXED] Kola Airbase name "Alakourtti" to "Alakurtti"
2025-05-15 06:42:07 +02:00
shaji
20406e40ca [FIXED] Kola Airbase name "Alakourtti" to "Alakurtti" 2025-05-15 01:17:55 +02:00
Applevangelist
3b50fee5a0 #CTLD - extract troops, check for groupname in task properties of PLAYERTASKs, so the right people rescue the correct group 2025-05-12 17:50:37 +02:00
Applevangelist
804004198b #MANTIS - Update docu 2025-05-12 17:49:25 +02:00
Thomas
5b8b8a5566 Merge pull request #2303 from leka1986/master
Fix Line 77390: attempt to index local 'zonecoord' (a nil value)
2025-05-12 07:00:19 +02:00
leka1986
0468bacc0b Fix Line 77390: attempt to index local 'zonecoord' (a nil value) 2025-05-11 21:15:31 +02:00
Thomas
7eba1349ae Merge pull request #2301 from leka1986/master
VS Code pointed out some errors, like duplicated values in tables. This is first time I do changes through VS Code, Hope for the best
2025-05-04 10:47:28 +02:00
leka1986
b6074a4795 VS Code pointed out some errors, like duplicated values in tables. This is first time I do changes through VS Code, Hope for the best 2025-05-04 10:38:44 +02:00
Thomas
36c9f551d9 Merge pull request #2299 from leka1986/patch-3
Update CTLD.lua
2025-05-03 20:32:40 +02:00
leka1986
89c3f7310b Update CTLD.lua
Changed the naming from Get only to Get

and the order is Get, Get and load
Instead of Get and load, and Get only.

Changed the order on Pack and load, Pack and remove, pack only to 
Pack, Pack and load, Pack and remove.

Same goes for Drop and build, Drop only to Drop, Drop and build.

It purely subjective what one would like, so I leave it up to you. If you like it this way or the first version, you decide, then disregard this change.
2025-05-03 19:22:59 +02:00
Applevangelist
a6b622ed31 #CTLD - Additional features by Lekaa to drop and build one/many in one go and pack/load or get/load in one go 2025-05-03 17:01:02 +02:00
Frank
f1af3a50b8 Update Unit.lua
- GetAmmo HE shells can also be named "HESH"
2025-05-02 21:36:03 +02:00
Applevangelist
0c90e90c18 #CSAR - fixed design issue that prevented usage of ZONE objects as MASHes 2025-05-02 10:53:02 +02:00
Frank
f97ef25104 Update Unit.lua 2025-05-01 22:11:43 +02:00
Thomas
069c0aa03f Merge pull request #2297 from FlightControl-Master/Applevangelist-patch-1
Update CTLD.lua
2025-04-28 09:20:58 +02:00
Thomas
b145588ed5 Update CTLD.lua
Fix an issue when a ship is used as loading zone and the ship is destroyed
2025-04-28 09:20:04 +02:00
Applevangelist
3ad60a95ce #MANTIS - Adde Gepard data, made Roland Short 2025-04-27 11:25:46 +02:00
Frank
ac4b620f16 COORDINATE
- Improved Smoke and Fire and Smoke functions by adding delay and duration parameters
2025-04-26 23:39:22 +02:00
Thomas
ccada18a6a Merge pull request #2295 from leka1986/patch-2
Update CTLD.lua
2025-04-26 07:52:01 +02:00
leka1986
1547d66327 Update CTLD.lua
Getting rid of this error,
bad argument #1 to 'find' (string expected, got nil)
2025-04-26 03:28:16 +02:00
Thomas
8042e8bfaf Merge pull request #2293 from shaji-Dev/master
[ADDED] AIRBOSS:SetMaxSectionDistance
2025-04-23 14:21:31 +02:00
shaji
dd7b87e9cd [ADDED] AIRBOSS:SetMaxSectionDistance 2025-04-23 13:39:55 +02:00
Thomas
460d2768ff Merge pull request #2291 from FlightControl-Master/Applevangelist-patch-1
Update Range.lua
2025-04-23 09:03:54 +02:00
Thomas
3c74272749 Update Range.lua
#RANGE log an error if os/os.date() are not available
2025-04-23 09:00:05 +02:00
Thomas
82c409d77a Merge pull request #2289 from shaji-Dev/master
[ADDED] IsAlive condition for Unit and Group out message
2025-04-23 06:28:13 +02:00
shaji
195aac4504 [ADDED] IsAlive condition for Unit and Group out message 2025-04-22 20:57:06 +02:00
Thomas
08d8f3e25f Merge pull request #2285 from shaji-Dev/master
[ADDED] New Kola airbases
2025-04-21 19:37:22 +02:00
shaji
6f72697e26 [ADDED] New Kola airbases
-- * AIRBASE.Kola.Alta
-- * AIRBASE.Kola.Sodankyla
-- * AIRBASE.Kola.Enontekio
-- * AIRBASE.Kola.Evenes
-- * AIRBASE.Kola.Hosio
2025-04-21 19:11:22 +02:00
Applevangelist
0f6439cf9f #MANTIS - added C-RAM Point Defense 2025-04-20 17:49:25 +02:00
Frank
2c10943cb1 Update Airbase.lua
Germany map Umlaute
2025-04-18 17:50:01 +02:00
Frank
544db963ea Update Airbase.lua 2025-04-18 17:45:43 +02:00
Frank
207698a2dd Update Airbase.lua
- Germany map readded Umlaute in keys
2025-04-18 17:40:55 +02:00
Applevangelist
d1ae2c0f5e xx 2025-04-18 16:01:55 +02:00
Applevangelist
0392417189 Germany CW Bases 2025-04-18 14:46:13 +02:00
77 changed files with 1517 additions and 787 deletions

View File

@@ -1953,7 +1953,7 @@ local function refct_from_id(id) -- refct = refct_from_id(CTypeID)
unsigned = refct.unsigned,
size = bit.band(bit.rshift(ctype.info, 16), 127),
}
refct.bool, refct.const, refct.volatile, refct.unsigned = nil
refct.bool, refct.const, refct.volatile, refct.unsigned = nil, nil, nil, nil
end
if CT[4] then -- Merge sibling attributes onto this type.

View File

@@ -17,7 +17,9 @@
--- The AI_A2A_CAP class implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group} or @{Wrapper.Group}
-- and automatically engage any airborne enemies that are within a certain range or within a certain zone.
--
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ![Process](..\Presentations\AI_CAP\Dia3.JPG)
--
-- The AI_A2A_CAP is assigned a @{Wrapper.Group} and this must be done before the AI_A2A_CAP process can be started using the **Start** event.

View File

@@ -32,7 +32,9 @@
-- [DCS WORLD - MOOSE - A2A GCICAP - Build an automatic A2A Defense System](https://www.youtube.com/playlist?list=PL7ZUrU4zZUl0S4KMNUUJpaUs6zZHjLKNx)
--
-- ===
--
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # QUICK START GUIDE
--
-- There are basically two classes available to model an A2A defense system.

View File

@@ -19,6 +19,8 @@
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The AI_A2A_GCI is assigned a @{Wrapper.Group} and this must be done before the AI_A2A_GCI process can be started using the **Start** event.
--
-- The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.

View File

@@ -15,6 +15,8 @@
--- Implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group} or @{Wrapper.Group}.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ![Process](..\Presentations\AI_PATROL\Dia3.JPG)
--
-- The AI_A2A_PATROL is assigned a @{Wrapper.Group} and this must be done before the AI_A2A_PATROL process can be started using the **Start** event.

View File

@@ -16,7 +16,9 @@
-- @extends AI.AI_Air_Engage#AI_AIR_ENGAGE
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
--
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE

View File

@@ -19,6 +19,8 @@
--
-- # Developer Note
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--

View File

@@ -36,6 +36,8 @@
--
-- # QUICK START GUIDE
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The following class is available to model an A2G defense system.
--
-- AI_A2G_DISPATCHER is the main A2G defense class that models the A2G defense system.

View File

@@ -20,6 +20,8 @@
--- Implements the core functions to SEAD intruders. Use the Engage trigger to intercept intruders.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The AI_A2G_SEAD is assigned a @{Wrapper.Group} and this must be done before the AI_A2G_SEAD process can be started using the **Start** event.
--
-- The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.

View File

@@ -15,6 +15,7 @@
--- The AI_AIR class implements the core functions to operate an AI @{Wrapper.Group}.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # 1) AI_AIR constructor
--

View File

@@ -36,6 +36,8 @@
--
-- # QUICK START GUIDE
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The following class is available to model an AIR defense system.
--
-- AI_AIR_DISPATCHER is the main AIR defense class that models the AIR defense system.

View File

@@ -13,12 +13,14 @@
-- @type AI_AIR_ENGAGE
--- @type AI_AIR_ENGAGE
-- @extends AI.AI_AIR#AI_AIR
--- Implements the core functions to intercept intruders. Use the Engage trigger to intercept intruders.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The AI_AIR_ENGAGE is assigned a @{Wrapper.Group} and this must be done before the AI_AIR_ENGAGE process can be started using the **Start** event.
--
-- The AI will fly towards the random 3D point within the patrol zone, using a random speed within the given altitude and speed limits.

View File

@@ -15,6 +15,8 @@
--- The AI_AIR_PATROL class implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Group}
-- and automatically engage any airborne enemies that are within a certain range or within a certain zone.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ![Process](..\Presentations\AI_CAP\Dia3.JPG)
--
-- The AI_AIR_PATROL is assigned a @{Wrapper.Group} and this must be done before the AI_AIR_PATROL process can be started using the **Start** event.

View File

@@ -13,7 +13,7 @@
-- @type AI_AIR_SQUADRON
--- @type AI_AIR_SQUADRON
-- @extends Core.Base#BASE
@@ -21,6 +21,8 @@
--
-- # Developer Note
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--

View File

@@ -38,6 +38,8 @@
--- Implements the core functions to provide BattleGround Air Interdiction in an Engage @{Core.Zone} by an AIR @{Wrapper.Controllable} or @{Wrapper.Group}.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The AI_BAI_ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.
--
-- ![HoldAndEngage](..\Presentations\AI_BAI\Dia3.JPG)

View File

@@ -33,8 +33,9 @@
-- @field Wrapper.Group#GROUP Test
-- @extends Core.Fsm#FSM_SET
--- Monitors and manages as many replacement AI groups as there are
--- ![Banner Image](..\Images\deprecated.png)
--
-- Monitors and manages as many replacement AI groups as there are
-- CLIENTS in a SET\_CLIENT collection, which are not occupied by human players.
-- In other words, use AI_BALANCER to simulate human behaviour by spawning in replacement AI in multi player missions.
--

View File

@@ -39,6 +39,8 @@
--- Implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Controllable} or @{Wrapper.Group}
-- and automatically engage any airborne enemies that are within a certain range or within a certain zone.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ![Process](..\Presentations\AI_CAP\Dia3.JPG)
--
-- The AI_CAP_ZONE is assigned a @{Wrapper.Group} and this must be done before the AI_CAP_ZONE process can be started using the **Start** event.

View File

@@ -38,6 +38,9 @@
-- @extends AI.AI_Patrol#AI_PATROL_ZONE
--- Implements the core functions to provide Close Air Support in an Engage @{Core.Zone} by an AIR @{Wrapper.Controllable} or @{Wrapper.Group}.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The AI_CAS_ZONE runs a process. It holds an AI in a Patrol Zone and when the AI is commanded to engage, it will fly to an Engage Zone.
--
-- ![HoldAndEngage](..\Presentations\AI_CAS\Dia3.JPG)

View File

@@ -9,12 +9,14 @@
-- @module AI.AI_Cargo
-- @image Cargo.JPG
-- @type AI_CARGO
--- @type AI_CARGO
-- @extends Core.Fsm#FSM_CONTROLLABLE
--- Base class for the dynamic cargo handling capability for AI groups.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Carriers can be mobilized to intelligently transport infantry and other cargo within the simulation.
-- The AI_CARGO module uses the @{Cargo.Cargo} capabilities within the MOOSE framework.
-- CARGO derived objects must be declared within the mission to make the AI_CARGO object recognize the cargo.

View File

@@ -15,6 +15,8 @@
--- Brings a dynamic cargo handling capability for an AI vehicle group.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Armoured Personnel Carriers (APC), Trucks, Jeeps and other ground based carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation.
--
-- The AI_CARGO_APC class uses the @{Cargo.Cargo} capabilities within the MOOSE framework.

View File

@@ -14,6 +14,8 @@
--- Brings a dynamic cargo handling capability for an AI airplane group.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Airplane carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation between airbases.
--

View File

@@ -22,6 +22,8 @@
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # The dispatcher concept.
--
-- Carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation.

View File

@@ -36,6 +36,8 @@
--- A dynamic cargo transportation capability for AI groups.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Armoured Personnel APCs (APC), Trucks, Jeeps and other carrier equipment can be mobilized to intelligently transport infantry and other cargo within the simulation.
--
-- The AI_CARGO_DISPATCHER_APC module is derived from the AI_CARGO_DISPATCHER module.

View File

@@ -30,6 +30,8 @@
--- Brings a dynamic cargo handling capability for AI groups.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Airplanes can be mobilized to intelligently transport infantry and other cargo within the simulation.
--
-- The AI_CARGO_DISPATCHER_AIRPLANE module is derived from the AI_CARGO_DISPATCHER module.

View File

@@ -31,6 +31,8 @@
--- A dynamic cargo handling capability for AI helicopter groups.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Helicopters can be mobilized to intelligently transport infantry and other cargo within the simulation.
--
--

View File

@@ -29,6 +29,8 @@
--- A dynamic cargo transportation capability for AI groups.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Naval vessels can be mobilized to semi-intelligently transport cargo within the simulation.
--
-- The AI_CARGO_DISPATCHER_SHIP module is derived from the AI_CARGO_DISPATCHER module.

View File

@@ -15,6 +15,8 @@
--- Brings a dynamic cargo handling capability for an AI helicopter group.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Helicopter carriers can be mobilized to intelligently transport infantry and other cargo within the simulation.
--
-- The AI_CARGO_HELICOPTER class uses the @{Cargo.Cargo} capabilities within the MOOSE framework.

View File

@@ -14,6 +14,8 @@
--- Brings a dynamic cargo handling capability for an AI naval group.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Naval ships can be utilized to transport cargo around the map following naval shipping lanes.
-- The AI_CARGO_SHIP class uses the @{Cargo.Cargo} capabilities within the MOOSE framework.
-- @{Cargo.Cargo} must be declared within the mission or warehouse to make the AI_CARGO_SHIP recognize the cargo.

View File

@@ -25,6 +25,8 @@
--
-- Allows you to interact with escorting AI on your flight and take the lead.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Each escorting group can be commanded with a complete set of radio commands (radio menu in your flight, and then F10).
--
-- The radio commands will vary according the category of the group. The richest set of commands are with helicopters and airPlanes.

View File

@@ -23,6 +23,8 @@
--
-- # Developer Note
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--

View File

@@ -21,6 +21,8 @@
--- Models the assignment of AI escorts to player flights upon request using the radio menu.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # Developer Note
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE

View File

@@ -25,6 +25,8 @@
--
-- Allows you to interact with escorting AI on your flight and take the lead.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Each escorting group can be commanded with a complete set of radio commands (radio menu in your flight, and then F10).
--
-- The radio commands will vary according the category of the group. The richest set of commands are with helicopters and airPlanes.

View File

@@ -40,6 +40,8 @@
--- Build large formations, make AI follow a @{Wrapper.Client#CLIENT} (player) leader or a @{Wrapper.Unit#UNIT} (AI) leader.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- AI_FORMATION makes AI @{Wrapper.Group#GROUP}s fly in formation of various compositions.
-- The AI_FORMATION class models formations in a different manner than the internal DCS formation logic!!!
@@ -158,7 +160,6 @@ AI_FORMATION.__Enum.Mode = {
-- @field #number GroundRadar
-- @field #number Ground
AI_FORMATION.__Enum.ReportType = {
Airborne = "*",
Airborne = "A",
GroundRadar = "R",
Ground = "G",
@@ -1222,7 +1223,6 @@ function AI_FORMATION:FollowMe(FollowGroup, ClientUnit, CT1, CV1, CT2, CV2)
local CVI = {
x = CV2.x + CS * 10 * math.sin(Ca),
y = GH2.y + Inclination, -- + FollowFormation.y,
y = GH2.y,
z = CV2.z + CS * 10 * math.cos(Ca),
}

View File

@@ -48,6 +48,8 @@
--- Implements the core functions to patrol a @{Core.Zone} by an AI @{Wrapper.Controllable} or @{Wrapper.Group}.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ![Process](..\Presentations\AI_PATROL\Dia3.JPG)
--
-- The AI_PATROL_ZONE is assigned a @{Wrapper.Group} and this must be done before the AI_PATROL_ZONE process can be started using the **Start** event.

View File

@@ -1,6 +1,6 @@
--- **Actions** - ACT_ACCOUNT_ classes **account for** (detect, count & report) various DCS events occurring on UNITs.
--
-- ![Banner Image](..\Presentations\ACT_ACCOUNT\Dia1.JPG)
-- ![Banner Image](..\Images\deprecated.png)
--
-- ===
--
@@ -8,9 +8,11 @@
-- @image MOOSE.JPG
do -- ACT_ACCOUNT
--- # @{#ACT_ACCOUNT} FSM class, extends @{Core.Fsm#FSM_PROCESS}
--
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ## ACT_ACCOUNT state machine:
--
-- This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.
@@ -133,7 +135,7 @@ do -- ACT_ACCOUNT
-- @param #string Event
-- @param #string From
-- @param #string To
function ACT_ACCOUNT:onafterEvent( ProcessUnit, From, Event, To, Event )
function ACT_ACCOUNT:onafterEvent( ProcessUnit, From, Event, To )
self:__NoMore( 1 )
end

View File

@@ -1,6 +1,8 @@
--- (SP) (MP) (FSM) Accept or reject process for player (task) assignments.
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # @{#ACT_ASSIGN} FSM template class, extends @{Core.Fsm#FSM_PROCESS}
--

View File

@@ -1,5 +1,6 @@
--- (SP) (MP) (FSM) Route AI or players through waypoints or to zones.
--
-- ![Banner Image](..\Images\deprecated.png)
-- ## ACT_ASSIST state machine:
--
-- This class is a state machine: it manages a process that is triggered by events causing state transitions to occur.

View File

@@ -2,6 +2,8 @@
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # @{#ACT_ROUTE} FSM class, extends @{Core.Fsm#FSM_PROCESS}
--
-- ## ACT_ROUTE state machine:

View File

@@ -2,6 +2,8 @@
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # 1) MOOSE Cargo System.
--
-- #### Those who have used the mission editor, know that the DCS mission editor provides cargo facilities.

View File

@@ -22,6 +22,9 @@ do -- CARGO_CRATE
-- @type CARGO_CRATE
-- @extends Cargo.Cargo#CARGO_REPRESENTABLE
---
-- ![Banner Image](..\Images\deprecated.png)
--
--- Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.
-- Use the event functions as described above to Load, UnLoad, Board, UnBoard the CARGO\_CRATE objects to and from carriers.
--

View File

@@ -26,6 +26,8 @@ do -- CARGO_GROUP
-- @extends Cargo.Cargo#CARGO_REPORTABLE
--- Defines a cargo that is represented by a @{Wrapper.Group} object within the simulator.
--
-- ![Banner Image](..\Images\deprecated.png)
-- The cargo can be Loaded, UnLoaded, Boarded, UnBoarded to and from Carriers.
--
-- The above cargo classes are used by the following AI_CARGO_ classes to allow AI groups to transport cargo:

View File

@@ -32,6 +32,8 @@ do -- CARGO_SLINGLOAD
--
-- # Developer Note
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--

View File

@@ -30,6 +30,8 @@ do -- CARGO_UNIT
--
-- # Developer Note
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--

View File

@@ -974,7 +974,7 @@ do -- Scheduling
-- @param #BASE self
-- @param #number Start Specifies the amount of seconds that will be waited before the scheduling is started, and the event function is called.
-- @param #function SchedulerFunction The event function to be called when a timer event occurs. The event function needs to accept the parameters specified in SchedulerArguments.
-- @param #table ... Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
-- @param ... Optional arguments that can be given as part of scheduler. The arguments need to be given as a table { param1, param 2, ... }.
-- @return #string The Schedule ID of the planned schedule.
function BASE:ScheduleOnce( Start, SchedulerFunction, ... )

View File

@@ -872,6 +872,8 @@ end
-- @return Wrapper.Group#GROUP The found GROUP.
function DATABASE:FindGroup( GroupName )
if type(GroupName) ~= "string" or GroupName == "" then return end
local GroupFound = self.GROUPS[GroupName]
if GroupFound == nil and GroupName ~= nil and self.Templates.Groups[GroupName] == nil then
@@ -1697,7 +1699,7 @@ function DATABASE:_EventOnBirth( Event )
if PlayerName then
-- Debug info.
self:I(string.format("Player '%s' joined unit '%s' of group '%s'", tostring(PlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniDCSGroupName)))
self:I(string.format("Player '%s' joined unit '%s' (%s) of group '%s'", tostring(PlayerName), tostring(Event.IniDCSUnitName), tostring(Event.IniTypeName), tostring(Event.IniDCSGroupName)))
-- Add client in case it does not exist already.
if client == nil or (client and client:CountPlayers() == 0) then

View File

@@ -206,7 +206,7 @@ end
function MESSAGE:ToGroup( Group, Settings )
self:F( Group.GroupName )
if Group then
if Group and Group:IsAlive() then
if self.MessageType then
local Settings = Settings or (Group and _DATABASE:GetPlayerSettings( Group:GetPlayerName() )) or _SETTINGS -- Core.Settings#SETTINGS
@@ -231,7 +231,7 @@ end
function MESSAGE:ToUnit( Unit, Settings )
self:F( Unit.IdentifiableName )
if Unit then
if Unit and Unit:IsAlive() then
if self.MessageType then
local Settings = Settings or ( Unit and _DATABASE:GetPlayerSettings( Unit:GetPlayerName() ) ) or _SETTINGS -- Core.Settings#SETTINGS

View File

@@ -25,7 +25,7 @@
do -- COORDINATE
---
--- Coordinate class
-- @type COORDINATE
-- @field #string ClassName Name of the class
-- @field #number x Component of the 3D vector.
@@ -59,6 +59,10 @@ do -- COORDINATE
-- * @{#COORDINATE.SmokeOrange}(): To smoke the point in orange.
-- * @{#COORDINATE.SmokeWhite}(): To smoke the point in white.
-- * @{#COORDINATE.SmokeGreen}(): To smoke the point in green.
-- * @{#COORDINATE.SetSmokeOffsetDirection}(): To set an offset point direction for smoke.
-- * @{#COORDINATE.SetSmokeOffsetDistance}(): To set an offset point distance for smoke.
-- * @{#COORDINATE.SwitchSmokeOffsetOn}(): To set an offset point for smoke to on.
-- * @{#COORDINATE.SwitchSmokeOffsetOff}(): To set an offset point for smoke to off.
--
-- ## 2.2) Flare
--
@@ -2118,14 +2122,112 @@ do -- COORDINATE
end
--- Smokes the point in a color.
--- Create colored smoke the point. The smoke we last up to 5 min (DCS limitation) but you can optionally specify a shorter duration or stop it manually.
-- @param #COORDINATE self
-- @param Utilities.Utils#SMOKECOLOR SmokeColor
-- @param #string name (Optional) Name if you want to stop the smoke early (normal duration: 5mins)
function COORDINATE:Smoke( SmokeColor, name )
self:F2( { SmokeColor } )
self.firename = name or "Smoke-"..math.random(1,100000)
trigger.action.smoke( self:GetVec3(), SmokeColor, self.firename )
-- @param #number SmokeColor Color of smoke, e.g. `SMOKECOLOR.Green` for green smoke.
-- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min.
-- @param #number Delay (Optional) Delay before the smoke is started in seconds.
-- @param #string Name (Optional) Name if you want to stop the smoke early (normal duration: 5mins)
-- @param #boolean Offset (Optional) If true, offset the smokle a bit.
-- @param #number Direction (Optional) If Offset is true this is the direction of the offset, 1-359 (degrees). Default random.
-- @param #number Distance (Optional) If Offset is true this is the distance of the offset in meters. Default random 10-20.
-- @return #COORDINATE self
function COORDINATE:Smoke( SmokeColor, Duration, Delay, Name, Offset,Direction,Distance)
self:F2( { SmokeColor, Name, Duration, Delay, Offset } )
SmokeColor=SmokeColor or SMOKECOLOR.Green
if Delay and Delay>0 then
self:ScheduleOnce(Delay, COORDINATE.Smoke, self, SmokeColor, Duration, 0, Name, Direction,Distance)
else
-- Create a name which is used to stop the smoke manually
self.firename = Name or "Smoke-"..math.random(1,100000)
-- Create smoke
if Offset or self.SmokeOffset then
local Angle = Direction or self:GetSmokeOffsetDirection()
local Distance = Distance or self:GetSmokeOffsetDistance()
local newpos = self:Translate(Distance,Angle,true,false)
local newvec3 = newpos:GetVec3()
trigger.action.smoke( newvec3, SmokeColor, self.firename )
else
trigger.action.smoke( self:GetVec3(), SmokeColor, self.firename )
end
-- Stop smoke
if Duration and Duration>0 then
self:ScheduleOnce(Duration, COORDINATE.StopSmoke, self, self.firename )
end
end
return self
end
--- Get the offset direction when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #number Direction in degrees.
function COORDINATE:GetSmokeOffsetDirection()
local direction = self.SmokeOffsetDirection or math.random(1,359)
return direction
end
--- Set the offset direction when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @param #number Direction (Optional) This is the direction of the offset, 1-359 (degrees). Default random.
-- @return #COORDINATE self
function COORDINATE:SetSmokeOffsetDirection(Direction)
if self then
self.SmokeOffsetDirection = Direction or math.random(1,359)
return self
else
COORDINATE.SmokeOffsetDirection = Direction or math.random(1,359)
end
end
--- Get the offset distance when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #number Distance Distance in meters.
function COORDINATE:GetSmokeOffsetDistance()
local distance = self.SmokeOffsetDistance or math.random(10,20)
return distance
end
--- Set the offset distance when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @param #number Distance (Optional) This is the distance of the offset in meters. Default random 10-20.
-- @return #COORDINATE self
function COORDINATE:SetSmokeOffsetDistance(Distance)
if self then
self.SmokeOffsetDistance = Distance or math.random(10,20)
return self
else
COORDINATE.SmokeOffsetDistance = Distance or math.random(10,20)
end
end
--- Set the offset on when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #COORDINATE self
function COORDINATE:SwitchSmokeOffsetOn()
if self then
self.SmokeOffset = true
return self
else
COORDINATE.SmokeOffset = true
end
end
--- Set the offset off when using `COORDINATE:Smoke()`.
-- @param #COORDINATE self
-- @return #COORDINATE self
function COORDINATE:SwitchSmokeOffsetOff()
if self then
self.SmokeOffset = false
return self
else
COORDINATE.SmokeOffset = false
end
end
--- Stops smoking the point in a color.
@@ -2137,49 +2239,83 @@ do -- COORDINATE
--- Smoke the COORDINATE Green.
-- @param #COORDINATE self
function COORDINATE:SmokeGreen()
self:F2()
self:Smoke( SMOKECOLOR.Green )
-- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min.
-- @param #number Delay (Optional) Delay before the smoke is started in seconds.
-- @return #COORDINATE self
function COORDINATE:SmokeGreen(Duration, Delay)
self:Smoke( SMOKECOLOR.Green, Duration, Delay )
return self
end
--- Smoke the COORDINATE Red.
-- @param #COORDINATE self
function COORDINATE:SmokeRed()
self:F2()
self:Smoke( SMOKECOLOR.Red )
-- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min.
-- @param #number Delay (Optional) Delay before the smoke is started in seconds.
-- @return #COORDINATE self
function COORDINATE:SmokeRed(Duration, Delay)
self:Smoke( SMOKECOLOR.Red, Duration, Delay )
return self
end
--- Smoke the COORDINATE White.
-- @param #COORDINATE self
function COORDINATE:SmokeWhite()
self:F2()
self:Smoke( SMOKECOLOR.White )
-- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min.
-- @param #number Delay (Optional) Delay before the smoke is started in seconds.
-- @return #COORDINATE self
function COORDINATE:SmokeWhite(Duration, Delay)
self:Smoke( SMOKECOLOR.White, Duration, Delay )
return self
end
--- Smoke the COORDINATE Orange.
-- @param #COORDINATE self
function COORDINATE:SmokeOrange()
self:F2()
self:Smoke( SMOKECOLOR.Orange )
-- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min.
-- @param #number Delay (Optional) Delay before the smoke is started in seconds.
-- @return #COORDINATE self
function COORDINATE:SmokeOrange(Duration, Delay)
self:Smoke( SMOKECOLOR.Orange, Duration, Delay )
return self
end
--- Smoke the COORDINATE Blue.
-- @param #COORDINATE self
function COORDINATE:SmokeBlue()
self:F2()
self:Smoke( SMOKECOLOR.Blue )
-- @param #number Duration (Optional) Duration of the smoke in seconds. DCS stopps the smoke automatically after 5 min.
-- @param #number Delay (Optional) Delay before the smoke is started in seconds.
-- @return #COORDINATE self
function COORDINATE:SmokeBlue(Duration, Delay)
self:Smoke( SMOKECOLOR.Blue, Duration, Delay )
return self
end
--- Big smoke and fire at the coordinate.
-- @param #COORDINATE self
-- @param Utilities.Utils#BIGSMOKEPRESET preset Smoke preset (1=small smoke and fire, 2=medium smoke and fire, 3=large smoke and fire, 4=huge smoke and fire, 5=small smoke, 6=medium smoke, 7=large smoke, 8=huge smoke).
-- @param #number density (Optional) Smoke density. Number in [0,...,1]. Default 0.5.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeAndFire( preset, density, name )
self:F2( { preset=preset, density=density } )
density=density or 0.5
self.firename = name or "Fire-"..math.random(1,10000)
trigger.action.effectSmokeBig( self:GetVec3(), preset, density, self.firename )
-- @param #number Preset Smoke preset (1=small smoke and fire, 2=medium smoke and fire, 3=large smoke and fire, 4=huge smoke and fire, 5=small smoke, 6=medium smoke, 7=large smoke, 8=huge smoke).
-- @param #number Density (Optional) Smoke density. Number in [0,...,1]. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string Name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
-- @return #COORDINATE self
function COORDINATE:BigSmokeAndFire( Preset, Density, Duration, Delay, Name )
self:F2( { preset=Preset, density=Density } )
Preset=Preset or BIGSMOKEPRESET.SmallSmokeAndFire
Density=Density or 0.5
if Delay and Delay>0 then
self:ScheduleOnce(Delay, COORDINATE.BigSmokeAndFire, self, Preset, Density, Duration, 0, Name)
else
self.firename = Name or "Fire-"..math.random(1,10000)
trigger.action.effectSmokeBig( self:GetVec3(), Preset, Density, self.firename )
-- Stop smoke
if Duration and Duration>0 then
self:ScheduleOnce(Duration, COORDINATE.StopBigSmokeAndFire, self, self.firename )
end
end
return self
end
--- Stop big smoke and fire at the coordinate.
@@ -2192,82 +2328,98 @@ do -- COORDINATE
--- Small smoke and fire at the coordinate.
-- @param #COORDINATE self
-- @param #number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeAndFireSmall( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.SmallSmokeAndFire, density, name)
-- @param #number Density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string Name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
-- @return #COORDINATE self
function COORDINATE:BigSmokeAndFireSmall( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.SmallSmokeAndFire, Density, Duration, Delay, Name)
return self
end
--- Medium smoke and fire at the coordinate.
-- @param #COORDINATE self
-- @param #number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeAndFireMedium( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.MediumSmokeAndFire, density, name)
-- @return #COORDINATE self
function COORDINATE:BigSmokeAndFireMedium( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.MediumSmokeAndFire, Density, Duration, Delay, Name)
return self
end
--- Large smoke and fire at the coordinate.
-- @param #COORDINATE self
-- @param #number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeAndFireLarge( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.LargeSmokeAndFire, density, name)
-- @return #COORDINATE self
function COORDINATE:BigSmokeAndFireLarge( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.LargeSmokeAndFire, Density, Duration, Delay, Name)
return self
end
--- Huge smoke and fire at the coordinate.
-- @param #COORDINATE self
-- @param #number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeAndFireHuge( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.HugeSmokeAndFire, density, name)
-- @return #COORDINATE self
function COORDINATE:BigSmokeAndFireHuge( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.HugeSmokeAndFire, Density, Duration, Delay, Name)
return self
end
--- Small smoke at the coordinate.
-- @param #COORDINATE self
-- @param #number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeSmall( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.SmallSmoke, density, name)
-- @return #COORDINATE self
function COORDINATE:BigSmokeSmall( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.SmallSmoke, Density, Duration, Delay, Name)
return self
end
--- Medium smoke at the coordinate.
-- @param #COORDINATE self
-- @param number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeMedium( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.MediumSmoke, density, name)
-- @return #COORDINATE self
function COORDINATE:BigSmokeMedium( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.MediumSmoke, Density, Duration, Delay, Name)
return self
end
--- Large smoke at the coordinate.
-- @param #COORDINATE self
-- @param #number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeLarge( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.LargeSmoke, density,name)
-- @return #COORDINATE self
function COORDINATE:BigSmokeLarge( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.LargeSmoke, Density, Duration, Delay, Name)
return self
end
--- Huge smoke at the coordinate.
-- @param #COORDINATE self
-- @param #number density (Optional) Smoke density. Number between 0 and 1. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @param #number Delay (Optional) Delay before the smoke and fire is started in seconds.
-- @param #string name (Optional) Name of the fire to stop it later again if not using the same COORDINATE object. Defaults to "Fire-" plus a random 5-digit-number.
function COORDINATE:BigSmokeHuge( density, name )
self:F2( { density=density } )
density=density or 0.5
self:BigSmokeAndFire(BIGSMOKEPRESET.HugeSmoke, density,name)
-- @return #COORDINATE self
function COORDINATE:BigSmokeHuge( Density, Duration, Delay, Name )
self:BigSmokeAndFire(BIGSMOKEPRESET.HugeSmoke, Density, Duration, Delay, Name)
return self
end
--- Flares the point in a color.
@@ -2921,8 +3073,10 @@ do -- COORDINATE
local sunrise=UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, true, Tdiff)
local sunset=UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, false, Tdiff)
if sunrise == "N/R" then return false end
if sunrise == "N/S" then return true end
if type(sunrise) == "string" or type(sunset) == "string" then
if sunrise == "N/R" then return false end
if sunset == "N/S" then return true end
end
local time=UTILS.ClockToSeconds(clock)
@@ -2940,6 +3094,11 @@ do -- COORDINATE
-- Todays sun set in sec.
local sunset=self:GetSunset(true)
if type(sunrise) == "string" or type(sunset) == "string" then
if sunrise == "N/R" then return false end
if sunset == "N/S" then return true end
end
-- Seconds passed since midnight.
local time=UTILS.SecondsOfToday()

View File

@@ -198,7 +198,7 @@ end -- env
do -- radio
---@type radio
--@type radio
-- @field #radio.modulation modulation
---

View File

@@ -141,7 +141,6 @@ FOX = {
explosiondist = 200,
explosiondist2 = 500,
bigmissilemass = 50,
destroy = nil,
dt50 = 5,
dt10 = 1,
dt05 = 0.5,

View File

@@ -22,7 +22,7 @@
-- @module Functional.Mantis
-- @image Functional.Mantis.jpg
--
-- Last Update: Mar 2025
-- Last Update: May 2025
-------------------------------------------------------------------------
--- **MANTIS** class, extends Core.Base#BASE
@@ -62,7 +62,9 @@
-- @field #table FilterZones Table of Core.Zone#ZONE Zones Consider SAM groups in this zone(s) only for this MANTIS instance, must be handed as #table of Zone objects.
-- @field #boolean SmokeDecoy If true, smoke short range SAM units as decoy if a plane is in firing range.
-- @field #number SmokeDecoyColor Color to use, defaults to SMOKECOLOR.White
-- @field #number checkcounter Counter for SAM Table refreshes
-- @field #number checkcounter Counter for SAM Table refreshes.
-- @field #number DLinkCacheTime Seconds after which cached contacts in DLink will decay.
-- @field #boolean logsamstatus Log SAM status in dcs.log every cycle if true
-- @extends Core.Base#BASE
@@ -74,10 +76,9 @@
--
-- * Moose derived Modular, Automatic and Network capable Targeting and Interception System.
-- * Controls a network of SAM sites. Uses detection to switch on the SAM site closest to the enemy.
-- * **Automatic mode** (default since 0.8) will set-up your SAM site network automatically for you
-- * **Classic mode** behaves like before
-- * Leverage evasiveness from SEAD, leverage attack range setting
-- * Automatic setup of SHORAD based on groups of the class "short-range"
-- * **Automatic mode** (default) will set-up your SAM site network automatically for you.
-- * Leverage evasiveness from SEAD, leverage attack range setting.
-- * Automatic setup of SHORAD based on groups of the class "short-range".
--
-- # 0. Base considerations and naming conventions
--
@@ -133,10 +134,10 @@
--
-- # 0.1 Set-up in the mission editor
--
-- Set up your SAM sites in the mission editor. Name the groups using a systematic approach like above.
-- Set up your EWR system in the mission editor. Name the groups using a systematic approach like above. Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc.
-- Set up your SAM sites in the mission editor. Name the groups using a systematic approach like above.Can be e.g. AWACS or a combination of AWACS and Search Radars like e.g. EWR 1L13 etc.
-- Search Radars usually have "SR" or "STR" in their names. Use the encyclopedia in the mission editor to inform yourself.
-- Set up your SHORAD systems. They need to be **close** to (i.e. around) the SAM sites to be effective. Use **one** group per SAM location. SA-15 TOR systems offer a good missile defense.
-- Set up your SHORAD systems. They need to be **close** to (i.e. around) the SAM sites to be effective. Use **one unit ** per group (multiple groups) for the SAM location.
-- Else, evasive manoevers might club up all defenders in one place. Red SA-15 TOR systems offer a good missile defense.
--
-- [optional] Set up your HQ. Can be any group, e.g. a command vehicle.
--
@@ -188,7 +189,7 @@
--
-- ## 2.1 Auto mode features
--
-- ### 2.1.1 You can now add Accept-, Reject- and Conflict-Zones to your setup, e.g. to consider borders or de-militarized zones:
-- ### 2.1.1 You can add Accept-, Reject- and Conflict-Zones to your setup, e.g. to consider borders or de-militarized zones:
--
-- -- Parameters are tables of Core.Zone#ZONE objects!
-- -- This is effectively a 3-stage filter allowing for zone overlap. A coordinate is accepted first when
@@ -205,9 +206,6 @@
-- ### 2.1.3 SHORAD/Point defense will automatically be added from SAM sites of type "point" or if the range is less than 5km or if the type is AAA.
--
-- ### 2.1.4 Advanced features
--
-- -- Option to switch off auto mode **before** you start MANTIS (not recommended)
-- mybluemantis.automode = false
--
-- -- Option to set the scale of the activation range, i.e. don't activate at the fringes of max range, defaults below.
-- -- also see engagerange below.
@@ -220,6 +218,12 @@
--
-- -- For some scenarios, like Cold War, it might be useful not to activate SAMs if friendly aircraft are around to avoid death by friendly fire.
-- mybluemantis.checkforfriendlies = true
--
-- ### 2.1.6 Shoot & Scoot
--
-- -- Option to make the (driveable) SHORAD units drive around and shuffle positions
-- -- We use a SET_ZONE for that, number of zones to consider defaults to three, Random is true for random coordinates and Formation is e.g. "Vee".
-- mybluemantis:AddScootZones(ZoneSet, Number, Random, Formation)
--
-- # 3. Default settings [both modes unless stated otherwise]
--
@@ -242,26 +246,8 @@
-- E.g. mymantis:SetAdvancedMode( true, 90 )
--
-- Use this option if you want to make use of or allow advanced SEAD tactics.
--
-- # 5. Integrate SHORAD [classic mode, not necessary in automode, not recommended for manual setup]
--
-- You can also choose to integrate Mantis with @{Functional.Shorad#SHORAD} for protection against HARMs and AGMs manually. When SHORAD detects a missile fired at one of MANTIS' SAM sites, it will activate SHORAD systems in
-- the given defense checkradius around that SAM site. Create a SHORAD object first, then integrate with MANTIS like so:
--
-- local SamSet = SET_GROUP:New():FilterPrefixes("Blue SAM"):FilterCoalitions("blue"):FilterStart()
-- myshorad = SHORAD:New("BlueShorad", "Blue SHORAD", SamSet, 22000, 600, "blue")
-- -- now set up MANTIS
-- mymantis = MANTIS:New("BlueMantis","Blue SAM","Blue EWR",nil,"blue",false,"Blue Awacs")
-- mymantis:AddShorad(myshorad,720)
-- mymantis:Start()
--
-- If you systematically name your SHORAD groups starting with "Blue SHORAD" you'll need exactly **one** SHORAD instance to manage all SHORAD groups.
--
-- (Optionally) you can remove the link later on with
--
-- mymantis:RemoveShorad()
--
-- # 6. Integrated SEAD
-- # 5. Integrated SEAD
--
-- MANTIS is using @{Functional.Sead#SEAD} internally to both detect and evade HARM attacks. No extra efforts needed to set this up!
-- Once a HARM attack is detected, MANTIS (via SEAD) will shut down the radars of the attacked SAM site and take evasive action by moving the SAM
@@ -336,6 +322,8 @@ MANTIS = {
SmokeDecoy = false,
SmokeDecoyColor = SMOKECOLOR.White,
checkcounter = 1,
DLinkCacheTime = 120,
logsamstatus = false,
}
--- Advanced state enumerator
@@ -374,7 +362,7 @@ MANTIS.radiusscale[MANTIS.SamType.POINT] = 3
MANTIS.SamData = {
["Hawk"] = { Range=35, Blindspot=0, Height=12, Type="Medium", Radar="Hawk" }, -- measures in km
["NASAMS"] = { Range=14, Blindspot=0, Height=7, Type="Short", Radar="NSAMS" }, -- AIM 120B
["Patriot"] = { Range=99, Blindspot=0, Height=25, Type="Long", Radar="Patriot" },
["Patriot"] = { Range=99, Blindspot=0, Height=25, Type="Long", Radar="Patriot str" },
["Rapier"] = { Range=10, Blindspot=0, Height=3, Type="Short", Radar="rapier" },
["SA-2"] = { Range=40, Blindspot=7, Height=25, Type="Medium", Radar="S_75M_Volhov" },
["SA-3"] = { Range=18, Blindspot=6, Height=18, Type="Short", Radar="5p73 s-125 ln" },
@@ -382,7 +370,8 @@ MANTIS.SamData = {
["SA-6"] = { Range=25, Blindspot=0, Height=8, Type="Medium", Radar="1S91" },
["SA-10"] = { Range=119, Blindspot=0, Height=18, Type="Long" , Radar="S-300PS 4"},
["SA-11"] = { Range=35, Blindspot=0, Height=20, Type="Medium", Radar="SA-11" },
["Roland"] = { Range=5, Blindspot=0, Height=5, Type="Point", Radar="Roland" },
["Roland"] = { Range=6, Blindspot=0, Height=5, Type="Short", Radar="Roland" },
["Gepard"] = { Range=5, Blindspot=0, Height=4, Type="Point", Radar="Gepard" },
["HQ-7"] = { Range=12, Blindspot=0, Height=3, Type="Short", Radar="HQ-7" },
["SA-9"] = { Range=4, Blindspot=0, Height=3, Type="Point", Radar="Strela", Point="true" },
["SA-8"] = { Range=10, Blindspot=0, Height=5, Type="Short", Radar="Osa 9A33" },
@@ -393,6 +382,7 @@ MANTIS.SamData = {
["Chaparral"] = { Range=8, Blindspot=0, Height=3, Type="Short", Radar="Chaparral" },
["Linebacker"] = { Range=4, Blindspot=0, Height=3, Type="Point", Radar="Linebacker", Point="true" },
["Silkworm"] = { Range=90, Blindspot=1, Height=0.2, Type="Long", Radar="Silkworm" },
["HEMTT_C-RAM_Phalanx"] = { Range=2, Blindspot=0, Height=2, Type="Point", Radar="HEMTT_C-RAM_Phalanx", Point="true" },
-- units from HDS Mod, multi launcher options is tricky
["SA-10B"] = { Range=75, Blindspot=0, Height=18, Type="Medium" , Radar="SA-10B"},
["SA-17"] = { Range=50, Blindspot=3, Height=30, Type="Medium", Radar="SA-17" },
@@ -625,7 +615,8 @@ do
self.advAwacs = false
end
self:SetDLinkCacheTime()
-- Set the string id for output to DCS.log file.
self.lid=string.format("MANTIS %s | ", self.name)
@@ -658,6 +649,8 @@ do
table.insert(self.ewr_templates,awacs)
end
self.logsamstatus = false
self:T({self.ewr_templates})
self.SAM_Group = SET_GROUP:New():FilterPrefixes(self.SAM_Templates_Prefix):FilterCoalitions(self.Coalition)
@@ -689,7 +682,7 @@ do
-- TODO Version
-- @field #string version
self.version="0.9.27"
self.version="0.9.30"
self:I(string.format("***** Starting MANTIS Version %s *****", self.version))
--- FSM Functions ---
@@ -1039,6 +1032,16 @@ do
end
return self
end
--- Function to set how long INTEL DLINK remembers contacts.
-- @param #MANTIS self
-- @param #number seconds Remember this many seconds, at least 5 seconds.
-- @return #MANTIS self
function MANTIS:SetDLinkCacheTime(seconds)
self.DLinkCacheTime = math.abs(seconds or 120)
if self.DLinkCacheTime < 5 then self.DLinkCacheTime = 5 end
return self
end
--- Function to set the detection interval
-- @param #MANTIS self
@@ -1431,7 +1434,9 @@ do
--IntelTwo:SetClusterRadius(5000)
IntelTwo:Start()
local IntelDlink = INTEL_DLINK:New({IntelOne,IntelTwo},self.name.." DLINK",22,300)
local CacheTime = self.DLinkCacheTime or 120
local IntelDlink = INTEL_DLINK:New({IntelOne,IntelTwo},self.name.." DLINK",22,CacheTime)
IntelDlink:__Start(1)
self:SetUsingDLink(IntelDlink)
@@ -1493,7 +1498,7 @@ do
elseif chm then
SAMData = self.SamDataCH
end
--self:T("Looking to auto-match for "..grpname)
--self:I("Looking to auto-match for "..grpname)
for _,_unit in pairs(units) do
local unit = _unit -- Wrapper.Unit#UNIT
local type = string.lower(unit:GetTypeName())
@@ -1694,7 +1699,9 @@ do
local grpname = group:GetName()
local grpcoord = group:GetCoordinate()
local grprange, grpheight,type,blind = self:_GetSAMRange(grpname)
local radaralive = group:IsSAM()
-- TODO the below might stop working at some point after some hours, needs testing
--local radaralive = group:IsSAM()
local radaralive = true
table.insert( SAM_Tbl, {grpname, grpcoord, grprange, grpheight, blind, type}) -- make the table lighter, as I don't really use the zone here
table.insert( SEAD_Grps, grpname )
if type == MANTIS.SamType.LONG and radaralive then
@@ -1856,7 +1863,7 @@ do
end --end alive
end --end check
end --for loop
if self.debug or self.verbose then
if self.debug or self.verbose or self.logsamstatus then
for _,_status in pairs(self.SamStateTracker) do
if _status == "GREEN" then
instatusgreen=instatusgreen+1
@@ -1877,8 +1884,9 @@ do
-- @param #MANTIS self
-- @param Functional.Detection#DETECTION_AREAS detection Detection object
-- @param #boolean dlink
-- @param #boolean reporttolog
-- @return #MANTIS self
function MANTIS:_Check(detection,dlink)
function MANTIS:_Check(detection,dlink,reporttolog)
self:T(self.lid .. "Check")
--get detected set
local detset = detection:GetDetectedItemCoordinates()
@@ -1905,7 +1913,8 @@ do
local samset = self:_GetSAMTable() -- table of i.1=names, i.2=coordinates, i.3=firing range, i.4=firing height
instatusred, instatusgreen, activeshorads = self:_CheckLoop(samset,detset,dlink,self.maxclassic)
end
if self.debug or self.verbose then
local function GetReport()
local statusreport = REPORT:New("\nMANTIS Status "..self.name)
statusreport:Add("+-----------------------------+")
statusreport:Add(string.format("+ SAM in RED State: %2d",instatusred))
@@ -1914,7 +1923,15 @@ do
statusreport:Add(string.format("+ SHORAD active: %2d",activeshorads))
end
statusreport:Add("+-----------------------------+")
return statusreport
end
if self.debug or self.verbose then
local statusreport = GetReport()
MESSAGE:New(statusreport:Text(),10):ToAll():ToLog()
elseif reporttolog == true then
local statusreport = GetReport()
MESSAGE:New(statusreport:Text(),10):ToLog()
end
return self
end
@@ -2022,7 +2039,7 @@ do
self:T({From, Event, To})
-- check detection
if not self.state2flag then
self:_Check(self.Detection,self.DLink)
self:_Check(self.Detection,self.DLink,self.logsamstatus)
end
local EWRAlive = self:_CheckAnyEWRAlive()

View File

@@ -53,6 +53,8 @@
--
-- # Developer Note
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE.
-- Therefore, this class is considered to be deprecated and superseded by the [Functional.Fox](https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Fox.html) class, which provides the same functionality.
--

View File

@@ -2102,7 +2102,12 @@ function RANGE._OnImpact(weapon, self, playerData, attackHdg, attackAlt, attackV
result.attackHdg = attackHdg
result.attackVel = attackVel
result.attackAlt = attackAlt
result.date=os and os.date() or "n/a"
if os and os.date then
result.date=os.date()
else
self:E(self.lid.."os or os.date() not available")
result.date = "n/a"
end
-- Add to table.
table.insert( _results, result )

View File

@@ -7,6 +7,8 @@
--
-- # Developer Note
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Note while this class still works, it is no longer supported as the original author stopped active development of MOOSE
-- Therefore, this class is considered to be deprecated
--

View File

@@ -2798,7 +2798,7 @@ function ATIS:onafterBroadcast( From, Event, To )
end
_RUNACT = subtitle
alltext = alltext .. ";\n" .. subtitle
--alltext = alltext .. ";\n" .. subtitle
-- Runway length.
if self.rwylength then

View File

@@ -32,6 +32,7 @@
-- * [USS George Washington](https://en.wikipedia.org/wiki/USS_George_Washington_\(CVN-73\)) (CVN-73) [Super Carrier Module]
-- * [USS Harry S. Truman](https://en.wikipedia.org/wiki/USS_Harry_S._Truman) (CVN-75) [Super Carrier Module]
-- * [USS Forrestal](https://en.wikipedia.org/wiki/USS_Forrestal_\(CV-59\)) (CV-59) [Heatblur Carrier Module]
-- * [Essex Class](https://en.wikipedia.org/wiki/Essex-class_aircraft_carrier) (CV-11) [Magnitude 3 Carrier Module]
-- * [HMS Hermes](https://en.wikipedia.org/wiki/HMS_Hermes_\(R12\)) (R12)
-- * [HMS Invincible](https://en.wikipedia.org/wiki/HMS_Invincible_\(R05\)) (R05)
-- * [USS Tarawa](https://en.wikipedia.org/wiki/USS_Tarawa_\(LHA-1\)) (LHA-1)
@@ -47,6 +48,7 @@
-- * [AV-8B N/A Harrier](https://forums.eagle.ru/forumdisplay.php?f=555) (Player & AI)
-- * [T-45C Goshawk](https://forum.dcs.world/topic/203816-vnao-t-45-goshawk/) (VNAO mod) (Player & AI)
-- * [FE/A-18E/F/G Superhornet](https://forum.dcs.world/topic/316971-cjs-super-hornet-community-mod-v20-official-thread/) (CJS mod) (Player & AI)
-- * [F4U-1D Corsair](https://forum.dcs.world/forum/781-f4u-1d/) (Player & AI)
-- * F/A-18C Hornet (AI)
-- * F-14A Tomcat (AI)
-- * E-2D Hawkeye (AI)
@@ -1283,6 +1285,8 @@ AIRBOSS = {
-- @field #string RHINOE F/A-18E Superhornet (mod).
-- @field #string RHINOF F/A-18F Superhornet (mod).
-- @field #string GROWLER FEA-18G Superhornet (mod).
-- @field #string CORSAIR F4U-1D Corsair.
-- @field #string CORSAIR_CW F4U-1D Corsair Mk.4 (clipped wing).
AIRBOSS.AircraftCarrier={
AV8B="AV8BNA",
HORNET="FA-18C_hornet",
@@ -1299,6 +1303,8 @@ AIRBOSS.AircraftCarrier={
RHINOE="FA-18E",
RHINOF="FA-18F",
GROWLER="EA-18G",
CORSAIR="F4U-1D",
CORSAIR_CW="F4U-1D CW",
}
--- Carrier types.
@@ -1310,6 +1316,7 @@ AIRBOSS.AircraftCarrier={
-- @field #string TRUMAN USS Harry S. Truman (CVN-75) [Super Carrier Module]
-- @field #string FORRESTAL USS Forrestal (CV-59) [Heatblur Carrier Module]
-- @field #string VINSON USS Carl Vinson (CVN-70) [Deprecated!]
-- @field #string ESSEX Essex class carrier (e.g. USS Yorktown (CV-10)) [Magnitude 3 Carrier Module]
-- @field #string HERMES HMS Hermes (R12) [V/STOL Carrier]
-- @field #string INVINCIBLE HMS Invincible (R05) [V/STOL Carrier]
-- @field #string TARAWA USS Tarawa (LHA-1) [V/STOL Carrier]
@@ -1325,6 +1332,7 @@ AIRBOSS.CarrierType = {
STENNIS = "Stennis",
FORRESTAL = "Forrestal",
VINSON = "VINSON",
ESSEX = "Essex",
HERMES = "HERMES81",
INVINCIBLE = "hms_invincible",
TARAWA = "LHA_Tarawa",
@@ -1731,10 +1739,10 @@ AIRBOSS.Difficulty = {
-- @field #table trapsheet Groove data table recorded every 0.5 seconds.
-- @field #boolean trapon If true, save trap sheets.
-- @field #string debriefschedulerID Debrief scheduler ID.
--
--
-- @field Sound.SRS#MSRS SRS
-- @field Sound.SRS#MSRSQUEUE SRSQ
--
--
-- @extends #AIRBOSS.FlightGroup
--- Main group level radio menu: F10 Other/Airboss.
@@ -1747,7 +1755,7 @@ AIRBOSS.MenuF10Root = nil
--- Airboss class version.
-- @field #string version
AIRBOSS.version = "1.3.3"
AIRBOSS.version = "1.4.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1912,6 +1920,9 @@ function AIRBOSS:New( carriername, alias )
-- Set max section members. Default 2.
self:SetMaxSectionSize()
-- Set max section distance. Default 100 meters.
self:SetMaxSectionDistance()
-- Set max flights per stack. Default is 2.
self:SetMaxFlightsPerStack()
@@ -2010,6 +2021,8 @@ function AIRBOSS:New( carriername, alias )
elseif self.carriertype == AIRBOSS.CarrierType.VINSON then
-- Carl Vinson is legacy now.
self:_InitStennis()
elseif self.carriertype == AIRBOSS.CarrierType.ESSEX then
self:_InitEssex()
elseif self.carriertype == AIRBOSS.CarrierType.HERMES then
-- Hermes parameters.
self:_InitHermes()
@@ -2539,7 +2552,7 @@ function AIRBOSS:AddRecoveryWindow( starttime, stoptime, case, holdingoffset, tu
return self
end
if Tstop <= Tnow then
string.format( "WARNING: Recovery stop time %s already over. Tnow=%s! Recovery window rejected.", UTILS.SecondsToClock( Tstop ), UTILS.SecondsToClock( Tnow ) )
string.format( "WARNING: Recovery stop time %s already over. Tnow=%s! Recovery window rejected.", UTILS.SecondsToClock( Tstop ), UTILS.SecondsToClock( Tnow ) )
return self
end
@@ -2863,23 +2876,28 @@ end
function AIRBOSS:SetGlideslopeErrorThresholds(_max,_min, High, HIGH, Low, LOW)
--Check if V/STOL Carrier
if self.carriertype == AIRBOSS.CarrierType.INVINCIBLE or self.carriertype == AIRBOSS.CarrierType.HERMES or self.carriertype == AIRBOSS.CarrierType.TARAWA or self.carriertype == AIRBOSS.CarrierType.AMERICA or self.carriertype == AIRBOSS.CarrierType.JCARLOS or self.carriertype == AIRBOSS.CarrierType.CANBERRA then
if self.carriertype == AIRBOSS.CarrierType.INVINCIBLE or
self.carriertype == AIRBOSS.CarrierType.HERMES or
self.carriertype == AIRBOSS.CarrierType.TARAWA or
self.carriertype == AIRBOSS.CarrierType.AMERICA or
self.carriertype == AIRBOSS.CarrierType.JCARLOS or
self.carriertype == AIRBOSS.CarrierType.CANBERRA then
-- allow a larger GSE for V/STOL operations --Pene Testing
self.gle._max=_max or 0.7
self.gle.High=High or 1.4
self.gle.HIGH=HIGH or 1.9
self.gle._min=_min or -0.5
self.gle.Low=Low or -1.2
self.gle.LOW=LOW or -1.5
-- CVN values
-- allow a larger GSE for V/STOL operations --Pene Testing
self.gle._max=_max or 0.7
self.gle.High=High or 1.4
self.gle.HIGH=HIGH or 1.9
self.gle._min=_min or -0.5
self.gle.Low=Low or -1.2
self.gle.LOW=LOW or -1.5
else
self.gle._max=_max or 0.4
self.gle.High=High or 0.8
self.gle.HIGH=HIGH or 1.5
self.gle._min=_min or -0.3
self.gle.Low=Low or -0.6
self.gle.LOW=LOW or -0.9
-- CVN values
self.gle._max=_max or 0.4
self.gle.High=High or 0.8
self.gle.HIGH=HIGH or 1.5
self.gle._min=_min or -0.3
self.gle.Low=Low or -0.6
self.gle.LOW=LOW or -0.9
end
return self
@@ -3066,7 +3084,7 @@ end
-- @param #number Port Port of the SRS server, defaults to 5002.
-- @param #string Culture (Optional, Airboss Culture) Culture, defaults to "en-US".
-- @param #string Gender (Optional, Airboss Gender) Gender, e.g. "male" or "female". Defaults to "male".
-- @param #string Voice (Optional, Airboss Voice) Set to use a specific voice. Will **override gender and culture** settings.
-- @param #string Voice (Optional, Airboss Voice) Set to use a specific voice. Will **override gender and culture** settings.
-- @param #string GoogleCreds (Optional) Path to Google credentials, e.g. "C:\\Program Files\\DCS-SimpleRadio-Standalone\\yourgooglekey.json".
-- @param #number Volume (Optional) E.g. 0.75. Defaults to 1.0 (loudest).
-- @param #table AltBackend (Optional) See MSRS for details.
@@ -3097,10 +3115,10 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
-- SRSQUEUE
self.SRSQ = MSRSQUEUE:New("AIRBOSS")
self.SRSQ:SetTransmitOnlyWithPlayers(true)
if not self.PilotRadio then
if not self.PilotRadio then
self:SetSRSPilotVoice()
end
return self
return self
end
--- Set LSO radio frequency and modulation. Default frequency is 264 MHz AM.
@@ -3343,6 +3361,22 @@ function AIRBOSS:SetMaxSectionSize( nmax )
return self
end
--- Set maximum distance up to which section members are allowed (default: 100 meters).
-- @param #AIRBOSS self
-- @param #number dmax Max distance in meters (default 100 m). Minimum is 10 m, maximum is 5000 m.
-- @return #AIRBOSS self
function AIRBOSS:SetMaxSectionDistance( dmax )
if dmax then
if dmax < 10 then
dmax = 10
elseif dmax > 5000 then
dmax = 5000
end
end
self.maxsectiondistance = dmax or 100
return self
end
--- Set max number of flights per stack. All members of a section count as one "flight".
-- @param #AIRBOSS self
-- @param #number nmax Number of max allowed flights per stack. Default is two. Minimum is one, maximum is 4.
@@ -4608,6 +4642,51 @@ function AIRBOSS:_InitForrestal()
end
--- Init parameters for Essec class carriers.
-- @param #AIRBOSS self
function AIRBOSS:_InitEssex()
-- Init Nimitz as default.
self:_InitNimitz()
-- Carrier Parameters.
self.carrierparam.sterndist = -126
self.carrierparam.deckheight = 19.27 --DCS World\CoreMods\tech\M3 WWII PTO units\Database\Essex_Class_Carrier_1944.lua
-- Total size of the carrier (approx as rectangle).
self.carrierparam.totlength = 268
self.carrierparam.totwidthport = 23
self.carrierparam.totwidthstarboard = 23
-- Landing runway.
self.carrierparam.rwyangle = 0.0
self.carrierparam.rwylength = 265
self.carrierparam.rwywidth = 20
-- Wires.
self.carrierparam.wire1 = 21.9
self.carrierparam.wire2 = 28.3
self.carrierparam.wire3 = 34.7
self.carrierparam.wire4 = 41.1
self.carrierparam.wire5 = 47.4
self.carrierparam.wire6 = 53.7
self.carrierparam.wire7 = 59.0
self.carrierparam.wire8 = 64.1
self.carrierparam.wire9 = 72.7
self.carrierparam.wire10 = 78.0
self.carrierparam.wire11 = 85.5
self.carrierparam.wire12 = 105.9
self.carrierparam.wire13 = 113.3
self.carrierparam.wire14 = 121.0
self.carrierparam.wire15 = 128.5
-- Landing distance.
self.carrierparam.landingdist = self.carrierparam.sterndist+self.carrierparam.wire3
end
--- Init parameters for R12 HMS Hermes carrier.
-- @param #AIRBOSS self
function AIRBOSS:_InitHermes()
@@ -5310,7 +5389,8 @@ function AIRBOSS:_GetAircraftAoA( playerData )
local goshawk = playerData.actype == AIRBOSS.AircraftCarrier.T45C
local skyhawk = playerData.actype == AIRBOSS.AircraftCarrier.A4EC
local harrier = playerData.actype == AIRBOSS.AircraftCarrier.AV8B
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B
local corsair = playerData.actype == AIRBOSS.AircraftCarrier.CORSAIR or playerData.actype == AIRBOSS.AircraftCarrier.CORSAIR_CW
-- Table with AoA values.
local aoa = {} -- #AIRBOSS.AircraftAoA
@@ -5355,7 +5435,6 @@ function AIRBOSS:_GetAircraftAoA( playerData )
aoa.Fast = 8.25 -- =17.5/2
aoa.FAST = 8.00 -- =16.5/2
elseif harrier then
-- AV-8B Harrier parameters. Tuning done on the Fast AoA to allow for abeam and ninety at Nozzles 55. Pene testing
aoa.SLOW = 16.0
aoa.Slow = 13.5
@@ -5364,7 +5443,15 @@ function AIRBOSS:_GetAircraftAoA( playerData )
aoa.OnSpeedMin = 9.5
aoa.Fast = 8.0
aoa.FAST = 7.5
elseif corsair then
-- F4U-1D Corsair parameters.
aoa.SLOW = 16.0
aoa.Slow = 13.5
aoa.OnSpeedMax = 12.5
aoa.OnSpeed = 10.0
aoa.OnSpeedMin = 9.5
aoa.Fast = 8.0
aoa.FAST = 7.5
end
return aoa
@@ -5477,6 +5564,7 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B
local harrier = playerData.actype == AIRBOSS.AircraftCarrier.AV8B
local goshawk = playerData.actype == AIRBOSS.AircraftCarrier.T45C
local corsair = playerData.actype == AIRBOSS.AircraftCarrier.CORSAIR or playerData.actype == AIRBOSS.AircraftCarrier.CORSAIR_CW
-- Return values.
local alt
@@ -5536,6 +5624,9 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
elseif goshawk then
alt = UTILS.FeetToMeters( 800 )
speed = UTILS.KnotsToMps( 300 )
elseif corsair then
alt = UTILS.FeetToMeters( 300 )
speed = UTILS.KnotsToMps( 120 )
end
elseif step == AIRBOSS.PatternStep.BREAKENTRY then
@@ -5549,6 +5640,9 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
elseif goshawk then
alt = UTILS.FeetToMeters( 800 )
speed = UTILS.KnotsToMps( 300 )
elseif corsair then
alt = UTILS.FeetToMeters( 200 )
speed = UTILS.KnotsToMps( 110 )
end
elseif step == AIRBOSS.PatternStep.EARLYBREAK then
@@ -5557,6 +5651,9 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
alt = UTILS.FeetToMeters( 800 )
elseif skyhawk then
alt = UTILS.FeetToMeters( 600 )
elseif corsair then
alt = UTILS.FeetToMeters( 200 )
speed = UTILS.KnotsToMps( 100 )
end
elseif step == AIRBOSS.PatternStep.LATEBREAK then
@@ -5565,6 +5662,9 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
alt = UTILS.FeetToMeters( 800 )
elseif skyhawk then
alt = UTILS.FeetToMeters( 600 )
elseif corsair then
alt = UTILS.FeetToMeters( 150 )
speed = UTILS.KnotsToMps( 100 )
end
elseif step == AIRBOSS.PatternStep.ABEAM then
@@ -5573,6 +5673,9 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
alt = UTILS.FeetToMeters( 600 )
elseif skyhawk then
alt = UTILS.FeetToMeters( 500 )
elseif corsair then
alt = UTILS.FeetToMeters( 150 )
speed = UTILS.KnotsToMps( 90 )
end
aoa = aoaac.OnSpeed
@@ -5597,6 +5700,9 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
alt = UTILS.FeetToMeters( 500 )
elseif harrier then
alt = UTILS.FeetToMeters( 425 )
elseif corsair then
alt = UTILS.FeetToMeters( 90 )
speed = UTILS.KnotsToMps( 90 )
end
aoa = aoaac.OnSpeed
@@ -5609,6 +5715,8 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
alt = UTILS.FeetToMeters( 430 ) -- Tomcat should be a bit higher as it intercepts the GS a bit higher.
elseif skyhawk then
alt = UTILS.FeetToMeters( 370 ) -- ?
elseif corsair then
alt = UTILS.FeetToMeters( 80 )
end
-- Harrier wont get into wake pos. Runway is not angled and it stays port.
@@ -5624,6 +5732,8 @@ function AIRBOSS:_GetAircraftParameters( playerData, step )
alt = UTILS.FeetToMeters( 300 ) -- ?
elseif harrier then
alt=UTILS.FeetToMeters(312)-- 300-325 ft
elseif corsair then
alt = UTILS.FeetToMeters( 80 )
end
aoa = aoaac.OnSpeed
@@ -6500,6 +6610,8 @@ function AIRBOSS:_LandAI( flight )
Speed = UTILS.KnotsToKmph( 175 )
elseif flight.actype == AIRBOSS.AircraftCarrier.S3B or flight.actype == AIRBOSS.AircraftCarrier.S3BTANKER then
Speed = UTILS.KnotsToKmph( 140 )
elseif flight.actype == AIRBOSS.AircraftCarrier.CORSAIR or flight.actype == AIRBOSS.AircraftCarrier.CORSAIR_CW then
Speed = UTILS.KnotsToKmph( 100 )
end
-- Carrier position.
@@ -8722,13 +8834,13 @@ function AIRBOSS:OnEventRemoveUnit( EventData )
-- Nil checks.
if EventData == nil then
self:E( self.lid .. "ERROR: EventData=nil in event REMOVEUNIT!" )
self:E( EventData )
self:T( self.lid .. "ERROR: EventData=nil in event REMOVEUNIT!" )
self:T( EventData )
return
end
if EventData.IniUnit == nil then
self:E( self.lid .. "ERROR: EventData.IniUnit=nil in event REMOVEUNIT!" )
self:E( EventData )
self:T( self.lid .. "ERROR: EventData.IniUnit=nil in event REMOVEUNIT!" )
self:T( EventData )
return
end
@@ -10295,6 +10407,9 @@ function AIRBOSS:_GetSternCoord()
elseif self.carriertype == AIRBOSS.CarrierType.FORRESTAL then
-- Forrestal
self.sterncoord:Translate( self.carrierparam.sterndist, hdg, true, true ):Translate( 7.5, FB + 90, true, true )
elseif self.carriertype == AIRBOSS.CarrierType.ESSEX then
-- Forrestal
self.sterncoord:Translate( self.carrierparam.sterndist, hdg, true, true ):Translate( -1, FB + 90, true, true )
else
-- Nimitz SC: translate 8 meters starboard wrt Final bearing.
self.sterncoord:Translate( self.carrierparam.sterndist, hdg, true, true ):Translate( 9.5, FB + 90, true, true )
@@ -11596,7 +11711,7 @@ function AIRBOSS:GetHeadingIntoWind_old( vdeck, magnetic, coord )
local function adjustDegreesForWindSpeed(windSpeed)
local degreesAdjustment = 0
-- the windspeeds are in m/s
-- +0 degrees at 15m/s = 37kts
-- +0 degrees at 14m/s = 35kts
-- +0 degrees at 13m/s = 33kts
@@ -11611,7 +11726,7 @@ function AIRBOSS:GetHeadingIntoWind_old( vdeck, magnetic, coord )
-- +20 degrees at 4m/s = 26kts
-- +20 degrees at 3m/s = 26kts
-- +30 degrees at 2m/s = 26kts 1s
if windSpeed > 0 and windSpeed < 3 then
degreesAdjustment = 30
elseif windSpeed >= 3 and windSpeed < 5 then
@@ -11623,7 +11738,7 @@ function AIRBOSS:GetHeadingIntoWind_old( vdeck, magnetic, coord )
elseif windSpeed >= 13 then
degreesAdjustment = 0
end
return degreesAdjustment
end
@@ -11682,60 +11797,60 @@ function AIRBOSS:GetHeadingIntoWind_new( vdeck, magnetic, coord )
local h=self:GetHeading(magnetic)
return h, math.min(vdeck, Vmax)
end
-- Convert wind speed to knots.
vwind=UTILS.MpsToKnots(vwind)
-- Wind to in knots.
local windto=(windfrom+180)%360
-- Offset angle in rad. We also define the rotation to be clock-wise, which requires a minus sign.
local alpha=math.rad(-Offset)
-- Constant.
local C = math.sqrt(math.cos(alpha)^2 / math.sin(alpha)^2 + 1)
-- Upper limit of desired speed due to max boat speed.
local vdeckMax=vwind + math.cos(alpha) * Vmax
-- Lower limit of desired speed due to min boat speed.
local vdeckMin=vwind + math.cos(alpha) * Vmin
-- Speed of ship so it matches the desired speed.
local v=0
-- Angle wrt. to wind TO-direction
-- Angle wrt. to wind TO-direction
local theta=0
if vdeck>vdeckMax then
-- Boat cannot go fast enough
-- Set max speed.
v=Vmax
-- Calculate theta.
theta = math.asin(v/(vwind*C)) - math.asin(-1/C)
elseif vdeck<vdeckMin then
-- Boat cannot go slow enought
-- Set min speed.
v=Vmin
-- Calculatge theta.
theta = math.asin(v/(vwind*C)) - math.asin(-1/C)
elseif vdeck*math.sin(alpha)>vwind then
-- Too little wind
-- Set theta to 90°
theta=math.pi/2
-- Set speed.
v = math.sqrt(vdeck^2 - vwind^2)
else
-- Normal case
theta = math.asin(vdeck * math.sin(alpha) / vwind)
@@ -11744,9 +11859,9 @@ function AIRBOSS:GetHeadingIntoWind_new( vdeck, magnetic, coord )
-- Magnetic heading.
local magvar= magnetic and self.magvar or 0
-- Ship heading so cross wind is min for the given wind.
local intowind = (540 + (windto - magvar + math.deg(theta) )) % 360
local intowind = (540 + (windto - magvar + math.deg(theta) )) % 360
return intowind, v
end
@@ -12204,7 +12319,7 @@ function AIRBOSS:_LSOgrade( playerData )
-- Normal laning part at the beginning
local Gb = GXX .. " " .. GIM
-- Number of deviations that occurred at the the beginning of the landing (XX or IM). These are graded like in non-VTOL landings, i.e. on deviations is
-- Number of deviations that occurred at the the beginning of the landing (XX or IM). These are graded like in non-VTOL landings, i.e. on deviations is
local N=nXX+nIM
local nL=count(Gb, '_')/2
local nS=count(Gb, '%(')
@@ -12222,7 +12337,7 @@ function AIRBOSS:_LSOgrade( playerData )
if nL>0 or nLv>1 then
-- Larger deviations at XX or IM or at least one larger deviation IC or AR==> "No grade" 2.0 points.
-- In other words, we allow one larger deviation at IC+AR
-- In other words, we allow one larger deviation at IC+AR
grade="--"
points=2.0
elseif nN>0 or nNv>1 or nLv==1 then
@@ -13718,7 +13833,7 @@ function AIRBOSS:CarrierTurnIntoWind( time, vdeck, uturn )
local deltaH = self:_GetDeltaHeading( hdg, hiw )
-- Debug output
self:I( self.lid .. string.format( "Carrier steaming into the wind (%.1f kts). Heading=%03d-->%03d (Delta=%.1f), Speed=%.1f knots, Distance=%.1f NM, Time=%d sec",
self:I( self.lid .. string.format( "Carrier steaming into the wind (%.1f kts). Heading=%03d-->%03d (Delta=%.1f), Speed=%.1f knots, Distance=%.1f NM, Time=%d sec",
UTILS.MpsToKnots( vwind ), hdg, hiw, deltaH, speedknots, distNM, speedknots, time ) )
-- Current coordinate.
@@ -14930,12 +15045,12 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
if radio == nil or call == nil then
return
end
if not self.SRS then
-- Create a new radio transmission item.
local transmission = {} -- #AIRBOSS.Radioitem
transmission.radio = radio
transmission.call = call
transmission.Tplay = timer.getAbsTime() + (delay or 0)
@@ -14943,49 +15058,49 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
transmission.isplaying = false
transmission.Tstarted = nil
transmission.loud = loud and call.loud
-- Player onboard number if sender has one.
if self:_IsOnboard( call.modexsender ) then
self:_Number2Radio( radio, call.modexsender, delay, 0.3, pilotcall )
end
-- Play onboard number if receiver has one.
if self:_IsOnboard( call.modexreceiver ) then
self:_Number2Radio( radio, call.modexreceiver, delay, 0.3, pilotcall )
end
-- Add transmission to the right queue.
local caller = ""
if radio.alias == "LSO" then
table.insert( self.RQLSO, transmission )
caller = "LSOCall"
-- Schedule radio queue checks.
if not self.RQLid then
self:T( self.lid .. string.format( "Starting LSO radio queue." ) )
self.RQLid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQLSO, "LSO" }, 0.02, 0.05 )
end
elseif radio.alias == "MARSHAL" then
table.insert( self.RQMarshal, transmission )
caller = "MarshalCall"
if not self.RQMid then
self:T( self.lid .. string.format( "Starting Marhal radio queue." ) )
self.RQMid = self.radiotimer:Schedule( nil, AIRBOSS._CheckRadioQueue, { self, self.RQMarshal, "MARSHAL" }, 0.02, 0.05 )
end
end
-- Append radio click sound at the end of the transmission.
if click then
self:RadioTransmission( radio, self[caller].CLICK, false, delay )
end
else
-- SRS transmission
@@ -14996,7 +15111,7 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
local voice = nil
local gender = nil
local culture = nil
if radio.alias == "AIRBOSS" then
frequency = self.AirbossRadio.frequency
modulation = self.AirbossRadio.modulation
@@ -15004,13 +15119,13 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
gender = self.AirbossRadio.gender
culture = self.AirbossRadio.culture
end
if radio.alias == "MARSHAL" then
voice = self.MarshalRadio.voice
gender = self.MarshalRadio.gender
culture = self.MarshalRadio.culture
end
if radio.alias == "LSO" then
frequency = self.LSORadio.frequency
modulation = self.LSORadio.modulation
@@ -15018,7 +15133,7 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
gender = self.LSORadio.gender
culture = self.LSORadio.culture
end
if pilotcall then
voice = self.PilotRadio.voice
gender = self.PilotRadio.gender
@@ -15032,16 +15147,16 @@ function AIRBOSS:RadioTransmission( radio, call, loud, delay, interval, click, p
modulation = self.AirbossRadio.modulation
radio.alias = "AIRBOSS"
end
local volume = nil
if loud then
volume = 1.0
end
--local text = tostring(call.modexreceiver).."; "..radio.alias.."; "..call.subtitle
local text = call.subtitle
self:T(self.lid..text)
self:T(self.lid..text)
local srstext = self:_GetNiceSRSText(text)
self.SRSQ:NewTransmission(srstext, call.duration, self.SRS, nil, 0.1, nil, call.subtitle, call.subduration, frequency, modulation, gender, culture, voice, volume, radio.alias)
end
@@ -15061,11 +15176,11 @@ function AIRBOSS:SetSRSPilotVoice( Voice, Gender, Culture )
self.PilotRadio.voice = Voice or MSRS.Voices.Microsoft.David
self.PilotRadio.gender = Gender or "male"
self.PilotRadio.culture = Culture or "en-US"
if (not Voice) and self.SRS and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
self.PilotRadio.voice = MSRS.Voices.Google.Standard.en_US_Standard_J
end
return self
end
@@ -15379,44 +15494,44 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio
-- SCHEDULER:New(nil, self.MessageToPlayer, {self, playerData, message, sender, receiver, duration, clear}, delay)
self:ScheduleOnce( delay, self.MessageToPlayer, self, playerData, message, sender, receiver, duration, clear )
else
if not self.SRS then
-- Wait until previous sound finished.
local wait = 0
-- Onboard number to get the attention.
if receiver == playerData.onboard then
-- Which voice over number to use.
if sender and (sender == "LSO" or sender == "MARSHAL" or sender == "AIRBOSS") then
-- User sound of board number.
wait = wait + self:_Number2Sound( playerData, sender, receiver )
end
end
-- Negative.
if string.find( text:lower(), "negative" ) then
local filename = self:_RadioFilename( self.MarshalCall.NEGATIVE, false, "MARSHAL" )
USERSOUND:New( filename ):ToGroup( playerData.group, wait )
wait = wait + self.MarshalCall.NEGATIVE.duration
end
-- Affirm.
if string.find( text:lower(), "affirm" ) then
local filename = self:_RadioFilename( self.MarshalCall.AFFIRMATIVE, false, "MARSHAL" )
USERSOUND:New( filename ):ToGroup( playerData.group, wait )
wait = wait + self.MarshalCall.AFFIRMATIVE.duration
end
-- Roger.
if string.find( text:lower(), "roger" ) then
local filename = self:_RadioFilename( self.MarshalCall.ROGER, false, "MARSHAL" )
USERSOUND:New( filename ):ToGroup( playerData.group, wait )
wait = wait + self.MarshalCall.ROGER.duration
end
-- Play click sound to end message.
if wait > 0 then
local filename = self:_RadioFilename( self.MarshalCall.CLICK )
@@ -15429,7 +15544,7 @@ function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duratio
local voice = self.MarshalRadio.voice
local gender = self.MarshalRadio.gender
local culture = self.MarshalRadio.culture
if not sender then sender = "AIRBOSS" end
if string.find(sender,"AIRBOSS" ) then
@@ -17047,7 +17162,7 @@ function AIRBOSS:_RemoveSectionMember( playerData, sectionmember )
return false
end
--- Set all flights within 100 meters to be part of my section.
--- Set all flights within maxsectiondistance meters to be part of my section (default: 100 meters).
-- @param #AIRBOSS self
-- @param #string _unitName Name of the player unit.
function AIRBOSS:_SetSection( _unitName )
@@ -17065,7 +17180,7 @@ function AIRBOSS:_SetSection( _unitName )
local mycoord = _unit:GetCoordinate()
-- Max distance up to which section members are allowed.
local dmax = 100
local dmax = self.maxsectiondistance
-- Check if player is in Marshal or pattern queue already.
local text

View File

@@ -31,7 +31,7 @@
-- @image OPS_CSAR.jpg
---
-- Last Update Jan 2025
-- Last Update May 2025
-------------------------------------------------------------------------
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
@@ -263,6 +263,7 @@ CSAR = {
rescuedpilots = 0,
limitmaxdownedpilots = true,
maxdownedpilots = 10,
useFIFOLimitReplacement = false, -- If true, it will remove the oldest downed pilot when a new one is added, if the limit is reached.
allheligroupset = nil,
topmenuname = "CSAR",
ADFRadioPwr = 1000,
@@ -313,7 +314,7 @@ CSAR.AircraftType["CH-47Fbl1"] = 31
--- CSAR class version.
-- @field #string version
CSAR.version="1.0.30"
CSAR.version="1.0.33"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
@@ -468,7 +469,7 @@ function CSAR:New(Coalition, Template, Alias)
-- added 1.0.15
self.allowbronco = false -- set to true to use the Bronco mod as a CSAR plane
self.ADFRadioPwr = 1000
self.ADFRadioPwr = 500
-- added 1.0.16
self.PilotWeight = 80
@@ -1144,19 +1145,8 @@ function CSAR:_EventHandler(EventData)
self:T("Double Ejection!")
return self
end
-- limit no of pilots in the field.
if self.limitmaxdownedpilots and self:_ReachedPilotLimit() then
self:T("Maxed Downed Pilot!")
return self
end
-- TODO: Over water check --- EVENTS.LandingAfterEjection NOT triggered by DCS, so handle csarUsePara = true case
-- might create dual pilots in edge cases
local wetfeet = false
local initdcscoord = nil
local initcoord = nil
if _event.id == EVENTS.Ejection then
@@ -1168,6 +1158,36 @@ function CSAR:_EventHandler(EventData)
initcoord = COORDINATE:NewFromVec3(initdcscoord)
self:T({initdcscoord})
end
-- Remove downed pilot if already exists to replace with new one.
if _event.IniPlayerName then
local PilotTable = self.downedPilots --#CSAR.DownedPilot
local _foundPilot = nil
for _,_pilot in pairs(PilotTable) do
if _pilot.player == _event.IniPlayerName and _pilot.alive == true then
_foundPilot = _pilot
break
end
end
if _foundPilot then
self:T("Downed pilot already exists!")
_foundPilot.group:Destroy(false)
self:_RemoveNameFromDownedPilots(_foundPilot.name)
self:_CheckDownedPilotTable()
end
end
-- limit no of pilots in the field.
if self.limitmaxdownedpilots and self:_ReachedPilotLimit() then
self:T("Maxed Downed Pilot!")
return self
end
-- TODO: Over water check --- EVENTS.LandingAfterEjection NOT triggered by DCS, so handle csarUsePara = true case
-- might create dual pilots in edge cases
local wetfeet = false
--local surface = _unit:GetCoordinate():GetSurfaceType()
local surface = initcoord:GetSurfaceType()
@@ -2116,56 +2136,50 @@ end
--- (Internal) Determine distance to closest MASH.
-- @param #CSAR self
-- @param Wrapper.Unit#UNIT _heli Helicopter #UNIT
-- @return #CSAR self
-- @return #number Distance in meters
-- @return #string MASH Name as string
function CSAR:_GetClosestMASH(_heli)
self:T(self.lid .. " _GetClosestMASH")
local _mashset = self.mash -- Core.Set#SET_GROUP
local _mashes = _mashset:GetSetObjects() -- #table
local MashSets = {}
--local _mashes = _mashset.Set-- #table
table.insert(MashSets,_mashset.Set)
table.insert(MashSets,self.zonemashes.Set)
table.insert(MashSets,self.staticmashes.Set)
local _shortestDistance = -1
local _distance = 0
local _helicoord = _heli:GetCoordinate()
local function GetCloseAirbase(coordinate,Coalition,Category)
local a=coordinate:GetVec3()
local distmin=math.huge
local airbase=nil
for DCSairbaseID, DCSairbase in pairs(world.getAirbases(Coalition)) do
local b=DCSairbase:getPoint()
local c=UTILS.VecSubstract(a,b)
local dist=UTILS.VecNorm(c)
if dist<distmin and (Category==nil or Category==DCSairbase:getDesc().category) then
distmin=dist
airbase=DCSairbase
end
end
return distmin
end
local MashName = nil
if self.allowFARPRescue then
local position = _heli:GetCoordinate()
local afb,distance = position:GetClosestAirbase(nil,self.coalition)
_shortestDistance = distance
MashName = (afb ~= nil) and afb:GetName() or "Unknown"
end
for _, _mashUnit in pairs(_mashes) do
if _mashUnit and _mashUnit:IsAlive() then
local _mashcoord = _mashUnit:GetCoordinate()
_distance = self:_GetDistance(_helicoord, _mashcoord)
if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then
_shortestDistance = _distance
end
end
for _,_mashes in pairs(MashSets) do
for _, _mashUnit in pairs(_mashes or {}) do
local _mashcoord
if _mashUnit and (not _mashUnit:IsInstanceOf("ZONE_BASE")) and _mashUnit:IsAlive() then
_mashcoord = _mashUnit:GetCoordinate()
elseif _mashUnit and _mashUnit:IsInstanceOf("ZONE_BASE") then
_mashcoord = _mashUnit:GetCoordinate()
end
_distance = self:_GetDistance(_helicoord, _mashcoord)
if _distance ~= nil and (_shortestDistance == -1 or _distance < _shortestDistance) then
_shortestDistance = _distance
MashName = _mashUnit:GetName() or "Unknown"
end
end
end
if _shortestDistance ~= -1 then
return _shortestDistance
return _shortestDistance, MashName
else
return -1
end
end
--- (Internal) Display onboarded rescued pilots.
@@ -2323,9 +2337,9 @@ end
-- @param #CSAR self
-- @param Wrapper.Group#GROUP _group Group #GROUP object.
-- @param #number _freq Frequency to use
-- @param #string _name Beacon Name to use
-- @param #string BeaconName Beacon Name to use
-- @return #CSAR self
function CSAR:_AddBeaconToGroup(_group, _freq, _name)
function CSAR:_AddBeaconToGroup(_group, _freq, BeaconName)
self:T(self.lid .. " _AddBeaconToGroup")
if self.CreateRadioBeacons == false then return end
local _group = _group
@@ -2346,10 +2360,11 @@ function CSAR:_AddBeaconToGroup(_group, _freq, _name)
if _radioUnit then
local name = _radioUnit:GetName()
local Frequency = _freq -- Freq in Hertz
local name = _radioUnit:GetName()
--local name = _radioUnit:GetName()
local Sound = "l10n/DEFAULT/"..self.radioSound
local vec3 = _radioUnit:GetVec3() or _radioUnit:GetPositionVec3() or {x=0,y=0,z=0}
trigger.action.radioTransmission(Sound, vec3, 0, false, Frequency, self.ADFRadioPwr or 1000,_name) -- Beacon in MP only runs for exactly 30secs straight
self:I(self.lid..string.format("Added Radio Beacon %d Hertz | Name %s | Position {%d,%d,%d}",Frequency,BeaconName,vec3.x,vec3.y,vec3.z))
trigger.action.radioTransmission(Sound, vec3, 0, true, Frequency, self.ADFRadioPwr or 500,BeaconName) -- Beacon in MP only runs for exactly 30secs straight
end
end
@@ -2370,9 +2385,13 @@ function CSAR:_RefreshRadioBeacons()
local group = pilot.group
local frequency = pilot.frequency or 0 -- thanks to @Thrud
local bname = pilot.BeaconName or pilot.name..math.random(1,100000)
trigger.action.stopRadioTransmission(bname)
--trigger.action.stopRadioTransmission(bname)
if group and group:IsAlive() and frequency > 0 then
self:_AddBeaconToGroup(group,frequency,bname)
--self:_AddBeaconToGroup(group,frequency,bname)
else
if frequency > 0 then
trigger.action.stopRadioTransmission(bname)
end
end
end
end
@@ -2402,11 +2421,26 @@ function CSAR:_ReachedPilotLimit()
local limit = self.maxdownedpilots
local islimited = self.limitmaxdownedpilots
local count = self:_CountActiveDownedPilots()
if islimited and (count >= limit) then
return true
else
return false
end
if islimited and (count >= limit) then
if self.useFIFOLimitReplacement then
local oldIndex = -1
local oldDownedPilot = nil
for _index, _downedpilot in pairs(self.downedPilots) do
oldIndex = _index
oldDownedPilot = _downedpilot
break
end
if oldDownedPilot then
oldDownedPilot.group:Destroy(false)
oldDownedPilot.alive = false
self:_CheckDownedPilotTable()
return false
end
end
return true
else
return false
end
end
--- User - Function to add onw SET_GROUP Set-up for pilot filtering and assignment.
@@ -2454,9 +2488,10 @@ function CSAR:onafterStart(From, Event, To)
self.mash = SET_GROUP:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart()
local staticmashes = SET_STATIC:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterOnce()
local zonemashes = SET_ZONE:New():FilterPrefixes(self.mashprefix):FilterOnce()
self.staticmashes = SET_STATIC:New():FilterCoalitions(self.coalitiontxt):FilterPrefixes(self.mashprefix):FilterStart()
self.zonemashes = SET_ZONE:New():FilterPrefixes(self.mashprefix):FilterStart()
--[[
if staticmashes:Count() > 0 then
for _,_mash in pairs(staticmashes.Set) do
self.mash:AddObject(_mash)
@@ -2464,10 +2499,13 @@ function CSAR:onafterStart(From, Event, To)
end
if zonemashes:Count() > 0 then
self:T("Adding zones to self.mash SET")
for _,_mash in pairs(zonemashes.Set) do
self.mash:AddObject(_mash)
end
self:T("Objects in SET: "..self.mash:Count())
end
--]]
if not self.coordinate then
local csarhq = self.mash:GetRandom()

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,8 @@
--- Governs multiple missions, the tasking and the reporting.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Command centers govern missions, communicates the task assignments between human players of the coalition, and manages the menu flow.
-- It can assign a random task to a player when requested.

View File

@@ -5,6 +5,8 @@
-- The @{#DETECTION_MANAGER} class defines the core functions to report detected objects to groups.
-- Reportings can be done in several manners, and it is up to the derived classes if DETECTION_MANAGER to model the reporting behaviour.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- 1.1) DETECTION_MANAGER constructor:
-- -----------------------------------
-- * @{#DETECTION_MANAGER.New}(): Create a new DETECTION_MANAGER instance.

View File

@@ -27,6 +27,8 @@
--- Models goals to be achieved and can contain multiple tasks to be executed to achieve the goals.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- A mission contains multiple tasks and can be of different task types.
-- These tasks need to be assigned to human players to be executed.
--

View File

@@ -12,6 +12,8 @@
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- # 1) Tasking from a player perspective.
--
-- Tasking can be controlled by using the "other" menu in the radio menu of the player group.

View File

@@ -17,6 +17,8 @@
---
-- # TASKINFO class, extends @{Core.Base#BASE}
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ## The TASKINFO class implements the methods to contain information and display information of a task.
--
-- # Developer Note

View File

@@ -20,6 +20,9 @@ do -- TASK_A2A
--- Defines Air To Air tasks for a @{Core.Set} of Target Units,
-- based on the tasking capabilities defined in @{Tasking.Task#TASK}.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The TASK_A2A is implemented using a @{Core.Fsm#FSM_TASK}, and has the following statuses:
--
-- * **None**: Start of the process

View File

@@ -30,6 +30,8 @@ do -- TASK_A2A_DISPATCHER
-- @extends Tasking.DetectionManager#DETECTION_MANAGER
--- Orchestrates the dynamic dispatching of tasks upon groups of detected units determined a @{Core.Set} of EWR installation groups.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ![Banner Image](..\Presentations\TASK_A2A_DISPATCHER\Dia3.JPG)
--

View File

@@ -20,6 +20,9 @@ do -- TASK_A2G
--- The TASK_A2G class defines Air To Ground tasks for a @{Core.Set} of Target Units,
-- based on the tasking capabilities defined in @{Tasking.Task#TASK}.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The TASK_A2G is implemented using a @{Core.Fsm#FSM_TASK}, and has the following statuses:
--
-- * **None**: Start of the process

View File

@@ -33,6 +33,8 @@ do -- TASK_A2G_DISPATCHER
-- @extends Tasking.DetectionManager#DETECTION_MANAGER
--- Orchestrates dynamic **A2G Task Dispatching** based on the detection results of a linked @{Functional.Detection} object.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- It uses the Tasking System within the MOOSE framework, which is a multi-player Tasking Orchestration system.
-- It provides a truly dynamic battle environment for pilots and ground commanders to engage upon,

View File

@@ -10,6 +10,8 @@
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- ## Test Missions:
--
-- Test missions can be located on the main GITHUB site.
@@ -1176,7 +1178,7 @@ do -- TASK_CARGO
end
---@param Color Might be SMOKECOLOR.Blue, SMOKECOLOR.Red SMOKECOLOR.Orange, SMOKECOLOR.White or SMOKECOLOR.Green
--@param Color Might be SMOKECOLOR.Blue, SMOKECOLOR.Red SMOKECOLOR.Orange, SMOKECOLOR.White or SMOKECOLOR.Green
function TASK_CARGO:SetSmokeColor(SmokeColor)
-- Makes sure Coloe is set
if SmokeColor == nil then

View File

@@ -76,6 +76,8 @@ do -- TASK_CAPTURE_DISPATCHER
--- Implements the dynamic dispatching of capture zone tasks.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The **TASK_CAPTURE_DISPATCHER** allows you to setup various tasks for let human
-- players capture zones in a co-operation effort.
--

View File

@@ -20,6 +20,8 @@ do -- TASK_ZONE_GOAL
--- # TASK_ZONE_GOAL class, extends @{Tasking.Task#TASK}
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The TASK_ZONE_GOAL class defines the task to protect or capture a protection zone.
-- The TASK_ZONE_GOAL is implemented using a @{Core.Fsm#FSM_TASK}, and has the following statuses:
--

View File

@@ -44,6 +44,8 @@
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- Please read through the @{Tasking.Task_CARGO} process to understand the mechanisms of tasking and cargo tasking and handling.
--
-- The cargo will be a downed pilot, which is located somwhere on the battlefield. Use the menus system and facilities to

View File

@@ -2,6 +2,8 @@
--
-- The **TASK_CARGO_DISPATCHER** allows you to setup various tasks for let human
-- players transport cargo as part of a task.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- The cargo dispatcher will implement for you mechanisms to create cargo transportation tasks:
--

View File

@@ -1,5 +1,7 @@
--- **Tasking** - Models tasks for players to transport cargo.
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- **Specific features:**
--
-- * Creates a task to transport #Cargo.Cargo to and between deployment zones.

View File

@@ -2,6 +2,8 @@
--
-- ===
--
-- ![Banner Image](..\Images\deprecated.png)
--
-- 1) @{Tasking.Task_Manager#TASK_MANAGER} class, extends @{Core.Fsm#FSM}
-- ===
-- The @{Tasking.Task_Manager#TASK_MANAGER} class defines the core functions to report tasks to groups.

View File

@@ -12,27 +12,35 @@
-- @module Utilities.Utils
-- @image MOOSE.JPG
---
--- Smoke color enum `trigger.smokeColor`.
-- @type SMOKECOLOR
-- @field Green
-- @field Red
-- @field White
-- @field Orange
-- @field Blue
-- @field #number Green Green smoke (0)
-- @field #number Red Red smoke (1)
-- @field #number White White smoke (2)
-- @field #number Orange Orange smoke (3)
-- @field #number Blue Blue smoke (4)
SMOKECOLOR = trigger.smokeColor -- #SMOKECOLOR
---
--- Flare colur enum `trigger.flareColor`.
-- @type FLARECOLOR
-- @field Green
-- @field Red
-- @field White
-- @field Yellow
-- @field #number Green (0)
-- @field #number Red Red flare (1)
-- @field #number White White flare (2)
-- @field #number Yellow Yellow flare (3)
FLARECOLOR = trigger.flareColor -- #FLARECOLOR
--- Big smoke preset enum.
-- @type BIGSMOKEPRESET
-- @field #number SmallSmokeAndFire Small moke and fire (1)
-- @field #number MediumSmokeAndFire Medium smoke and fire (2)
-- @field #number LargeSmokeAndFire Large smoke and fire (3)
-- @field #number HugeSmokeAndFire Huge smoke and fire (4)
-- @field #number SmallSmoke Small smoke (5)
-- @field #number MediumSmoke Medium smoke (6)
-- @field #number LargeSmoke Large smoke (7)
-- @field #number HugeSmoke Huge smoke (8)
BIGSMOKEPRESET = {
SmallSmokeAndFire=1,
MediumSmokeAndFire=2,
@@ -351,7 +359,7 @@ end
-- @return #string Table as a string.
UTILS.OneLineSerialize = function( tbl ) -- serialization of a table all on a single line, no comments, made to replace old get_table_string function
lookup_table = {}
local lookup_table = {}
local function _Serialize( tbl )
@@ -490,7 +498,7 @@ end
--- Counts the number of elements in a table.
-- @param #table T Table to count
-- @return #int Number of elements in the table
-- @return #number Number of elements in the table
function UTILS.TableLength(T)
local count = 0
for _ in pairs(T or {}) do count = count + 1 end
@@ -1905,6 +1913,13 @@ end
function UTILS.GetReportingName(Typename)
local typename = string.lower(Typename)
-- special cases - Shark and Manstay have "A-50" in the name
if string.find(typename,"ka-50",1,true) then
return "Shark"
elseif string.find(typename,"a-50",1,true) then
return "Mainstay"
end
for name, value in pairs(ENUMS.ReportingName.NATO) do
local svalue = string.lower(value)
@@ -2137,9 +2152,9 @@ function UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, Rising, Tlocal)
local cosH = (cos(zenith) - (sinDec * sin(latitude))) / (cosDec * cos(latitude))
if rising and cosH > 1 then
return "N/S" -- The sun never rises on this location on the specified date
return "N/R" -- The sun never rises on this location on the specified date
elseif cosH < -1 then
return "N/R" -- The sun never sets on this location on the specified date
return "N/S" -- The sun never sets on this location on the specified date
end
-- Finish calculating H and convert into hours

View File

@@ -449,7 +449,6 @@ AIRBASE.TheChannel = {
-- * AIRBASE.Syria.Al_Dumayr
-- * AIRBASE.Syria.Al_Qusayr
-- * AIRBASE.Syria.Aleppo
-- * AIRBASE.Syria.Amman
-- * AIRBASE.Syria.An_Nasiriyah
-- * AIRBASE.Syria.At_Tanf
-- * AIRBASE.Syria.Bassel_Al_Assad
@@ -511,8 +510,9 @@ AIRBASE.TheChannel = {
-- * AIRBASE.Syria.Wujah_Al_Hajar
-- * AIRBASE.Syria.Ben_Gurion
-- * AIRBASE.Syria.Hatzor
-- * AIRBASE.Syria.Palmashim
-- * AIRBASE.Syria.Palmachim
-- * AIRBASE.Syria.Tel_Nof
-- * AIRBASE.Syria.Marka
--
--@field Syria
AIRBASE.Syria={
@@ -522,7 +522,6 @@ AIRBASE.Syria={
["Al_Dumayr"] = "Al-Dumayr",
["Al_Qusayr"] = "Al Qusayr",
["Aleppo"] = "Aleppo",
["Amman"] = "Amman",
["An_Nasiriyah"] = "An Nasiriyah",
["At_Tanf"] = "At Tanf",
["Bassel_Al_Assad"] = "Bassel Al-Assad",
@@ -554,6 +553,7 @@ AIRBASE.Syria={
["Kuweires"] = "Kuweires",
["Lakatamia"] = "Lakatamia",
["Larnaca"] = "Larnaca",
["Marka"] = "Marka",
["Marj_Ruhayyil"] = "Marj Ruhayyil",
["Marj_as_Sultan_North"] = "Marj as Sultan North",
["Marj_as_Sultan_South"] = "Marj as Sultan South",
@@ -584,7 +584,7 @@ AIRBASE.Syria={
["Wujah_Al_Hajar"] = "Wujah Al Hajar",
["Ben_Gurion"] = "Ben Gurion",
["Hatzor"] = "Hatzor",
["Palmashim"] = "Palmashim",
["Palmachim"] = "Palmachim",
["Tel_Nof"] = "Tel Nof",
}
@@ -689,7 +689,7 @@ AIRBASE.SouthAtlantic={
-- * AIRBASE.Sinai.Bilbeis_Air_Base
-- * AIRBASE.Sinai.Bir_Hasanah
-- * AIRBASE.Sinai.Birma_Air_Base
-- * AIRBASE.Sinai.Borj_El_Arab_International_Airport
-- * AIRBASE.Sinai.Borg_El_Arab_International_Airport
-- * AIRBASE.Sinai.Cairo_International_Airport
-- * AIRBASE.Sinai.Cairo_West
-- * AIRBASE.Sinai.Difarsuwar_Airfield
@@ -737,7 +737,7 @@ AIRBASE.Sinai = {
["Bilbeis_Air_Base"] = "Bilbeis Air Base",
["Bir_Hasanah"] = "Bir Hasanah",
["Birma_Air_Base"] = "Birma Air Base",
["Borj_El_Arab_International_Airport"] = "Borj El Arab International Airport",
["Borg_El_Arab_International_Airport"] = "Borg El Arab International Airport",
["Cairo_International_Airport"] = "Cairo International Airport",
["Cairo_West"] = "Cairo West",
["Difarsuwar_Airfield"] = "Difarsuwar Airfield",
@@ -790,9 +790,14 @@ AIRBASE.Sinai = {
-- * AIRBASE.Kola.Vidsel
-- * AIRBASE.Kola.Vuojarvi
-- * AIRBASE.Kola.Andoya
-- * AIRBASE.Kola.Alakourtti
-- * AIRBASE.Kola.Alakurtti
-- * AIRBASE.Kola.Kittila
-- * AIRBASE.Kola.Bardufoss
-- * AIRBASE.Kola.Alta
-- * AIRBASE.Kola.Sodankyla
-- * AIRBASE.Kola.Enontekio
-- * AIRBASE.Kola.Evenes
-- * AIRBASE.Kola.Hosio
--
-- @field Kola
AIRBASE.Kola = {
@@ -815,9 +820,14 @@ AIRBASE.Kola = {
["Vidsel"] = "Vidsel",
["Vuojarvi"] = "Vuojarvi",
["Andoya"] = "Andoya",
["Alakourtti"] = "Alakourtti",
["Alakurtti"] = "Alakurtti",
["Kittila"] = "Kittila",
["Bardufoss"] = "Bardufoss",
["Alta"] = "Alta",
["Sodankyla"] = "Sodankyla",
["Enontekio"] = "Enontekio",
["Evenes"] = "Evenes",
["Hosio"] = "Hosio",
}
--- Airbases of the Afghanistan map
@@ -911,10 +921,10 @@ AIRBASE.Iraq = {
--- Airbases of the Germany Cold War map
-- * AIRBASE.GermanyCW.Airracing_Frankfurt
-- * AIRBASE.GermanyCW.Airracing_Frankfurt
-- * AIRBASE.GermanyCW.Airracing_Koblenz
-- * AIRBASE.GermanyCW.Airracing_Luebeck
-- * AIRBASE.GermanyCW.Allstedt
-- * AIRBASE.GermanyCW.Alt_Daber
-- * AIRBASE.GermanyCW.Altes_Lager
-- * AIRBASE.GermanyCW.Bad_Duerkheim
-- * AIRBASE.GermanyCW.Barth
@@ -937,14 +947,13 @@ AIRBASE.Iraq = {
-- * AIRBASE.GermanyCW.Fritzlar
-- * AIRBASE.GermanyCW.Fulda
-- * AIRBASE.GermanyCW.Gardelegen
-- * AIRBASE.GermanyCW.Garz
-- * AIRBASE.GermanyCW.Gatow
-- * AIRBASE.GermanyCW.Gelnhausen
-- * AIRBASE.GermanyCW.Giebelstadt
-- * AIRBASE.GermanyCW.Glindbruchkippe
-- * AIRBASE.GermanyCW.Gross_Doelln
-- * AIRBASE.GermanyCW.Glindbruchkippe
-- * AIRBASE.GermanyCW.Gross_Mohrdorf
-- * AIRBASE.GermanyCW.Grosse_Wiese
-- * AIRBASE.GermanyCW.Gaerz
-- * AIRBASE.GermanyCW.Guetersloh
-- * AIRBASE.GermanyCW.H_FRG_01
-- * AIRBASE.GermanyCW.H_FRG_02
@@ -994,7 +1003,7 @@ AIRBASE.Iraq = {
-- * AIRBASE.GermanyCW.H_GDR_04
-- * AIRBASE.GermanyCW.H_GDR_05
-- * AIRBASE.GermanyCW.H_GDR_06
-- * AIRBASE.GermanyCW.H_GDR_07
-- * AIRBASE.GermanyCW.H_GDR_07
-- * AIRBASE.GermanyCW.H_GDR_08
-- * AIRBASE.GermanyCW.H_GDR_09
-- * AIRBASE.GermanyCW.H_GDR_10
@@ -1016,10 +1025,11 @@ AIRBASE.Iraq = {
-- * AIRBASE.GermanyCW.H_GDR_31
-- * AIRBASE.GermanyCW.H_GDR_32
-- * AIRBASE.GermanyCW.H_GDR_33
-- * AIRBASE.GermanyCW.H_GDR_34
-- * AIRBASE.GermanyCW.H_Med_FRG_01
-- * AIRBASE.GermanyCW.H_Med_FRG_02
-- * AIRBASE.GermanyCW.H_Med_FRG_04
-- * AIRBASE.GermanyCW.H_Med_FRG_06
-- * AIRBASE.GermanyCW.H_Med_FRG_09
-- * AIRBASE.GermanyCW.H_Med_FRG_11
-- * AIRBASE.GermanyCW.H_Med_FRG_12
-- * AIRBASE.GermanyCW.H_Med_FRG_13
@@ -1067,9 +1077,9 @@ AIRBASE.Iraq = {
-- * AIRBASE.GermanyCW.Koethen
-- * AIRBASE.GermanyCW.Laage
-- * AIRBASE.GermanyCW.Langenselbold
-- * AIRBASE.GermanyCW.Laerz
-- * AIRBASE.GermanyCW.Leipzig_Halle
-- * AIRBASE.GermanyCW.Leipzig_Mockau
-- * AIRBASE.GermanyCW.Laerz
-- * AIRBASE.GermanyCW.Luebeck
-- * AIRBASE.GermanyCW.Lueneburg
-- * AIRBASE.GermanyCW.Mahlwinkel
@@ -1087,14 +1097,15 @@ AIRBASE.Iraq = {
-- * AIRBASE.GermanyCW.Pottschutthoehe
-- * AIRBASE.GermanyCW.Ramstein
-- * AIRBASE.GermanyCW.Rinteln
-- * AIRBASE.GermanyCW.Schweinfurt
-- * AIRBASE.GermanyCW.Schoenefeld
-- * AIRBASE.GermanyCW.Schweinfurt
-- * AIRBASE.GermanyCW.Sembach
-- * AIRBASE.GermanyCW.Spangdahlem
-- * AIRBASE.GermanyCW.Sperenberg
-- * AIRBASE.GermanyCW.Stendal
-- * AIRBASE.GermanyCW.Tegel
-- * AIRBASE.GermanyCW.Tempelhof
-- * AIRBASE.GermanyCW.Templin
-- * AIRBASE.GermanyCW.Tutow
-- * AIRBASE.GermanyCW.Uelzen
-- * AIRBASE.GermanyCW.Uetersen
@@ -1106,6 +1117,7 @@ AIRBASE.Iraq = {
-- * AIRBASE.GermanyCW.Weser_Wuemme
-- * AIRBASE.GermanyCW.Wiesbaden
-- * AIRBASE.GermanyCW.Wismar
-- * AIRBASE.GermanyCW.Wittstock
-- * AIRBASE.GermanyCW.Worms
-- * AIRBASE.GermanyCW.Wunstorf
-- * AIRBASE.GermanyCW.Zerbst
@@ -1117,7 +1129,6 @@ AIRBASE.GermanyCW = {
["Airracing_Koblenz"] = "Airracing Koblenz",
["Airracing_Luebeck"] = "Airracing Lubeck",
["Allstedt"] = "Allstedt",
["Alt_Daber"] = "Alt Daber",
["Altes_Lager"] = "Altes Lager",
["Bad_Duerkheim"] = "Bad Durkheim",
["Barth"] = "Barth",
@@ -1140,14 +1151,13 @@ AIRBASE.GermanyCW = {
["Fritzlar"] = "Fritzlar",
["Fulda"] = "Fulda",
["Gardelegen"] = "Gardelegen",
["Garz"] = "Garz",
["Gatow"] = "Gatow",
["Gelnhausen"] = "Gelnhausen",
["Giebelstadt"] = "Giebelstadt",
["Glindbruchkippe_"] = "Glindbruchkippe ",
["Gross_Doelln"] = "Gross Dolln",
["Glindbruchkippe"] = "Glindbruchkippe ",
["Gross_Mohrdorf"] = "Gross Mohrdorf",
["Grosse_Wiese"] = "Grosse Wiese",
["Gaerz"] = "Garz",
["Guetersloh"] = "Gutersloh",
["H_FRG_01"] = "H FRG 01",
["H_FRG_02"] = "H FRG 02",
@@ -1219,10 +1229,11 @@ AIRBASE.GermanyCW = {
["H_GDR_31"] = "H GDR 31",
["H_GDR_32"] = "H GDR 32",
["H_GDR_33"] = "H GDR 33",
["H_GDR_34"] = "H GDR 34",
["H_Med_FRG_01"] = "H Med FRG 01",
["H_Med_FRG_02"] = "H Med FRG 02",
["H_Med_FRG_04"] = "H Med FRG 04",
["H_Med_FRG_06"] = "H Med FRG 06",
["H_Med_FRG_09"] = "H Med FRG 09",
["H_Med_FRG_11"] = "H Med FRG 11",
["H_Med_FRG_12"] = "H Med FRG 12",
["H_Med_FRG_13"] = "H Med FRG 13",
@@ -1270,9 +1281,9 @@ AIRBASE.GermanyCW = {
["Koethen"] = "Kothen",
["Laage"] = "Laage",
["Langenselbold"] = "Langenselbold",
["Laerz"] = "Larz",
["Leipzig_Halle"] = "Leipzig Halle",
["Leipzig_Mockau"] = "Leipzig Mockau",
["Laerz"] = "Larz",
["Luebeck"] = "Lubeck",
["Lueneburg"] = "Luneburg",
["Mahlwinkel"] = "Mahlwinkel",
@@ -1290,14 +1301,15 @@ AIRBASE.GermanyCW = {
["Pottschutthoehe"] = "Pottschutthohe",
["Ramstein"] = "Ramstein",
["Rinteln"] = "Rinteln",
["Schweinfurt"] = "Schweinfurt",
["Schoenefeld"] = "Schonefeld",
["Schweinfurt"] = "Schweinfurt",
["Sembach"] = "Sembach",
["Spangdahlem"] = "Spangdahlem",
["Sperenberg"] = "Sperenberg",
["Stendal"] = "Stendal",
["Tegel"] = "Tegel",
["Tempelhof"] = "Tempelhof",
["Templin"] = "Templin",
["Tutow"] = "Tutow",
["Uelzen"] = "Uelzen",
["Uetersen"] = "Uetersen",
@@ -1309,6 +1321,7 @@ AIRBASE.GermanyCW = {
["Weser_Wuemme"] = "Weser Wumme",
["Wiesbaden"] = "Wiesbaden",
["Wismar"] = "Wismar",
["Wittstock"] = "Wittstock",
["Worms"] = "Worms",
["Wunstorf"] = "Wunstorf",
["Zerbst"] = "Zerbst",
@@ -2581,7 +2594,7 @@ function AIRBASE:_InitRunways(IncludeInverse)
runway.name=string.format("%02d", tonumber(namefromheading))
else
runway.name=string.format("%02d", tonumber(name))
self:I("RunwayName: "..runway.name)
--self:I("RunwayName: "..runway.name)
end
--runway.name=string.format("%02d", tonumber(name))

View File

@@ -912,15 +912,18 @@ function GROUP:GetVelocityVec3()
if DCSGroup and DCSGroup:isExist() then
local GroupUnits = DCSGroup:getUnits()
local GroupCount = #GroupUnits
local GroupCount = 0
local VelocityVec3 = { x = 0, y = 0, z = 0 }
for _, DCSUnit in pairs( GroupUnits ) do
local UnitVelocityVec3 = DCSUnit:getVelocity()
VelocityVec3.x = VelocityVec3.x + UnitVelocityVec3.x
VelocityVec3.y = VelocityVec3.y + UnitVelocityVec3.y
VelocityVec3.z = VelocityVec3.z + UnitVelocityVec3.z
if DCSUnit:isExist() and DCSUnit:isActive() then
local UnitVelocityVec3 = DCSUnit:getVelocity()
VelocityVec3.x = VelocityVec3.x + UnitVelocityVec3.x
VelocityVec3.y = VelocityVec3.y + UnitVelocityVec3.y
VelocityVec3.z = VelocityVec3.z + UnitVelocityVec3.z
GroupCount = GroupCount + 1
end
end
VelocityVec3.x = VelocityVec3.x / GroupCount
@@ -1754,11 +1757,13 @@ function GROUP:GetMaxVelocity()
for Index, UnitData in pairs( DCSGroup:getUnits() ) do
local UnitVelocityVec3 = UnitData:getVelocity()
local UnitVelocity = math.abs( UnitVelocityVec3.x ) + math.abs( UnitVelocityVec3.y ) + math.abs( UnitVelocityVec3.z )
if UnitData:isExist() and UnitData:isActive() then
local UnitVelocityVec3 = UnitData:getVelocity()
local UnitVelocity = math.abs( UnitVelocityVec3.x ) + math.abs( UnitVelocityVec3.y ) + math.abs( UnitVelocityVec3.z )
if UnitVelocity > GroupVelocityMax then
GroupVelocityMax = UnitVelocity
if UnitVelocity > GroupVelocityMax then
GroupVelocityMax = UnitVelocity
end
end
end

View File

@@ -897,7 +897,7 @@ function UNIT:GetAmmunition()
nAPshells = nAPshells + Nammo
end
if ammotable[w].desc.typeName and string.find(ammotable[w].desc.typeName, "_HE", 1, true) then
if ammotable[w].desc.typeName and (string.find(ammotable[w].desc.typeName, "_HE", 1, true) or string.find(ammotable[w].desc.typeName, "HESH", 1, true)) then
nHEshells = nHEshells + Nammo
end
@@ -1107,7 +1107,6 @@ function UNIT:GetUnits()
if DCSUnit then
Units[1] = UNIT:Find(DCSUnit)
- self:T3(Units)
return Units
end