Compare commits

...

1112 Commits

Author SHA1 Message Date
Thomas 1be2c92a5c Merge pull request #2612 from shaji-Dev/master-ng
CTLD + ENUMS
2026-07-17 07:19:31 +02:00
shafik 4c8a17fe57 Merge remote-tracking branch 'origin/master-ng' into master-ng 2026-07-16 19:58:51 +02:00
shafik 64dea17982 [FIXED] Hardcoded "blue" coalition in SET filters (Doesn't work for redfor in PvP).
[FIXED] Unnecessary new COORDINATE objects that don't hold reference (used only for distance calc).
2026-07-16 19:58:36 +02:00
shafik b1f86c702d [ADDED] F-100 weapons enums 2026-07-16 19:48:35 +02:00
Thomas 1a9540d0d4 Merge pull request #2611 from FlightControl-Master/develop
Develop
2026-07-16 06:45:05 +02:00
Thomas cdfaac527c Merge pull request #2606 from shaji-Dev/master-ng
[FIX] "Parameter #1 (group id) missed" refreshing menus for dead groups
2026-07-15 19:53:58 +02:00
Thomas 4e3bf9969b Merge pull request #2610 from FlightControl-Master/master-ng
Merge from master
2026-07-15 19:52:43 +02:00
Thomas 74c16bd4f0 Merge pull request #2609 from leka1986/agent/group-change-option-event
Add group option change event support
2026-07-15 19:51:38 +02:00
leka1986 55e048b322 Add group option change event support 2026-07-15 18:39:46 +02:00
Thomas b31fb7ece3 Merge pull request #2608 from FlightControl-Master/master-ng
Merge from master
2026-07-15 18:35:50 +02:00
Thomas 149e3421d9 Merge pull request #2607 from patpatpowercat/develop
Update Mantis.lua
2026-07-15 18:34:53 +02:00
patpatpowercat 338ec34604 Update Mantis.lua
Added ships to MANTIS.

NAVYGROUPs may be integrated. Need to be aware MANTIS doesn't change ROE.

SEAD does not (by default) effect ships.

Ships are individually identified, not as group. Group will react to jamming as a whole, will go live/sleep based upon longest range/best radar.

No longer need prefixes for either ground or naval units.
2026-07-14 21:47:47 -07:00
Shafik 3d79a16d3a [FIX] "Parameter #1 (group id) missed" refreshing menus for dead groups 2026-07-13 11:02:42 +03:00
Thomas efa08c1280 Merge pull request #2605 from FlightControl-Master/master-ng
Merge from master
2026-07-12 17:58:28 +02:00
Thomas 589e65963f Merge pull request #2604 from FlightControl-Master/leka1986-patch-2
Fix aircraft model names for Lancer and Kiowa
2026-07-12 17:57:29 +02:00
leka1986 af4f20af67 Fix aircraft model names for Lancer and Kiowa 2026-07-12 13:30:33 +02:00
Applevangelist b1b8630d21 Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-28 09:31:16 +02:00
Applevangelist 98ed7d50c1 #EASYGCICAP
* Added `SetDefaultINTERCEPTAlt()`
2026-06-28 09:30:45 +02:00
Applevangelist 4ba81cb8bc Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-27 10:57:53 +02:00
Applevangelist 626b12f486 #MSRS #HOUND corrected frequency formatting to allow 1000ths of a frequency 2026-06-27 10:57:27 +02:00
Thomas 36c0297344 Merge pull request #2603 from FlightControl-Master/master-ng
Update ScheduleDispatcher.lua
2026-06-26 12:35:03 +02:00
Thomas 8c60a8c678 Update ScheduleDispatcher.lua
Undoing previous change as some delayed event calls stopped working, probably FSM. Need to find the reason for that.
2026-06-26 12:31:54 +02:00
Thomas 6829d75464 Merge pull request #2602 from FlightControl-Master/master-ng
Merge
2026-06-24 06:30:19 +02:00
Thomas 867f919d5f Merge pull request #2601 from FlightControl-Master/leka1986-patch-2
Update Utils.lua
2026-06-24 06:29:28 +02:00
leka1986 f769a0deb5 Update Utils.lua
Added KA-50_3 door check.
2026-06-24 01:56:31 +02:00
Applevangelist 4efd71e36a Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-23 12:30:14 +02:00
Applevangelist 7e9dd9deff #EASYGCICAP - fall back to GCI behaviour if no CAP Points have been defined. 2026-06-23 12:29:45 +02:00
Applevangelist fed9174bcb Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-21 12:53:35 +02:00
Applevangelist b6ea6606fc #SCHEDULEDISPATCHER - Fixing a memory leak. Thanks to @Shazzer1951 2026-06-21 12:51:50 +02:00
Thomas 9963c737a3 Merge pull request #2599 from FlightControl-Master/master-ng
Merge from master
2026-06-14 17:53:05 +02:00
Thomas 5005203206 Merge pull request #2598 from patpatpowercat/develop
Update Airboss.lua
2026-06-14 17:52:13 +02:00
patpatpowercat a3455855b8 Update Airboss.lua
Remove max speed check that limits WOD in high winds.

This restriction seems redundant with GetHeadingIntoWind_new should return 30 with 0 wind (max carrier speed) regardless of requested WOD speed.
2026-06-14 08:36:38 -07:00
Applevangelist 73d3ed119c Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-14 16:11:05 +02:00
Applevangelist d1e4dd3fe9 #EVENT - small fix 2026-06-14 16:10:34 +02:00
Applevangelist 23112c9954 Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-14 13:45:08 +02:00
Applevangelist 9326cfad1c #AIRBASE - Add Syria Airbases 2026-06-14 13:44:44 +02:00
Applevangelist 23c59d906f Merge remote-tracking branch 'origin/develop' into develop 2026-06-14 12:07:31 +02:00
Applevangelist cc62655ffe Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-14 12:07:25 +02:00
Applevangelist b8e114101b #EVENT - Event Shoot fix for ZELL Boosters 2026-06-14 12:06:54 +02:00
Thomas 401e9d9e8e Merge pull request #2597 from FlightControl-Master/master-ng
Merge from master
2026-06-14 09:57:46 +02:00
Thomas f083b77390 Merge pull request #2596 from patpatpowercat/develop
Update Airboss.lua
2026-06-14 09:56:13 +02:00
patpatpowercat db3bc3742e Update Airboss.lua
Fix: manually stopped recovery windows immediately re-open. _CheckRecoveryTimes re-opened any window in its active time range without checking recovery.OVER, while DeleteRecoveryWindow failed to remove still-open windows. Added the OVER guard on the open path and made window deletion reliable and iteration-safe.
2026-06-13 09:36:27 -07:00
Applevangelist 9b1a3e4894 Merge remote-tracking branch 'origin/master-ng' into develop
# Conflicts:
#	Moose Development/Moose/Core/Spawn.lua
2026-06-11 17:34:53 +02:00
Applevangelist bf10196662 xx 2026-06-11 17:34:19 +02:00
Thomas 6c32aa6044 Merge pull request #2595 from geofffranks/fix/spawn-air-takeoff-event-args
fix(Spawn): air-spawn takeoff event never fired (wrong arg packing)
2026-06-11 07:59:43 +02:00
Geoff Franks edf70e971c fix(Spawn): air-spawn takeoff event never fired (wrong arg packing)
SPAWN:SpawnAtAirbase scheduled the synthetic takeoff event for air-spawned
groups with:

    self:ScheduleOnce(5, BASE.CreateEventTakeoff,
                      {GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject()})

BASE:ScheduleOnce(Start, SchedulerFunction, ...) forwards its trailing
arguments to the scheduled function as varargs (it wraps `...` in a table
internally). Wrapping the arguments in a table here made that table argument
number one, so CreateEventTakeoff ran with the {group, time, dcs} table as
`self`. A plain table has no :F(), the very first line errored, and the
S_EVENT_TAKEOFF event was never raised. Air-spawned AI_A2A_DISPATCHER GCI
defenders therefore never activated (observed: zero QRA scrambled with
takeoff = Air).

The sibling call site in SpawnAtParkingSpot is correct because it uses
SCHEDULER:New(nil, fn, {args}, 5), which DOES take a single argument table.
Drop the braces so the args pass as varargs, matching CreateEventTakeoff's
(self=group, EventTime, Initiator) signature.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-10 21:02:40 -04:00
Thomas 7c5af54473 Merge pull request #2594 from FlightControl-Master/master-ng
Merge from master
2026-06-07 20:04:55 +02:00
Thomas a0420e1cb6 Merge pull request #2593 from patpatpowercat/develop
Update Mantis.lua
2026-06-07 20:04:10 +02:00
Applevangelist 2aa9b91ce5 Merge remote-tracking branch 'origin/master-ng' into develop 2026-06-05 14:25:35 +02:00
Applevangelist 27bd27a2e5 #EASYGCICAP - create correct number of Alert5 missions instead of relying on the number of required assets 2026-06-05 14:25:02 +02:00
patpatpowercat 8e219c5877 Update Mantis.lua
Widened (long-range systems): Nike, Hawk, SA-5, SA-12, SA-20A/B, SA-21/S-400, SA-22, SA-23/B, Patriot PAC-2/3, NASAMS, HQ-22, THAAD, IRIS-T, SON-9 → matches actual radar coverage rather than missile kinematic range
Tightened (short-range systems): SA-15, SA-19, HQ-7, HQ-17, Rapier → SHORAD shouldn't be jammable from absurd standoff
2026-06-01 11:20:24 -07:00
Applevangelist fdc19a6898 Merge remote-tracking branch 'origin/develop' into develop 2026-05-24 13:01:26 +02:00
Applevangelist d3ebf023fb Merge remote-tracking branch 'origin/master-ng' into develop 2026-05-24 13:01:22 +02:00
Applevangelist 3d1dcd78a3 #SPAWN - fix SpawnOnRunway if definitely requested (SP only!) 2026-05-24 13:00:57 +02:00
Thomas d40c559d2d Merge pull request #2592 from FlightControl-Master/master-ng
Merge
2026-05-21 20:04:54 +02:00
Thomas 9cda1b88ea Merge pull request #2591 from patpatpowercat/develop
Add jammer ability to MANTIS
2026-05-21 20:03:54 +02:00
patpatpowercat 09f99b9a74 Merge branch 'develop' of https://github.com/FlightControl-Master/MOOSE into develop 2026-05-19 09:41:34 -07:00
Thomas ff5205e686 Merge pull request #2590 from FlightControl-Master/master-ng
Merge from master
2026-05-18 06:24:53 +02:00
Thomas ebd105f80d Merge pull request #2589 from FlightControl-Master/leka1986-patch-1
Update Shorad.lua
2026-05-18 06:23:59 +02:00
leka1986 cc8a4e0bad Update CTLD_Localization.lua
Added Italian localization.
2026-05-16 19:29:50 +02:00
leka1986 5f70e2d6b1 Add Italian locale support to CTLD
Added Italian Localization
2026-05-16 19:29:07 +02:00
leka1986 95f38fbf55 Update Shorad.lua
Fix tgtgrp2 is nil.
2026-05-16 19:27:06 +02:00
Applevangelist aec3466f13 Merge remote-tracking branch 'origin/master-ng' into develop 2026-05-14 10:47:23 +02:00
Applevangelist 696630fe4d #SUPPRESSION - fix typo 2026-05-14 10:46:22 +02:00
Applevangelist 47aa524677 Merge remote-tracking branch 'origin/master-ng' into develop 2026-05-10 13:04:56 +02:00
Applevangelist 79f03c164c xx 2026-05-10 13:04:29 +02:00
patpatpowercat ca7d3a48a7 Update Mantis.lua
The following code is modified MANTIS code that adds jamming capability. It has new custom code for all SAMs, fixes a couple SAM issues (S-300V/V4, adds SON-9). Clients/players can select their loadout, and then utilize the F10 menu to turn the jammer on/off. For AI aircraft, they can be setup with whatever loadout, and then scripted to turn their jammer on/off.
2026-05-08 14:02:06 -07:00
Thomas 2556dbe145 Merge pull request #2588 from FlightControl-Master/master-ng
Update Auftrag.lua
2026-05-05 11:47:29 +02:00
Thomas af1e9546e5 Update Auftrag.lua
line 6613 - Fix for HasSEAD should it find statics unexpectedly
2026-05-05 11:46:16 +02:00
Thomas 3203a22668 Merge pull request #2587 from FlightControl-Master/master-ng
Merge
2026-05-05 10:34:35 +02:00
Thomas b69ac2f86f Merge pull request #2586 from FlightControl-Master/leka1986-patch-1
Update CTLD.lua
2026-05-05 10:33:36 +02:00
leka1986 0d410f3e55 Update CTLD.lua
remove whitespace
2026-05-03 19:51:24 +02:00
leka1986 cbe6756330 Update CTLD.lua 2026-05-03 19:27:46 +02:00
leka1986 07045be32b Update CTLD_Localization.lua
Added traditional Chinese and Taiwan Chinese
2026-05-03 19:27:16 +02:00
leka1986 52a2132463 Update CTLD_Localization.lua
Added CH,  PT-BR, TR.
2026-05-03 16:21:14 +02:00
leka1986 9272b1f18c Update CTLD.lua
### Summary
- Added an optional CTLD group locale resolver for group-targeted menus and messages.
- Routed CTLD group menu/message localization through group-aware lookup while preserving `self.locale` as the default fallback.
- Added an optional cargo display formatter with group context for missions that need custom cargo labels.
- Added `MENU_CRATE_SINGLE` localization so single-crate menu labels use the localization table, matching multi-crate labels.

### Compatibility
Default behavior is unchanged unless a mission calls `SetGroupLocaleResolver` or `SetCargoDisplayFormatter`.

### Motivation
This allows missions with per-player or per-group language settings to localize CTLD menus and group messages without changing the global CTLD locale, This can be used to persist localization choice using the player name.
2026-05-03 16:19:44 +02:00
Applevangelist b84880c0dd Merge remote-tracking branch 'origin/develop' into develop 2026-05-01 12:46:49 +02:00
Applevangelist a9be18b284 Merge remote-tracking branch 'origin/master-ng' into develop 2026-05-01 12:46:45 +02:00
Thomas 93178df67f Merge pull request #2585 from FlightControl-Master/master-ng
Merge from master
2026-04-30 17:38:17 +02:00
Thomas f34bf1e052 Merge pull request #2584 from HoodiNahi/fix/spawn-init-randomize-zones-nil-gaurd
Fix(Spawn):add nil gaurd to InitRandomizeZones
2026-04-30 17:37:30 +02:00
HoodiNahi e159eb83b7 fix syntax 2026-04-30 20:07:36 +05:30
HoodiNahi 2581836058 Fix(Spawn):add nil gaurd to InitRandomizeZones 2026-04-30 20:03:52 +05:30
Thomas d9651e1dea Merge pull request #2583 from FlightControl-Master/master-ng
Pr
2026-04-27 17:34:03 +02:00
Thomas 0347f185a5 Merge pull request #2582 from FlightControl-Master/leka1986-patch-1
Leka1986 patch 1
2026-04-27 17:33:27 +02:00
leka1986 5e2218de38 Expand locale options in CTLD.lua
Updated language locale options to include Spanish and Russian.
2026-04-26 19:26:23 +02:00
leka1986 6db5441bb1 Modify parking spot handling in Spawn.lua
Refactor parking spot usage logic to use explicit spots when available.
2026-04-26 19:13:09 +02:00
leka1986 13b7e43729 Update CTLD_Localization.lua
Russian localization.
2026-04-26 19:11:26 +02:00
leka1986 a72f7298d0 Update CTLD.lua
Added Russian locale, 

- my_ctld.locale = "ru"
2026-04-26 19:10:03 +02:00
Applevangelist 801cc105da Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-25 16:49:58 +02:00
Applevangelist f186b4bd58 xx 2026-04-25 16:49:10 +02:00
Frank 79f13fa6ae Update Warehouse.lua
- fixes bug that descriptors are not obtained
2026-04-25 16:45:26 +02:00
Applevangelist d38fc4ec8f Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-23 12:41:40 +02:00
Applevangelist ba1575d674 #MSRS - Added Hound Jammer option functionality 2026-04-23 12:41:01 +02:00
Applevangelist 391182e23f Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-21 18:30:01 +02:00
Applevangelist 6d5fb64fde #TARS - Docu additions 2026-04-21 18:29:25 +02:00
Frank 5df1fb88f1 Merge branch 'master-ng' of https://github.com/FlightControl-Master/MOOSE into master-ng 2026-04-20 21:47:38 +02:00
Frank 2e4d4f056a Update SRS.lua
- fixed bug if no frequencies and/or modulations are specified (UTILS.EnsureTable returned an empty table not nil. therefore, self.frequencies and self.modulations was not used)
2026-04-20 21:47:36 +02:00
Thomas a9ceda4edd Merge pull request #2580 from FlightControl-Master/master-ng
Merge from master
2026-04-20 06:36:40 +02:00
Thomas e76fd23396 Merge pull request #2579 from FlightControl-Master/leka1986-patch-1
Update Spawn.lua
2026-04-20 06:35:31 +02:00
leka1986 7df1eb963f Update CSAR.lua
CSAR now treats aircraft with AircraftType[type] <= 0 as not CSAR-capable when building the active SAR unit list, while still allowing those type keys to exist for other systems such as FARP storage setup.

Added those to the type,

CSAR.AircraftType["Ka-50_3"] = 0
CSAR.AircraftType["Ka-50"] = 0
CSAR.AircraftType["AV8BNA"] = 0
2026-04-19 20:36:44 +02:00
leka1986 aff1d3c7db Update Spawn.lua
SPAWN:SpawnAtAirbase() and SPAWN:ParkAircraft() now handle HELIPAD/FARP parking the same way as airbases: explicit parking is honored first, helicopter spawns try the smarter parking search before falling back to the simpler free-spot table.
2026-04-19 20:35:20 +02:00
Applevangelist d15f6cdb44 Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-19 15:31:01 +02:00
Applevangelist c59b668eec #TARS
- Correct optical view projection implemented (ellipse bc of the angle of view)
- Duration now describes the number of expositions your camera has
- Interval of shots is dependent on the speed of the TARS unit
- Added platform parameters overlap (of shots, usually 25% for faster movers, 50% for slower ones), overlap is clamped by minimum interval — at high speeds the interval floor is reached and overlap effectively increases (and you go through shots really fast)
- Fixed zone draw for debug
2026-04-19 15:29:40 +02:00
Applevangelist 4620a83317 Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-16 12:38:47 +02:00
Applevangelist 87d0c4e9d4 #TARS - Added TARS_SESSION.debugunitsearch = false and F10 search zone draw for debugging 2026-04-16 12:38:15 +02:00
Thomas 74361f6a3a Merge pull request #2578 from FlightControl-Master/master-ng
Merge
2026-04-16 07:00:29 +02:00
Thomas b82b882e02 Merge pull request #2577 from FlightControl-Master/leka1986-patch-1
Update CTLD.lua
2026-04-16 06:59:46 +02:00
leka1986 347783d4b7 Update CTLD_Localization.lua
---
-- @field Messages
CTLD.Messages = {
    EN = {
        -- ============================================================
        -- Crate / Cargo Loading
        -- ============================================================
        CRATE_LOADED_GROUNDCREW         = "Crate %s loaded by ground crew!",
        CRATE_UNLOADED_GROUNDCREW       = "Crate %s unloaded by ground crew!",
        CRATE_LOADED_ID                 = "Crate ID %d for %s loaded!",
        LOADED_FULL                     = "Loaded %d %s.",
        LOADED_SETS_LEFTOVER            = "Loaded %d %s(s), with %d leftover crate(s).",
        LOADED_SETS                     = "Loaded %d %s(s).",
        LOADED_PARTIAL                  = "Loaded only %d/%d crate(s) of %s.",
        LOADED_PARTIAL_LIMIT            = "Loaded only %d/%d crate(s) of %s. Cargo limit is now reached!",
        LOADED_BATCH                    = "Loaded %d %s.",
        LOADED_BATCH_PARTIAL            = "Some sets could not be fully loaded.",
        -- ============================================================
        -- Dropping / Unloading
        -- ============================================================
        DROPPED_FULL                    = "Dropped %d %s.",
        DROPPED_SETS_LEFTOVER           = "Dropped %d %s(s), with %d leftover crate(s).",
        DROPPED_SETS                    = "Dropped %d %s(s).",
        DROPPED_PARTIAL                 = "Dropped %d/%d crate(s) of %s.",
        DROPPED_INTO_ACTION             = "Dropped %s into action!",
        DROPPED_BEACON                  = "Dropped %s | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
        CRATES_POSITIONED               = "%d crates for %s have been positioned near you!",
        CRATES_DROPPED                  = "%d crates for %s have been dropped!",
        -- ============================================================
        -- Troops
        -- ============================================================
        BOARDED                         = "%s boarded!",
        BOARDING                        = "%s boarding!",
        TROOPS_RETURNED                 = "Troops have returned to base!",
        -- ============================================================
        -- Deployment
        -- ============================================================
        DEPLOYED_NEAR_YOU               = "%s have been deployed near you!",
        UNITS_REMOVED                   = "%s have been removed",
        -- ============================================================
        -- Build / Repair
        -- ============================================================
        BUILD_STARTED                   = "Build started, ready in %d seconds!",
        REPAIR_STARTED                  = "Repair started using %s taking %d secs",
        NO_UNIT_TO_REPAIR               = "No unit close enough to repair!",
        CANT_REPAIR_WITH                = "Can't repair this unit with %s",
        CRATES_MOVE_BEFORE_BUILD        = "*** Crates need to be moved before building!",
        -- ============================================================
        -- Errors - Chopper / Weight / Capacity
        -- ============================================================
        CHOPPER_CANNOT_CARRY            = "Sorry this chopper cannot carry crates!",
        TOO_HEAVY                       = "Sorry, that's too heavy to load!",
        FULLY_LOADED                    = "Sorry, we are fully loaded!",
        CRAMMED                         = "Sorry, we're crammed already!",
        NO_CAPACITY_NOW                 = "No capacity to load more now!",
        NO_MORE_CAPACITY                = "No more capacity to load crates!",
        CANNOT_LOAD_NONE_OR_FULL        = "Cannot load crates: either none found or no capacity left.",
        -- ============================================================
        -- Errors - Position
        -- ============================================================
        NEED_TO_LAND_OR_HOVER_LOAD      = "You need to land or hover in position to load!",
        HOVER_OVER_CRATES               = "Hover over the crates to pick them up!",
        LAND_OR_HOVER_OVER_CRATES       = "Land or hover over the crates to pick them up!",
        MUST_LAND_OR_HOVER_CRATES       = "You must land or hover to load crates!",
        NEED_TO_LAND_BUILD              = "You need to land / stop to build something, Pilot!",
        NOT_CLOSE_ENOUGH_LOGISTICS      = "You are not close enough to a logistics zone!",
        NOT_CLOSE_ENOUGH_DROP           = "You are not close enough to a drop zone!",
        NOT_CLOSE_ENOUGH_ZONE_NM        = "Negative, need to be closer than %dnm to a zone!",
        CANNOT_BUILD_LOADING_AREA       = "You cannot build in a loading area, Pilot!",
        -- ============================================================
        -- Errors - Doors
        -- ============================================================
        OPEN_DOORS_LOAD_CARGO           = "You need to open the door(s) to load cargo!",
        OPEN_DOORS_LOAD_TROOPS          = "You need to open the door(s) to load troops!",
        OPEN_DOORS_EXTRACT_TROOPS       = "You need to open the door(s) to extract troops!",
        OPEN_DOORS_UNLOAD_TROOPS        = "You need to open the door(s) to unload troops!",
        OPEN_DOORS_DROP_CARGO           = "You need to open the door(s) to drop cargo!",
        -- ============================================================
        -- Errors - Stock / Availability
        -- ============================================================
        ALL_GONE                        = "Sorry, all %s are gone!",
        RAN_OUT_OF                      = "Sorry, we ran out of %s",
        CARGO_NOT_AVAILABLE_ZONE        = "The requested cargo is not available in this zone!",
        ENOUGH_CRATES_NEARBY            = "There are enough crates nearby already! Take care of those first!",
        NO_CRATES_WITHIN                = "No (loadable) crates within %d meters!",
        NO_CRATES_WITHIN_PLAIN          = "No crates within %d meters!",
        NO_CRATES_IN_RANGE              = "No crates found in range!",
        NO_NAMED_CRATES_IN_RANGE        = "No \"%s\" crates found in range!",
        NO_LOADABLE_CRATES              = "Sorry, no loadable crates nearby or max cargo weight reached!",
        NO_UNITS_TO_EXTRACT             = "No units close enough to extract!",
        NO_UNIT_CONFIG                  = "No unit configuration found for %s",
        CANT_ONBOARD                    = "Can't onboard %s",
        TOO_MANY_UNITS_NEARBY           = "You already have %d units nearby!",
        NO_CRATE_GROUPS                 = "No crate groups found for this unit!",
        NO_CRATE_SET                    = "No crate set found or index invalid!",
        NO_CRATE_IN_SET                 = "No crate found in that set!",
        NO_TROOP_CHUNK                  = "No troop cargo chunk found for ID %d!",
        TROOP_CHUNK_EMPTY               = "Troop chunk is empty for ID %d!",
        -- ============================================================
        -- Nothing loaded / in stock
        -- ============================================================
        NOTHING_LOADED                  = "Nothing loaded!\nTroop limit: %d | Crate limit %d | Weight limit %d kgs",
        NOTHING_LOADED_AIRDROP          = "Nothing loaded or not within airdrop parameters!",
        NOTHING_LOADED_HOVER            = "Nothing loaded or not hovering within parameters!",
        NOTHING_IN_STOCK                = "Nothing in stock!",
        NOTHING_TO_PACK                 = "Nothing to pack at this distance pilot!",
        NOTHING_TO_REMOVE               = "Nothing to remove at this distance pilot!",
        -- ============================================================
        -- Zone / Info
        -- ============================================================
        ROGER_ZONE                      = "Roger, %s zone %s!",
        -- ============================================================
        -- Report: Hover / Flight Parameters
        -- ============================================================
        HOVER_PARAMS_METRIC             = "Hover parameters (autoload/drop):\n - Min height %dm \n - Max height %dm \n - Max speed 2mps \n - In parameter: %s",
        HOVER_PARAMS_IMPERIAL           = "Hover parameters (autoload/drop):\n - Min height %dft \n - Max height %dft \n - Max speed 6ftps \n - In parameter: %s",
        FLIGHT_PARAMS_IMPERIAL          = "Flight parameters (airdrop):\n - Min height %dft \n - Max height %dft \n - In parameter: %s",
        FLIGHT_PARAMS_METRIC            = "Flight parameters (airdrop):\n - Min height %dm \n - Max height %dm \n - In parameter: %s",
        -- ============================================================
        -- Report Titles  (REPORT:New())
        -- ============================================================
        REPORT_CRATES_FOUND             = "Crates Found Nearby:",
        REPORT_REMOVING_CRATES          = "Removing Crates Found Nearby:",
        REPORT_TRANSPORT_CHECKOUT       = "Transport Checkout Sheet",
        REPORT_INVENTORY                = "Inventory Sheet",
        REPORT_BUILD_CHECKLIST          = "Checklist Buildable Crates",
        REPORT_REPAIR_CHECKLIST         = "Checklist Repairs",
        REPORT_BEACONS                  = "Active Zone Beacons",
        -- ============================================================
        -- Report Section Headers  (report:Add())
        -- ============================================================
        REPORT_SECTION_TROOPS           = "        -- TROOPS --",
        REPORT_SECTION_CRATES           = "       -- CRATES --",
        REPORT_SECTION_CRATES_GC        = "       -- CRATES loaded via Ground Crew --",
        REPORT_SECTION_NONE             = "        N O N E",
        REPORT_SECTION_NONE_ALT         = "     --- None found! ---",
        REPORT_SECTION_NONE_REPAIR      = "     --- None Found ---",
        REPORT_GC_LOADABLE_HINT         = "Probably ground crew loadable (F8)",
        REPORT_TOTAL_MASS               = "Total Mass: %s kg. Loadable: %s kg.",
        REPORT_TROOPS_CRATES_COUNT      = "Troops: %d(%d), Crates: %d(%d)",
        REPORT_TROOPS_CRATETYPES_COUNT  = "Troops: %d, Cratetypes: %d",
        -- ============================================================
        -- Report Row Templates  (per-item lines in reports)
        -- ============================================================
        REPORT_ROW_TROOP                = "Troop: %s size %d",
        REPORT_ROW_CRATE                = "Crate: %s %d/%d",
        REPORT_ROW_CRATE_SIZE1          = "Crate: %s size 1",
        REPORT_ROW_GC_CRATE             = "GC loaded Crate: %s size 1",
        REPORT_ROW_DROPPED_CRATE        = "Dropped crate for %s, %dkg",
        REPORT_ROW_CRATE_KG             = "Crate for %s, %dkg",
        REPORT_ROW_CRATE_REMOVED        = "Crate for %s, %dkg removed",
        REPORT_ROW_UNIT_STOCK           = "Unit: %s | Soldiers: %d | Stock: %s",
        REPORT_ROW_TYPE_CRATE_STOCK     = "Type: %s | Crates per Set: %d | Stock: %s",
        REPORT_ROW_TYPE_STOCK           = "Type: %s | Stock: %s",
        REPORT_ROW_BUILD_CHECK          = "Type: %s | Required %d | Found %d | Can Build %s",
        REPORT_ROW_REPAIR_CHECK         = "Type: %s | Required %d | Found %d | Can Repair %s",
        REPORT_ROW_BEACON               = " %s | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
        -- ============================================================
        -- Weight / Crate limit tokens
        -- ============================================================
        WEIGHT_LIMIT                    = "Weight limit reached",
        CRATE_LIMIT                     = "Crate limit reached",
        -- ============================================================
        -- Menu labels - Top level
        -- ============================================================
        MENU_CTLD                       = "CTLD",
        MENU_MANAGE_TROOPS              = "Manage Troops",
        MENU_MANAGE_CRATES              = "Manage Crates",
        MENU_MANAGE_UNITS               = "Manage Units",
        -- ============================================================
        -- Menu labels - Troops
        -- ============================================================
        MENU_LOAD_TROOPS                = "Load troops",
        MENU_DROP_TROOPS                = "Drop Troops",
        MENU_DROP_ALL_TROOPS            = "Drop ALL troops",
        MENU_EXTRACT_TROOPS             = "Extract troops",
        MENU_DROP_N_TROOPS              = "Drop (%d) %s",
        -- ============================================================
        -- Menu labels - Crates: Get
        -- ============================================================
        MENU_GET_CRATES                 = "Get Crates",
        MENU_GET                        = "Get",
        MENU_GET_AND_LOAD               = "Get and Load",
        MENU_GET_ANYWAY                 = "Get anyway",
        MENU_PARTIALLY_LOAD             = "Partially load",
        MENU_OUT_OF_STOCK               = "Out of stock",
        MENU_TROOP_LIMIT                = "Troop limit reached",
        -- ============================================================
        -- Menu labels - Crates: Load
        -- ============================================================
        MENU_LOAD_CRATES                = "Load Crates",
        MENU_LOAD_ALL                   = "Load ALL",
        MENU_SHOW_LOADABLE_CRATES       = "Show loadable crates",
        MENU_NO_CRATES_FOUND_RESCAN     = "No crates found! Rescan?",
        MENU_USE_C130_LOAD              = "Use C-130 Load system",
        MENU_LOAD_SINGLE                = "Load",
        -- ============================================================
        -- Menu labels - Crates: Drop
        -- ============================================================
        MENU_DROP_CRATES                = "Drop Crates",
        MENU_DROP_ALL_CRATES            = "Drop ALL crates",
        MENU_DROP                       = "Drop",
        MENU_DROP_AND_BUILD             = "Drop and build",
        MENU_DROP_N_SETS                = "Drop %d Set%s",
        MENU_NO_CRATES_TO_DROP          = "No crates to drop!",
        -- ============================================================
        -- Menu labels - Crates: Build / Repair / Pack / Remove
        -- ============================================================
        MENU_BUILD_CRATES               = "Build crates",
        MENU_REPAIR                     = "Repair",
        MENU_PACK_CRATES                = "Pack crates",
        MENU_PACK                       = "Pack",
        MENU_SCAN_PACKABLE_UNITS        = "Scan packable units nearby",
        MENU_NO_PACKABLE_UNITS_FOUND_RESCAN = "No packable units found! Rescan?",
        MENU_PACK_ALL                   = "Pack nearby",
        MENU_PACK_AND_LOAD              = "Pack and Load",
        MENU_PACK_AND_LOAD_ALL          = "Pack and Load nearby",
        MENU_PACK_AND_REMOVE            = "Pack and Remove",
        MENU_PACK_AND_REMOVE_ALL        = "Pack and Remove nearby",
        MENU_REMOVE_CRATES              = "Remove crates",
        MENU_REMOVE_CRATES_NEARBY       = "Remove crates nearby",
        MENU_LIST_CRATES_NEARBY         = "List crates nearby",
        MENU_CRATES_NEEDED              = "%d crate%s %s (%dkg)",
        -- ============================================================
        -- Menu labels - Units (C-130)
        -- ============================================================
        MENU_GET_UNITS                  = "Get Units",
        MENU_REMOVE_UNITS_NEARBY        = "Remove units nearby",
        -- ============================================================
        -- Menu labels - Info / Cargo
        -- ============================================================
        MENU_LIST_BOARDED_CARGO         = "List boarded cargo",
        MENU_INVENTORY                  = "Inventory",
        MENU_LIST_ZONE_BEACONS          = "List active zone beacons",
        -- ============================================================
        -- Menu labels - Smokes / Flares / Beacons
        -- ============================================================
        MENU_SMOKES_FLARES_BEACONS      = "Smokes, Flares, Beacons",
        MENU_SMOKE_ZONES_NEARBY         = "Smoke zones nearby",
        MENU_DROP_SMOKE_NOW             = "Drop smoke now",
        MENU_RED_SMOKE                  = "Red smoke",
        MENU_BLUE_SMOKE                 = "Blue smoke",
        MENU_GREEN_SMOKE                = "Green smoke",
        MENU_ORANGE_SMOKE               = "Orange smoke",
        MENU_WHITE_SMOKE                = "White smoke",
        MENU_FLARE_ZONES_NEARBY         = "Flare zones nearby",
        MENU_FIRE_FLARE_NOW             = "Fire flare now",
        MENU_DROP_BEACON_NOW            = "Drop beacon now",
        -- ============================================================
        -- Menu labels - Parameters
        -- ============================================================
        MENU_SHOW_FLIGHT_PARAMS         = "Show flight parameters",
        MENU_SHOW_HOVER_PARAMS          = "Show hover parameters",
        STOCK_NONE                      = "none",
        STOCK_UNLIMITED                 = "unlimited",
        BUILD_YES                       = "YES",
        BUILD_NO                        = "NO",
    },
  DE = {
        -- ============================================================
        -- Kiste / Fracht laden
        -- ============================================================
        CRATE_LOADED_GROUNDCREW         = "Kiste %s vom Bodenpersonal geladen!",
        CRATE_UNLOADED_GROUNDCREW       = "Kiste %s vom Bodenpersonal entladen!",
        CRATE_LOADED_ID                 = "Kiste ID %d für %s geladen!",
        LOADED_FULL                     = "%d %s geladen.",
        LOADED_SETS_LEFTOVER            = "%d %s geladen, %d Kiste(n) übrig.",
        LOADED_SETS                     = "%d %s geladen.",
        LOADED_PARTIAL                  = "Nur %d/%d Kiste(n) von %s geladen.",
        LOADED_PARTIAL_LIMIT            = "Nur %d/%d Kiste(n) von %s geladen. Frachtlimit erreicht!",
        LOADED_BATCH                    = "%d %s geladen.",
        LOADED_BATCH_PARTIAL            = "Einige Sets konnten nicht vollständig geladen werden.",
        -- ============================================================
        -- Abwerfen / Entladen
        -- ============================================================
        DROPPED_FULL                    = "%d %s abgeworfen.",
        DROPPED_SETS_LEFTOVER           = "%d %s abgeworfen, %d Kiste(n) übrig.",
        DROPPED_SETS                    = "%d %s abgeworfen.",
        DROPPED_PARTIAL                 = "%d/%d Kiste(n) von %s abgeworfen.",
        DROPPED_INTO_ACTION             = "%s im Einsatz abgesetzt!",
        DROPPED_BEACON                  = "%s abgesetzt | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
        CRATES_POSITIONED               = "%d Kisten für %s in Ihrer Nähe positioniert!",
        CRATES_DROPPED                  = "%d Kisten für %s abgeworfen!",
        -- ============================================================
        -- Truppen
        -- ============================================================
        BOARDED                         = "%s eingestiegen!",
        BOARDING                        = "%s steigt ein!",
        TROOPS_RETURNED                 = "Truppen zur Basis zurückgekehrt!",
        -- ============================================================
        -- Einsatz
        -- ============================================================
        DEPLOYED_NEAR_YOU               = "%s in Ihrer Nähe eingesetzt!",
        UNITS_REMOVED                   = "%s entfernt",
        -- ============================================================
        -- Bauen / Reparieren
        -- ============================================================
        BUILD_STARTED                   = "Bau gestartet, fertig in %d Sekunden!",
        REPAIR_STARTED                  = "Reparatur mit %s gestartet, dauert %d Sek.",
        NO_UNIT_TO_REPAIR               = "Keine Einheit in Reichweite zum Reparieren!",
        CANT_REPAIR_WITH                = "Diese Einheit kann nicht mit %s repariert werden",
        CRATES_MOVE_BEFORE_BUILD        = "*** Kisten müssen vor dem Bau verschoben werden!",
        -- ============================================================
        -- Fehler - Hubschrauber / Gewicht / Kapazität
        -- ============================================================
        CHOPPER_CANNOT_CARRY            = "Dieser Hubschrauber kann keine Kisten transportieren!",
        TOO_HEAVY                       = "Entschuldigung, das ist zu schwer zum Laden!",
        FULLY_LOADED                    = "Entschuldigung, wir sind voll beladen!",
        CRAMMED                         = "Entschuldigung, wir sind bereits voll besetzt!",
        NO_CAPACITY_NOW                 = "Aktuell keine Ladekapazität mehr vorhanden!",
        NO_MORE_CAPACITY                = "Keine Kapazität mehr für weitere Kisten!",
        CANNOT_LOAD_NONE_OR_FULL        = "Laden nicht möglich: keine Kisten gefunden oder Kapazität erschöpft.",
        -- ============================================================
        -- Fehler - Position
        -- ============================================================
        NEED_TO_LAND_OR_HOVER_LOAD      = "Bitte landen oder schweben Sie zum Laden!",
        HOVER_OVER_CRATES               = "Schweben Sie über die Kisten, um sie aufzunehmen!",
        LAND_OR_HOVER_OVER_CRATES       = "Landen oder schweben Sie über die Kisten, um sie aufzunehmen!",
        MUST_LAND_OR_HOVER_CRATES       = "Sie müssen landen oder schweben, um Kisten zu laden!",
        NEED_TO_LAND_BUILD              = "Sie müssen landen / anhalten, um etwas zu bauen, Pilot!",
        NOT_CLOSE_ENOUGH_LOGISTICS      = "Sie sind nicht nah genug an einer Logistikzone!",
        NOT_CLOSE_ENOUGH_DROP           = "Sie sind nicht nah genug an einer Abwurfzone!",
        NOT_CLOSE_ENOUGH_ZONE_NM        = "Negativ, Sie müssen näher als %d Seemeilen an einer Zone sein!",
        CANNOT_BUILD_LOADING_AREA       = "In einem Ladebereich kann nicht gebaut werden, Pilot!",
        -- ============================================================
        -- Fehler - Türen
        -- ============================================================
        OPEN_DOORS_LOAD_CARGO           = "Bitte öffnen Sie die Tür(en) zum Laden von Fracht!",
        OPEN_DOORS_LOAD_TROOPS          = "Bitte öffnen Sie die Tür(en) zum Einladen von Truppen!",
        OPEN_DOORS_EXTRACT_TROOPS       = "Bitte öffnen Sie die Tür(en) zum Aussteigen der Truppen!",
        OPEN_DOORS_UNLOAD_TROOPS        = "Bitte öffnen Sie die Tür(en) zum Entladen der Truppen!",
        OPEN_DOORS_DROP_CARGO           = "Bitte öffnen Sie die Tür(en) zum Abwerfen der Fracht!",
        -- ============================================================
        -- Fehler - Bestand / Verfügbarkeit
        -- ============================================================
        ALL_GONE                        = "Entschuldigung, alle %s sind vergriffen!",
        RAN_OUT_OF                      = "Entschuldigung, %s ist nicht mehr vorrätig",
        CARGO_NOT_AVAILABLE_ZONE        = "Die angeforderte Fracht ist in dieser Zone nicht verfügbar!",
        ENOUGH_CRATES_NEARBY            = "Es sind bereits genügend Kisten in der Nähe! Bitte zuerst um diese kümmern!",
        NO_CRATES_WITHIN                = "Keine (ladbaren) Kisten in %d Metern Umkreis!",
        NO_CRATES_WITHIN_PLAIN          = "Keine Kisten in %d Metern Umkreis!",
        NO_CRATES_IN_RANGE              = "Keine Kisten in Reichweite gefunden!",
        NO_NAMED_CRATES_IN_RANGE        = "Keine \"%s\"-Kisten in Reichweite gefunden!",
        NO_LOADABLE_CRATES              = "Entschuldigung, keine ladbaren Kisten in der Nähe oder maximales Frachtgewicht erreicht!",
        NO_UNITS_TO_EXTRACT             = "Keine Einheiten nah genug zum Aussteigen!",
        NO_UNIT_CONFIG                  = "Keine Einheitenkonfiguration für %s gefunden",
        CANT_ONBOARD                    = "%s kann nicht eingeladen werden",
        TOO_MANY_UNITS_NEARBY           = "Sie haben bereits %d Einheiten in der Nähe!",
        NO_CRATE_GROUPS                 = "Keine Kistengruppen für diese Einheit gefunden!",
        NO_CRATE_SET                    = "Kein Kistenset gefunden oder Index ungültig!",
        NO_CRATE_IN_SET                 = "Keine Kiste in diesem Set gefunden!",
        NO_TROOP_CHUNK                  = "Kein Truppenfracht-Block für ID %d gefunden!",
        TROOP_CHUNK_EMPTY               = "Truppenfracht-Block für ID %d ist leer!",
        -- ============================================================
        -- Nichts geladen / kein Bestand
        -- ============================================================
        NOTHING_LOADED                  = "Nichts geladen!\nTruppenlimit: %d | Kistenlimit: %d | Gewichtslimit: %d kg",
        NOTHING_LOADED_AIRDROP          = "Nichts geladen oder nicht innerhalb der Abwurfparameter!",
        NOTHING_LOADED_HOVER            = "Nichts geladen oder Schwebeparameter nicht erfüllt!",
        NOTHING_IN_STOCK                = "Nichts vorrätig!",
        NOTHING_TO_PACK                 = "Nichts in dieser Entfernung zum Verpacken, Pilot!",
        NOTHING_TO_REMOVE               = "Nichts in dieser Entfernung zum Entfernen, Pilot!",
        -- ============================================================
        -- Zone / Info
        -- ============================================================
        ROGER_ZONE                      = "Verstanden, %s Zone %s!",
        -- ============================================================
        -- Report: Schwebe- / Flugparameter
        -- ============================================================
        HOVER_PARAMS_METRIC             = "Schwebeparameter (Autoladen/Abwurf):\n - Min. Höhe %dm \n - Max. Höhe %dm \n - Max. Geschwindigkeit 2m/s \n - Im Parameter: %s",
        HOVER_PARAMS_IMPERIAL           = "Schwebeparameter (Autoladen/Abwurf):\n - Min. Höhe %dft \n - Max. Höhe %dft \n - Max. Geschwindigkeit 6ft/s \n - Im Parameter: %s",
        FLIGHT_PARAMS_IMPERIAL          = "Flugparameter (Luftabwurf):\n - Min. Höhe %dft \n - Max. Höhe %dft \n - Im Parameter: %s",
        FLIGHT_PARAMS_METRIC            = "Flugparameter (Luftabwurf):\n - Min. Höhe %dm \n - Max. Höhe %dm \n - Im Parameter: %s",
        -- ============================================================
        -- Report-Titel
        -- ============================================================
        REPORT_CRATES_FOUND             = "Kisten in der Nähe:",
        REPORT_REMOVING_CRATES          = "Entferne Kisten in der Nähe:",
        REPORT_TRANSPORT_CHECKOUT       = "Transport-Checkliste",
        REPORT_INVENTORY                = "Inventarliste",
        REPORT_BUILD_CHECKLIST          = "Checkliste baubare Kisten",
        REPORT_REPAIR_CHECKLIST         = "Checkliste Reparaturen",
        REPORT_BEACONS                  = "Aktive Zonenfeuer",
        -- ============================================================
        -- Report-Sektionskopfzeilen
        -- ============================================================
        REPORT_SECTION_TROOPS           = "        -- TRUPPEN --",
        REPORT_SECTION_CRATES           = "       -- KISTEN --",
        REPORT_SECTION_CRATES_GC        = "       -- KISTEN via Bodenpersonal geladen --",
        REPORT_SECTION_NONE             = "        K E I N E",
        REPORT_SECTION_NONE_ALT         = "     --- Keine gefunden! ---",
        REPORT_SECTION_NONE_REPAIR      = "     --- Keine gefunden ---",
        REPORT_GC_LOADABLE_HINT         = "Wahrscheinlich durch Bodenpersonal ladbar (F8)",
        REPORT_TOTAL_MASS               = "Gesamtgewicht: %s kg. Ladbar: %s kg.",
        REPORT_TROOPS_CRATES_COUNT      = "Truppen: %d(%d), Kisten: %d(%d)",
        REPORT_TROOPS_CRATETYPES_COUNT  = "Truppen: %d, Kistentypen: %d",
        -- ============================================================
        -- Report-Zeilenvorlagen
        -- ============================================================
        REPORT_ROW_TROOP                = "Truppe: %s Größe %d",
        REPORT_ROW_CRATE                = "Kiste: %s %d/%d",
        REPORT_ROW_CRATE_SIZE1          = "Kiste: %s Größe 1",
        REPORT_ROW_GC_CRATE             = "Bodenpersonal-Kiste: %s Größe 1",
        REPORT_ROW_DROPPED_CRATE        = "Abgeworfene Kiste für %s, %dkg",
        REPORT_ROW_CRATE_KG             = "Kiste für %s, %dkg",
        REPORT_ROW_CRATE_REMOVED        = "Kiste für %s, %dkg entfernt",
        REPORT_ROW_UNIT_STOCK           = "Einheit: %s | Soldaten: %d | Bestand: %s",
        REPORT_ROW_TYPE_CRATE_STOCK     = "Typ: %s | Kisten pro Set: %d | Bestand: %s",
        REPORT_ROW_TYPE_STOCK           = "Typ: %s | Bestand: %s",
        REPORT_ROW_BUILD_CHECK          = "Typ: %s | Benötigt: %d | Gefunden: %d | Baubar: %s",
        REPORT_ROW_REPAIR_CHECK         = "Typ: %s | Benötigt: %d | Gefunden: %d | Reparierbar: %s",
        REPORT_ROW_BEACON               = " %s | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
        -- ============================================================
        -- Gewichts- / Kistenlimit-Token
        -- ============================================================
        WEIGHT_LIMIT                    = "Gewichtslimit erreicht",
        CRATE_LIMIT                     = "Kistenlimit erreicht",
        -- ============================================================
        -- Menübezeichnungen - Obere Ebene
        -- ============================================================
        MENU_CTLD                       = "CTLD",
        MENU_MANAGE_TROOPS              = "Truppen verwalten",
        MENU_MANAGE_CRATES              = "Kisten verwalten",
        MENU_MANAGE_UNITS               = "Einheiten verwalten",
        -- ============================================================
        -- Menübezeichnungen - Truppen
        -- ============================================================
        MENU_LOAD_TROOPS                = "Truppen einladen",
        MENU_DROP_TROOPS                = "Truppen absetzen",
        MENU_DROP_ALL_TROOPS            = "ALLE Truppen absetzen",
        MENU_EXTRACT_TROOPS             = "Truppen aufnehmen",
        MENU_DROP_N_TROOPS              = "(%d) %s absetzen",
        -- ============================================================
        -- Menübezeichnungen - Kisten: Holen
        -- ============================================================
        MENU_GET_CRATES                 = "Kisten holen",
        MENU_GET                        = "Holen",
        MENU_GET_AND_LOAD               = "Holen und laden",
        MENU_GET_ANYWAY                 = "Trotzdem holen",
        MENU_PARTIALLY_LOAD             = "Teilweise laden",
        MENU_OUT_OF_STOCK               = "Nicht vorrätig",
        MENU_TROOP_LIMIT                = "Truppenlimit erreicht",
        -- ============================================================
        -- Menübezeichnungen - Kisten: Laden
        -- ============================================================
        MENU_LOAD_CRATES                = "Kisten laden",
        MENU_LOAD_ALL                   = "ALLE laden",
        MENU_SHOW_LOADABLE_CRATES       = "Ladbare Kisten anzeigen",
        MENU_NO_CRATES_FOUND_RESCAN     = "Keine Kisten gefunden! Neu scannen?",
        MENU_USE_C130_LOAD              = "C-130-Ladesystem verwenden",
        MENU_LOAD_SINGLE                = "Lade",
        -- ============================================================
        -- Menübezeichnungen - Kisten: Abwerfen
        -- ============================================================
        MENU_DROP_CRATES                = "Kisten abwerfen",
        MENU_DROP_ALL_CRATES            = "ALLE Kisten abwerfen",
        MENU_DROP                       = "Abwerfen",
        MENU_DROP_AND_BUILD             = "Abwerfen und bauen",
        MENU_DROP_N_SETS                = "%d Set%s abwerfen",
        MENU_NO_CRATES_TO_DROP          = "Keine Kisten zum Abwerfen!",
        -- ============================================================
        -- Menübezeichnungen - Kisten: Bauen / Reparieren / Packen / Entfernen
        -- ============================================================
        MENU_BUILD_CRATES               = "Kisten bauen",
        MENU_REPAIR                     = "Reparieren",
        MENU_PACK_CRATES                = "Kisten packen",
        MENU_PACK                       = "Packen",
        MENU_SCAN_PACKABLE_UNITS        = "Packbare Einheiten in der Nähe scannen",
        MENU_NO_PACKABLE_UNITS_FOUND_RESCAN = "Keine packbaren Einheiten gefunden! Neu scannen?",
        MENU_PACK_ALL                   = "In der Nähe packen",
        MENU_PACK_AND_LOAD              = "Packen und laden",
        MENU_PACK_AND_LOAD_ALL          = "In der Nähe packen und laden",
        MENU_PACK_AND_REMOVE            = "Packen und entfernen",
        MENU_PACK_AND_REMOVE_ALL        = "In der Nähe packen und entfernen",
        MENU_REMOVE_CRATES              = "Kisten entfernen",
        MENU_REMOVE_CRATES_NEARBY       = "Nahe Kisten entfernen",
        MENU_LIST_CRATES_NEARBY         = "Nahe Kisten auflisten",
        MENU_CRATES_NEEDED              = "%d Kiste%s %s (%dkg)",
        -- ============================================================
        -- Menübezeichnungen - Einheiten (C-130)
        -- ============================================================
        MENU_GET_UNITS                  = "Einheiten holen",
        MENU_REMOVE_UNITS_NEARBY        = "Nahe Einheiten entfernen",
        -- ============================================================
        -- Menübezeichnungen - Info / Fracht
        -- ============================================================
        MENU_LIST_BOARDED_CARGO         = "Geladene Fracht anzeigen",
        MENU_INVENTORY                  = "Inventar",
        MENU_LIST_ZONE_BEACONS          = "Aktive Zonenfeuer anzeigen",
        -- ============================================================
        -- Menübezeichnungen - Rauch / Leuchtfeuer / Baken
        -- ============================================================
        MENU_SMOKES_FLARES_BEACONS      = "Rauch, Leuchtfeuer, Baken",
        MENU_SMOKE_ZONES_NEARBY         = "Nahe Zonen einrauchen",
        MENU_DROP_SMOKE_NOW             = "Rauch jetzt setzen",
        MENU_RED_SMOKE                  = "Roter Rauch",
        MENU_BLUE_SMOKE                 = "Blauer Rauch",
        MENU_GREEN_SMOKE                = "Grüner Rauch",
        MENU_ORANGE_SMOKE               = "Oranger Rauch",
        MENU_WHITE_SMOKE                = "Weißer Rauch",
        MENU_FLARE_ZONES_NEARBY         = "Nahe Zonen befeuern",
        MENU_FIRE_FLARE_NOW             = "Leuchtfeuer jetzt abfeuern",
        MENU_DROP_BEACON_NOW            = "Bake jetzt setzen",
        -- ============================================================
        -- Menübezeichnungen - Parameter
        -- ============================================================
        MENU_SHOW_FLIGHT_PARAMS         = "Flugparameter anzeigen",
        MENU_SHOW_HOVER_PARAMS          = "Schwebeparameter anzeigen",
        STOCK_NONE                      = "keiner",
        STOCK_UNLIMITED                 = "unbegrenzt",
        BUILD_YES                       = "JA",
        BUILD_NO                        = "NEIN",
},
FR = {
        --- ============================================================
        -- Chargement caisse / fret
        -- ============================================================
        CRATE_LOADED_GROUNDCREW         = "Caisse(s) %s chargée(s) par l'équipe au sol !",
        CRATE_UNLOADED_GROUNDCREW       = "Caisse(s) %s déchargée(s) par l'équipe au sol !",
        CRATE_LOADED_ID                 = "Caisse(s) ID %d pour %s chargée(s) !",
        LOADED_FULL                     = "%d %s chargé(s).",
        LOADED_SETS_LEFTOVER            = "%d %s chargé(s), %d caisse(s) restante(s).",
        LOADED_SETS                     = "%d %s chargé(s).",
        LOADED_PARTIAL                  = "Seulement %d/%d caisse(s) de %s chargée(s).",
        LOADED_PARTIAL_LIMIT            = "Seulement %d/%d caisse(s) de %s chargée(s). Limite de fret atteinte !",
        LOADED_BATCH                    = "%d %s chargé(s).",
        LOADED_BATCH_PARTIAL            = "Certains ensembles n'ont pas pu être complètement chargés.",
        -- ============================================================
        -- Largage / Déchargement
        -- ============================================================
        DROPPED_FULL                    = "%d %s largué(s).",
        DROPPED_SETS_LEFTOVER           = "%d %s largué(s), %d caisse(s) restante(s).",
        DROPPED_SETS                    = "%d %s largué(s).",
        DROPPED_PARTIAL                 = "%d/%d caisse(s) de %s larguée(s).",
        DROPPED_INTO_ACTION             = "%s engagé(s) en action !",
        DROPPED_BEACON                  = "%s largué | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
        CRATES_POSITIONED               = "%d caisses pour %s positionnées près de vous !",
        CRATES_DROPPED                  = "%d caisses pour %s larguées !",
        -- ============================================================
        -- Troupes
        -- ============================================================
        BOARDED                         = "%s embarqué(s) !",
        BOARDING                        = "%s en cours d'embarquement !",
        TROOPS_RETURNED                 = "Les troupes sont retournées à la base !",
        -- ============================================================
        -- Déploiement
        -- ============================================================
        DEPLOYED_NEAR_YOU               = "%s déployé(s) près de vous !",
        UNITS_REMOVED                   = "%s supprimé(s)",
        -- ============================================================
        -- Construction / Réparation
        -- ============================================================
        BUILD_STARTED                   = "Construction démarrée, prête dans %d secondes !",
        REPAIR_STARTED                  = "Réparation démarrée avec %s, durée %d sec.",
        NO_UNIT_TO_REPAIR               = "Aucune unité(s) assez proche pour être réparée(s) !",
        CANT_REPAIR_WITH                = "Impossible de réparer cette unité avec %s",
        CRATES_MOVE_BEFORE_BUILD        = "*** Les caisses doivent être déplacées avant la construction !",
        -- ============================================================
        -- Erreurs - Hélicoptère / Poids / Capacité
        -- ============================================================
        CHOPPER_CANNOT_CARRY            = "Cet hélicoptère ne peut pas transporter de caisses !",
        TOO_HEAVY                       = "Désolé, c'est trop lourd à charger !",
        FULLY_LOADED                    = "Désolé, capacité maximale atteinte !",
        CRAMMED                         = "Désolé, nous sommes déjà au complet !",
        NO_CAPACITY_NOW                 = "Aucune capacité de chargement disponible pour le moment !",
        NO_MORE_CAPACITY                = "Plus de capacité pour charger des caisses !",
        CANNOT_LOAD_NONE_OR_FULL        = "Chargement impossible : aucune caisse trouvée ou capacité épuisée.",
        -- ============================================================
        -- Erreurs - Position
        -- ============================================================
        NEED_TO_LAND_OR_HOVER_LOAD      = "Vous devez atterrir ou rester en vol stationnaire pour charger !",
        HOVER_OVER_CRATES               = "Survolez les caisses en stationnaire pour les récupérer !",
        LAND_OR_HOVER_OVER_CRATES       = "Atterrissez ou survolez les caisses en stationnaire pour les récupérer !",
        MUST_LAND_OR_HOVER_CRATES       = "Vous devez atterrir ou rester en stationnaire pour charger les caisses !",
        NEED_TO_LAND_BUILD              = "Vous devez atterrir / vous arrêter pour construire quelque chose, Pilote !",
        NOT_CLOSE_ENOUGH_LOGISTICS      = "Vous n'êtes pas assez proche d'une zone logistique !",
        NOT_CLOSE_ENOUGH_DROP           = "Vous n'êtes pas assez proche d'une zone de largage !",
        NOT_CLOSE_ENOUGH_ZONE_NM        = "Négatif, vous devez être à moins de %d nm d'une zone !",
        CANNOT_BUILD_LOADING_AREA       = "Vous ne pouvez pas construire dans une zone de chargement, Pilote !",
        -- ============================================================
        -- Erreurs - Portes
        -- ============================================================
        OPEN_DOORS_LOAD_CARGO           = "Vous devez ouvrir la/les porte(s) pour charger du fret !",
        OPEN_DOORS_LOAD_TROOPS          = "Vous devez ouvrir la/les porte(s) pour embarquer des troupes !",
        OPEN_DOORS_EXTRACT_TROOPS       = "Vous devez ouvrir la/les porte(s) pour extraire des troupes !",
        OPEN_DOORS_UNLOAD_TROOPS        = "Vous devez ouvrir la/les porte(s) pour débarquer des troupes !",
        OPEN_DOORS_DROP_CARGO           = "Vous devez ouvrir la/les porte(s) pour larguer du fret !",
        -- ============================================================
        -- Erreurs - Stock / Disponibilité
        -- ============================================================
        ALL_GONE                        = "Désolé, tous les %s sont épuisés !",
        RAN_OUT_OF                      = "Désolé, nous n'avons plus de %s !",
        CARGO_NOT_AVAILABLE_ZONE        = "Le fret demandé n'est pas disponible dans cette zone !",
        ENOUGH_CRATES_NEARBY            = "Il y a déjà suffisamment de caisses à proximité ! Occupez-vous d'abord de celles-ci !",
        NO_CRATES_WITHIN                = "Aucune caisse (chargeable) dans un rayon de %d mètres !",
        NO_CRATES_WITHIN_PLAIN          = "Aucune caisse dans un rayon de %d mètres !",
        NO_CRATES_IN_RANGE              = "Aucune caisse trouvée à portée !",
        NO_NAMED_CRATES_IN_RANGE        = "Aucune caisse \"%s\" trouvée à portée !",
        NO_LOADABLE_CRATES              = "Désolé, aucune caisse chargeable à proximité ou poids maximum atteint !",
        NO_UNITS_TO_EXTRACT             = "Aucune unité assez proche pour être extraite !",
        NO_UNIT_CONFIG                  = "Aucune configuration d'unité trouvée pour %s",
        CANT_ONBOARD                    = "Impossible d'embarquer %s",
        TOO_MANY_UNITS_NEARBY           = "Vous avez déjà %d unités à proximité !",
        NO_CRATE_GROUPS                 = "Aucun groupe de caisses trouvé pour cette unité !",
        NO_CRATE_SET                    = "Aucun ensemble de caisses trouvé ou index invalide !",
        NO_CRATE_IN_SET                 = "Aucune caisse trouvée dans cet ensemble !",
        NO_TROOP_CHUNK                  = "Aucun bloc de fret de troupes trouvé pour l'ID %d !",
        TROOP_CHUNK_EMPTY               = "Le bloc de fret de troupes pour l'ID %d est vide !",
        -- ============================================================
        -- Rien de chargé / en stock
        -- ============================================================
        NOTHING_LOADED                  = "Rien de chargé !\nLimite de troupes : %d | Limite de caisses : %d | Limite en poids : %d kg",
        NOTHING_LOADED_AIRDROP          = "Rien de chargé ou paramètres de largage non respectés !",
        NOTHING_LOADED_HOVER            = "Rien de chargé ou paramètres de vol stationnaire non respectés !",
        NOTHING_IN_STOCK                = "Rien en stock !",
        NOTHING_TO_PACK                 = "Rien à charger à cette distance, Pilote !",
        NOTHING_TO_REMOVE               = "Rien à retirer à cette distance, Pilote !",
        -- ============================================================
        -- Zone / Info
        -- ============================================================
        ROGER_ZONE                      = "Compris, zone %s %s !",
        -- ============================================================
        -- Rapport : Paramètres stationnaire / vol
        -- ============================================================
        HOVER_PARAMS_METRIC             = "Paramètres stationnaires (autochargement/largage) :\n - Hauteur min. %dm \n - Hauteur max. %dm \n - Vitesse max. 2m/s \n - Dans les paramètres : %s",
        HOVER_PARAMS_IMPERIAL           = "Paramètres stationnaires (autochargement/largage) :\n - Hauteur min. %dft \n - Hauteur max. %dft \n - Vitesse max. 6ft/s \n - Dans les paramètres : %s",
        FLIGHT_PARAMS_IMPERIAL          = "Paramètres de vol (largage aérien) :\n - Hauteur min. %dft \n - Hauteur max. %dft \n - Dans les paramètres : %s",
        FLIGHT_PARAMS_METRIC            = "Paramètres de vol (largage aérien) :\n - Hauteur min. %dm \n - Hauteur max. %dm \n - Dans les paramètres : %s",
        -- ============================================================
        -- Titres de rapport
        -- ============================================================
        REPORT_CRATES_FOUND             = "Caisses trouvées à proximité :",
        REPORT_REMOVING_CRATES          = "Suppression des caisses à proximité :",
        REPORT_TRANSPORT_CHECKOUT       = "Fiche de contrôle transport",
        REPORT_INVENTORY                = "Fiche d'inventaire",
        REPORT_BUILD_CHECKLIST          = "Checklist caisses constructibles",
        REPORT_REPAIR_CHECKLIST         = "Checklist réparations",
        REPORT_BEACONS                  = "Balises de zone actives",
        -- ============================================================
        -- En-têtes de sections de rapport
        -- ============================================================
        REPORT_SECTION_TROOPS           = "        -- TROUPES --",
        REPORT_SECTION_CRATES           = "       -- CAISSES --",
        REPORT_SECTION_CRATES_GC        = "       -- CAISSES chargées via équipe au sol --",
        REPORT_SECTION_NONE             = "        A U C U N",
        REPORT_SECTION_NONE_ALT         = "     --- Aucun trouvé ! ---",
        REPORT_SECTION_NONE_REPAIR      = "     --- Aucun trouvé ---",
        REPORT_GC_LOADABLE_HINT         = "Probablement chargeable via l’équipe au sol (F8)",
        REPORT_TOTAL_MASS               = "Masse totale : %s kg. Chargeable : %s kg.",
        REPORT_TROOPS_CRATES_COUNT      = "Troupes : %d(%d), Caisses : %d(%d)",
        REPORT_TROOPS_CRATETYPES_COUNT  = "Troupes : %d, Types de caisses : %d",
        -- ============================================================
        -- Modèles de lignes de rapport
        -- ============================================================
        REPORT_ROW_TROOP                = "Troupe : %s taille %d",
        REPORT_ROW_CRATE                = "Caisse : %s %d/%d",
        REPORT_ROW_CRATE_SIZE1          = "Caisse : %s taille 1",
        REPORT_ROW_GC_CRATE             = "Caisses chargées par l'équipe au sol : %s taille 1",
        REPORT_ROW_DROPPED_CRATE        = "Caisses larguées pour %s, %dkg",
        REPORT_ROW_CRATE_KG             = "Caisses pour %s, %dkg",
        REPORT_ROW_CRATE_REMOVED        = "Caisses pour %s, %dkg retirées",
        REPORT_ROW_UNIT_STOCK           = "Unités : %s | Soldats : %d | Stock : %s",
        REPORT_ROW_TYPE_CRATE_STOCK     = "Type : %s | Caisses par ensemble : %d | Stock : %s",
        REPORT_ROW_TYPE_STOCK           = "Type : %s | Stock : %s",
        REPORT_ROW_BUILD_CHECK          = "Type : %s | Requis : %d | Trouvé : %d | Constructible : %s",
        REPORT_ROW_REPAIR_CHECK         = "Type : %s | Requis : %d | Trouvé : %d | Réparable : %s",
        REPORT_ROW_BEACON               = " %s | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
        -- ============================================================
        -- Tokens limite poids / caisses
        -- ============================================================
        WEIGHT_LIMIT                    = "Limite de poids atteinte",
        CRATE_LIMIT                     = "Limite de caisses atteinte",
        -- ============================================================
        -- Libellés de menu - Niveau supérieur
        -- ============================================================
        MENU_CTLD                       = "CTLD",
        MENU_MANAGE_TROOPS              = "Gérer les troupes",
        MENU_MANAGE_CRATES              = "Gérer les caisses",
        MENU_MANAGE_UNITS               = "Gérer les unités",
        -- ============================================================
        -- Libellés de menu - Troupes
        -- ============================================================
        MENU_LOAD_TROOPS                = "Embarquer troupes",
        MENU_DROP_TROOPS                = "Déposer troupes",
        MENU_DROP_ALL_TROOPS            = "Déposer TOUTES les troupes",
        MENU_EXTRACT_TROOPS             = "Extraire troupes",
        MENU_DROP_N_TROOPS              = "Déposer (%d) %s",
        -- ============================================================
        -- Libellés de menu - Caisses : Récupérer
        -- ============================================================
        MENU_GET_CRATES                 = "Récupérer caisses",
        MENU_GET                        = "Récupérer",
        MENU_GET_AND_LOAD               = "Récupérer et charger",
        MENU_GET_ANYWAY                 = "Récupérer quand même",
        MENU_PARTIALLY_LOAD             = "Chargement partiel",
        MENU_OUT_OF_STOCK               = "Rupture de stock",
        MENU_TROOP_LIMIT                = "Limite de troupes atteinte",
        -- ============================================================
        -- Libellés de menu - Caisses : Charger
        -- ============================================================
        MENU_LOAD_CRATES                = "Charger caisses",
        MENU_LOAD_ALL                   = "Tout charger",
        MENU_SHOW_LOADABLE_CRATES       = "Afficher caisses chargeables",
        MENU_NO_CRATES_FOUND_RESCAN     = "Aucune caisse trouvée ! Rescanner ?",
        MENU_USE_C130_LOAD              = "Utiliser le système de chargement C-130",
        MENU_LOAD_SINGLE                = "Charger",
        -- ============================================================
        -- Libellés de menu - Caisses : Larguer
        -- ============================================================
        MENU_DROP_CRATES                = "Larguer caisses",
        MENU_DROP_ALL_CRATES            = "Larguer TOUTES les caisses",
        MENU_DROP                       = "Larguer",
        MENU_DROP_AND_BUILD             = "Larguer et construire",
        MENU_DROP_N_SETS                = "Larguer %d ensemble%s",
        MENU_NO_CRATES_TO_DROP          = "Aucune caisse à larguer !",
        -- ============================================================
        -- Libellés de menu - Caisses : Construire / Réparer / Emballer / Retirer
        -- ============================================================
        MENU_BUILD_CRATES               = "Construire caisses",
        MENU_REPAIR                     = "Réparer",
        MENU_PACK_CRATES                = "Emballer caisses",
        MENU_PACK                       = "Emballer",
        MENU_SCAN_PACKABLE_UNITS        = "Scanner unités emballables à proximité",
        MENU_NO_PACKABLE_UNITS_FOUND_RESCAN = "Aucune unité emballable trouvée ! Rescanner ?",
        MENU_PACK_ALL                   = "Emballer à proximité",
        MENU_PACK_AND_LOAD              = "Emballer et charger",
        MENU_PACK_AND_LOAD_ALL          = "Emballer et charger à proximité",
        MENU_PACK_AND_REMOVE            = "Emballer et retirer",
        MENU_PACK_AND_REMOVE_ALL        = "Emballer et retirer à proximité",
        MENU_REMOVE_CRATES              = "Retirer caisses",
        MENU_REMOVE_CRATES_NEARBY       = "Retirer caisses proches",
        MENU_LIST_CRATES_NEARBY         = "Lister caisses proches",
        MENU_CRATES_NEEDED              = "%d caisse%s %s (%dkg)",
        -- ============================================================
        -- Libellés de menu - Unités (C-130)
        -- ============================================================
        MENU_GET_UNITS                  = "Récupérer unités",
        MENU_REMOVE_UNITS_NEARBY        = "Retirer les unités proches",
        -- ============================================================
        -- Libellés de menu - Info / Fret
        -- ============================================================
        MENU_LIST_BOARDED_CARGO         = "Lister le fret embarqué",
        MENU_INVENTORY                  = "Inventaire",
        MENU_LIST_ZONE_BEACONS          = "Lister les balises de zones actives",
        -- ============================================================
        -- Libellés de menu - Fumigènes / Fusées / Balises
        -- ============================================================
        MENU_SMOKES_FLARES_BEACONS      = "Fumigènes, Fusées, Balises",
        MENU_SMOKE_ZONES_NEARBY         = "Fumigène sur les zones proches",
        MENU_DROP_SMOKE_NOW             = "Poser fumigène maintenant",
        MENU_RED_SMOKE                  = "Fumigène rouge",
        MENU_BLUE_SMOKE                 = "Fumigène bleu",
        MENU_GREEN_SMOKE                = "Fumigène vert",
        MENU_ORANGE_SMOKE               = "Fumigène orange",
        MENU_WHITE_SMOKE                = "Fumigène blanc",
        MENU_FLARE_ZONES_NEARBY         = "Baliser zones proches",
        MENU_FIRE_FLARE_NOW             = "Tirer une fusée maintenant",
        MENU_DROP_BEACON_NOW            = "Poser une balise maintenant",
        -- ============================================================
        -- Libellés de menu - Paramètres
        -- ============================================================
        MENU_SHOW_FLIGHT_PARAMS         = "Afficher paramètres de vol",
        MENU_SHOW_HOVER_PARAMS          = "Afficher les paramètres stationnaire",
        STOCK_NONE                      = "aucun",
        STOCK_UNLIMITED                 = "illimité",
        BUILD_YES                       = "OUI",
        BUILD_NO                        = "NON",
    },
    ES={
      CRATE_LOADED_GROUNDCREW="Contenedor %s cargado por el quipo de tierra.",
      CRATE_UNLOADED_GROUNDCREW="Contenedor %s descargado por el quipo de tierra.",
      CRATE_LOADED_ID="Contenedor ID %d para %s cargado.",
      LOADED_FULL="Cargado %d %s.",
      LOADED_SETS_LEFTOVER="Cargado %d %s(s), de %d contenedor(es) restante(s).",
      LOADED_SETS="Cargado %d %s(s).",
      LOADED_PARTIAL="Cargado sólo %d/%d contenedor(es) de %s.",
      LOADED_PARTIAL_LIMIT="Cargado sólo %d/%d contenedor(es) de %s. Límite de carga alcanzado.",
      LOADED_BATCH="Cargado %d %s.",
      LOADED_BATCH_PARTIAL="Some sets could not be fully loaded.",
      DROPPED_FULL="Entregado %d %s.",
      DROPPED_SETS_LEFTOVER="Entregado %d %s(s), de %d conenedor(es) restante(s).",
      DROPPED_SETS="Entregado %d %s(s).",
      DROPPED_PARTIAL="Entregado %d/%d contenedor(es) de %s.",
      DROPPED_INTO_ACTION="¡Soltados %s en acción!",
      DROPPED_BEACON="Entregado %s | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
      CRATES_POSITIONED="%d contenedores para %s servidos cerca de ti.",
      CRATES_DROPPED="%d contenedores para %s han sido entregados.",
      BOARDED="¡%s a bordo!",
      BOARDING="¡%s entrando!",
      TROOPS_RETURNED="¡Las tropas han vuelto a la base!",
      DEPLOYED_NEAR_YOU="%s han sido servidas cerca de tí.",
      UNITS_REMOVED="%s ha sido eliminado",
      BUILD_STARTED="Construcción comenzada, listo en %d segundos.",
      REPAIR_STARTED="Reparación comenzaza usando %s, tardará %d segundos.",
      NO_UNIT_TO_REPAIR="No hay unidades cercanas que necesiten reparación.",
      CANT_REPAIR_WITH="No se puede reparar esta unidad con %s",
      CRATES_MOVE_BEFORE_BUILD="*** Los contenedores deben ser movidos antes de construirse.",
      CHOPPER_CANNOT_CARRY="Lo siento, este helicóptero no puede transportar contenedores.",
      TOO_HEAVY="Lo siento, esta carga es muy pesada.",
      FULLY_LOADED="Lo siento, vamos hasta arriba.",
      CRAMMED="Lo siento, vamos a tope.",
      NO_CAPACITY_NOW="No queda capacidad para cargar más.",
      NO_MORE_CAPACITY="No queda capacidad para cargar más contenedores.",
      CANNOT_LOAD_NONE_OR_FULL="No se pueden cargar contenedores: n hay o no queda capacidad.",
      NEED_TO_LAND_OR_HOVER_LOAD="Necesitas aterrizar o mantenerte en estacionario para cargar.",
      HOVER_OVER_CRATES="Mantente en estacionario sobre el contenedor para recogerlo.",
      LAND_OR_HOVER_OVER_CRATES="Aterriza o mantente en estacionario para recoger el contenedor.",
      MUST_LAND_OR_HOVER_CRATES="Necesitas aterrizar o mantenerte en eestacionario para cargar contenedores.",
      NEED_TO_LAND_BUILD="Necesitas aterrizar/parar para construir algo.",
      NOT_CLOSE_ENOUGH_LOGISTICS="No estás cerca de una zona de logística.",
      NOT_CLOSE_ENOUGH_DROP="No estás en una zona de entrega.",
      NOT_CLOSE_ENOUGH_ZONE_NM="Negativo, tienes que estar a menos de %dnm de la zona.",
      CANNOT_BUILD_LOADING_AREA="No puedes construir en la zona de carga.",
      OPEN_DOORS_LOAD_CARGO="Necesitas abrir las puertas para cargar.",
      OPEN_DOORS_LOAD_TROOPS="Necesitas abrir las puertas para que embarquen las tropas.",
      OPEN_DOORS_EXTRACT_TROOPS="Necesitas abrir las puertas para poder sacar a las tropas de aquí.",
      OPEN_DOORS_UNLOAD_TROOPS="Necesitas abrir las puertas para que desembarquen las tropas.",
      OPEN_DOORS_DROP_CARGO="Necesitas abrir las puertas para descargar la carga.",
      ALL_GONE="Lo siento, todos %s se han servido.",
      RAN_OUT_OF="Lo siento, nos hemos quedad sin %s",
      CARGO_NOT_AVAILABLE_ZONE="La carga solicitada no está disponible en esta zona.",
      ENOUGH_CRATES_NEARBY="Hay contenedores cerca de ti listas. Encárgate primero de ellos.",
      NO_CRATES_WITHIN="No ha contenedores (cargables) en %d metros.",
      NO_CRATES_WITHIN_PLAIN="No hay contenedores en %d metros.",
      NO_CRATES_IN_RANGE="No se han encontrado contenedores en rango.",
      NO_NAMED_CRATES_IN_RANGE="No se han encontrado \"%s\" conenedores en rango.",
      NO_LOADABLE_CRATES="Lo siento, no hay contenedores cercanos o se ha alcanzado el peso máximo.",
      NO_UNITS_TO_EXTRACT="No hay unidades cercanas para extracción.",
      NO_UNIT_CONFIG="No se ha encontrado configuración de unidad para %s",
      CANT_ONBOARD="No puede subir %s",
      TOO_MANY_UNITS_NEARBY="Ya tienes %d unidades próximas.",
      NO_CRATE_GROUPS="No se han encontrado grupos de contendeores para esta unidad.",
      NO_CRATE_SET="No se ha encontrado contenedor o su index es inválido.",
      NO_CRATE_IN_SET="No se ha encontrado contenedor para este set.",
      NO_TROOP_CHUNK="No se han encontrado tropas para el id %d!",
      TROOP_CHUNK_EMPTY="Troop chunk is empty for ID %d!",
      NOTHING_LOADED="Nada cargado.\nLímite tropas: %d | Límite contenedores: %d | Peso límite: %d kg.",
      NOTHING_LOADED_AIRDROP="Nada cargado o no estás en parámetros de lanzamiento aéreo.",
      NOTHING_LOADED_HOVER="Nada cargado o no estás en parámetros de estacionario.",
      NOTHING_IN_STOCK="¡Nada en stock!",
      NOTHING_TO_PACK="Nada para empaquetar a esta distancia.",
      NOTHING_TO_REMOVE="Nada para eliminar a esta distancia.",
      ROGER_ZONE="Recibido, %s cona %s!",
      HOVER_PARAMS_METRIC="Parámetros en estacionario (autocarga/suelta):\n - Altura mínima %dm \n - Altura máxima %dm \n - Velocidad máxima 2mps \n - En parámetros: %s",
      HOVER_PARAMS_IMPERIAL="Parámetros en estacionario (autocarga/suelta):\n - Altura mínima  %dft \n - Altura máxima %dft \n - Velocidad máxima 6ftps \n - En parámetros: %s",
      FLIGHT_PARAMS_IMPERIAL="Parámetros vuelo (lanzamiento aéreo):\n - Altura mínima  %dft \n - Altura máxima %dft \n - En parámetros: %s",
      FLIGHT_PARAMS_METRIC="Parámetros vuelo (lanzamiento aéreo):\n - Altura mínima  %dm \n - Altura máxima %dm \n - En parámetros: %s",
      REPORT_CRATES_FOUND="Contenedores encontrados cerca:",
      REPORT_REMOVING_CRATES="Contenedores eliminados cerca:",
      REPORT_TRANSPORT_CHECKOUT="Informe de transporte",
      REPORT_INVENTORY="Inventario",
      REPORT_BUILD_CHECKLIST="Contenedores construibles",
      REPORT_REPAIR_CHECKLIST="Reparaciones",
      REPORT_BEACONS="Active Zone Beacons",
      REPORT_SECTION_TROOPS="        -- TROPAS --",
      REPORT_SECTION_CRATES="    -- CONTENEDORES --",
      REPORT_SECTION_CRATES_GC="       -- Contenedores cargados por equipo de tierra --",
      REPORT_SECTION_NONE="        N A D A",
      REPORT_SECTION_NONE_ALT="     --- Nada encontrado ---",
      REPORT_SECTION_NONE_REPAIR="     --- Nada encontrado ---",
      REPORT_GC_LOADABLE_HINT="Probablemente cargable por el equipo de tierra (F8)",
      REPORT_TOTAL_MASS="Peso total: %s kg. Cargable: %s kg.",
      REPORT_TROOPS_CRATES_COUNT="Tropas: %d(%d), Contenedores: %d(%d)",
      REPORT_TROOPS_CRATETYPES_COUNT="Tropas: %d, Tipos contenedores: %d",
      REPORT_ROW_TROOP="Tropas: %s tamaño %d",
      REPORT_ROW_CRATE="Contenedores: %s %d/%d",
      REPORT_ROW_CRATE_SIZE1="Contenedores: %s tamaño 1",
      REPORT_ROW_GC_CRATE="Contenedores cargados: %s tamaño 1",
      REPORT_ROW_DROPPED_CRATE="Entregado contenedor para %s, %dkg",
      REPORT_ROW_CRATE_KG="Contenedor para %s, %dkg",
      REPORT_ROW_CRATE_REMOVED="Contenedor para %s, %dkg eliminado",
      REPORT_ROW_UNIT_STOCK="Unidad: %s | Soldados: %d | Stock: %s",
      REPORT_ROW_TYPE_CRATE_STOCK="Tipo: %s | Contenedores por set: %d | Stock: %s",
      REPORT_ROW_TYPE_STOCK="Tipo: %s | Stock: %s",
      REPORT_ROW_BUILD_CHECK="Tipo: %s | Rquiere %d | Encontrados %d | Construible %s",
      REPORT_ROW_REPAIR_CHECK="Tipo: %s | Requiere %d | Encontrados %d | Reparable %s",
      REPORT_ROW_BEACON=" %s | FM %s Mhz | VHF %s KHz | UHF %s Mhz ",
      WEIGHT_LIMIT="Alcanzado límite de pesoWeight limit reached",
      CRATE_LIMIT="Alcanzado límite contenedores",
      MENU_CTLD="CTLD",
      MENU_MANAGE_TROOPS="Gestionar tropas",
      MENU_MANAGE_CRATES="Gestionar contenedores",
      MENU_MANAGE_UNITS="Gestionar unidades",
      MENU_LOAD_TROOPS="Cargar tropas",
      MENU_DROP_TROOPS="Entregar tropas",
      MENU_DROP_ALL_TROOPS="Entregar TODAS tropas",
      MENU_EXTRACT_TROOPS="Extraer tropas",
      MENU_DROP_N_TROOPS="Soltar (%d) %s",
      MENU_GET_CRATES="Solicitar contenedores",
      MENU_GET="Solicitar",
      MENU_GET_AND_LOAD="Solicitar y cargar",
      MENU_GET_ANYWAY="Solicitar de todas formas",
      MENU_PARTIALLY_LOAD="Carga parcial",
      MENU_OUT_OF_STOCK="Sin stock",
      MENU_TROOP_LIMIT="Limite de tropas alcanzado",
      MENU_LOAD_CRATES="Cargar contenedores",
      MENU_LOAD_ALL="Cargar TODO",
      MENU_SHOW_LOADABLE_CRATES="Mostrar contenedores carbables",
      MENU_NO_CRATES_FOUND_RESCAN="Contenedores no encontrados, ¿buscar?",
      MENU_USE_C130_LOAD="Usar sistmea de carga del C-130",
      MENU_LOAD_SINGLE="Cargar",
      MENU_DROP_CRATES="Soltar cargas",
      MENU_DROP_ALL_CRATES="Soltar TODAS cargas",
      MENU_DROP="Soltar",
      MENU_DROP_AND_BUILD="Soltar y constuir",
      MENU_DROP_N_SETS="Soltar %d Set %s",
      MENU_NO_CRATES_TO_DROP="No hay cargas para soltar",
      MENU_BUILD_CRATES="Construir contenedores",
      MENU_REPAIR="Reparar",
      MENU_PACK_CRATES="Empaquetar cargas",
      MENU_PACK="Empaquetar",
      MENU_SCAN_PACKABLE_UNITS="Buscar unidades empaquetables cercanas",
      MENU_NO_PACKABLE_UNITS_FOUND_RESCAN="No se encontraron unidades empaquetables. ¿Buscar de nuevo?",
      MENU_PACK_ALL="Empaquetar cercanas",
      MENU_PACK_AND_LOAD="Empaquetar y cargar",
      MENU_PACK_AND_LOAD_ALL="Empaquetar y cargar cercanas",
      MENU_PACK_AND_REMOVE="Empaquetar y eliminar",
      MENU_PACK_AND_REMOVE_ALL="Empaquetar y eliminar cercanas",
      MENU_REMOVE_CRATES="Eliminar cargas",
      MENU_REMOVE_CRATES_NEARBY="Eliminar cargas cercanas",
      MENU_LIST_CRATES_NEARBY="Listar cargas cercanas",
      MENU_CRATES_NEEDED="%d contenedor%s %s (%dkg)",
      MENU_GET_UNITS="Obtener unidades",
      MENU_REMOVE_UNITS_NEARBY="Eliminar unidades cercanas",
      MENU_LIST_BOARDED_CARGO="Lista de cargas a bordo",
      MENU_INVENTORY="Inventario",
      MENU_LIST_ZONE_BEACONS="Lista de balizas activas",
      MENU_SMOKES_FLARES_BEACONS="Humos, Bengalas, Balizas",
      MENU_SMOKE_ZONES_NEARBY="Humo en zonas cercanas",
      MENU_DROP_SMOKE_NOW="Lanzar humo ahora",
      MENU_RED_SMOKE="Humo rojo",
      MENU_BLUE_SMOKE="Humo azul",
      MENU_GREEN_SMOKE="Humo verde",
      MENU_ORANGE_SMOKE="Humo naranja",
      MENU_WHITE_SMOKE="Humo blanco",
      MENU_FLARE_ZONES_NEARBY="Bengalas en zonas cercanas",
      MENU_FIRE_FLARE_NOW="Disparar bengala ahora",
      MENU_DROP_BEACON_NOW="Soltar baliza ahora",
      MENU_SHOW_FLIGHT_PARAMS="Mostrar parámetros de vuelo",
      MENU_SHOW_HOVER_PARAMS="Mostrar parámetros estacionario",
      STOCK_NONE="Nada",
      STOCK_UNLIMITED="ilimitado",
      BUILD_YES="SI",
      BUILD_NO="NO",
      },
  }
2026-04-15 20:08:45 +02:00
leka1986 0b2f07ca6c Update CTLD.lua
- **Changed** the pack menu layout so pack actions now open into dedicated `Pack`, `Pack and Load`, and `Pack and Remove` submenus.
- **Added** scanning for nearby packable units within each pack submenu.
- **Added** direct selection of individual nearby packable units from the pack menus.
- **Changed** the pack menu order so detected nearby units appear first, followed by the nearby bulk action and the scan action.
- **Added** nearby bulk actions in each pack submenu (`Pack nearby`, `Pack and Load nearby`, `Pack and Remove nearby`).
- **Changed** pack menu refresh behavior so nearby packable units are rebuilt after major logistics actions and after build completion.
- **Fixed** selected `Pack and Load` so it only loads the crates created by the chosen packed unit.
- **Fixed** selected `Pack and Remove` so it only removes the crates created by the chosen packed unit.
- **Changed** pre-pack event handling so before-pack callbacks receive the specific group being packed.
- **Added** localization for the new pack menu wording in English, German, French, and Spanish.
2026-04-15 20:06:57 +02:00
Thomas 7c5d5543e0 Merge pull request #2576 from FlightControl-Master/master-ng
Update TARS.lua
2026-04-15 10:29:15 +02:00
Thomas 3d10716b1f Update TARS.lua
#TARS Documentation addition
2026-04-15 10:28:39 +02:00
Thomas c48a7d4400 Merge pull request #2575 from FlightControl-Master/master-ng
Merge
2026-04-14 06:29:09 +02:00
Thomas 79130d4fe2 Merge pull request #2574 from Rolln-dev/Rolln/AIRBOSS
[BUGFIX] AIRBOSS:_LSOGrades
2026-04-14 06:28:13 +02:00
Rolln-dev aebb6ac0db [BUGFIX] AIRBOSS:_LSOGrades When points are deducted for a 1-wire pass, we also need to change the grade according to the new points. 2026-04-13 19:20:20 -06:00
Applevangelist 3eb910b47e Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-12 13:13:21 +02:00
Applevangelist 6223b8e1a7 #TARS - docu fixes 2026-04-12 13:12:58 +02:00
Applevangelist 533a4dfa6c Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-12 12:58:33 +02:00
Applevangelist dbc752253b #TARS Initial Release 2026-04-12 12:56:15 +02:00
Applevangelist 7f074781f4 xx 2026-04-12 12:51:13 +02:00
Applevangelist ab77fcbc1f Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-08 15:18:20 +02:00
Applevangelist 56520092c3 #EASYGCICAP - Fix restart function to restart, not start, the Airwings, and call Status itself afterwards 2026-04-08 15:17:54 +02:00
Applevangelist 252a1b0761 Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-08 14:44:20 +02:00
Applevangelist 51e5f53965 #LEGION Fix for MinDistance when nil and spawning on a ship 2026-04-08 14:43:53 +02:00
Applevangelist b0976d1613 Merge remote-tracking branch 'origin/develop' into develop 2026-04-07 12:22:27 +02:00
Applevangelist a737ca71e6 Merge remote-tracking branch 'origin/master-ng' into develop 2026-04-07 12:22:24 +02:00
Applevangelist 1071300a7f #MSRS - Added HOUND/OpenA combo 2026-04-07 12:19:37 +02:00
Thomas 2490958090 Merge pull request #2573 from FlightControl-Master/master-ng
#INTEL add rcs info to contact data
2026-04-06 19:07:23 +02:00
Applevangelist b78b76e579 #INTEL add rcs info to contact data 2026-04-06 18:49:53 +02:00
Thomas efff22fc18 Merge pull request #2571 from FlightControl-Master/master-ng
Merge
2026-03-31 19:35:34 +02:00
Thomas d52ce9af72 Merge pull request #2570 from shaji-Dev/master-ng
[FIXED] CTLD maxUnloadTroopsAllowed
2026-03-31 19:34:28 +02:00
smiki cace516e91 [FIXED] CTLD maxUnloadTroopsAllowed 2026-03-31 18:30:04 +02:00
Thomas 4b27e92210 Merge pull request #2569 from FlightControl-Master/master-ng
Merge
2026-03-30 08:38:19 +02:00
Thomas 3d0061fd83 Merge pull request #2568 from shaji-Dev/master-ng
CTLD. Set max disposition search radius for _C130GetUnits
2026-03-30 08:37:43 +02:00
smiki 1f0a154e4d CTLD. Set max disposition search radius for C-130J 2026-03-29 17:35:41 +02:00
smiki 02bfe9a253 [REMOVED] CTLD. Disposition for _C130GetUnits 2026-03-29 17:32:59 +02:00
Applevangelist f2063f41f6 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-27 17:42:30 +01:00
Applevangelist c7c07c7075 #INTEL Added options to simulate Cold War Doppler radar systems incl. of radar cross section 2026-03-27 17:41:20 +01:00
Applevangelist 28e60745b9 #SPAWN - Added SPAWN:InitCallSignRed(ID) 2026-03-27 17:40:37 +01:00
Applevangelist 830a3b9b1a #MSRS - Added priority parameter to MSRSQUEUE 2026-03-27 17:40:36 +01:00
Thomas 12241e931a Merge pull request #2567 from FlightControl-Master/master-ng
merge
2026-03-27 15:18:15 +01:00
Thomas 3f902d8886 Merge pull request #2566 from shaji-Dev/master-ng
[ADDED] New weapons to ENUMS
2026-03-27 15:17:25 +01:00
smiki fdffef3baf [ADDED] New weapons to ENUMS 2026-03-27 12:44:18 +01:00
Thomas 4cb6debef8 Merge pull request #2565 from FlightControl-Master/master-ng
Merge from master
2026-03-26 06:45:10 +01:00
Thomas 435ea42761 Merge pull request #2564 from shaji-Dev/master-ng
New CTLD And CHIEF Options
2026-03-26 06:44:23 +01:00
smiki 36957dce85 [ADDED] CHIEF:AddLegionRecruitMinRange 2026-03-26 02:46:04 +01:00
smiki fe44e966e0 [ADDED] CHIEF:AddLegionRecruitMinRange 2026-03-26 02:43:06 +01:00
smiki 3b4be5396e [ADDED] Unload Troops Restriction Options 2026-03-26 01:13:28 +01:00
smiki 685c7ac777 [ADDED] Unload Troops Restriction Options 2026-03-26 01:04:02 +01:00
Thomas efe4bf3912 Merge pull request #2563 from FlightControl-Master/master-ng
Merge pull request #2562 from FlightControl-Master/develop
2026-03-24 13:32:26 +01:00
Thomas f1c70f5713 Merge pull request #2562 from FlightControl-Master/develop
Develop
2026-03-24 12:38:14 +01:00
Thomas 3608386bd0 Merge branch 'master-ng' into develop 2026-03-24 12:37:14 +01:00
Thomas 548a959e72 Update gh-pages.yml 2026-03-24 12:29:42 +01:00
Thomas ff957b72c4 Update gh-pages.yml 2026-03-24 12:20:15 +01:00
Thomas 80c55a451d Update gh-pages.yml 2026-03-24 12:17:40 +01:00
Thomas bd5816e451 Update gh-pages.yml 2026-03-24 12:15:13 +01:00
Thomas d28477a655 Update gh-pages.yml 2026-03-24 12:00:15 +01:00
Thomas 9e329abcfa Update gh-pages.yml 2026-03-24 11:57:22 +01:00
Thomas 781a2043b7 Update gh-pages.yml 2026-03-24 11:55:11 +01:00
Thomas 44136b23b1 Update gh-pages.yml 2026-03-24 11:52:29 +01:00
Thomas a5f4272ab7 Update gh-pages.yml 2026-03-24 11:47:01 +01:00
Thomas f32b5878ed Update build-docs.yml 2026-03-24 11:45:46 +01:00
Thomas 1a2892d5d0 Merge pull request #2561 from FlightControl-Master/Applevangelist-patch-2
Update gh-pages.yml
2026-03-24 11:42:30 +01:00
Thomas 1811e28fbb Update gh-pages.yml 2026-03-24 11:42:15 +01:00
Thomas c6ee556c2b Merge pull request #2560 from FlightControl-Master/Applevangelist-patch-2
Update build-includes.yml
2026-03-24 11:39:39 +01:00
Thomas 054e362e8c Update gh-pages.yml 2026-03-24 11:39:18 +01:00
Thomas c4cb9fb82c Update build-docs.yml 2026-03-24 11:37:24 +01:00
Thomas b48035fb37 Update build-includes.yml 2026-03-24 11:36:18 +01:00
Thomas 5819c31b5e Update build-includes.yml 2026-03-24 11:33:56 +01:00
Thomas d77886d586 Update Intelligence.lua 2026-03-24 10:56:54 +01:00
Thomas a9c616120f Update Intelligence.lua 2026-03-24 10:51:03 +01:00
Thomas 09849c7a44 Update Intelligence.lua 2026-03-24 10:45:34 +01:00
Thomas 75d4b70623 Merge branch 'Apple/Develop' into master-ng 2026-03-24 10:13:28 +01:00
Thomas 60959e211a Merge pull request #2557 from FlightControl-Master/master-ng
Update README.md
2026-03-24 10:06:29 +01:00
Thomas 6bccd64ade Update README.md 2026-03-23 06:20:18 +01:00
Thomas 1fcc1598b1 Merge pull request #2556 from FlightControl-Master/master-ng
Merge
2026-03-23 06:19:08 +01:00
Thomas 69784226ea Merge pull request #2555 from FlightControl-Master/leka1986-patch-3
Update CTLD.lua
2026-03-23 06:18:06 +01:00
leka1986 ff17d17e3e Update CTLD.lua
Fixed nil when unitVec2=unitcoord:GetVec2() returns nil.

Removed " self.UseC130LoadAndUnload and " when blocking the build if the cargo is inside  the frame. Now it will block the build with or without  UseC130LoadAndUnload set to true.
2026-03-22 23:37:08 +01:00
Applevangelist 40d9cd2c2b Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-22 17:59:03 +01:00
Applevangelist a7127f07cb #RAT - Fix for F-14A data 2026-03-22 17:58:38 +01:00
Applevangelist b47528028c Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-22 16:50:03 +01:00
Applevangelist 105c30868b #RAT Fix for aircraft with missing dimensions 2026-03-22 16:49:41 +01:00
Applevangelist 786ddda4ad Merge remote-tracking branch 'origin/develop' into develop 2026-03-22 16:32:36 +01:00
Applevangelist 9d08d667a3 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-22 16:32:32 +01:00
Applevangelist a570136a9f #MSRS - Added option for AutoTranslate 2026-03-22 16:32:07 +01:00
Thomas 16583ee35f Merge pull request #2553 from FlightControl-Master/master-ng
Merge
2026-03-22 09:18:00 +01:00
Thomas ed17a42737 Merge pull request #2552 from FlightControl-Master/leka1986-patch-3
Fix SpawnAtAirbase emergency airspawn ground-flag bug
2026-03-22 09:17:08 +01:00
leka1986 2f6525c7c4 Fix SpawnAtAirbase emergency airspawn ground-flag bug
When no parking is available, SpawnAtAirbase switches to air start (Takeoff=Air) but spawnonground remained true. This caused nil indexing of parkingspots during unit placement. Set spawnonground=false when emergency airspawn is selected to keep placement on the airspawn path.
2026-03-22 02:40:45 +01:00
Applevangelist 5e2e8d1fae Merge remote-tracking branch 'origin/develop' into branch 2026-03-21 12:35:47 +01:00
Applevangelist a05f52e3d0 Merge remote-tracking branch 'origin/master-ng' into branch 2026-03-21 12:35:41 +01:00
Applevangelist 117a1e8811 Merge remote-tracking branch 'origin/develop' into develop 2026-03-21 12:35:07 +01:00
Applevangelist 0daf486868 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-21 12:35:04 +01:00
Applevangelist ab6d4cb9b9 #POINT Added Box Scan Method
#CTLD Added options for beacon frequency preset when adding a zone
2026-03-21 12:22:05 +01:00
Applevangelist 6efbc95043 xx 2026-03-21 12:21:21 +01:00
Applevangelist e5fc4bc1dc #CTLD Added option to define beacon frequencies when adding a zone 2026-03-21 12:21:00 +01:00
Applevangelist 65eaecd005 Merge remote-tracking branch 'origin/develop' into branch 2026-03-19 12:28:41 +01:00
Applevangelist 7d52fb686a Merge remote-tracking branch 'origin/master-ng' into branch 2026-03-19 12:28:31 +01:00
Applevangelist 92b4f18cd6 Merge remote-tracking branch 'origin/develop' into develop 2026-03-19 12:28:07 +01:00
Applevangelist 8ede104a3d xx 2026-03-19 12:27:50 +01:00
Thomas 42b4bd62d9 Merge pull request #2549 from hawaiianryan808/master-ng
Add a new SetOptionJettisonEmptyTanks() method to CONTROLLABLE class.
2026-03-19 12:27:17 +01:00
Applevangelist a8bc62608c Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-19 12:26:19 +01:00
Applevangelist 266aba5d72 xx 2026-03-19 12:24:57 +01:00
Thomas 1ddcd28371 Merge pull request #2551 from FlightControl-Master/master-ng
Merge
2026-03-18 20:34:51 +01:00
Thomas f8c0886fe5 Merge pull request #2550 from FlightControl-Master/Applevangelist-patch-4
Update Suppression.lua
2026-03-18 20:33:52 +01:00
Thomas ac258fa356 Update Suppression.lua 2026-03-18 20:33:31 +01:00
HawaiianRyan808 7b21c0cc6b Add a new SetOptionJettisonEmptyTanks() method to CONTROLLABLE class. 2026-03-18 13:51:36 -05:00
Thomas 67297aa574 Merge pull request #2548 from FlightControl-Master/master-ng
Update Suppression.lua
2026-03-18 11:10:50 +01:00
Thomas 28b7c431e0 Update Suppression.lua
#SUPPRESSION - Suppress unnecessary log entries when in normal mode
2026-03-18 10:55:38 +01:00
Thomas b5ba31a94d Merge pull request #2547 from FlightControl-Master/master-ng
merge from master
2026-03-15 15:14:35 +01:00
Thomas 4ca843a14e Merge pull request #2546 from FlightControl-Master/Applevangelist-patch-3
Update Controllable.lua
2026-03-15 15:07:42 +01:00
Thomas 24043d31ab Update Controllable.lua 2026-03-15 15:07:25 +01:00
Applevangelist a008e6cc26 xx 2026-03-14 15:37:45 +01:00
Applevangelist 1e0afb96af xx 2026-03-12 07:40:16 +01:00
Applevangelist 786afd561a Merge remote-tracking branch 'origin/develop' into branch 2026-03-12 07:39:09 +01:00
Applevangelist 5a21e1717c Merge remote-tracking branch 'origin/master-ng' into branch 2026-03-12 07:39:03 +01:00
Thomas d3b550f6a2 Merge pull request #2545 from FlightControl-Master/master-ng
Merge from master
2026-03-10 10:33:25 +01:00
Thomas f5bda1e8d1 Merge pull request #2543 from FlightControl-Master/Applevangelist-patch-2
Update CTLD_Localization.lua
2026-03-10 10:25:08 +01:00
Thomas a5bad3735f Update CTLD_Localization.lua 2026-03-10 10:20:01 +01:00
Frank 2e00c3ad56 Merge branch 'master-ng' into develop 2026-03-08 23:06:42 +01:00
Frank 3324656516 Update Auftrag.lua 2026-03-08 23:06:12 +01:00
Applevangelist a8b6607c89 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-08 15:38:38 +01:00
Applevangelist f93bf6f0e7 #ARMYGROUP - Added Huntingpatrolcode by Celludriel 2026-03-08 15:38:03 +01:00
Applevangelist ccd4d3c9a8 xx 2026-03-08 15:37:20 +01:00
Applevangelist 4dee60b0fd Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-08 15:12:23 +01:00
Applevangelist 85a4e4bd35 #EASYGCICAP - Fix for the Stop function 2026-03-08 15:11:57 +01:00
Frank 227b6337bc Merge branch 'master-ng' into develop 2026-03-08 14:14:36 +01:00
Frank b6c82316c7 AUFTRAG
- Updated AWACS mission type to support anchor at a unit
2026-03-08 14:14:22 +01:00
Frank 9850b50f1e Merge branch 'master-ng' into develop 2026-03-08 13:14:14 +01:00
Frank 970f567edf Update Auftrag.lua
- Added `AUFTRAG:SetEngageQuantity`
2026-03-08 13:14:01 +01:00
Frank a4b47001c4 Merge branch 'master-ng' into develop 2026-03-08 12:49:27 +01:00
Frank bea05a5b54 Update Controllable.lua
- removed unused and redundant `AttackQtyLimit` parameter
2026-03-08 12:49:18 +01:00
Applevangelist 7ae60e3cd1 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-07 18:18:49 +01:00
Applevangelist 4367a91d4b #VARIOUS - Added Speaker options for HOUND 2026-03-07 18:17:23 +01:00
Applevangelist 04accc28c8 Merge remote-tracking branch 'origin/develop' into branch 2026-03-07 12:08:34 +01:00
Applevangelist 210fd237e8 Merge remote-tracking branch 'origin/master-ng' into branch
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2026-03-07 12:08:24 +01:00
Applevangelist 34074a9451 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-07 12:06:00 +01:00
Applevangelist 94179bbb33 #MSRS - Speaker options for Piper 2026-03-07 12:05:27 +01:00
Applevangelist c9549ecd7c Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-07 11:35:40 +01:00
Applevangelist dc8ebf7faa #VARIOUS - Added provider options for TTS and updated logic 2026-03-07 11:35:12 +01:00
Applevangelist 33bd6cc5a4 xx 2026-03-07 11:34:46 +01:00
Applevangelist 5f7975b910 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-07 09:57:00 +01:00
Applevangelist 835b7d66a1 #CSAR - Fix setting correct provider if a provider is given and a google credentials path is there at the same time 2026-03-07 09:56:33 +01:00
Thomas b99894768b Merge pull request #2542 from FlightControl-Master/master-ng
Merge
2026-03-06 20:27:14 +01:00
Thomas 06acd02dbb Merge pull request #2541 from FlightControl-Master/leka1986-patch-2
Update CTLD.lua
2026-03-06 20:25:59 +01:00
leka1986 2cedcff73c Update CTLD.lua
Removed C-130 from the Messaging Unloaded by ground crew.

Scheduler for batch building is now 0 to make each set build it's own  with it's engineer. He will despawn after 30 seconds after build.

Shorter message for C-130 airdrop buildstarted.
2026-03-06 20:16:21 +01:00
Applevangelist 360567ccd7 xx 2026-03-05 16:46:11 +01:00
Applevangelist 82ec9befd0 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-05 16:02:16 +01:00
Applevangelist 514ac30ad1 #MSRS - Added "Speaker" option for HOUND/PIPER sub-voices 2026-03-05 16:01:42 +01:00
Applevangelist 782cd87d60 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-05 10:17:33 +01:00
Applevangelist 3514073433 xx 2026-03-05 10:17:09 +01:00
Applevangelist f4345e1005 xx 2026-03-05 10:17:02 +01:00
Applevangelist b88a421d2c xx 2026-03-05 10:16:00 +01:00
Applevangelist 25d3fb389c xx 2026-03-05 10:15:50 +01:00
Applevangelist 9afd516182 Merge remote-tracking branch 'origin/develop' into branch 2026-03-05 09:56:12 +01:00
Applevangelist bfeaa0530f Merge remote-tracking branch 'origin/master-ng' into branch
# Conflicts:
#	Moose Development/Moose/Functional/Escort.lua
#	Moose Development/Moose/Ops/CTLD.lua
#	Moose Development/Moose/Ops/CTLD_CARGO.lua
2026-03-05 09:56:05 +01:00
Applevangelist bb4692bbf6 Merge remote-tracking branch 'origin/master-ng' into develop 2026-03-05 09:49:54 +01:00
Applevangelist 73fc73ae52 xx 2026-03-05 09:49:23 +01:00
Thomas f9d667863e Merge pull request #2539 from FlightControl-Master/master-ng
Merge
2026-03-05 06:56:17 +01:00
Thomas f3bc71a4ee Merge pull request #2538 from FlightControl-Master/leka1986-patch-4
Leka1986 patch 4
2026-03-05 06:55:17 +01:00
leka1986 d30377a7b1 Remove C-130J-30 specific notes from CTLD.lua
Removed notes specific to C-130J-30 workflow from CTLD.lua.
2026-03-04 21:47:27 +01:00
leka1986 750ad6b5b9 Update CTLD.lua
Fixed comments that looked weird in the website.
2026-03-04 21:44:46 +01:00
Thomas e8176eee4f Merge pull request #2537 from FlightControl-Master/master-ng
Merge from master-ng
2026-03-04 14:12:14 +01:00
Thomas 52b1526163 Merge pull request #2536 from FlightControl-Master/Applevangelist-patch-1-1
Update Designate.lua
2026-03-04 14:11:03 +01:00
Thomas 74254e407b Update Designate.lua 2026-03-04 14:10:33 +01:00
Thomas ca3ccce3f2 Merge pull request #2535 from FlightControl-Master/Applevangelist-patch-1
Update Message.lua
2026-03-04 13:53:23 +01:00
Thomas 4ce820279e Update Message.lua
#MESSAGE Added :ToSet() and ToSetIf()
2026-03-04 13:53:03 +01:00
Thomas 3c11045050 Merge pull request #2534 from FlightControl-Master/develop
Merge pull request #2533 from FlightControl-Master/master-ng
2026-03-04 12:03:41 +01:00
Thomas 64199acefe Merge pull request #2533 from FlightControl-Master/master-ng
Meegez
2026-03-04 12:01:48 +01:00
Thomas 2d4d4e3865 Merge branch 'develop' into master-ng 2026-03-04 12:01:31 +01:00
Thomas f01a1fb6b9 Merge pull request #2532 from FlightControl-Master/leka1986-patch-3
Update DynamicCargo.lua
2026-03-03 19:57:32 +01:00
Thomas 0a05bb3892 Merge pull request #2531 from FlightControl-Master/leka1986-patch-2
Update CTLD.lua
2026-03-03 19:55:12 +01:00
leka1986 506073022b Update DynamicCargo.lua
- Added C-130-specific transport state handling to avoid false unloads with `ropelength = 0`.
- Added state flow for C-130 cargo:
  - attach (grounded proximity)
  - detach (airborne + distance)
  - airborne confirm
  - landed-stable confirm
  - unload event only after landed-stable check
- Added owner re-resolve fallback for C-130 when owner/unit refs are stale.
- Added C-130 config values:
  - `C130AttachDistance = 10`
  - `C130DetachDistance = 14`
  - `C130AirborneAGL = 8`
  - `C130LandedAGL = 0.5`
  - `C130StabilityEpsilon = 0.05`
  - `C130RequireAirborne = true`
  - owner resolve thresholds (`Move2D`, `Near2D`, `Max3D`)
- Updated default scheduler interval to `5` seconds.
- Changed tracking to one global timer for all tracked DynamicCargo objects:
  - starts when cargo exists
  - stops when no tracked cargo remains
- Added/updated aircraft dimensions table entries:
  - `CH-47Fbl1`, `Mi-8MTV2`, `Mi-8MT`, `UH-1H`, `Mi-24P`, `UH-60L`, `UH-60L_DAP`, `C-130J-30`
- Added helper getters:
  - `IsAttached()`
  - `IsDetached()`
  - `WasAirborneTransport()`
  - `IsLandedStable()`
  - `GetCarrierUnitName()`
  - `GetCarrierTypeName()`
  - `GetCarrierGroupName()`

**Behavior note**

- Non-C130 behavior stays on the existing logic path.
- Existing DynamicCargo event IDs and flow are kept (`New`, `Loaded`, `Unloaded`, `Removed`).
2026-03-03 19:37:42 +01:00
leka1986 85b582d6dd Update CTLD.lua
- Added C-130 DynamicCargo auto-build adapter inside CTLD core.
- New CTLD options:
  - `UseC130DynamicCargoAutoBuild = false` (default off)
  - `C130DynamicCargoAutoBuildMergeSeconds = 10`
- Hooked C-130 set registration into CTLD `Get Crates` flow (buildable cargo only: `VEHICLE` / `FOB`).
- Added CTLD internal set/entry tracking for C-130 crates:
  - map crate spawn -> dynamic cargo loaded/unloaded -> landed.
- Wired DynamicCargo event handling in CTLD:
  - on loaded: map to the correct CTLD set entry.
  - on unloaded: mark landed and create/rebind CTLD cargo proxy for build handoff.
  - on removed before landed: mark set failed and clean it.
- Added set completion logic:
  - build starts only when all crates in set are landed.
  - helper infantry is spawned and CTLD engineer build path is used.
- Added merge window batching by owner:
  - close drops from same C-130 can be processed together (one handoff window).
- Added scoped filtering in `_BuildCrates` for this path:
  - prevents counting unrelated nearby crates during engineer auto-build.
- Added cleanup paths for completed/failed/stale sets and stop lifecycle cleanup.
- Added/updated docs in section `2.2` for:
  - what the feature does,
  - required settings,
  - usage example,
  - and the important note that this applies to CTLD `Get Crates` cargo (not C-130 Loadsheet cargo).

**Behavior note**

- Default behavior is unchanged unless `UseC130DynamicCargoAutoBuild` is enabled.
2026-03-03 19:35:17 +01:00
Thomas 8968add126 Merge pull request #2528 from Rolln-dev/Rolln/ParamsCleanup
UPDATE: FUNCTIONAL, NAVIGATION, OPS, SOUND, UTILITIES and WRAPPER function params
2026-03-03 06:25:56 +01:00
Thomas 6967b5f20b Merge pull request #2530 from FlightControl-Master/revert-2529-master-ng
Revert "Update CTLD.lua"
2026-03-03 06:25:19 +01:00
Rolln-dev 4e910fcd7a UPDATE: OPS function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 20:48:54 -07:00
leka1986 c65d93dd73 Revert "Update CTLD.lua" 2026-03-02 22:23:48 +01:00
Rolln-dev ea3689791b UPDATE: SOUND function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 09:19:20 -07:00
Rolln-dev 38bdcfd297 UPDATE: WRAPPER function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 08:59:40 -07:00
Rolln-dev b74ec54bea UPDATE: UTILITIES function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 08:35:47 -07:00
Thomas 6698bf0c67 Merge pull request #2529 from FlightControl-Master/master-ng
Update CTLD.lua
2026-03-02 16:28:20 +01:00
Thomas c346eb7acc Update CTLD.lua 2026-03-02 16:24:29 +01:00
Rolln-dev 414a1d2ca5 UPDATE: NAVIGATION function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 08:12:03 -07:00
Rolln-dev 6f16d34681 UPDATE: FUNCTIONAL function params
- Added (Optional) to param descriptions for params that have default values
2026-03-02 08:03:56 -07:00
Thomas 88e6d1c3ff Merge pull request #2527 from FlightControl-Master/master-ng
Update Utils.lua
2026-03-02 13:26:59 +01:00
Thomas 877ca7176a Update Utils.lua
#UTILS - Make PrintTableToLog() safer against endless cycles
2026-03-02 12:22:13 +01:00
Thomas 9c3a2470c2 Merge pull request #2526 from FlightControl-Master/master-ng
Merge from master
2026-03-02 06:43:41 +01:00
Thomas ee002fa470 Merge pull request #2524 from FlightControl-Master/leka1986-patch-1
Update OpsGroup.lua
2026-03-02 06:42:38 +01:00
Thomas 33773950b0 Merge pull request #2525 from Rolln-dev/Rolln/ParamsCleanup
UPDATE: Core function params
2026-03-02 06:41:37 +01:00
Rolln-dev 753691f5db UPDATE: Core function params
- Fixed some incorrect param types
- Added (Optional) to param descriptions that have default values
2026-03-01 16:28:12 -07:00
Frank 216d023c45 Auftrag
- Improvements
2026-03-01 23:11:36 +01:00
leka1986 d5911afde1 Update OpsGroup.lua
Fixed mojibake
2026-03-01 19:38:52 +01:00
Frank a57532d7bf Merge branch 'master-ng' into develop 2026-03-01 15:42:19 +01:00
Frank e02a1f705b Merge pull request #2523 from FlightControl-Master/FF/Ops
Update
2026-03-01 15:36:27 +01:00
Frank 2e4d401f61 Update
- SET: cleaned up FilterPrefixes
- AUFTRAG: fixed bug in _GetDCSAttackTask
- CONTROLLABLE: Removed unused parameter AttackQtyLimit from TaskAttackGroup, changed weapon type enum for some tasks.
2026-03-01 15:35:05 +01:00
Applevangelist 9c16734141 xx 2026-03-01 14:07:02 +01:00
Applevangelist ea1fa521c4 Merge remote-tracking branch 'origin/develop' into develop 2026-03-01 14:04:49 +01:00
Applevangelist 384e0b1212 Merge remote-tracking branch 'origin/master-ng' into develop
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
#	Moose Development/Moose/Ops/CTLD_CARGO.lua
#	Moose Development/Moose/Ops/CTLD_Hercules.lua
#	Moose Development/Moose/Ops/CTLD_Localization.lua
2026-03-01 14:04:19 +01:00
Applevangelist 3d6bd4ea54 #Fix some missing localizations 2026-03-01 14:03:13 +01:00
Applevangelist 085330c930 xx 2026-03-01 14:00:27 +01:00
Thomas 44cfbb2c30 Merge pull request #2522 from FlightControl-Master/master-ng
Update CTLD.lua
2026-02-28 18:34:55 +01:00
Thomas fe0f0a0190 Update CTLD.lua 2026-02-28 18:33:35 +01:00
Applevangelist f1386dd229 xx 2026-02-28 18:31:29 +01:00
Thomas 68ac892015 Merge pull request #2521 from FlightControl-Master/master-ng
Merge from master
2026-02-28 17:43:05 +01:00
Thomas 782bd0f164 Merge pull request #2520 from FlightControl-Master/Applevangelist-CTLD-1
#CTLD - Added localization and SRS
2026-02-28 17:39:58 +01:00
Thomas d85b109091 Update Moose.files 2026-02-28 17:39:16 +01:00
Thomas 429307ecc3 Update Modules.lua 2026-02-28 17:38:21 +01:00
Thomas 180d861426 Update CTLD.lua 2026-02-28 17:36:48 +01:00
Thomas 7c15e1119b #CTLD - Added localization and SRS
#CTLD - Added localization and SRS
2026-02-28 17:32:50 +01:00
Applevangelist 11d7a31584 #CTLD Localization 2026-02-27 16:18:32 +01:00
Applevangelist 26f55b0bb5 #CTLD Localization 2026-02-27 16:12:55 +01:00
Applevangelist 2828693112 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-27 09:34:46 +01:00
Applevangelist ebd61a70b0 #MSRS - some HOUND specific adjustments 2026-02-27 09:34:19 +01:00
Applevangelist e96c265135 #MSRS - some chamges for HOUND backend 2026-02-27 09:33:49 +01:00
Applevangelist a96e093204 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-27 09:21:30 +01:00
Applevangelist bed8196f10 #CSAR - Missing message translations 2026-02-27 09:21:09 +01:00
Applevangelist d51ab4483e Merge remote-tracking branch 'origin/develop' into develop 2026-02-27 09:19:06 +01:00
Frank e28d24bfe3 Merge pull request #2519 from FlightControl-Master/develop
Develop
2026-02-26 23:39:57 +01:00
Frank 7a9f2f3944 Merge pull request #2518 from FlightControl-Master/FF/Ops
Update
2026-02-26 23:27:43 +01:00
Frank 0ce082ed80 Merge branch 'master-ng' into FF/Ops 2026-02-26 16:10:33 +01:00
Applevangelist 1319df63f5 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-26 15:45:10 +01:00
Applevangelist 486dc6d218 #SRS - fix for Hound Backend if only one frequency is set
#CSAR - Added localization options, added some SRS options (backend, provider)
2026-02-26 15:44:14 +01:00
Applevangelist 234345f2ea Merge remote-tracking branch 'origin/develop' into branch 2026-02-26 12:52:42 +01:00
Applevangelist 08bfc1450c Merge remote-tracking branch 'origin/master-ng' into branch 2026-02-26 12:52:36 +01:00
Frank 8788dc264d Merge branch 'develop' into FF/Ops 2026-02-26 08:09:18 +01:00
Frank 5ff5da9d9a Update Enums.lua
- Added new Weapon type enums
- Added torpedos to Auto weapon type
2026-02-26 08:08:44 +01:00
Frank bfc9d357d6 Update Auftrag.lua
- Added GetCargoSet function
2026-02-24 15:30:16 +01:00
Applevangelist fc79fd18b8 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-23 18:13:49 +01:00
Applevangelist a949b7ae8c xx 2026-02-23 18:13:16 +01:00
Applevangelist 6899f4b5ac Merge remote-tracking branch 'origin/develop' into develop 2026-02-23 18:12:15 +01:00
Applevangelist e6fb8fa1d4 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-23 18:12:11 +01:00
Applevangelist 12e71f4454 #MSRS - Added Hound TTS as backend
#AIRBOSS - fixed an issue with `EnableSRS()` if no voice is given and no config file exists for MSRS.
2026-02-23 18:11:28 +01:00
Frank 6362e37804 Merge pull request #2517 from FlightControl-Master/FF/Ops
AUFTRAG
2026-02-22 16:33:54 +01:00
Frank 8471132fe7 AUFTRAG
AUFTRAG FREIGHTTRANSPORT
- Added proper success/failure evaluation
2026-02-22 16:31:03 +01:00
Thomas 2449ed4c96 Merge pull request #2516 from FlightControl-Master/master-ng
Merge from master-ng
2026-02-22 13:45:16 +01:00
leka1986 3979e6b2af Merge pull request #2515 from FlightControl-Master/leka1986-patch-1
Added a new function: CTLD:CanGetTroops, this is a final check for outside hooks, if player have conditions.

Reworked cargo placement in the case of none ship. Cargo will be placed and sizes are depended on the cargo type, this can be further tweaked under the function GetCrates. This is applied to all types of cargo and all type of units.

Removed "Get" from the menu if the UseC130LoadAndUnload is true, player choose now the amount of cargo, then they will spawn. Same is for the Chinook if GCLoading is enabled.

Increased the UH-60L_DAP crate limit to 2 and the weight limit to 3500.

C130basetype is now independent of UseC130LoadAndUnload true / false. It will always be cds_crate for the C-130, and players can change it to whatever.
2026-02-22 13:44:10 +01:00
leka1986 052f055bbf Update CTLD.lua
Added:  function CTLD:AddStaticsCargoFromType(Name,TypeName,Mass,Stock,SubCategory,DontShowInMenu,Location,UnitTypes,Category,ShapeName,ResourceMap,DisplayName)
Added:  function CTLD:CanGetTroops, this is a final check for outside hooks, if player have conditions.


Reworked cargo placement in the case of none ship.
Cargo will be placed and sizes are depended on the cargo type, this can be further tweaked under the function GetCrates. This is applied to all types of cargo and all type of units.

Removed "Get" from the menu if the UseC130LoadAndUnload is true, player choose now the amount of cargo, then they will spawn. Same is for the Chinook if GCLoading is enabled.

Increased the UH-60L_DAP crate limit to 2 and the weight limit to 3500.

C130basetype is now independent of UseC130LoadAndUnload true / false. It will always be cds_crate for the C-130, and players can change it to whatever.
2026-02-22 13:25:42 +01:00
Applevangelist a88bc4554f Merge remote-tracking branch 'origin/develop' into branch 2026-02-19 09:23:14 +01:00
Applevangelist ddfdc3e1d1 Merge remote-tracking branch 'origin/master-ng' into branch 2026-02-19 09:23:03 +01:00
Applevangelist e0487280e5 xx 2026-02-19 09:22:36 +01:00
Thomas 8bb080dba7 Merge pull request #2514 from FlightControl-Master/master-ng
Update Airbase.lua
2026-02-18 11:42:18 +01:00
Thomas c31e8e8130 Update Airbase.lua
#AIRBASE removed a "." from Marianas Airbase names
2026-02-18 11:40:05 +01:00
Frank 09fd4d25b7 AUFTRAG
- Added check for cargo in zone
2026-02-16 22:25:59 +01:00
Frank e3c753ba71 Merge pull request #2513 from FlightControl-Master/FF/Ops
AUFTRAG
2026-02-15 22:47:53 +01:00
Frank 1ac0249fe5 AUFTRAG
- improved FREIGHTTRANSPORT mission type
2026-02-15 22:44:39 +01:00
Applevangelist eb1db21920 Merge remote-tracking branch 'origin/develop' into branch 2026-02-15 13:36:28 +01:00
Applevangelist 60e46bed7e Merge remote-tracking branch 'origin/master-ng' into branch 2026-02-15 13:36:21 +01:00
Thomas a127c8b7c7 Merge pull request #2512 from FlightControl-Master/master-ng
Merge from master
2026-02-15 13:34:18 +01:00
Thomas 982b5392ab Merge pull request #2511 from FlightControl-Master/Applevangelist-CTLD-3
Update CTLD.lua
2026-02-15 13:33:27 +01:00
Thomas 843ef4d9d2 Update CTLD.lua 2026-02-15 13:32:57 +01:00
Frank 52986ce8de AUFTRAG 2026-02-13 12:01:34 +01:00
Thomas 5c570b3d8c Update README.md 2026-02-12 12:00:28 +01:00
Frank d85e5e7b3e Merge branch 'develop' into FF/Ops 2026-02-12 08:51:37 +01:00
Frank 2ebce9fd03 AUFTRAG
- New FREIGHTTRANSPORT (internal cargo transportation) WIP
2026-02-10 22:17:22 +01:00
Thomas 758f2a7103 Merge pull request #2510 from FlightControl-Master/master-ng
Update Utils.lua
2026-02-10 15:34:26 +01:00
Thomas fa163d2a42 Update Utils.lua
#UTILS Small fix
2026-02-10 15:33:24 +01:00
Thomas 8f910f83af Merge pull request #2509 from FlightControl-Master/master-ng
Merge
2026-02-10 06:16:51 +01:00
Thomas 5e6204854f Merge pull request #2508 from leka1986/patch-9
Update Database.lua
2026-02-10 06:15:40 +01:00
leka1986 da65b3ec64 Update Database.lua
Removed 
  self:HandleEvent( EVENTS.NewCargo )
  self:HandleEvent( EVENTS.DeleteCargo )
2026-02-09 21:18:12 +01:00
Thomas c781c2fefb Merge pull request #2507 from FlightControl-Master/master-ng
Merge from master
2026-02-09 18:51:33 +01:00
Thomas d691b8201b Merge pull request #2506 from shaji-Dev/master-ng
[ADDED] 268 Missing Warehouse EQP ENUMS
2026-02-09 18:26:35 +01:00
smiki 2109222d12 [ADDED] 268 Missing Warehouse EQP ENUMS 2026-02-09 18:24:25 +01:00
Applevangelist 1abebc54b2 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-08 15:12:57 +01:00
Applevangelist 248af4f9a1 Merge remote-tracking branch 'origin/develop' into branch 2026-02-08 15:11:46 +01:00
Applevangelist 1a70358e21 Merge remote-tracking branch 'origin/master-ng' into branch
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
#	Moose Development/Moose/Functional/Artillery.lua
#	Moose Development/Moose/Functional/ZoneGoalCargo.lua
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Wrapper/Client.lua
#	Moose Development/Moose/Wrapper/Controllable.lua
2026-02-08 15:11:33 +01:00
Applevangelist 1729c14acc #ENUMS Added 2 storage items 2026-02-08 15:07:09 +01:00
Thomas 1b440aa3ad Update index.md 2026-02-08 14:48:51 +01:00
Applevangelist 9e2a57a935 xx 2026-02-08 14:17:16 +01:00
Applevangelist e52c1199f9 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-08 14:16:44 +01:00
Applevangelist 176d614d86 #CONTROLLABLE - Rollback FunctionString Changes 2026-02-08 14:16:11 +01:00
Applevangelist 3003d069fe Merge remote-tracking branch 'origin/master-ng' into develop
# Conflicts:
#	Moose Development/Moose/Cargo/Cargo.lua
2026-02-08 12:36:26 +01:00
Applevangelist dfcbe6fd9b # CARGO CLASS Removal 2026-02-08 12:32:40 +01:00
Applevangelist 5a9277de90 xx 2026-02-08 12:08:00 +01:00
Applevangelist 3b4b385418 #CARGO Removal in Warehouse functions 2026-02-08 12:06:13 +01:00
Frank db49403117 Merge branch 'develop' into FF/Ops 2026-02-08 11:08:31 +01:00
Frank 63b916eeca Merge branch 'WarehouseOps' into develop 2026-02-07 22:35:01 +01:00
Frank 0beb6b2022 Warehouse & OpsTransport
**WAREHOUSE**
- Switched from AI_CARGO_DISPATCHER to OPSTRANSPORT

**OPSTRANSPORT**
- Fixed bugs
2026-02-07 22:34:36 +01:00
Applevangelist 62dcfdb7a2 Merge remote-tracking branch 'origin/develop' into branch 2026-02-07 16:59:48 +01:00
Applevangelist 17d33b460f Merge remote-tracking branch 'origin/master-ng' into branch 2026-02-07 16:59:42 +01:00
Applevangelist 9dc282b1d9 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-07 16:58:29 +01:00
Applevangelist 7ec43c9913 #CONTROLLABLE - Make waypoint function a bit more robust 2026-02-07 16:57:53 +01:00
Thomas 9df39f9646 Merge pull request #2504 from FlightControl-Master/master-ng
Merge
2026-02-07 09:10:23 +01:00
Thomas d3ad70b019 Merge pull request #2503 from hawaiianryan808/master-ng
Add RAT prediction for destination ship location
2026-02-07 09:09:19 +01:00
HawaiianRyan808 8bab24adbd Make RAT crudely predict where the ship will be at landing time instead of routing aircraft to where the ship is at spawn time. 2026-02-06 13:54:12 -06:00
Applevangelist 3261a59cee Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Modules_local.lua
2026-02-06 17:40:25 +01:00
Applevangelist 42731b5778 Merge remote-tracking branch 'origin/master-ng' into develop
# Conflicts:
#	Moose Development/Moose/Core/Event.lua
2026-02-06 17:29:44 +01:00
Applevangelist 80d2c9871d xx 2026-02-06 17:29:03 +01:00
Applevangelist d5b7a2e168 Restore Cargo Events in EVENT until Franky has finished off Warehouse 2026-02-06 17:28:42 +01:00
Applevangelist ee610f5cc7 Merge remote-tracking branch 'origin/master-ng' into develop 2026-02-06 16:28:47 +01:00
Applevangelist 1830b4c752 #CONTROLLABLE
- Added OptionAllowFormationSideSwap()
- Added OptionAIRunwayLineup()
2026-02-06 16:28:11 +01:00
Applevangelist 486891d861 xx 2026-02-06 16:25:42 +01:00
Applevangelist cec6663ea3 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Cargo/Cargo.lua
2026-02-06 12:44:30 +01:00
Applevangelist 9e2ad78330 Merge remote-tracking branch 'origin/master' into branch 2026-02-06 12:43:14 +01:00
Applevangelist d8dc953252 xx 2026-02-05 12:20:34 +01:00
Applevangelist 08bab8501b Merge remote-tracking branch 'origin/develop' into branch 2026-01-25 13:16:02 +01:00
Applevangelist 3e2fe8a744 Merge remote-tracking branch 'origin/master' into branch 2026-01-25 13:15:55 +01:00
Applevangelist 802c2065ee xx 2026-01-25 13:15:32 +01:00
Applevangelist 34d2336030 xx 2026-01-24 16:17:44 +01:00
Applevangelist 9322b4df99 Merge remote-tracking branch 'origin/develop' into branch 2026-01-24 15:10:59 +01:00
Applevangelist af0e411487 Merge remote-tracking branch 'origin/master' into branch 2026-01-24 15:10:53 +01:00
Applevangelist bff150a931 xx 2026-01-23 18:21:21 +01:00
Applevangelist 829860e4f0 xx 2026-01-22 17:21:04 +01:00
Applevangelist af67829a41 xx 2026-01-22 12:30:54 +01:00
Applevangelist e633c0247d Merge remote-tracking branch 'origin/develop' into branch 2026-01-22 08:07:30 +01:00
Applevangelist 38b385f15f Merge remote-tracking branch 'origin/master' into branch 2026-01-22 08:07:23 +01:00
Applevangelist 33483ae37b xx 2026-01-12 13:14:32 +01:00
Applevangelist a9a827dc40 Merge remote-tracking branch 'origin/develop' into branch 2026-01-12 08:49:49 +01:00
Applevangelist d82f49f727 Merge remote-tracking branch 'origin/master' into branch 2026-01-12 08:49:43 +01:00
Applevangelist ce711a3d0c #EASYGCICAP - Fix trying to set corridor limits in feet when they are meters internally 2026-01-09 15:35:19 +01:00
Applevangelist 6b3148ec31 xx 2026-01-08 18:50:00 +01:00
Applevangelist e5fc887d4a xx 2026-01-08 13:12:12 +01:00
Applevangelist 59b15930a3 Merge remote-tracking branch 'origin/develop' into branch 2026-01-08 13:03:43 +01:00
Applevangelist f06daedb0c Merge remote-tracking branch 'origin/master' into branch 2026-01-08 13:03:36 +01:00
Applevangelist c2b8a71000 xx 2026-01-08 13:03:15 +01:00
Applevangelist b29f485e15 xx 2026-01-04 17:51:48 +01:00
Applevangelist e821fa1100 xx 2026-01-04 17:51:36 +01:00
Applevangelist e5c919700a Merge remote-tracking branch 'origin/develop' into branch 2026-01-03 17:27:37 +01:00
Applevangelist b9b947fa3d Merge remote-tracking branch 'origin/master' into branch 2026-01-03 17:27:30 +01:00
Applevangelist 07714d160c xx 2026-01-03 17:25:45 +01:00
Applevangelist e413ca5b62 Merge remote-tracking branch 'origin/master' into branch 2025-12-30 10:41:10 +01:00
Applevangelist a96c617b01 Merge remote-tracking branch 'origin/develop' into branch 2025-12-30 09:43:45 +01:00
Applevangelist da0ba49a14 Merge remote-tracking branch 'origin/master' into branch 2025-12-30 09:43:39 +01:00
Applevangelist c4ad52a456 Merge remote-tracking branch 'origin/develop' into branch 2025-12-29 18:20:08 +01:00
Applevangelist de2c6bec85 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Ops/AirWing.lua
2025-12-29 18:20:01 +01:00
Applevangelist 3eef63b75c xx 2025-12-29 13:59:23 +01:00
Applevangelist 9df694e12e xx 2025-12-29 12:48:35 +01:00
Applevangelist a3754b7031 xx 2025-12-29 12:34:42 +01:00
Applevangelist ca19352ace xx 2025-12-29 10:47:06 +01:00
Applevangelist e3b405ad2d xx 2025-12-28 17:51:25 +01:00
Applevangelist fb8cc4bfeb xx 2025-12-28 16:51:52 +01:00
Applevangelist c119e35901 xx 2025-12-28 14:02:03 +01:00
Applevangelist b3005010e7 xx 2025-12-28 13:51:23 +01:00
Applevangelist 2cb58da7b7 xx 2025-12-28 13:50:43 +01:00
Applevangelist ab14deb2cf xx 2025-12-28 13:33:16 +01:00
Applevangelist 5b88ad2967 xx 2025-12-23 17:14:44 +01:00
Applevangelist 79a2e905a8 xx 2025-12-22 14:08:32 +01:00
Applevangelist 0e3500f587 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Ops/Intelligence.lua
#	Moose Development/Moose/Ops/PlayerTask.lua
2025-12-22 12:24:25 +01:00
Applevangelist 12fa333907 xx 2025-12-21 18:46:08 +01:00
Applevangelist 17a3f59bdc xx 2025-12-21 15:34:17 +01:00
Applevangelist fc9e31199e #CSAR - added option for Smoke Closest MASH, adjusted logic for airbase rescues 2025-12-21 12:49:00 +01:00
Applevangelist fefcbbabbb Merge remote-tracking branch 'origin/develop' into branch 2025-12-21 11:45:14 +01:00
Applevangelist 38fcb274a0 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Core/MarkerOps_Base.lua
2025-12-21 11:45:06 +01:00
Applevangelist 3aa3942998 xx 2025-12-21 11:44:19 +01:00
Applevangelist 8a958df5f5 xx 2025-12-20 12:07:31 +01:00
Applevangelist 41a9c22959 Merge remote-tracking branch 'origin/Apple/Develop' into branch 2025-12-17 11:31:13 +01:00
Applevangelist 49097649de xx 2025-12-17 11:31:07 +01:00
Thomas 19e94a7fb9 Merge pull request #2472 from FlightControl-Master/master
Merge
2025-12-16 08:41:03 +01:00
Applevangelist 7605c2f4f5 xx 2025-12-15 12:12:20 +01:00
Applevangelist ec41d7310b Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/AI/AI_A2G_BAI.lua
#	Moose Development/Moose/AI/AI_CAP.lua
#	Moose Development/Moose/Modules_local.lua
#	Moose Development/Moose/Ops/EasyA2G.lua
2025-12-15 09:43:41 +01:00
Applevangelist feb4f77ef4 Merge remote-tracking branch 'origin/master' into branch 2025-12-15 09:42:09 +01:00
Applevangelist 79654a99d9 xx 2025-12-15 09:40:08 +01:00
Applevangelist 1d0a273ffb xx 2025-12-14 16:04:07 +01:00
Applevangelist 7fec25ddcd xx 2025-12-14 14:34:22 +01:00
Applevangelist 81b227fa9e Merge remote-tracking branch 'origin/master' into branch 2025-12-12 12:52:43 +01:00
Applevangelist 2eb5374b28 xx 2025-12-12 12:52:10 +01:00
Applevangelist 12bde81e67 xx 2025-12-11 15:47:26 +01:00
Applevangelist 0503596414 xx 2025-12-11 15:41:55 +01:00
Applevangelist 65ab481432 xx 2025-12-11 09:35:29 +01:00
Applevangelist d76e8ddc3f xx 2025-12-07 15:13:04 +01:00
Applevangelist 7189154d47 xx 2025-12-07 13:23:23 +01:00
Applevangelist e72bd1738c Merge remote-tracking branch 'origin/develop' into branch 2025-12-06 11:55:22 +01:00
Applevangelist 280d2f6517 Merge remote-tracking branch 'origin/master' into branch 2025-12-06 11:55:13 +01:00
Frank 16e069b9a5 Merge branch 'develop' into FF/Ops 2025-12-04 17:33:38 +01:00
Applevangelist 230e270f13 Merge remote-tracking branch 'origin/develop' into branch 2025-11-28 12:50:39 +01:00
Applevangelist a87860a110 Merge remote-tracking branch 'origin/master' into branch 2025-11-28 12:50:31 +01:00
Applevangelist 7456489fb0 xx 2025-11-28 12:48:49 +01:00
Applevangelist 9992361980 xx 2025-11-28 09:15:50 +01:00
Applevangelist 40fee25da5 Merge remote-tracking branch 'origin/develop' into branch 2025-11-28 08:48:17 +01:00
Applevangelist d6a9e4726e Merge remote-tracking branch 'origin/master' into branch 2025-11-28 08:48:08 +01:00
Applevangelist 9e81e5606a xx 2025-11-28 08:47:37 +01:00
Applevangelist 01425dac70 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Core/Point.lua
#	Moose Development/Moose/Ops/OpsGroup.lua
2025-11-27 08:58:39 +01:00
Applevangelist 8406fd86d5 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Wrapper/Scenery.lua
2025-11-27 08:57:37 +01:00
Frank 88a8a3318f Merge branch 'develop' into FF/Ops 2025-11-23 20:42:00 +01:00
Applevangelist c4f0440b0a xx 2025-11-22 16:17:00 +01:00
Applevangelist cbb6d2c712 fixes 2025-11-22 15:25:02 +01:00
Thomas bc24d75ad7 Merge pull request #2448 from FlightControl-Master/master
Merge from master
2025-11-22 15:21:28 +01:00
Applevangelist c869d23778 #ZONE - Small fix 2025-11-22 15:15:24 +01:00
Applevangelist 5edffbbca4 #SET - Small fix 2025-11-22 15:14:57 +01:00
Applevangelist 01f2b6b783 #EVENT - Small fix 2025-11-22 15:13:43 +01:00
Frank ed091c4f3e Merge branch 'develop' into FF/Ops 2025-11-22 11:21:25 +01:00
Applevangelist f4a2ae8ccc xx 2025-11-16 16:52:41 +01:00
Applevangelist 4bc25c6043 Merge remote-tracking branch 'origin/develop' into branch 2025-11-15 16:59:23 +01:00
Applevangelist d25acf1065 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Wrapper/Controllable.lua
2025-11-15 16:52:18 +01:00
Applevangelist 742103ff02 Merge remote-tracking branch 'origin/master' into branch 2025-11-15 16:51:34 +01:00
Applevangelist f93a1959b4 xx 2025-11-15 16:51:06 +01:00
Frank d37cd1613d Merge branch 'develop' into FF/Ops 2025-11-14 23:44:40 +01:00
Frank 96a923b5a8 Merge branch 'master' into FF/Ops 2025-11-14 23:44:25 +01:00
Applevangelist aebb6a359b Merge remote-tracking branch 'origin/develop' into branch 2025-11-14 17:27:57 +01:00
Applevangelist 500f113f95 Merge remote-tracking branch 'origin/master' into branch 2025-11-14 17:27:49 +01:00
Applevangelist b983e9f8b4 SXX 2025-11-14 17:27:26 +01:00
Applevangelist 856197a5c8 xx 2025-11-14 13:20:39 +01:00
Applevangelist 6f05249214 XX 2025-11-13 15:54:47 +01:00
Applevangelist c9c6d5dbc2 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Core/Fsm.lua
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Modules_local.lua
2025-11-13 14:09:12 +01:00
Applevangelist a8de630ecf Merge remote-tracking branch 'origin/master' into branch 2025-11-13 14:08:20 +01:00
Applevangelist 7c37160fb7 Merge remote-tracking branch 'origin/develop' into branch 2025-11-09 17:22:45 +01:00
Applevangelist 2e263561d3 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Core/Set.lua
2025-11-09 17:22:36 +01:00
Applevangelist 255a652d4d xx 2025-11-09 16:52:30 +01:00
Applevangelist aa2cff69e9 Merge remote-tracking branch 'origin/develop' into branch 2025-11-09 14:44:12 +01:00
Applevangelist 0789fb7f08 Merge remote-tracking branch 'origin/master' into branch 2025-11-09 14:44:05 +01:00
Applevangelist 4fba2e4abd Merge remote-tracking branch 'origin/develop' into branch 2025-11-09 14:25:41 +01:00
Applevangelist 9670f26619 Merge remote-tracking branch 'origin/master' into branch 2025-11-09 14:25:35 +01:00
Applevangelist e197f88510 xx 2025-11-02 13:04:37 +01:00
Applevangelist b07accdb3d xx 2025-11-02 09:54:16 +01:00
Applevangelist 31808b7981 Merge remote-tracking branch 'origin/develop' into branch 2025-11-02 09:54:05 +01:00
Applevangelist 50827b3b60 Merge remote-tracking branch 'origin/master' into branch 2025-11-02 09:53:58 +01:00
Applevangelist 8901820026 Merge remote-tracking branch 'origin/develop' into branch 2025-10-29 12:09:45 +01:00
Applevangelist 288b933884 Merge remote-tracking branch 'origin/master' into branch 2025-10-29 12:09:37 +01:00
Applevangelist f4c7912415 Merge remote-tracking branch 'origin/develop' into branch 2025-10-26 16:20:21 +01:00
Applevangelist 1ecc3c8ff2 Merge remote-tracking branch 'origin/master' into branch 2025-10-26 16:20:13 +01:00
Applevangelist 6e38e214b6 xx 2025-10-26 14:28:23 +01:00
Applevangelist 8251879162 Merge remote-tracking branch 'origin/develop' into branch 2025-10-25 16:57:09 +02:00
Applevangelist ec9297a5c0 Merge remote-tracking branch 'origin/master' into branch 2025-10-25 16:56:51 +02:00
Applevangelist a93ade9813 xx 2025-10-25 16:55:26 +02:00
Applevangelist df454cb59e xx 2025-10-25 16:54:11 +02:00
Applevangelist 13217f764e #CTLD - fix double function entry 2025-10-24 16:26:30 +02:00
Applevangelist 71400ff24b Merge remote-tracking branch 'origin/develop' into branch 2025-10-24 16:18:56 +02:00
Applevangelist 10371c06d0 Merge remote-tracking branch 'origin/master' into branch 2025-10-24 16:18:49 +02:00
Applevangelist 33dd158df4 xx 2025-10-24 16:18:13 +02:00
Applevangelist d74d337d2f xx 2025-10-23 08:09:56 +02:00
Applevangelist 4b1d81d582 #TIRESIAS - Fixed a problem when a script wants to add exceptions pre-start. 2025-10-19 14:38:42 +02:00
Applevangelist e223084014 Merge remote-tracking branch 'origin/develop' into branch 2025-10-13 18:53:04 +02:00
Applevangelist 02022685f4 Merge remote-tracking branch 'origin/master' into branch 2025-10-13 18:52:58 +02:00
Applevangelist c415f9082f Merge remote-tracking branch 'origin/master' into branch 2025-10-12 19:16:45 +02:00
Applevangelist aab65765a7 Merge remote-tracking branch 'origin/develop' into branch 2025-10-12 17:25:50 +02:00
Applevangelist c0335a1f86 Merge remote-tracking branch 'origin/master' into branch 2025-10-12 17:25:43 +02:00
Applevangelist c2e81415a1 xx 2025-10-12 17:21:45 +02:00
Applevangelist 1d8a03f9d4 xx 2025-10-12 16:45:50 +02:00
Applevangelist befb957b3f xx 2025-10-08 16:01:32 +02:00
Applevangelist d0d22142b9 Merge remote-tracking branch 'origin/develop' into branch 2025-10-08 15:51:04 +02:00
Applevangelist ecc94b6b5e Merge remote-tracking branch 'origin/develop' into branch 2025-10-08 12:32:32 +02:00
Applevangelist 977df39ac9 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Functional/RAT.lua
2025-10-08 12:32:25 +02:00
Applevangelist e0eee614c7 #CONTROLLABLE - Added CONTROLLABLE:OptionAAAMinFiringHeightMeters, CONTROLLABLE:OptionAAAMinFiringHeightFeet,CONTROLLABLE:OptionAAAMaxFiringHeightMeters, CONTROLLABLE:OptionAAAMaxFiringHeightFeet 2025-10-08 12:27:01 +02:00
Applevangelist ed52325fe2 Merge remote-tracking branch 'origin/develop' into branch 2025-10-07 17:53:23 +02:00
Applevangelist 68e0537846 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Functional/RAT.lua
2025-10-07 17:53:16 +02:00
Applevangelist 53b1415e87 xx 2025-10-07 17:48:22 +02:00
Applevangelist 75c350cffc Merge remote-tracking branch 'origin/develop' into branch 2025-10-07 16:00:00 +02:00
Applevangelist 484a51a377 Merge remote-tracking branch 'origin/master' into branch 2025-10-07 15:59:49 +02:00
Applevangelist 488996fadb Merge remote-tracking branch 'origin/master' into branch 2025-10-07 11:39:27 +02:00
Applevangelist 729f987cf1 xx 2025-10-07 11:38:44 +02:00
Applevangelist 7113706a16 Merge remote-tracking branch 'origin/develop' into branch 2025-10-02 18:02:02 +02:00
Applevangelist 45e62a5b2f Merge remote-tracking branch 'origin/master' into branch 2025-10-02 18:01:52 +02:00
Applevangelist b803371d0b Merge remote-tracking branch 'origin/develop' into branch 2025-09-27 14:51:53 +02:00
Applevangelist dd459b05b5 Merge remote-tracking branch 'origin/master' into branch 2025-09-27 14:51:43 +02:00
Applevangelist 41855fc63b xx 2025-09-25 15:16:28 +02:00
Applevangelist 71d93f2b67 xx 2025-09-25 12:14:12 +02:00
Applevangelist c814ed5a04 Merge remote-tracking branch 'origin/develop' into branch 2025-09-25 07:25:47 +02:00
Applevangelist fa10c7d0d4 Merge remote-tracking branch 'origin/master' into branch 2025-09-25 07:25:39 +02:00
Applevangelist 0ea6f5f71b Merge remote-tracking branch 'origin/develop' into branch 2025-09-23 18:10:37 +02:00
Applevangelist 43c5fee5b3 Merge remote-tracking branch 'origin/master' into branch 2025-09-23 18:10:25 +02:00
Applevangelist 905b2a7a98 Merge remote-tracking branch 'origin/develop' into branch 2025-09-18 16:38:43 +02:00
Applevangelist 9faa12a681 Merge remote-tracking branch 'origin/master' into branch 2025-09-18 16:38:26 +02:00
Applevangelist 0532ceb1cf #PLAYERTASK - Ensure call task failed on the controller 2025-09-17 12:04:14 +02:00
Applevangelist 0cc3150558 Merge remote-tracking branch 'origin/develop' into branch 2025-09-15 09:29:47 +02:00
Applevangelist 0fc2ce2484 Merge remote-tracking branch 'origin/master' into branch 2025-09-15 09:29:38 +02:00
Applevangelist 6abd76a40b xx 2025-09-15 09:27:44 +02:00
Applevangelist 4a1acf5d6a Merge remote-tracking branch 'origin/develop' into branch 2025-09-07 19:00:51 +02:00
Applevangelist 7ae926bf5c Merge remote-tracking branch 'origin/master' into branch 2025-09-07 19:00:40 +02:00
Applevangelist c197c842e8 #CLIENTMENU - add missing func from documentation 2025-09-07 18:58:32 +02:00
Applevangelist 8ad03f11ca Merge remote-tracking branch 'origin/develop' into branch 2025-09-02 14:09:39 +02:00
Applevangelist bfb89e80e0 Merge remote-tracking branch 'origin/master' into branch 2025-09-02 14:09:31 +02:00
Applevangelist 4d48b42aea xx 2025-08-31 18:21:48 +02:00
Applevangelist 6e01df753f Merge remote-tracking branch 'origin/develop' into branch 2025-08-31 13:29:33 +02:00
Applevangelist c75022038c Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2025-08-31 13:29:22 +02:00
Applevangelist d71cd370c0 Merge remote-tracking branch 'origin/develop' into branch 2025-08-28 15:31:55 +02:00
Applevangelist f400d0212a xx 2025-08-28 13:18:18 +02:00
Applevangelist 3ce0a8a45e Merge remote-tracking branch 'origin/Apple/Develop' into branch 2025-08-28 11:14:42 +02:00
Applevangelist cc295b4633 Merge remote-tracking branch 'origin/develop' into branch 2025-08-28 11:14:37 +02:00
Applevangelist cad66e8241 Merge remote-tracking branch 'origin/master' into branch 2025-08-28 11:14:29 +02:00
Thomas da7bc301ea Merge pull request #2377 from FlightControl-Master/master
Merge gro
2025-08-27 14:25:53 +02:00
Applevangelist f6b77f51ce Merge remote-tracking branch 'origin/develop' into branch 2025-08-25 17:29:57 +02:00
Applevangelist 4067259e9a Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2025-08-25 17:29:46 +02:00
Applevangelist fe9512eb82 Merge remote-tracking branch 'origin/develop' into branch 2025-08-24 15:28:18 +02:00
Applevangelist d213c3defb Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2025-08-24 15:28:09 +02:00
Applevangelist d13781ec32 xx 2025-08-15 14:26:54 +02:00
Applevangelist 8c5efdbe55 xx 2025-08-14 17:15:54 +02:00
Applevangelist e49003940f #MANTIS - Added Pantsir S1, TOR M2, IRIS-T SLM to main man SAM data (from CH mod) 2025-08-14 09:12:50 +02:00
Applevangelist 3c85b920cd Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Ops/EasyGCICAP.lua
2025-08-14 08:33:47 +02:00
Applevangelist 83cf6026cb Merge remote-tracking branch 'origin/master' into branch 2025-08-14 08:33:26 +02:00
Applevangelist ece9e008c2 xx 2025-08-10 13:40:01 +02:00
Applevangelist 95e7daa27c yy 2025-08-10 13:22:45 +02:00
Applevangelist 5411c4f38d xx 2025-08-10 13:20:45 +02:00
Applevangelist 56022f5e1e xx 2025-08-10 13:20:38 +02:00
Applevangelist bc464008c9 xx 2025-08-07 18:47:16 +02:00
Applevangelist 25143386d5 Merge remote-tracking branch 'origin/Apple/Develop' into branch 2025-08-07 18:00:35 +02:00
Applevangelist af7c9a3caa Merge remote-tracking branch 'origin/develop' into branch 2025-08-07 18:00:32 +02:00
Applevangelist 4a3e60bde9 xx 2025-08-07 18:00:25 +02:00
Thomas 4c8a93f63f Merge pull request #2360 from FlightControl-Master/master
Merge from master
2025-08-04 16:15:06 +02:00
Applevangelist c6b78b9e42 Merge remote-tracking branch 'origin/develop' into branch 2025-08-01 14:04:16 +02:00
Applevangelist ea90f56f4d Merge remote-tracking branch 'origin/master' into branch 2025-08-01 14:04:08 +02:00
Applevangelist 8684fc13ac xx 2025-08-01 14:01:28 +02:00
Applevangelist 7ccdec671a xxx 2025-08-01 09:22:44 +02:00
Applevangelist 052e1c3867 xx 2025-07-31 12:33:58 +02:00
Applevangelist ac410e9a56 Merge remote-tracking branch 'origin/develop' into branch 2025-07-31 09:39:38 +02:00
Applevangelist 1e1ed92d52 Merge remote-tracking branch 'origin/master' into branch 2025-07-31 09:39:30 +02:00
Applevangelist fc37149e9d xx 2025-07-29 17:38:11 +02:00
Applevangelist 413fa31534 Merge remote-tracking branch 'origin/develop' into branch 2025-07-29 10:04:28 +02:00
Applevangelist 5af7bcc677 Merge remote-tracking branch 'origin/master' into branch 2025-07-29 10:04:19 +02:00
Applevangelist 3768d57639 #TIRESIA - Avoid creating SETs all the time for player groups, cached now 2025-07-27 19:23:47 +02:00
Applevangelist e947367fca Merge remote-tracking branch 'origin/develop' into branch 2025-07-27 14:51:32 +02:00
Applevangelist 23105e3cb5 Merge remote-tracking branch 'origin/master' into branch 2025-07-27 14:51:26 +02:00
Applevangelist 09898d9b4d Merge remote-tracking branch 'origin/master' into branch 2025-07-27 14:50:59 +02:00
Applevangelist a49d20dd8f Merge remote-tracking branch 'origin/develop' into branch 2025-07-26 12:02:29 +02:00
Applevangelist 0069d20434 Merge remote-tracking branch 'origin/master' into branch 2025-07-26 12:02:20 +02:00
Applevangelist 56c8e22392 xx 2025-07-25 19:04:34 +02:00
Applevangelist 54ad4495c4 Merge remote-tracking branch 'origin/develop' into branch 2025-07-25 15:00:05 +02:00
Applevangelist 16dff6c24d Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Utilities/Utils.lua
2025-07-25 14:59:55 +02:00
Applevangelist e543ee576f xx 2025-07-25 14:59:11 +02:00
Applevangelist 8db60412ba ^xx 2025-07-25 14:47:49 +02:00
Applevangelist 2da2dec1da Merge remote-tracking branch 'origin/develop' into branch 2025-07-24 18:28:40 +02:00
Applevangelist 892fcfc2ca Merge remote-tracking branch 'origin/master' into branch 2025-07-24 18:28:33 +02:00
Applevangelist 8ff79e4131 xx 2025-07-24 16:19:42 +02:00
Applevangelist 2b29ae4f9c xx 2025-07-24 16:17:32 +02:00
Applevangelist 04f275e273 xxx 2025-07-23 15:47:47 +02:00
Applevangelist 19ab249d77 Merge remote-tracking branch 'origin/develop' into branch 2025-07-23 12:37:02 +02:00
Applevangelist f15b1a503a Merge remote-tracking branch 'origin/master' into branch 2025-07-23 12:36:55 +02:00
Applevangelist a64cc0ba4b xxx 2025-07-23 12:36:20 +02:00
Applevangelist 0457fc85c7 #CTLD - added FSM event "CratesPacked"
#UTILS - more options for MASH building
2025-07-22 13:07:33 +02:00
Applevangelist 2cd071acb2 Merge remote-tracking branch 'origin/develop' into branch 2025-07-21 15:04:23 +02:00
Applevangelist 92f6687429 Merge remote-tracking branch 'origin/master' into branch 2025-07-21 15:04:13 +02:00
Applevangelist c0b1062ac7 Merge remote-tracking branch 'origin/develop' into branch 2025-07-21 14:51:43 +02:00
Applevangelist 54f6eddfa2 Merge remote-tracking branch 'origin/master' into branch 2025-07-21 14:51:35 +02:00
Applevangelist 777886a8e7 xxx 2025-07-21 14:50:58 +02:00
Applevangelist 6cb262e04d xxx 2025-07-20 14:02:59 +02:00
Applevangelist 504c531266 Merge remote-tracking branch 'origin/develop' into branch 2025-07-20 12:30:51 +02:00
Applevangelist 77863e64bb Merge remote-tracking branch 'origin/master' into branch 2025-07-20 12:30:16 +02:00
Applevangelist 61509f35df xxx 2025-07-20 12:29:43 +02:00
Applevangelist 1c48a71cec Merge remote-tracking branch 'origin/develop' into branch 2025-07-19 16:06:36 +02:00
Applevangelist 940abee55c Merge remote-tracking branch 'origin/master' into branch 2025-07-19 16:06:31 +02:00
Applevangelist b66a29e209 xxx 2025-07-19 16:03:23 +02:00
Applevangelist 2d9a99738e xxx 2025-07-19 16:03:17 +02:00
Applevangelist 22b8cab5e1 xxx 2025-07-19 16:02:44 +02:00
Applevangelist d40b744728 xxx 2025-07-19 16:02:03 +02:00
Applevangelist ccb1055c6f xxx 2025-07-19 16:01:21 +02:00
Applevangelist c78471cc8f xxx 2025-07-19 16:00:27 +02:00
Applevangelist aa4b4a5e2f xxx 2025-07-19 15:59:16 +02:00
Applevangelist 33154ebcdc xxx 2025-07-19 15:58:29 +02:00
Applevangelist 78bfbb11f9 #AIRBOSS - fix TTS path in docu 2025-07-19 15:57:46 +02:00
Applevangelist a491c34824 #AICSAR - Added functionality to use rescue zones instead of pure distance. Fixed helo not despawning after landing back at base. 2025-07-19 15:56:23 +02:00
Applevangelist 43c7a65942 xx 2025-07-18 17:57:00 +02:00
Applevangelist d18cd0e643 Merge remote-tracking branch 'origin/Apple/Develop' into branch 2025-07-18 09:26:48 +02:00
Applevangelist 26a03d2c45 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Modules_local.lua
2025-07-18 09:26:38 +02:00
Applevangelist b035e0835c Merge remote-tracking branch 'origin/master' into branch 2025-07-18 09:25:24 +02:00
Thomas dbe96fa931 Merge pull request #2336 from FlightControl-Master/master
Pull from master
2025-07-15 11:21:30 +02:00
Applevangelist dc04d347bb Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Ops/Auftrag.lua
2025-07-04 16:25:49 +02:00
Applevangelist a33d71d6ef xx 2025-07-04 16:25:17 +02:00
Applevangelist e842e11b88 Merge remote-tracking branch 'origin/develop' into branch 2025-07-03 16:40:37 +02:00
Applevangelist 3cf168c7aa Merge remote-tracking branch 'origin/master' into branch 2025-07-03 16:40:30 +02:00
Applevangelist ff02063d54 Merge remote-tracking branch 'origin/develop' into branch 2025-07-03 15:16:40 +02:00
Applevangelist 2e5ffa269f Merge remote-tracking branch 'origin/master' into branch 2025-07-03 15:16:33 +02:00
Applevangelist 744782fd0b Merge remote-tracking branch 'origin/develop' into branch 2025-07-03 12:00:12 +02:00
Applevangelist 9a4025a566 Merge remote-tracking branch 'origin/master' into branch 2025-07-03 12:00:03 +02:00
Applevangelist 7a8486d7cd Merge remote-tracking branch 'origin/develop' into branch 2025-07-03 10:56:15 +02:00
Applevangelist 25f79e495b Merge remote-tracking branch 'origin/master' into branch 2025-07-03 10:55:58 +02:00
Applevangelist 8525bf0188 Merge remote-tracking branch 'origin/develop' into branch 2025-06-29 15:51:20 +02:00
Applevangelist cb08e4a577 xxx 2025-06-29 15:50:47 +02:00
Applevangelist a28ad6a7c2 Merge remote-tracking branch 'origin/develop' into branch 2025-06-26 11:52:13 +02:00
Applevangelist 7e3c33e242 Merge remote-tracking branch 'origin/master' into branch 2025-06-26 11:52:05 +02:00
Applevangelist e8f30fc98b Merge remote-tracking branch 'origin/develop' into branch 2025-06-24 18:49:45 +02:00
Applevangelist 77b9ded23e Merge remote-tracking branch 'origin/master' into branch 2025-06-24 18:49:36 +02:00
Applevangelist 5d976266c3 Merge remote-tracking branch 'origin/develop' into branch 2025-06-18 17:47:43 +02:00
Applevangelist e03a397d46 Merge remote-tracking branch 'origin/master' into branch 2025-06-18 17:47:34 +02:00
Applevangelist f08783f800 xx 2025-06-18 17:46:50 +02:00
Applevangelist eea75c669f xx 2025-06-18 17:46:44 +02:00
Applevangelist 2e31c62efb Merge remote-tracking branch 'origin/develop' into branch 2025-06-15 15:43:48 +02:00
Applevangelist e7f953df6d Merge remote-tracking branch 'origin/master' into branch 2025-06-15 15:43:37 +02:00
Applevangelist b62b39e9e8 xx 2025-06-15 15:37:34 +02:00
Applevangelist 8717faf7a1 xx 2025-06-12 09:10:07 +02:00
Applevangelist 14300229fb #UTILS - Small fix for GetReportingName to distinguish Shark from Mainstay 2025-06-10 18:05:19 +02:00
Applevangelist 2c15d7ed00 xx 2025-06-10 10:02:37 +02:00
Applevangelist 6ac17fa999 Merge remote-tracking branch 'origin/develop' into branch 2025-06-08 18:44:42 +02:00
Applevangelist 768a380b32 Merge remote-tracking branch 'origin/master' into branch 2025-06-08 18:44:36 +02:00
Applevangelist 0233fef475 xx 2025-06-08 18:41:25 +02:00
Applevangelist a4aa78ac35 xx 2025-05-30 20:50:55 +02:00
Applevangelist ca3fb4e479 Merge remote-tracking branch 'origin/develop' into branch 2025-05-30 19:39:58 +02:00
Applevangelist 40d4dc14ab Merge remote-tracking branch 'origin/master' into branch 2025-05-30 19:39:49 +02:00
Applevangelist 618a5ca9be xx 2025-05-30 19:39:08 +02:00
Applevangelist f7a86deba5 xxx 2025-05-26 12:29:48 +02:00
Applevangelist 740f90a513 xx 2025-05-26 07:41:08 +02:00
Applevangelist efceb095d2 xx 2025-05-24 15:53:29 +02:00
Applevangelist ac7cdb7d16 Merge remote-tracking branch 'origin/develop' into branch 2025-05-24 14:31:55 +02:00
Applevangelist ffc5cff275 Merge remote-tracking branch 'origin/master' into branch 2025-05-24 14:31:27 +02:00
Applevangelist e456573eec #CSAR fix for ADF beacons 2025-05-21 10:04:50 +02:00
Applevangelist daa2b7da4d xxx 2025-05-16 13:58:55 +02:00
Applevangelist 5351c4f093 xx 2025-05-16 13:43:39 +02:00
Applevangelist 5ff314d8e0 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/AI/AI_A2A_Cap.lua
#	Moose Development/Moose/AI/AI_A2A_Dispatcher.lua
#	Moose Development/Moose/AI/AI_A2A_Gci.lua
#	Moose Development/Moose/AI/AI_A2A_Patrol.lua
#	Moose Development/Moose/AI/AI_A2G_BAI.lua
#	Moose Development/Moose/AI/AI_A2G_CAS.lua
#	Moose Development/Moose/AI/AI_A2G_Dispatcher.lua
#	Moose Development/Moose/AI/AI_A2G_SEAD.lua
#	Moose Development/Moose/AI/AI_Air.lua
#	Moose Development/Moose/AI/AI_Air_Dispatcher.lua
#	Moose Development/Moose/AI/AI_Air_Engage.lua
#	Moose Development/Moose/AI/AI_Air_Patrol.lua
#	Moose Development/Moose/AI/AI_Air_Squadron.lua
#	Moose Development/Moose/AI/AI_BAI.lua
#	Moose Development/Moose/AI/AI_Balancer.lua
#	Moose Development/Moose/AI/AI_CAP.lua
#	Moose Development/Moose/AI/AI_CAS.lua
#	Moose Development/Moose/AI/AI_Cargo.lua
#	Moose Development/Moose/AI/AI_Cargo_APC.lua
#	Moose Development/Moose/AI/AI_Cargo_Airplane.lua
#	Moose Development/Moose/AI/AI_Cargo_Dispatcher.lua
#	Moose Development/Moose/AI/AI_Cargo_Dispatcher_APC.lua
#	Moose Development/Moose/AI/AI_Cargo_Dispatcher_Airplane.lua
#	Moose Development/Moose/AI/AI_Cargo_Dispatcher_Helicopter.lua
#	Moose Development/Moose/AI/AI_Cargo_Dispatcher_Ship.lua
#	Moose Development/Moose/AI/AI_Cargo_Helicopter.lua
#	Moose Development/Moose/AI/AI_Cargo_Ship.lua
#	Moose Development/Moose/AI/AI_Escort.lua
#	Moose Development/Moose/AI/AI_Escort_Dispatcher.lua
#	Moose Development/Moose/AI/AI_Escort_Dispatcher_Request.lua
#	Moose Development/Moose/AI/AI_Escort_Request.lua
#	Moose Development/Moose/AI/AI_Formation.lua
#	Moose Development/Moose/AI/AI_Patrol.lua
#	Moose Development/Moose/Actions/Act_Account.lua
#	Moose Development/Moose/Actions/Act_Assign.lua
#	Moose Development/Moose/Actions/Act_Assist.lua
#	Moose Development/Moose/Actions/Act_Route.lua
#	Moose Development/Moose/Cargo/Cargo.lua
#	Moose Development/Moose/Cargo/CargoCrate.lua
#	Moose Development/Moose/Cargo/CargoGroup.lua
#	Moose Development/Moose/Cargo/CargoSlingload.lua
#	Moose Development/Moose/Cargo/CargoUnit.lua
#	Moose Development/Moose/Tasking/CommandCenter.lua
#	Moose Development/Moose/Tasking/DetectionManager.lua
#	Moose Development/Moose/Tasking/Mission.lua
#	Moose Development/Moose/Tasking/Task.lua
#	Moose Development/Moose/Tasking/TaskInfo.lua
#	Moose Development/Moose/Tasking/Task_A2A.lua
#	Moose Development/Moose/Tasking/Task_A2A_Dispatcher.lua
#	Moose Development/Moose/Tasking/Task_A2G.lua
#	Moose Development/Moose/Tasking/Task_A2G_Dispatcher.lua
#	Moose Development/Moose/Tasking/Task_CARGO.lua
#	Moose Development/Moose/Tasking/Task_Capture_Dispatcher.lua
#	Moose Development/Moose/Tasking/Task_Capture_Zone.lua
#	Moose Development/Moose/Tasking/Task_Cargo_CSAR.lua
#	Moose Development/Moose/Tasking/Task_Cargo_Dispatcher.lua
#	Moose Development/Moose/Tasking/Task_Cargo_Transport.lua
#	Moose Development/Moose/Tasking/Task_Manager.lua
2025-05-16 11:56:23 +02:00
Applevangelist 45bb0fff8a xx 2025-05-16 11:48:14 +02:00
Applevangelist 9a10b34933 xxx 2025-05-15 18:24:45 +02:00
Applevangelist 1231541053 xx 2025-05-15 11:39:42 +02:00
Applevangelist 5e45e4a8ec xxx 2025-05-15 10:05:25 +02:00
Applevangelist 5a96a6078a Merge remote-tracking branch 'origin/develop' into branch 2025-05-15 08:53:09 +02:00
Applevangelist 8fdeca99be Merge remote-tracking branch 'origin/master' into branch 2025-05-15 08:53:03 +02:00
Applevangelist 6ff2725a1d #MANTIS - Make DLINK cache time configureable 2025-05-15 08:50:56 +02:00
Applevangelist 2b83d516d5 xxx 2025-05-12 17:48:50 +02:00
Applevangelist c5ec17a473 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/AI/AI_Formation.lua
2025-05-12 08:32:24 +02:00
Applevangelist a81de5e23f Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/AI/AI_Formation.lua
#	Moose Development/Moose/Actions/Act_Account.lua
#	Moose Development/Moose/Functional/Fox.lua
#	Moose Development/Moose/Tasking/Task_CARGO.lua
2025-05-12 08:31:17 +02:00
Applevangelist c1855cefd3 CTLD 2025-05-12 08:30:35 +02:00
Applevangelist e9d812f315 Merge remote-tracking branch 'origin/develop' into branch 2025-05-03 17:03:30 +02:00
Applevangelist f95d27bf80 Merge remote-tracking branch 'origin/master' into branch 2025-05-03 17:03:14 +02:00
Applevangelist be98ee52b7 xxx 2025-05-03 16:59:07 +02:00
Applevangelist 4c9210586c #CSAR - fix design issue that prevented usage of ZONE objects as MASHes 2025-05-02 10:52:34 +02:00
Applevangelist dc51f83249 Merge remote-tracking branch 'origin/develop' into branch 2025-05-02 09:35:22 +02:00
Applevangelist 23ed39a708 Merge remote-tracking branch 'origin/master' into branch 2025-05-02 09:35:14 +02:00
Applevangelist 44c59b97e8 CSAR 2025-05-02 09:34:43 +02:00
Applevangelist 9721f743a0 Merge remote-tracking branch 'origin/develop' into branch 2025-04-27 11:27:59 +02:00
Applevangelist 63899923fb Merge remote-tracking branch 'origin/master' into branch 2025-04-27 11:27:40 +02:00
Applevangelist 4fbbf70b8e xx 2025-04-27 11:23:16 +02:00
Applevangelist e38dc77c4b Merge remote-tracking branch 'origin/develop' into branch 2025-04-24 14:49:44 +02:00
Applevangelist f283e68a63 Merge remote-tracking branch 'origin/master' into branch 2025-04-24 14:49:33 +02:00
Applevangelist 96d52ea393 xxx 2025-04-24 14:47:02 +02:00
Applevangelist 52c45364fc Merge remote-tracking branch 'origin/develop' into branch 2025-04-20 17:51:08 +02:00
Applevangelist fcfc41252e Merge remote-tracking branch 'origin/master' into branch 2025-04-20 17:50:51 +02:00
Applevangelist 46f9cf46e4 xxx 2025-04-20 17:50:16 +02:00
Applevangelist 1c24786723 xx 2025-04-20 15:51:44 +02:00
Applevangelist 7ded993c49 xx 2025-04-19 17:52:17 +02:00
Applevangelist 2636ca166f xx 2025-04-19 17:49:03 +02:00
Applevangelist 5d6e0c333b Merge remote-tracking branch 'origin/develop' into branch 2025-04-18 19:46:20 +02:00
Applevangelist ec2a89fa48 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Wrapper/Airbase.lua
2025-04-18 19:46:12 +02:00
Applevangelist c9414d98da #EASYGCICAP - make conflict zones setup a bit more explicit 2025-04-15 11:45:22 +02:00
Applevangelist 7df7a34c32 Merge remote-tracking branch 'origin/develop' into branch 2025-04-14 12:24:05 +02:00
Applevangelist 5d303752fe Merge remote-tracking branch 'origin/develop' into branch 2025-04-14 12:14:03 +02:00
Applevangelist 66cb7dd9b7 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Wrapper/Airbase.lua
2025-04-14 12:13:55 +02:00
Applevangelist e483d1bfca xx 2025-04-14 12:13:08 +02:00
Applevangelist 1456ff37d0 Merge remote-tracking branch 'origin/develop' into branch 2025-04-09 08:17:12 +02:00
Applevangelist abc86a7e9c Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Cargo/CargoGroup.lua
2025-04-09 08:17:06 +02:00
Applevangelist 00c5d82590 xx 2025-04-07 11:56:54 +02:00
Applevangelist c902a1f601 xxx 2025-04-07 10:40:39 +02:00
Applevangelist d92a170304 Merge remote-tracking branch 'origin/develop' into branch 2025-04-06 15:39:50 +02:00
Applevangelist 41a9a1f74b Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Sound/RadioQueue.lua
2025-04-06 15:39:41 +02:00
Applevangelist 9d7986e8d1 #CTLD - Allow CA Transport 2025-04-06 15:37:56 +02:00
Applevangelist ff5adc29d9 xx 2025-04-03 14:22:53 +02:00
Applevangelist b77ff793a3 Merge remote-tracking branch 'origin/develop' into branch 2025-04-03 11:50:12 +02:00
Applevangelist 08b95ec8c6 Merge remote-tracking branch 'origin/master' into branch 2025-04-03 11:50:06 +02:00
Applevangelist 2c255d48c5 #CONTROLLABLE:CommandSmokeOnOff(OnOff, Delay) added 2025-04-03 11:48:37 +02:00
Applevangelist 367ee31135 xx 2025-04-03 09:29:38 +02:00
Applevangelist 4ca43b4779 Merge remote-tracking branch 'origin/develop' into branch 2025-04-03 09:16:41 +02:00
Applevangelist d30b16a2fe Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Wrapper/DynamicCargo.lua
2025-04-03 09:16:32 +02:00
Applevangelist 6cb306a7e1 #DYNAMICCARGO - enhance checks for unloading cargo from hovering Hooks 2025-04-01 15:27:14 +02:00
Applevangelist b63185f1b3 Merge remote-tracking branch 'origin/develop' into branch 2025-04-01 14:15:13 +02:00
Applevangelist 4dc9e78812 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/AI/AI_Air.lua
#	Moose Development/Moose/AI/AI_Air_Engage.lua
#	Moose Development/Moose/AI/AI_Air_Patrol.lua
#	Moose Development/Moose/AI/AI_BAI.lua
#	Moose Development/Moose/AI/AI_Balancer.lua
#	Moose Development/Moose/AI/AI_CAP.lua
#	Moose Development/Moose/AI/AI_CAS.lua
#	Moose Development/Moose/AI/AI_Cargo_Airplane.lua
#	Moose Development/Moose/AI/AI_Cargo_Helicopter.lua
#	Moose Development/Moose/AI/AI_Formation.lua
#	Moose Development/Moose/AI/AI_Patrol.lua
#	Moose Development/Moose/Cargo/Cargo.lua
#	Moose Development/Moose/Cargo/CargoCrate.lua
#	Moose Development/Moose/Cargo/CargoGroup.lua
#	Moose Development/Moose/Cargo/CargoUnit.lua
#	Moose Development/Moose/Core/Point.lua
2025-04-01 14:15:06 +02:00
Applevangelist 22b81318b9 xx 2025-04-01 13:18:02 +02:00
Applevangelist 9862811c16 Merge remote-tracking branch 'origin/develop' into branch 2025-03-31 17:36:38 +02:00
Applevangelist af12296e51 Merge remote-tracking branch 'origin/master' into branch 2025-03-31 17:36:32 +02:00
Applevangelist 0361a95f5d xx 2025-03-30 16:56:35 +02:00
Applevangelist d6a16ee8b1 Merge remote-tracking branch 'origin/develop' into branch 2025-03-30 16:55:47 +02:00
Applevangelist e3aade05d4 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/AI/AI_BAI.lua
#	Moose Development/Moose/AI/AI_Patrol.lua
2025-03-30 16:55:37 +02:00
Applevangelist c21c3ecb42 xx 2025-03-30 16:45:17 +02:00
Applevangelist 1bfeb0b41b Merge remote-tracking branch 'origin/develop' into branch 2025-03-27 11:10:17 +01:00
Applevangelist 4ec2923f46 Merge remote-tracking branch 'origin/master' into branch 2025-03-27 11:10:11 +01:00
Applevangelist d2ec9642ca xx 2025-03-27 11:08:33 +01:00
Applevangelist e8e4f6bcb9 Merge remote-tracking branch 'origin/develop' into branch 2025-03-22 14:59:41 +01:00
Applevangelist f723f81c6d Merge remote-tracking branch 'origin/master' into branch 2025-03-22 14:59:34 +01:00
Applevangelist 5aeb3ba42d xx 2025-03-22 10:42:17 +01:00
Applevangelist 104d0f3d2d Merge remote-tracking branch 'origin/develop' into branch 2025-03-21 09:23:31 +01:00
Applevangelist 0ec47795bf Merge remote-tracking branch 'origin/master' into branch 2025-03-21 09:23:24 +01:00
Applevangelist c634023717 xxx 2025-03-21 09:22:59 +01:00
Applevangelist df9f204b7a xx 2025-03-16 13:06:19 +01:00
Applevangelist 1b29a30760 Merge remote-tracking branch 'origin/develop' into branch 2025-03-16 11:03:54 +01:00
Applevangelist 5d07cebdc4 Merge remote-tracking branch 'origin/master' into branch 2025-03-16 11:03:49 +01:00
Applevangelist b59bd0d4f2 xx 2025-03-16 11:02:32 +01:00
Applevangelist a2ccfcf361 Merge remote-tracking branch 'origin/develop' into branch 2025-03-15 16:30:44 +01:00
Applevangelist dccd46367f Merge remote-tracking branch 'origin/master' into branch 2025-03-15 16:30:36 +01:00
Applevangelist 2a6df8434a #SOUND/MSRS - small fix to delete the "--ssml" tag if google provider is used in conjunction with a file based sound output. 2025-03-15 10:55:05 +01:00
Applevangelist 1661872bf8 Merge remote-tracking branch 'origin/develop' into branch 2025-03-14 10:41:51 +01:00
Applevangelist 8878d1a8d3 Merge remote-tracking branch 'origin/master' into branch 2025-03-14 10:41:45 +01:00
Applevangelist 8e017f2ce0 #ZONE Some Trigger Improvements, added OnAfterZoneEmpty 2025-03-13 10:49:11 +01:00
Applevangelist d16124213f xxx 2025-03-12 10:25:54 +01:00
Applevangelist bdff8541b4 Merge remote-tracking branch 'origin/develop' into branch 2025-03-12 09:19:23 +01:00
Applevangelist 0d0cc20ebc Merge remote-tracking branch 'origin/master' into branch 2025-03-12 09:19:15 +01:00
Applevangelist 6fcb4a3184 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Setup/Moose.files
2025-03-12 08:46:16 +01:00
Applevangelist 2fced89dfc xx 2025-03-11 18:31:16 +01:00
Applevangelist 96ad3ff98b xx 2025-03-11 16:32:01 +01:00
Applevangelist 6c8fa5585b #CONTROLLABLE - Improved IR Markers 2025-03-11 10:51:44 +01:00
Applevangelist dc8992134e Merge remote-tracking branch 'origin/develop' into branch 2025-03-11 09:36:35 +01:00
Applevangelist 885b329dcb Merge remote-tracking branch 'origin/master' into branch 2025-03-11 09:36:28 +01:00
Thomas 702c5464aa Merge pull request #2267 from FlightControl-Master/master
merge from master
2025-03-10 15:33:52 +01:00
Applevangelist ac750aff10 Merge remote-tracking branch 'origin/develop' into branch 2025-03-09 14:38:49 +01:00
Applevangelist c679a77f9f Merge remote-tracking branch 'origin/master' into branch 2025-03-09 14:38:39 +01:00
Applevangelist 176e4f6217 xxx 2025-03-09 14:38:16 +01:00
Applevangelist 9e69c1c17e xx 2025-03-06 14:51:34 +01:00
Applevangelist 187a620f37 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/AI/AI_CAS.lua
2025-03-06 12:28:39 +01:00
Applevangelist 91b2fc7d9c Merge remote-tracking branch 'origin/master' into branch 2025-03-06 12:27:45 +01:00
Applevangelist 0baa912465 xx 2025-03-06 12:25:34 +01:00
Applevangelist 79e7f9940e xx 2025-03-02 12:39:25 +01:00
Applevangelist 25845c4d22 xxx 2025-02-23 16:09:41 +01:00
Applevangelist b66a342642 xxx 2025-02-23 11:12:00 +01:00
Applevangelist e2054371ed Merge remote-tracking branch 'origin/develop' into branch 2025-02-21 10:44:25 +01:00
Applevangelist e9c1ccedcd Merge remote-tracking branch 'origin/master' into branch 2025-02-21 10:44:17 +01:00
Applevangelist 367d1c6715 xx 2025-02-21 10:41:46 +01:00
Applevangelist 093c3fe7c9 #AUTOLASE - improve detection for ground Recce 2025-02-20 11:40:01 +01:00
Applevangelist 428712147d Merge remote-tracking branch 'origin/develop' into branch 2025-02-19 17:34:00 +01:00
Applevangelist 20fa78bc85 Merge remote-tracking branch 'origin/master' into branch 2025-02-19 17:33:53 +01:00
Applevangelist d081e115c7 #MANTIS 4-Tier-Approach 2025-02-18 11:12:14 +01:00
Applevangelist 3df9b54c01 Merge remote-tracking branch 'origin/develop' into branch 2025-02-17 08:36:24 +01:00
Applevangelist 72ac957806 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Functional/ATC_Ground.lua
2025-02-17 08:36:15 +01:00
Applevangelist 8ea746ee19 xxx 2025-02-10 18:02:57 +01:00
Applevangelist b2bc553e48 Merge remote-tracking branch 'origin/develop' into branch 2025-02-09 12:25:23 +01:00
Applevangelist a91c76a0be Merge remote-tracking branch 'origin/master' into branch 2025-02-09 12:25:18 +01:00
Applevangelist 5a94be98fe Merge remote-tracking branch 'origin/develop' into branch 2025-02-09 12:06:45 +01:00
Applevangelist 999d67b7af Merge remote-tracking branch 'origin/master' into branch 2025-02-09 12:06:38 +01:00
Applevangelist 91e7c86ba0 Merge remote-tracking branch 'origin/develop' into branch 2025-02-09 12:03:23 +01:00
Applevangelist f75c464bcd Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2025-02-09 12:03:16 +01:00
Applevangelist a4ae0d88e1 xx 2025-02-09 12:02:22 +01:00
Applevangelist 5c5b1383be Merge remote-tracking branch 'origin/develop' into branch 2025-02-09 11:47:15 +01:00
Applevangelist a5e75bf485 Merge remote-tracking branch 'origin/master' into branch 2025-02-09 11:47:08 +01:00
Applevangelist c6d79db266 Merge remote-tracking branch 'origin/develop' into branch 2025-02-06 16:35:58 +01:00
Applevangelist b394622b92 Merge remote-tracking branch 'origin/master' into branch 2025-02-06 16:35:49 +01:00
Applevangelist 03c623a0c2 xx 2025-02-06 08:52:52 +01:00
Applevangelist a5a0d8ab8a Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Functional/Tiresias.lua
2025-02-02 12:56:35 +01:00
Applevangelist 3bb5d3709b Merge remote-tracking branch 'origin/master' into branch 2025-02-02 12:56:05 +01:00
Applevangelist 32e538a27d xx 2025-02-01 18:39:30 +01:00
Applevangelist 02b75bf529 Merge remote-tracking branch 'origin/develop' into branch 2025-01-31 14:28:08 +01:00
Applevangelist f3477a03c6 Merge remote-tracking branch 'origin/master' into branch 2025-01-31 14:28:00 +01:00
Applevangelist 8f5e519d0a xxx 2025-01-30 18:32:01 +01:00
Applevangelist 1c4c5b5476 Merge remote-tracking branch 'origin/develop' into branch 2025-01-30 13:21:17 +01:00
Applevangelist 85e4a6cbd6 Merge remote-tracking branch 'origin/master' into branch 2025-01-30 13:21:10 +01:00
Applevangelist 0f9742aeb4 xx 2025-01-30 13:14:47 +01:00
Applevangelist 2d49745215 Merge remote-tracking branch 'origin/develop' into branch 2025-01-30 09:06:11 +01:00
Applevangelist 2b6a039368 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Core/Base.lua
2025-01-30 09:05:56 +01:00
Applevangelist 83e146f207 xx 2025-01-27 18:46:52 +01:00
Applevangelist b115a0a672 Merge remote-tracking branch 'origin/develop' into branch 2025-01-26 17:35:56 +01:00
Applevangelist 0c384a75cc Merge remote-tracking branch 'origin/master' into branch 2025-01-26 17:35:51 +01:00
Applevangelist c19d20c3f7 xxx 2025-01-26 17:35:30 +01:00
Applevangelist c7bc55d851 Merge remote-tracking branch 'origin/develop' into branch 2025-01-26 14:55:59 +01:00
Applevangelist 245dd6bb27 Merge remote-tracking branch 'origin/master' into branch 2025-01-26 14:55:47 +01:00
Applevangelist ff4f162ca2 Merge remote-tracking branch 'origin/develop' into branch 2025-01-25 15:58:06 +01:00
Applevangelist baf3f9a9a4 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2025-01-25 15:57:59 +01:00
Applevangelist ae65fce9cd xx 2025-01-25 15:54:42 +01:00
Applevangelist 5e856b67a1 Merge remote-tracking branch 'origin/develop' into branch 2025-01-25 15:07:38 +01:00
Applevangelist f365c5153b Merge remote-tracking branch 'origin/master' into branch 2025-01-25 15:07:16 +01:00
Applevangelist a11cda4ed1 Merge remote-tracking branch 'origin/develop' into branch 2025-01-24 12:26:38 +01:00
Applevangelist 9faa1b806d Merge remote-tracking branch 'origin/master' into branch 2025-01-24 12:26:30 +01:00
Applevangelist f533d4ec8f xxx 2025-01-24 12:22:00 +01:00
Applevangelist afc0671aa9 xx 2025-01-24 10:26:51 +01:00
Applevangelist f77771ae25 xx 2025-01-19 18:19:54 +01:00
Applevangelist c62dc17cd8 xxx 2025-01-19 17:39:54 +01:00
Applevangelist 3ed61e8a2a xx 2025-01-18 15:29:35 +01:00
Applevangelist 2a1234f7ff xxx 2025-01-17 12:19:42 +01:00
Applevangelist 77c6365e37 xx 2025-01-17 09:53:16 +01:00
Applevangelist 5c1d367926 xx 2025-01-16 11:10:42 +01:00
Applevangelist 869339150a Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Ops/Awacs.lua
2025-01-15 15:36:08 +01:00
Applevangelist 9b5a653940 Merge remote-tracking branch 'origin/master' into branch 2025-01-15 15:35:36 +01:00
Applevangelist 083bf13fe4 xx 2025-01-13 18:01:31 +01:00
Applevangelist 50436b8ced #AWACS - make # of escorts required assets 2025-01-13 12:38:39 +01:00
Applevangelist b82e15b2ce Merge remote-tracking branch 'origin/develop' into branch 2025-01-13 11:49:54 +01:00
Applevangelist 8ffa1bd692 #AWACS
- Fix a logic error: cancel the Escort mission when the replacement has arrived
- Workaround for a situation where a player has a checkin-entry in the menu and a managed group entry at the same time - which should not be the case.
2025-01-13 11:46:07 +01:00
Applevangelist c855198634 Merge remote-tracking branch 'origin/develop' into branch 2025-01-12 17:12:09 +01:00
Applevangelist 8aa8acdad0 Merge remote-tracking branch 'origin/master' into branch 2025-01-12 17:11:50 +01:00
Applevangelist 382ad6ecd8 xx 2025-01-12 17:02:40 +01:00
Applevangelist f009370e07 xx 2025-01-09 14:15:09 +01:00
Applevangelist 0e91a658b3 Merge remote-tracking branch 'origin/develop' into branch 2025-01-08 13:06:10 +01:00
Applevangelist 774317f2c5 Merge remote-tracking branch 'origin/master' into branch 2025-01-08 13:06:06 +01:00
Applevangelist a33e542df5 xx 2025-01-08 13:04:54 +01:00
Applevangelist 6adb9f0839 xx 2025-01-06 17:31:03 +01:00
Applevangelist 44a433eadf Merge remote-tracking branch 'origin/develop' into branch 2025-01-05 17:45:54 +01:00
Applevangelist 40cd58aa1c Merge remote-tracking branch 'origin/master' into branch 2025-01-05 17:45:47 +01:00
Applevangelist a2c241da43 xx 2025-01-05 17:43:21 +01:00
Applevangelist 34a11e79b3 Merge remote-tracking branch 'origin/develop' into branch 2025-01-04 18:28:06 +01:00
Applevangelist 1e4d2f4427 Merge remote-tracking branch 'origin/master' into branch 2025-01-04 18:27:59 +01:00
Applevangelist a3d7c9e537 xx 2025-01-04 18:22:36 +01:00
Applevangelist 9966c5eadf Merge remote-tracking branch 'origin/develop' into branch 2025-01-04 13:26:43 +01:00
Applevangelist 66bd771662 Merge remote-tracking branch 'origin/master' into branch 2025-01-04 13:26:34 +01:00
Applevangelist deb0431f93 #CTLD - Clarify doc for Hook loadable stuff 2025-01-04 13:24:40 +01:00
Applevangelist 5cc3fd7238 xx 2025-01-02 17:23:38 +01:00
Applevangelist c1c5467b9d xx 2025-01-02 17:06:42 +01:00
Applevangelist f67706044a #PLAYERRECCE - allow add'l position to be displayed 2025-01-02 15:46:42 +01:00
Applevangelist 2cb58bd351 xx 2025-01-02 13:15:13 +01:00
Applevangelist fc8c1c156f Merge remote-tracking branch 'origin/develop' into branch 2025-01-02 11:20:53 +01:00
Applevangelist 55052f4451 Merge remote-tracking branch 'origin/master' into branch 2025-01-02 11:20:45 +01:00
Applevangelist 12dd4a918f xx 2025-01-02 11:20:10 +01:00
Applevangelist 21a6bcfcfb xx 2025-01-01 17:54:59 +01:00
Applevangelist dc9b70db7e xx 2025-01-01 14:37:28 +01:00
Applevangelist 3b03b03f3c Merge remote-tracking branch 'origin/develop' into branch 2025-01-01 09:15:50 +01:00
Applevangelist 3923d81c87 Merge remote-tracking branch 'origin/master' into branch 2025-01-01 09:15:42 +01:00
Applevangelist 3090100265 Merge remote-tracking branch 'origin/develop' into branch 2024-12-31 15:36:14 +01:00
Applevangelist 87356291f7 Merge remote-tracking branch 'origin/master' into branch 2024-12-31 15:36:05 +01:00
Applevangelist 633186ca8a xx 2024-12-31 15:34:28 +01:00
Applevangelist 411d20ba26 #SEAD - Add AGM_65 2024-12-31 15:33:28 +01:00
Applevangelist 6eac89c038 #CTLD - also save and load static special shapes if they are set 2024-12-31 14:04:16 +01:00
Applevangelist 08b6fa520d Merge remote-tracking branch 'origin/develop' into branch 2024-12-30 14:43:02 +01:00
Applevangelist b69cea999e Merge remote-tracking branch 'origin/master' into branch 2024-12-30 14:42:56 +01:00
Applevangelist 91db9127da Merge remote-tracking branch 'origin/develop' into branch 2024-12-30 12:05:17 +01:00
Applevangelist c4512651cf Merge remote-tracking branch 'origin/master' into branch 2024-12-30 12:05:10 +01:00
Applevangelist 26530f25fb Merge remote-tracking branch 'origin/develop' into branch 2024-12-29 18:10:12 +01:00
Applevangelist d51961ac8c Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Wrapper/Storage.lua
2024-12-29 18:10:05 +01:00
Applevangelist 80e20e59ec #STORAGE - Added persistence options 2024-12-29 12:52:21 +01:00
Applevangelist 80906ded28 Merge remote-tracking branch 'origin/develop' into branch 2024-12-28 14:53:42 +01:00
Applevangelist 7cb04e65ca Merge remote-tracking branch 'origin/master' into branch 2024-12-28 14:53:38 +01:00
Applevangelist 8cd625b6f9 #MSRS Google 2025 voice catalog 2024-12-27 14:40:23 +01:00
Applevangelist 152a8cf9da Merge remote-tracking branch 'origin/develop' into branch 2024-12-27 12:27:42 +01:00
Applevangelist bb648b4396 Merge remote-tracking branch 'origin/master' into branch 2024-12-27 12:27:21 +01:00
Applevangelist ecdca9919e xx 2024-12-27 12:24:02 +01:00
Applevangelist 9bf2a013d5 Merge remote-tracking branch 'origin/develop' into branch 2024-12-26 17:20:56 +01:00
Applevangelist 4b2bc909e6 Merge remote-tracking branch 'origin/master' into branch 2024-12-26 17:20:51 +01:00
Applevangelist b3ed0681a8 xx 2024-12-26 17:19:14 +01:00
Applevangelist 0e75f64217 Merge remote-tracking branch 'origin/develop' into branch 2024-12-22 13:01:34 +01:00
Applevangelist 678dc92a66 #AWACS - add a mission parameter to ensure selection of AWACS aircraft 2024-12-22 13:00:22 +01:00
Applevangelist 7f323dd3a5 Merge remote-tracking branch 'origin/develop' into branch 2024-12-21 11:58:22 +01:00
Applevangelist 6ebd36e0b5 Merge remote-tracking branch 'origin/master' into branch 2024-12-21 11:58:19 +01:00
Applevangelist f7583dbd56 x 2024-12-21 11:22:52 +01:00
Applevangelist d0aa039626 xx 2024-12-19 14:16:10 +01:00
Applevangelist 844ad4619e Merge remote-tracking branch 'origin/develop' into branch 2024-12-18 12:36:16 +01:00
Applevangelist a73a12f73b Merge remote-tracking branch 'origin/master' into branch 2024-12-18 12:36:09 +01:00
Applevangelist 925754f290 xx 2024-12-18 12:34:00 +01:00
Applevangelist 3efe02fe37 xx 2024-12-18 11:36:36 +01:00
Applevangelist 84b1acc9d5 Merge remote-tracking branch 'origin/develop' into branch 2024-12-17 12:47:48 +01:00
Applevangelist ee144620ef Merge remote-tracking branch 'origin/master' into branch 2024-12-17 12:47:36 +01:00
Applevangelist f8808e0231 xx 2024-12-17 12:43:09 +01:00
Applevangelist 3b02e153ba xx 2024-12-17 12:38:57 +01:00
Applevangelist 87a94a72a6 #GROUP added Teleport(Coordinate) function leveraging Respawn(). Now also translate routes if there are any. 2024-12-15 13:33:18 +01:00
Applevangelist de8d356e6a Merge remote-tracking branch 'origin/develop' into branch 2024-12-15 11:42:41 +01:00
Applevangelist 58f5152fe5 Merge remote-tracking branch 'origin/master' into branch 2024-12-15 11:42:35 +01:00
Applevangelist 5b5bd83d5a Merge remote-tracking branch 'origin/develop' into branch 2024-12-15 11:34:17 +01:00
Applevangelist 90c78f304c Merge remote-tracking branch 'origin/master' into branch 2024-12-15 11:34:08 +01:00
Applevangelist 6e2a058e6e Merge remote-tracking branch 'origin/develop' into branch 2024-12-15 11:30:01 +01:00
Applevangelist 3c878be568 Merge remote-tracking branch 'origin/master' into branch 2024-12-15 11:29:51 +01:00
Applevangelist 465f8a5cc9 xx 2024-12-13 12:05:18 +01:00
Applevangelist 7dd67bdf0e Merge remote-tracking branch 'origin/develop' into branch 2024-12-12 13:15:40 +01:00
Applevangelist e9e0f82932 Merge remote-tracking branch 'origin/master' into branch 2024-12-12 13:14:46 +01:00
Applevangelist bb43a0e03c #AUFTRAG #OPSGROUP - Flightgroup handling for ingress and holding coord 2024-12-12 13:07:50 +01:00
Applevangelist 3805ab226b #AUFTRAG Better use of Ingress Coordinate 2024-12-11 16:41:22 +01:00
Applevangelist f1445cdbdd # 2024-12-11 14:36:54 +01:00
Applevangelist c80f128b0f #CTLD added 2024-12-11 14:17:14 +01:00
Applevangelist ef78549af0 Merge remote-tracking branch 'origin/develop' into branch 2024-12-11 13:59:02 +01:00
Applevangelist 5b437d6fb1 Merge remote-tracking branch 'origin/master' into branch 2024-12-11 13:58:55 +01:00
Applevangelist 3a3a3baf93 xx 2024-12-11 13:53:30 +01:00
Applevangelist 29efd4c4fb Merge remote-tracking branch 'origin/develop' into branch 2024-12-11 13:42:33 +01:00
Applevangelist 1a9827ec31 Merge remote-tracking branch 'origin/Apple/Develop' into branch 2024-12-11 13:41:47 +01:00
Applevangelist 4ae5e4ddd0 xx 2024-12-11 13:41:44 +01:00
Thomas 270eeac084 Update Auftrag.lua
Ingress small typo fic
2024-12-10 19:30:59 +01:00
Applevangelist eca130b3af #AUFTRAG/OPS allow extra ingress coord for air groups 2024-12-10 12:12:56 +01:00
Applevangelist 426297812e xx 2024-12-08 18:56:48 +01:00
Applevangelist 855ea764b1 #SET_OPSGROUP - fix for teleport/respawn 2024-12-06 14:06:56 +01:00
Applevangelist e53f1aa68d Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Functional/Mantis.lua
#	Moose Development/Moose/Ops/Auftrag.lua
2024-12-05 10:59:08 +01:00
Applevangelist 7c06c615d0 xx 2024-12-05 10:56:54 +01:00
Applevangelist bc60648458 xx 2024-11-30 16:19:21 +01:00
Applevangelist 116527abfe xx 2024-11-30 13:09:58 +01:00
Applevangelist a0f58a95db xx 2024-11-30 12:55:50 +01:00
Applevangelist c55732a02f Leaner new version 2024-11-30 12:49:36 +01:00
Applevangelist 25740f7e61 xx 2024-11-26 10:40:46 +01:00
Applevangelist 66b6e4475e Merge remote-tracking branch 'origin/develop' into branch 2024-11-26 08:07:10 +01:00
Applevangelist 76a8bc7a33 Merge remote-tracking branch 'origin/master' into branch 2024-11-26 08:06:48 +01:00
Applevangelist 633f990b36 xxx 2024-11-26 08:05:40 +01:00
Applevangelist 4511f79609 Merge remote-tracking branch 'origin/develop' into branch 2024-11-19 08:44:47 +01:00
Applevangelist 7ba360a005 Documentation 2024-11-18 08:54:10 +01:00
Applevangelist c4faf39270 Merge remote-tracking branch 'origin/develop' into branch 2024-11-18 08:24:36 +01:00
Applevangelist 1b7dece0a5 Merge remote-tracking branch 'origin/develop' into branch 2024-11-17 16:24:12 +01:00
Applevangelist ddcc20cc47 Merge remote-tracking branch 'origin/master' into branch 2024-11-17 16:24:07 +01:00
Applevangelist cea3ab291e xxx 2024-11-17 16:22:32 +01:00
Applevangelist 112a0b2a8e Merge remote-tracking branch 'origin/develop' into branch 2024-11-10 15:37:14 +01:00
Applevangelist 1f4ca22018 Merge remote-tracking branch 'origin/master' into branch 2024-11-10 15:37:01 +01:00
Applevangelist 954190f6df xx 2024-11-07 09:05:53 +01:00
Applevangelist 1307e53833 xx 2024-10-31 18:15:23 +01:00
Applevangelist e45d22ad35 xx 2024-10-31 16:05:03 +01:00
Applevangelist 48dcca4b7b Merge remote-tracking branch 'origin/develop' into branch 2024-10-30 17:11:57 +01:00
Applevangelist 4e708563eb Merge remote-tracking branch 'origin/master' into branch 2024-10-30 17:11:49 +01:00
Applevangelist 20b0902768 xxx 2024-10-29 13:56:28 +01:00
Applevangelist 6a219ab547 Merge remote-tracking branch 'origin/develop' into branch 2024-10-29 13:20:25 +01:00
Applevangelist fd06ce8967 Merge remote-tracking branch 'origin/master' into branch 2024-10-29 13:20:17 +01:00
Applevangelist 9d46968103 xxx 2024-10-29 13:18:00 +01:00
Applevangelist a012184dfe Merge remote-tracking branch 'origin/develop' into branch 2024-10-29 11:39:02 +01:00
Applevangelist 972e3550f6 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Functional/ATC_Ground.lua
2024-10-29 11:38:53 +01:00
Applevangelist 8a83f69e9c xxx 2024-10-29 11:38:06 +01:00
Applevangelist 98a82c5959 xx 2024-10-27 13:24:45 +01:00
Applevangelist ebc7902775 Merge remote-tracking branch 'origin/develop' into branch 2024-10-26 18:46:39 +02:00
Applevangelist 0473276c88 Merge remote-tracking branch 'origin/develop' into branch 2024-10-11 08:07:15 +02:00
Applevangelist 0b30ec7436 Merge remote-tracking branch 'origin/master' into branch 2024-10-11 08:07:05 +02:00
Applevangelist 84e7efc939 Merge remote-tracking branch 'origin/develop' into branch 2024-10-08 10:06:27 +02:00
Applevangelist 8bdf57d7cb Merge remote-tracking branch 'origin/master' into branch 2024-10-08 10:06:23 +02:00
Applevangelist d613f59ca8 #AWACS Added an option to set own function to create player callsigns from group or playernames 2024-10-08 10:03:45 +02:00
Applevangelist 508decd91b Merge remote-tracking branch 'origin/develop' into branch 2024-10-03 14:08:32 +02:00
Applevangelist ff366fde74 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Sound/SRS.lua
2024-10-03 14:08:26 +02:00
Applevangelist 2dce709db1 Some fixes 2024-10-03 14:02:14 +02:00
Applevangelist cc99a5ba2a Merge remote-tracking branch 'origin/master' into branch 2024-10-01 12:10:47 +02:00
Applevangelist e0bf137d70 Merge remote-tracking branch 'origin/develop' into branch 2024-10-01 12:09:46 +02:00
Applevangelist ef4f1a87da Merge remote-tracking branch 'origin/master' into branch 2024-10-01 12:09:30 +02:00
Applevangelist 8ede1fb351 #DCS 2.9.8.1107 airbase updates 2024-10-01 12:03:00 +02:00
Applevangelist 60ce3685c9 Merge remote-tracking branch 'origin/develop' into branch 2024-09-30 11:37:17 +02:00
Applevangelist a1d06a6fc8 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Core/Spawn.lua
2024-09-30 11:37:07 +02:00
Applevangelist 3d5dfc422d xx 2024-09-30 11:36:19 +02:00
Applevangelist 52983bc5f1 Merge remote-tracking branch 'origin/develop' into branch 2024-09-27 11:58:56 +02:00
Applevangelist a8a1a0e37c Merge remote-tracking branch 'origin/master' into branch 2024-09-27 11:58:45 +02:00
Applevangelist e5965f8aec xx 2024-09-27 11:57:17 +02:00
Applevangelist 0c8a4c4cf8 xx 2024-09-27 09:04:36 +02:00
Applevangelist f1b4bb734d Merge remote-tracking branch 'origin/develop' into branch 2024-09-26 09:08:00 +02:00
Applevangelist 5c3a5ddee3 Merge remote-tracking branch 'origin/master' into branch 2024-09-26 09:07:56 +02:00
Applevangelist e0e4ba7db3 xx 2024-09-23 13:43:05 +02:00
Applevangelist 1f3df107bf xxx 2024-09-23 12:43:51 +02:00
Applevangelist 6887289466 xx 2024-09-23 10:19:58 +02:00
Applevangelist 9ef7a8aa3c Merge remote-tracking branch 'origin/develop' into branch 2024-09-15 19:25:46 +02:00
Applevangelist 900b0049bc Merge remote-tracking branch 'origin/master' into branch 2024-09-15 19:25:42 +02:00
Applevangelist cadf46ded2 xx 2024-09-15 19:24:34 +02:00
Applevangelist b1fd5970d0 Merge remote-tracking branch 'origin/develop' into branch 2024-09-08 13:25:18 +02:00
Applevangelist a4a4b2e6b1 Merge remote-tracking branch 'origin/master' into branch 2024-09-08 13:25:14 +02:00
Applevangelist d58edf7c38 xx 2024-09-08 13:18:32 +02:00
Applevangelist 1f0781f19a Merge remote-tracking branch 'origin/develop' into branch 2024-09-08 11:45:35 +02:00
Applevangelist f53488e8b0 Merge remote-tracking branch 'origin/master' into branch 2024-09-08 11:45:22 +02:00
Applevangelist 232547a0fb xxx 2024-09-08 11:44:59 +02:00
Applevangelist f3be326b5e Merge remote-tracking branch 'origin/develop' into branch 2024-09-06 16:42:02 +02:00
Applevangelist 9703d10f03 Merge remote-tracking branch 'origin/master' into branch 2024-09-06 16:41:55 +02:00
Applevangelist d6ecde96f8 #CTLD #CSAR Function to add own SET_GROUP for pilots 2024-09-06 16:40:18 +02:00
Applevangelist 8153052eed Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Wrapper/Group.lua
2024-09-06 13:43:19 +02:00
Applevangelist 7d3a0568a9 Qol 2024-09-06 13:40:41 +02:00
Applevangelist 4bafdf9408 #SPAWN - relax checks on SpawnScheduled, ensure count is only done on event 2024-09-03 12:36:50 +02:00
Thomas efe3571120 Update Spawn.lua
Remove T2 calls
2024-09-02 13:42:10 +02:00
Applevangelist bd1fd6f469 Merge remote-tracking branch 'origin/develop' into branch 2024-09-01 15:38:14 +02:00
Applevangelist 69b962b934 Merge remote-tracking branch 'origin/master' into branch 2024-09-01 15:38:07 +02:00
Applevangelist 1a7117c20d #CONTROLLABLE - Added IR Marker Beacons for UNIT and GROUP objects 2024-09-01 15:36:20 +02:00
Applevangelist c8b0e9e5d2 Merge remote-tracking branch 'origin/develop' into branch 2024-09-01 13:38:22 +02:00
Applevangelist 4b3e361a28 xx 2024-09-01 13:38:15 +02:00
Applevangelist 1965e45737 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2024-09-01 12:42:29 +02:00
Applevangelist a9ecef4f01 Merge remote-tracking branch 'origin/develop' into branch 2024-09-01 12:42:06 +02:00
Applevangelist f11755aad3 xxx 2024-08-29 17:31:40 +02:00
Applevangelist e42e712e77 Merge remote-tracking branch 'origin/develop' into branch 2024-08-29 10:26:10 +02:00
Applevangelist 84fbd7c4b0 Merge remote-tracking branch 'origin/master' into branch 2024-08-29 10:26:06 +02:00
Applevangelist 6fb5222358 CTLD Fix for saved crate reload duplicating crates on load 2024-08-29 10:21:24 +02:00
Applevangelist 120a66819c Merge remote-tracking branch 'origin/develop' into branch 2024-08-27 18:38:26 +02:00
Applevangelist d110ef1340 Merge remote-tracking branch 'origin/master' into branch 2024-08-27 18:38:22 +02:00
Applevangelist 6706fc0af9 xx 2024-08-27 18:37:00 +02:00
Applevangelist dc358f9cde xx 2024-08-27 13:18:26 +02:00
Applevangelist e285b26b11 Merge remote-tracking branch 'origin/develop' into branch 2024-08-27 10:57:29 +02:00
Applevangelist a62184319f Merge remote-tracking branch 'origin/master' into branch 2024-08-27 10:57:23 +02:00
Applevangelist add0a0231a xx 2024-08-27 10:56:59 +02:00
Applevangelist d00913cb68 Merge remote-tracking branch 'origin/develop' into branch 2024-08-26 18:32:12 +02:00
Applevangelist eef24def61 Merge remote-tracking branch 'origin/master' into branch 2024-08-26 18:32:08 +02:00
Applevangelist 3813a30def xx 2024-08-26 18:30:52 +02:00
Applevangelist 13bde6f2ab xx 2024-08-26 18:21:03 +02:00
Applevangelist c38e357652 Merge remote-tracking branch 'origin/develop' into branch 2024-08-26 15:54:02 +02:00
Applevangelist 06d9564b8a Merge remote-tracking branch 'origin/master' into branch 2024-08-26 15:53:58 +02:00
Applevangelist 0372735a02 xx 2024-08-26 15:51:22 +02:00
Applevangelist deb913a95b xx 2024-08-24 18:10:46 +02:00
Applevangelist f59dd3e8c7 Merge remote-tracking branch 'origin/develop' into branch 2024-08-23 16:30:22 +02:00
Applevangelist b2ed5c56fc Merge remote-tracking branch 'origin/master' into branch 2024-08-23 16:30:15 +02:00
Applevangelist 9e29384262 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
#	Moose Development/Moose/Utilities/Enums.lua
2024-08-23 14:03:21 +02:00
Applevangelist 540412d115 xx 2024-08-23 12:47:08 +02:00
Applevangelist 694b7afc71 xx 2024-08-23 12:42:16 +02:00
Applevangelist cb4a12c5ba xx 2024-08-23 12:41:44 +02:00
Applevangelist 733251bf06 xx 2024-08-22 18:27:15 +02:00
Applevangelist 42069c5bbb xx 2024-08-22 17:17:41 +02:00
Applevangelist 82b4276b33 xx 2024-08-20 18:03:41 +02:00
Applevangelist 8f3fc9cb2b xx 2024-08-20 17:56:09 +02:00
Applevangelist 89c6358085 xxx 2024-08-20 10:55:22 +02:00
Applevangelist abb295ecc2 Merge remote-tracking branch 'origin/develop' into branch 2024-08-20 10:48:41 +02:00
Applevangelist 5607aa1cf2 Merge remote-tracking branch 'origin/master' into branch 2024-08-20 10:48:33 +02:00
Applevangelist 43f1c6fcb1 xx 2024-08-20 10:48:08 +02:00
Applevangelist cebf21ec19 Merge remote-tracking branch 'origin/develop' into branch 2024-08-18 19:39:15 +02:00
Applevangelist f4951d09a7 Merge remote-tracking branch 'origin/master' into branch 2024-08-18 19:39:08 +02:00
Applevangelist 21ec234dd3 xx 2024-08-18 19:38:43 +02:00
Applevangelist 43ffad02be xx 2024-08-18 19:33:24 +02:00
Applevangelist 4859ea2fb1 Merge remote-tracking branch 'origin/master' into branch 2024-08-18 13:59:41 +02:00
Applevangelist 86ed8fe9e5 #ATIS cover "NEWRAINPRESET4" 2024-08-18 13:06:13 +02:00
Applevangelist d0d709a410 Merge remote-tracking branch 'origin/develop' into branch 2024-08-17 14:23:25 +02:00
Applevangelist 8ecb4372b5 Merge remote-tracking branch 'origin/master' into branch 2024-08-17 14:23:16 +02:00
Applevangelist cf322c121e xx 2024-08-17 11:37:26 +02:00
Applevangelist 1aca716431 Merge remote-tracking branch 'origin/develop' into branch 2024-08-16 16:24:16 +02:00
Applevangelist 83209341ee Merge remote-tracking branch 'origin/master' into branch 2024-08-16 16:24:09 +02:00
Applevangelist a481e46017 Merge remote-tracking branch 'origin/develop' into branch 2024-08-16 15:47:12 +02:00
Applevangelist 031a0035bd Merge remote-tracking branch 'origin/master' into branch 2024-08-16 15:47:05 +02:00
Applevangelist 4ca4d2e211 xx 2024-08-16 15:45:43 +02:00
Applevangelist 866d4f93cc Merge remote-tracking branch 'origin/develop' into branch 2024-08-16 15:23:32 +02:00
Applevangelist 98eb362628 Merge remote-tracking branch 'origin/master' into branch 2024-08-16 15:23:18 +02:00
Applevangelist b95f12449e xx 2024-08-16 15:21:21 +02:00
Applevangelist e7ab07cec3 Merge remote-tracking branch 'origin/develop' into branch 2024-08-16 09:45:20 +02:00
Applevangelist c61dd606a1 Merge remote-tracking branch 'origin/master' into branch 2024-08-16 09:45:12 +02:00
Applevangelist 3d029d8f6f Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
#	Moose Development/Moose/Wrapper/DynamicCargo.lua
2024-08-16 09:41:43 +02:00
Applevangelist 9bb18a9df2 Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
#	Moose Setup/Moose.files
2024-08-16 09:41:25 +02:00
Applevangelist 823930de40 xx 2024-08-16 09:27:16 +02:00
Applevangelist c7201580d6 xx 2024-08-15 17:43:30 +02:00
Applevangelist e61856197a #DynamicCargo - fix for FARP/Ship heights 2024-08-15 12:01:32 +02:00
Applevangelist 37d321bb5c Merge remote-tracking branch 'origin/develop' into branch 2024-08-14 15:43:57 +02:00
Applevangelist 38e16dd07e Merge remote-tracking branch 'origin/master' into branch 2024-08-14 15:43:51 +02:00
Applevangelist 64bae07877 #ATIS French Translations 2024-08-14 15:42:26 +02:00
Applevangelist 616a80cf5c Merge remote-tracking branch 'origin/develop' into branch 2024-08-14 13:48:33 +02:00
Applevangelist 18fd22be53 Merge remote-tracking branch 'origin/master' into branch 2024-08-14 13:48:26 +02:00
Applevangelist c82359f87b #range 2024-08-14 11:34:57 +02:00
Applevangelist d354f02507 Merge remote-tracking branch 'origin/Apple/Develop' into branch 2024-08-14 09:48:21 +02:00
Applevangelist f612ca2fc4 Merge remote-tracking branch 'origin/develop' into branch 2024-08-14 09:48:19 +02:00
Applevangelist 9d0156908c Merge remote-tracking branch 'origin/master' into branch 2024-08-14 09:48:10 +02:00
Thomas 0ee0eb3162 Update Moose.files 2024-08-13 19:13:23 +02:00
Thomas 81653cf289 Update Modules.lua 2024-08-13 19:12:38 +02:00
Applevangelist 60d68161c4 #CTLD #DYNAMICCARGO 2024-08-13 19:07:57 +02:00
Applevangelist ba5743c057 Merge remote-tracking branch 'origin/develop' into branch 2024-08-13 10:31:57 +02:00
Applevangelist 0ee30532ee #ATIS - Polar circle fixes 2024-08-13 10:30:36 +02:00
Applevangelist 093a60050b xx 2024-08-13 09:49:48 +02:00
Applevangelist a1605f9a2d Merge remote-tracking branch 'origin/develop' into branch 2024-08-12 19:06:54 +02:00
Applevangelist 6bd5148de8 Merge remote-tracking branch 'origin/master' into branch 2024-08-12 19:06:45 +02:00
Applevangelist 402e72f728 CTLD small fix 2024-08-12 16:58:42 +02:00
Applevangelist 459ee72426 Merge remote-tracking branch 'origin/Apple/Develop' into branch 2024-08-12 16:18:20 +02:00
Applevangelist 174054f538 Merge remote-tracking branch 'origin/develop' into branch 2024-08-12 16:18:15 +02:00
Applevangelist 5aba0f025a Merge remote-tracking branch 'origin/master' into branch 2024-08-12 16:17:59 +02:00
Thomas 5b32d39309 Align w master changes (#2163)
* Update Base.lua (#2159)

Performance tuning - the BASE:I, F, T calls rank very high in overall number of calls taken from Moose. Ensure only the minimum number of actions based on trace state and level is taken

* Update Spawn.lua (#2161)

Updating this class as it calls BASE I,F,T a lot. Making it less noisy for some performance tuning
2024-08-12 10:28:00 +02:00
Applevangelist 8d1adca034 Merge remote-tracking branch 'origin/develop' into branch 2024-08-10 18:54:46 +02:00
Applevangelist 9d55cb6f94 Merge remote-tracking branch 'origin/master' into branch 2024-08-10 18:54:40 +02:00
Applevangelist 501fafcea6 xx 2024-08-10 18:16:26 +02:00
Applevangelist 7b4f7e9295 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Modules.lua
2024-08-10 18:04:02 +02:00
Applevangelist 90fa2abbe8 Merge remote-tracking branch 'origin/develop' into branch 2024-08-10 10:17:10 +02:00
Applevangelist 0532a182bb Merge remote-tracking branch 'origin/master' into branch
# Conflicts:
#	Moose Development/Moose/Ops/CTLD.lua
2024-08-10 10:17:03 +02:00
Applevangelist 29bb204e6d xx 2024-08-10 09:52:43 +02:00
Applevangelist bf7c49708f xx 2024-08-09 10:41:21 +02:00
Applevangelist 9227252976 #Chinhook 2024-08-08 19:53:59 +02:00
Applevangelist c138f76c8a Merge remote-tracking branch 'origin/develop' into branch 2024-08-08 13:04:49 +02:00
Applevangelist 5f4be987c6 Merge remote-tracking branch 'origin/master' into branch 2024-08-08 13:04:46 +02:00
Applevangelist 63dc9b2e8e #CTLD - Dyn CArgo Spawns Handling 2024-08-06 18:19:35 +02:00
Applevangelist f53bd8f11a #CTLD
* Added spawning crates behind the CH-47
* Added functionality to retain resource maps of cargo statics
* Added door check for cargo crate operations
2024-08-04 17:35:06 +02:00
Applevangelist 554809764f #AIRBASE - Added Kola airbases 2024-08-04 17:33:53 +02:00
Applevangelist 084c172e93 #SPAWN - Added StopRepeat() 2024-08-04 17:33:39 +02:00
Applevangelist d86f471361 #SPAWNSTATIC - added functions to manage cargo static resource maps 2024-08-04 17:33:22 +02:00
Applevangelist 7fa01b9e3c #STATIC - added access to STORAGE object if set (cargo static types) 2024-08-04 17:32:46 +02:00
Applevangelist 5ffeecc333 #STORAGE - added enumerators 2024-08-04 17:32:21 +02:00
Applevangelist 0d88fec4bf #UTILS - added rear door check for CH-47 2024-08-04 17:32:07 +02:00
Applevangelist 06d4e4ac1c Merge remote-tracking branch 'origin/develop' into branch 2024-08-03 14:34:20 +02:00
Applevangelist b3758ae0e7 Merge remote-tracking branch 'origin/master' into branch 2024-08-03 14:34:18 +02:00
Applevangelist 6a0b7896a4 Merge remote-tracking branch 'origin/Apple/Develop' into branch
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Setup/Moose.files
2024-08-03 14:10:54 +02:00
Applevangelist cc0bbf3a17 Merge remote-tracking branch 'origin/develop' into branch
# Conflicts:
#	Moose Development/Moose/Modules.lua
#	Moose Development/Moose/Modules_local.lua
#	Moose Setup/Moose.files
2024-08-03 14:09:04 +02:00
112 changed files with 16260 additions and 8738 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ jobs:
# Prepare build environment
#########################################################################
- name: Check out repository code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Prepare build output folders
run: |
@@ -48,7 +48,7 @@ jobs:
mkdir -p build/doc
- name: Checkout FlightControls modified luadocumentor
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: Applevangelist/luadocumentor
path: './build/tools/luadocumentor'
@@ -129,7 +129,7 @@ jobs:
fi
- name: Checkout ${{ steps.set_doc_repo.outputs.docrepo }} to folder MOOSE_DOCS
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ github.repository_owner }}/${{ steps.set_doc_repo.outputs.docrepo }}
path: './build/MOOSE_DOCS'
+2 -2
View File
@@ -40,7 +40,7 @@ jobs:
# Prepare build environment
#########################################################################
- name: Check out repository code
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Prepare build output folders
run: |
@@ -115,7 +115,7 @@ jobs:
# Push to MOOSE_INCLUDE
#########################################################################
- name: Checkout MOOSE_INCLUDE
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: ${{ github.repository_owner }}/MOOSE_INCLUDE
path: './build/MOOSE_INCLUDE'
+5 -5
View File
@@ -33,7 +33,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
@@ -43,7 +43,7 @@ jobs:
working-directory: docs/
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
uses: actions/configure-pages@v5
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
@@ -52,7 +52,7 @@ jobs:
working-directory: docs/
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
uses: actions/upload-pages-artifact@v4
with:
path: docs/_site/
@@ -73,6 +73,6 @@ jobs:
needs: deploy
steps:
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
- run: npm install linkinator
- run: npx linkinator https://flightcontrol-master.github.io/MOOSE/ --verbosity error --timeout 5000 --recurse --skip "(java.com)" --retry-errors --retry-errors-count 3 --retry-errors-jitter
- run: npx linkinator https://flightcontrol-master.github.io/MOOSE/ --verbosity error --timeout 5000 --recurse --skip "(java.com)" --skip 'https:\/\/flightcontrol-master\.github\.io\/MOOSE_DOCS_DEVELOP\/Documentation\/(?:AI|Tasking|Cargo|MissileTrainer)\.[^\/\s]+\.html$' --status-code "404:skip" --retry-errors --retry-errors-count 3 --retry-errors-jitter
File diff suppressed because it is too large Load Diff
@@ -1,340 +0,0 @@
--- **Cargo** - Management of single cargo crates, which are based on a STATIC object.
--
-- ===
--
-- ### [Demo Missions]()
--
-- ### [YouTube Playlist]()
--
-- ===
--
-- ### Author: **FlightControl**
-- ### Contributions:
--
-- ===
--
-- @module Cargo.CargoCrate
-- @image Cargo_Crates.JPG
do -- CARGO_CRATE
--- Models the behaviour of cargo crates, which can be slingloaded and boarded on helicopters.
-- @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.
--
-- The above cargo classes are used by the following AI_CARGO_ classes to allow AI groups to transport cargo:
--
-- * AI Armoured Personnel Carriers to transport cargo and engage in battles, using the @{AI.AI_Cargo_APC} module.
-- * AI Helicopters to transport cargo, using the @{AI.AI_Cargo_Helicopter} module.
-- * AI Planes to transport cargo, using the @{AI.AI_Cargo_Airplane} module.
-- * AI Ships is planned.
--
-- The above cargo classes are also used by the TASK_CARGO_ classes to allow human players to transport cargo as part of a tasking:
--
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT} to transport cargo by human players.
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_CSAR} to transport downed pilots by human players.
--
-- # Developer Note
--
-- 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
--
-- ===
--
-- @field #CARGO_CRATE
CARGO_CRATE = {
ClassName = "CARGO_CRATE"
}
--- CARGO_CRATE Constructor.
-- @param #CARGO_CRATE self
-- @param Wrapper.Static#STATIC CargoStatic
-- @param #string Type
-- @param #string Name
-- @param #number LoadRadius (optional)
-- @param #number NearRadius (optional)
-- @return #CARGO_CRATE
function CARGO_CRATE:New( CargoStatic, Type, Name, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoStatic, Type, Name, nil, LoadRadius, NearRadius ) ) -- #CARGO_CRATE
self:T( { Type, Name, NearRadius } )
self.CargoObject = CargoStatic -- Wrapper.Static#STATIC
-- Cargo objects are added to the _DATABASE and SET_CARGO objects.
_EVENTDISPATCHER:CreateEventNewCargo( self )
self:HandleEvent( EVENTS.Dead, self.OnEventCargoDead )
self:HandleEvent( EVENTS.Crash, self.OnEventCargoDead )
--self:HandleEvent( EVENTS.RemoveUnit, self.OnEventCargoDead )
self:HandleEvent( EVENTS.PlayerLeaveUnit, self.OnEventCargoDead )
self:SetEventPriority( 4 )
self.NearRadius = NearRadius or 25
return self
end
-- @param #CARGO_CRATE self
-- @param Core.Event#EVENTDATA EventData
function CARGO_CRATE:OnEventCargoDead( EventData )
local Destroyed = false
if self:IsDestroyed() or self:IsUnLoaded() or self:IsBoarding() then
if self.CargoObject:GetName() == EventData.IniUnitName then
if not self.NoDestroy then
Destroyed = true
end
end
else
if self:IsLoaded() then
local CarrierName = self.CargoCarrier:GetName()
if CarrierName == EventData.IniDCSUnitName then
MESSAGE:New( "Cargo is lost from carrier " .. CarrierName, 15 ):ToAll()
Destroyed = true
self.CargoCarrier:ClearCargo()
end
end
end
if Destroyed then
self:I( { "Cargo crate destroyed: " .. self.CargoObject:GetName() } )
self:Destroyed()
end
end
--- Enter UnLoaded State.
-- @param #CARGO_CRATE self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE
function CARGO_CRATE:onenterUnLoaded( From, Event, To, ToPointVec2 )
--self:T( { ToPointVec2, From, Event, To } )
local Angle = 180
local Speed = 10
local Distance = 10
if From == "Loaded" then
local StartCoordinate = self.CargoCarrier:GetCoordinate()
local CargoCarrierHeading = self.CargoCarrier:GetHeading() -- Get Heading of object in degrees.
local CargoDeployHeading = ( ( CargoCarrierHeading + Angle ) >= 360 ) and ( CargoCarrierHeading + Angle - 360 ) or ( CargoCarrierHeading + Angle )
local CargoDeployCoord = StartCoordinate:Translate( Distance, CargoDeployHeading )
ToPointVec2 = ToPointVec2 or COORDINATE:NewFromVec2( { x= CargoDeployCoord.x, y = CargoDeployCoord.z } )
-- Respawn the group...
if self.CargoObject then
self.CargoObject:ReSpawnAt( ToPointVec2, 0 )
self.CargoCarrier = nil
end
end
if self.OnUnLoadedCallBack then
self.OnUnLoadedCallBack( self, unpack( self.OnUnLoadedParameters ) )
self.OnUnLoadedCallBack = nil
end
end
--- Loaded State.
-- @param #CARGO_CRATE self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier
function CARGO_CRATE:onenterLoaded( From, Event, To, CargoCarrier )
--self:T( { From, Event, To, CargoCarrier } )
self.CargoCarrier = CargoCarrier
-- Only destroy the CargoObject is if there is a CargoObject (packages don't have CargoObjects).
if self.CargoObject then
self:T("Destroying")
self.NoDestroy = true
self.CargoObject:Destroy( false ) -- Do not generate a remove unit event, because we want to keep the template for later respawn in the database.
--local Coordinate = self.CargoObject:GetCoordinate():GetRandomCoordinateInRadius( 50, 20 )
--self.CargoObject:ReSpawnAt( Coordinate, 0 )
end
end
--- Check if the cargo can be Boarded.
-- @param #CARGO_CRATE self
function CARGO_CRATE:CanBoard()
return false
end
--- Check if the cargo can be Unboarded.
-- @param #CARGO_CRATE self
function CARGO_CRATE:CanUnboard()
return false
end
--- Check if the cargo can be sling loaded.
-- @param #CARGO_CRATE self
function CARGO_CRATE:CanSlingload()
return false
end
--- Check if Cargo Crate is in the radius for the Cargo to be reported.
-- @param #CARGO_CRATE self
-- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Crate is within the report radius.
function CARGO_CRATE:IsInReportRadius( Coordinate )
--self:T( { Coordinate, LoadRadius = self.LoadRadius } )
local Distance = 0
if self:IsUnLoaded() then
Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() )
--self:T( Distance )
if Distance <= self.LoadRadius then
return true
end
end
return false
end
--- Check if Cargo Crate is in the radius for the Cargo to be Boarded or Loaded.
-- @param #CARGO_CRATE self
-- @param Core.Point#Coordinate Coordinate
-- @return #boolean true if the Cargo Crate is within the loading radius.
function CARGO_CRATE:IsInLoadRadius( Coordinate )
--self:T( { Coordinate, LoadRadius = self.NearRadius } )
local Distance = 0
if self:IsUnLoaded() then
Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() )
--self:T( Distance )
if Distance <= self.NearRadius then
return true
end
end
return false
end
--- Get the current Coordinate of the CargoGroup.
-- @param #CARGO_CRATE self
-- @return Core.Point#COORDINATE The current Coordinate of the first Cargo of the CargoGroup.
-- @return #nil There is no valid Cargo in the CargoGroup.
function CARGO_CRATE:GetCoordinate()
--self:T()
return self.CargoObject:GetCoordinate()
end
--- Check if the CargoGroup is alive.
-- @param #CARGO_CRATE self
-- @return #boolean true if the CargoGroup is alive.
-- @return #boolean false if the CargoGroup is dead.
function CARGO_CRATE:IsAlive()
local Alive = true
-- When the Cargo is Loaded, the Cargo is in the CargoCarrier, so we check if the CargoCarrier is alive.
-- When the Cargo is not Loaded, the Cargo is the CargoObject, so we check if the CargoObject is alive.
if self:IsLoaded() then
Alive = Alive == true and self.CargoCarrier:IsAlive()
else
Alive = Alive == true and self.CargoObject:IsAlive()
end
return Alive
end
--- Route Cargo to Coordinate and randomize locations.
-- @param #CARGO_CRATE self
-- @param Core.Point#COORDINATE Coordinate
function CARGO_CRATE:RouteTo( Coordinate )
self:T( {Coordinate = Coordinate } )
end
--- Check if Cargo is near to the Carrier.
-- The Cargo is near to the Carrier within NearRadius.
-- @param #CARGO_CRATE self
-- @param Wrapper.Group#GROUP CargoCarrier
-- @param #number NearRadius
-- @return #boolean The Cargo is near to the Carrier.
-- @return #nil The Cargo is not near to the Carrier.
function CARGO_CRATE:IsNear( CargoCarrier, NearRadius )
self:T( {NearRadius = NearRadius } )
return self:IsNear( CargoCarrier:GetCoordinate(), NearRadius )
end
--- Respawn the CargoGroup.
-- @param #CARGO_CRATE self
function CARGO_CRATE:Respawn()
self:T( { "Respawning crate " .. self:GetName() } )
-- Respawn the group...
if self.CargoObject then
self.CargoObject:ReSpawn() -- A cargo destroy crates a DEAD event.
self:__Reset( -0.1 )
end
end
--- Respawn the CargoGroup.
-- @param #CARGO_CRATE self
function CARGO_CRATE:onafterReset()
self:T( { "Reset crate " .. self:GetName() } )
-- Respawn the group...
if self.CargoObject then
self:SetDeployed( false )
self:SetStartState( "UnLoaded" )
self.CargoCarrier = nil
-- Cargo objects are added to the _DATABASE and SET_CARGO objects.
_EVENTDISPATCHER:CreateEventNewCargo( self )
end
end
--- Get the transportation method of the Cargo.
-- @param #CARGO_CRATE self
-- @return #string The transportation method of the Cargo.
function CARGO_CRATE:GetTransportationMethod()
if self:IsLoaded() then
return "for unloading"
else
if self:IsUnLoaded() then
return "for loading"
else
if self:IsDeployed() then
return "delivered"
end
end
end
return ""
end
end
@@ -1,777 +0,0 @@
--- **Cargo** - Management of grouped cargo logistics, which are based on a GROUP object.
--
-- ===
--
-- ### [Demo Missions]()
--
-- ### [YouTube Playlist]()
--
-- ===
--
-- ### Author: **FlightControl**
-- ### Contributions:
--
-- ===
--
-- @module Cargo.CargoGroup
-- @image Cargo_Groups.JPG
do -- CARGO_GROUP
--- @type CARGO_GROUP
-- @field Core.Set#SET_CARGO CargoSet The collection of derived CARGO objects.
-- @field #string GroupName The name of the CargoGroup.
-- @field Wrapper.Group#GROUÜ CargoCarrier The carrier 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:
--
-- * AI Armoured Personnel Carriers to transport cargo and engage in battles, using the @{AI.AI_Cargo_APC} module.
-- * AI Helicopters to transport cargo, using the @{AI.AI_Cargo_Helicopter} module.
-- * AI Planes to transport cargo, using the @{AI.AI_Cargo_Airplane} module.
-- * AI Ships is planned.
--
-- The above cargo classes are also used by the TASK_CARGO_ classes to allow human players to transport cargo as part of a tasking:
--
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT} to transport cargo by human players.
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_CSAR} to transport downed pilots by human players.
--
-- # Developer Note
--
-- 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
--
-- @field #CARGO_GROUP CARGO_GROUP
--
CARGO_GROUP = {
ClassName = "CARGO_GROUP",
}
--- CARGO_GROUP constructor.
-- This make a new CARGO_GROUP from a @{Wrapper.Group} object.
-- It will "ungroup" the group object within the sim, and will create a @{Core.Set} of individual Unit objects.
-- @param #CARGO_GROUP self
-- @param Wrapper.Group#GROUP CargoGroup Group to be transported as cargo.
-- @param #string Type Cargo type, e.g. "Infantry". This is the type used in SET_CARGO:New():FilterTypes("Infantry") to define the valid cargo groups of the set.
-- @param #string Name A user defined name of the cargo group. This name CAN be the same as the group object but can also have a different name. This name MUST be unique!
-- @param #number LoadRadius (optional) Distance in meters until which a cargo is loaded into the carrier. Cargo outside this radius has to be routed by other means to within the radius to be loaded.
-- @param #number NearRadius (optional) Once the units are within this radius of the carrier, they are actually loaded, i.e. disappear from the scene.
-- @return #CARGO_GROUP Cargo group object.
function CARGO_GROUP:New( CargoGroup, Type, Name, LoadRadius, NearRadius )
-- Inherit CAROG_REPORTABLE
local self = BASE:Inherit( self, CARGO_REPORTABLE:New( Type, Name, 0, LoadRadius, NearRadius ) ) -- #CARGO_GROUP
self:T( { Type, Name, LoadRadius } )
self.CargoSet = SET_CARGO:New()
self.CargoGroup = CargoGroup
self.Grouped = true
self.CargoUnitTemplate = {}
self.NearRadius = NearRadius
self:SetDeployed( false )
local WeightGroup = 0
local VolumeGroup = 0
self.CargoGroup:Destroy() -- destroy and generate a unit removal event, so that the database gets cleaned, and the linked sets get properly cleaned.
local GroupName = CargoGroup:GetName()
self.CargoName = Name
self.CargoTemplate = UTILS.DeepCopy( _DATABASE:GetGroupTemplate( GroupName ) )
-- Deactivate late activation.
self.CargoTemplate.lateActivation=false
self.GroupTemplate = UTILS.DeepCopy( self.CargoTemplate )
self.GroupTemplate.name = self.CargoName .. "#CARGO"
self.GroupTemplate.groupId = nil
self.GroupTemplate.units = {}
for UnitID, UnitTemplate in pairs( self.CargoTemplate.units ) do
UnitTemplate.name = UnitTemplate.name .. "#CARGO"
local CargoUnitName = UnitTemplate.name
self.CargoUnitTemplate[CargoUnitName] = UnitTemplate
self.GroupTemplate.units[#self.GroupTemplate.units+1] = self.CargoUnitTemplate[CargoUnitName]
self.GroupTemplate.units[#self.GroupTemplate.units].unitId = nil
-- And we register the spawned unit as part of the CargoSet.
local Unit = UNIT:Register( CargoUnitName )
end
-- Then we register the new group in the database
self.CargoGroup = GROUP:NewTemplate( self.GroupTemplate, self.GroupTemplate.CoalitionID, self.GroupTemplate.CategoryID, self.GroupTemplate.CountryID )
-- Now we spawn the new group based on the template created.
self.CargoObject = _DATABASE:Spawn( self.GroupTemplate )
for CargoUnitID, CargoUnit in pairs( self.CargoObject:GetUnits() ) do
local CargoUnitName = CargoUnit:GetName()
local Cargo = CARGO_UNIT:New( CargoUnit, Type, CargoUnitName, LoadRadius, NearRadius )
self.CargoSet:Add( CargoUnitName, Cargo )
WeightGroup = WeightGroup + Cargo:GetWeight()
end
self:SetWeight( WeightGroup )
self:T( { "Weight Cargo", WeightGroup } )
-- Cargo objects are added to the _DATABASE and SET_CARGO objects.
_EVENTDISPATCHER:CreateEventNewCargo( self )
self:HandleEvent( EVENTS.Dead, self.OnEventCargoDead )
self:HandleEvent( EVENTS.Crash, self.OnEventCargoDead )
--self:HandleEvent( EVENTS.RemoveUnit, self.OnEventCargoDead )
self:HandleEvent( EVENTS.PlayerLeaveUnit, self.OnEventCargoDead )
self:SetEventPriority( 4 )
return self
end
--- Respawn the CargoGroup.
-- @param #CARGO_GROUP self
function CARGO_GROUP:Respawn()
self:T( { "Respawning" } )
for CargoID, CargoData in pairs( self.CargoSet:GetSet() ) do
local Cargo = CargoData -- Cargo.Cargo#CARGO
Cargo:Destroy() -- Destroy the cargo and generate a remove unit event to update the sets.
Cargo:SetStartState( "UnLoaded" )
end
-- Now we spawn the new group based on the template created.
_DATABASE:Spawn( self.GroupTemplate )
for CargoUnitID, CargoUnit in pairs( self.CargoObject:GetUnits() ) do
local CargoUnitName = CargoUnit:GetName()
local Cargo = CARGO_UNIT:New( CargoUnit, self.Type, CargoUnitName, self.LoadRadius )
self.CargoSet:Add( CargoUnitName, Cargo )
end
self:SetDeployed( false )
self:SetStartState( "UnLoaded" )
end
--- Ungroup the cargo group into individual groups with one unit.
-- This is required because by default a group will move in formation and this is really an issue for group control.
-- Therefore this method is made to be able to ungroup a group.
-- This works for ground only groups.
-- @param #CARGO_GROUP self
function CARGO_GROUP:Ungroup()
if self.Grouped == true then
self.Grouped = false
self.CargoGroup:Destroy()
for CargoUnitName, CargoUnit in pairs( self.CargoSet:GetSet() ) do
local CargoUnit = CargoUnit -- Cargo.CargoUnit#CARGO_UNIT
if CargoUnit:IsUnLoaded() then
local GroupTemplate = UTILS.DeepCopy( self.CargoTemplate )
--local GroupName = env.getValueDictByKey( GroupTemplate.name )
-- We create a new group object with one unit...
-- First we prepare the template...
GroupTemplate.name = self.CargoName .. "#CARGO#" .. CargoUnitName
GroupTemplate.groupId = nil
if CargoUnit:IsUnLoaded() then
GroupTemplate.units = {}
GroupTemplate.units[1] = self.CargoUnitTemplate[CargoUnitName]
GroupTemplate.units[#GroupTemplate.units].unitId = nil
GroupTemplate.units[#GroupTemplate.units].x = CargoUnit:GetX()
GroupTemplate.units[#GroupTemplate.units].y = CargoUnit:GetY()
GroupTemplate.units[#GroupTemplate.units].heading = CargoUnit:GetHeading()
end
-- Then we register the new group in the database
local CargoGroup = GROUP:NewTemplate( GroupTemplate, GroupTemplate.CoalitionID, GroupTemplate.CategoryID, GroupTemplate.CountryID)
-- Now we spawn the new group based on the template created.
_DATABASE:Spawn( GroupTemplate )
end
end
self.CargoObject = nil
end
end
--- Regroup the cargo group into one group with multiple unit.
-- This is required because by default a group will move in formation and this is really an issue for group control.
-- Therefore this method is made to be able to regroup a group.
-- This works for ground only groups.
-- @param #CARGO_GROUP self
function CARGO_GROUP:Regroup()
self:T("Regroup")
if self.Grouped == false then
self.Grouped = true
local GroupTemplate = UTILS.DeepCopy( self.CargoTemplate )
GroupTemplate.name = self.CargoName .. "#CARGO"
GroupTemplate.groupId = nil
GroupTemplate.units = {}
for CargoUnitName, CargoUnit in pairs( self.CargoSet:GetSet() ) do
local CargoUnit = CargoUnit -- Cargo.CargoUnit#CARGO_UNIT
self:T( { CargoUnit:GetName(), UnLoaded = CargoUnit:IsUnLoaded() } )
if CargoUnit:IsUnLoaded() then
CargoUnit.CargoObject:Destroy()
GroupTemplate.units[#GroupTemplate.units+1] = self.CargoUnitTemplate[CargoUnitName]
GroupTemplate.units[#GroupTemplate.units].unitId = nil
GroupTemplate.units[#GroupTemplate.units].x = CargoUnit:GetX()
GroupTemplate.units[#GroupTemplate.units].y = CargoUnit:GetY()
GroupTemplate.units[#GroupTemplate.units].heading = CargoUnit:GetHeading()
end
end
-- Then we register the new group in the database
self.CargoGroup = GROUP:NewTemplate( GroupTemplate, GroupTemplate.CoalitionID, GroupTemplate.CategoryID, GroupTemplate.CountryID )
self:T( { "Regroup", GroupTemplate } )
-- Now we spawn the new group based on the template created.
self.CargoObject = _DATABASE:Spawn( GroupTemplate )
end
end
--- @param #CARGO_GROUP self
-- @param Core.Event#EVENTDATA EventData
function CARGO_GROUP:OnEventCargoDead( EventData )
self:T(EventData)
local Destroyed = false
if self:IsDestroyed() or self:IsUnLoaded() or self:IsBoarding() or self:IsUnboarding() then
Destroyed = true
for CargoID, CargoData in pairs( self.CargoSet:GetSet() ) do
local Cargo = CargoData -- Cargo.Cargo#CARGO
if Cargo:IsAlive() then
Destroyed = false
else
Cargo:Destroyed()
end
end
else
local CarrierName = self.CargoCarrier:GetName()
if CarrierName == EventData.IniDCSUnitName then
MESSAGE:New( "Cargo is lost from carrier " .. CarrierName, 15 ):ToAll()
Destroyed = true
self.CargoCarrier:ClearCargo()
end
end
if Destroyed then
self:Destroyed()
self:T( { "Cargo group destroyed" } )
end
end
--- After Board Event.
-- @param #CARGO_GROUP self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterBoard( From, Event, To, CargoCarrier, NearRadius, ... )
self:T( { CargoCarrier.UnitName, From, Event, To, NearRadius = NearRadius } )
NearRadius = NearRadius or self.NearRadius
-- For each Cargo object within the CARGO_GROUPED, route each object to the CargoLoadPointVec2
self.CargoSet:ForEach(
function( Cargo, ... )
self:T( { "Board Unit", Cargo:GetName( ), Cargo:IsDestroyed(), Cargo.CargoObject:IsAlive() } )
local CargoGroup = Cargo.CargoObject --Wrapper.Group#GROUP
CargoGroup:OptionAlarmStateGreen()
Cargo:__Board( 1, CargoCarrier, NearRadius, ... )
end, ...
)
self:__Boarding( -1, CargoCarrier, NearRadius, ... )
end
--- Enter Loaded State.
-- @param #CARGO_GROUP self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier
function CARGO_GROUP:onafterLoad( From, Event, To, CargoCarrier, ... )
--self:T( { From, Event, To, CargoCarrier, ...} )
if From == "UnLoaded" then
-- For each Cargo object within the CARGO_GROUP, load each cargo to the CargoCarrier.
for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do
if not Cargo:IsDestroyed() then
Cargo:Load( CargoCarrier )
end
end
end
--self.CargoObject:Destroy()
self.CargoCarrier = CargoCarrier
self.CargoCarrier:AddCargo( self )
end
--- Leave Boarding State.
-- @param #CARGO_GROUP self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterBoarding( From, Event, To, CargoCarrier, NearRadius, ... )
--self:T( { CargoCarrier.UnitName, From, Event, To } )
local Boarded = true
local Cancelled = false
local Dead = true
self.CargoSet:Flush()
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do
--self:T( { Cargo:GetName(), Cargo.current } )
if not Cargo:is( "Loaded" )
and (not Cargo:is( "Destroyed" )) then -- If one or more units of a group defined as CARGO_GROUP died, the CARGO_GROUP:Board() command does not trigger the CARGO_GRUOP:OnEnterLoaded() function.
Boarded = false
end
if Cargo:is( "UnLoaded" ) then
Cancelled = true
end
if not Cargo:is( "Destroyed" ) then
Dead = false
end
end
if not Dead then
if not Cancelled then
if not Boarded then
self:__Boarding( -5, CargoCarrier, NearRadius, ... )
else
self:T("Group Cargo is loaded")
self:__Load( 1, CargoCarrier, ... )
end
else
self:__CancelBoarding( 1, CargoCarrier, NearRadius, ... )
end
else
self:__Destroyed( 1, CargoCarrier, NearRadius, ... )
end
end
--- Enter UnBoarding State.
-- @param #CARGO_GROUP self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterUnBoard( From, Event, To, ToPointVec2, NearRadius, ... )
self:T( {From, Event, To, ToPointVec2, NearRadius } )
NearRadius = NearRadius or 25
local Timer = 1
if From == "Loaded" then
if self.CargoObject then
self.CargoObject:Destroy()
end
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
self.CargoSet:ForEach(
--- @param Cargo.Cargo#CARGO Cargo
function( Cargo, NearRadius )
if not Cargo:IsDestroyed() then
local ToVec=nil
if ToPointVec2==nil then
ToVec=self.CargoCarrier:GetPointVec2():GetRandomPointVec2InRadius(2*NearRadius, NearRadius)
else
ToVec=ToPointVec2
end
Cargo:__UnBoard( Timer, ToVec, NearRadius )
Timer = Timer + 1
end
end, { NearRadius }
)
self:__UnBoarding( 1, ToPointVec2, NearRadius, ... )
end
end
--- Leave UnBoarding State.
-- @param #CARGO_GROUP self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius If distance is smaller than this number, cargo is loaded into the carrier.
function CARGO_GROUP:onafterUnBoarding( From, Event, To, ToPointVec2, NearRadius, ... )
--self:T( { From, Event, To, ToPointVec2, NearRadius } )
--local NearRadius = NearRadius or 25
local Angle = 180
local Speed = 10
local Distance = 5
if From == "UnBoarding" then
local UnBoarded = true
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
for CargoID, Cargo in pairs( self.CargoSet:GetSet() ) do
self:T( { Cargo:GetName(), Cargo.current } )
if not Cargo:is( "UnLoaded" ) and not Cargo:IsDestroyed() then
UnBoarded = false
end
end
if UnBoarded then
self:__UnLoad( 1, ToPointVec2, ... )
else
self:__UnBoarding( 1, ToPointVec2, NearRadius, ... )
end
return false
end
end
--- Enter UnLoaded State.
-- @param #CARGO_GROUP self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE ToPointVec2
function CARGO_GROUP:onafterUnLoad( From, Event, To, ToPointVec2, ... )
--self:T( { From, Event, To, ToPointVec2 } )
if From == "Loaded" then
-- For each Cargo object within the CARGO_GROUP, route each object to the CargoLoadPointVec2
self.CargoSet:ForEach(
function( Cargo )
--Cargo:UnLoad( ToPointVec2 )
local RandomVec2=nil
if ToPointVec2 then
RandomVec2=ToPointVec2:GetRandomPointVec2InRadius(20, 10)
end
Cargo:UnBoard( RandomVec2 )
end
)
end
self.CargoCarrier:RemoveCargo( self )
self.CargoCarrier = nil
end
--- Get the current Coordinate of the CargoGroup.
-- @param #CARGO_GROUP self
-- @return Core.Point#COORDINATE The current Coordinate of the first Cargo of the CargoGroup.
-- @return #nil There is no valid Cargo in the CargoGroup.
function CARGO_GROUP:GetCoordinate()
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
if Cargo then
return Cargo.CargoObject:GetCoordinate()
end
return nil
end
--- Get the x position of the cargo.
-- @param #CARGO_GROUP self
-- @return #number
function CARGO:GetX()
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
if Cargo then
return Cargo:GetCoordinate().x
end
return nil
end
--- Get the y position of the cargo.
-- @param #CARGO_GROUP self
-- @return #number
function CARGO:GetY()
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
if Cargo then
return Cargo:GetCoordinate().z
end
return nil
end
--- Check if the CargoGroup is alive.
-- @param #CARGO_GROUP self
-- @return #boolean true if the CargoGroup is alive.
-- @return #boolean false if the CargoGroup is dead.
function CARGO_GROUP:IsAlive()
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
return Cargo ~= nil
end
--- Get the first alive Cargo Unit of the Cargo Group.
-- @param #CARGO_GROUP self
-- @return #CARGO_GROUP
function CARGO_GROUP:GetFirstAlive()
local CargoFirstAlive = nil
for _, Cargo in pairs( self.CargoSet:GetSet() ) do
if not Cargo:IsDestroyed() then
CargoFirstAlive = Cargo
break
end
end
return CargoFirstAlive
end
--- Get the amount of cargo units in the group.
-- @param #CARGO_GROUP self
-- @return #CARGO_GROUP
function CARGO_GROUP:GetCount()
return self.CargoSet:Count()
end
--- Get the underlying GROUP object from the CARGO_GROUP.
-- @param #CARGO_GROUP self
-- @return #CARGO_GROUP
function CARGO_GROUP:GetGroup( Cargo )
local Cargo = Cargo or self:GetFirstAlive() -- Cargo.Cargo#CARGO
return Cargo.CargoObject:GetGroup()
end
--- Route Cargo to Coordinate and randomize locations.
-- @param #CARGO_GROUP self
-- @param Core.Point#COORDINATE Coordinate
function CARGO_GROUP:RouteTo( Coordinate )
--self:T( {Coordinate = Coordinate } )
-- For each Cargo within the CargoSet, route each object to the Coordinate
self.CargoSet:ForEach(
function( Cargo )
Cargo.CargoObject:RouteGroundTo( Coordinate, 10, "vee", 0 )
end
)
end
--- Check if Cargo is near to the Carrier.
-- The Cargo is near to the Carrier if the first unit of the Cargo Group is within NearRadius.
-- @param #CARGO_GROUP self
-- @param Wrapper.Group#GROUP CargoCarrier
-- @param #number NearRadius
-- @return #boolean The Cargo is near to the Carrier or #nil if the Cargo is not near to the Carrier.
function CARGO_GROUP:IsNear( CargoCarrier, NearRadius )
self:T( {NearRadius = NearRadius } )
for _, Cargo in pairs( self.CargoSet:GetSet() ) do
local Cargo = Cargo -- Cargo.Cargo#CARGO
if Cargo:IsAlive() then
if Cargo:IsNear( CargoCarrier:GetCoordinate(), NearRadius ) then
self:T( "Near" )
return true
end
end
end
return nil
end
--- Check if Cargo Group is in the radius for the Cargo to be Boarded.
-- @param #CARGO_GROUP self
-- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Group is within the load radius.
function CARGO_GROUP:IsInLoadRadius( Coordinate )
--self:T( { Coordinate } )
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
if Cargo then
local Distance = 0
local CargoCoordinate
if Cargo:IsLoaded() then
CargoCoordinate = Cargo.CargoCarrier:GetCoordinate()
else
CargoCoordinate = Cargo.CargoObject:GetCoordinate()
end
-- FF check if coordinate could be obtained. This was commented out for some (unknown) reason. But the check seems valid!
if CargoCoordinate then
Distance = Coordinate:Get2DDistance( CargoCoordinate )
else
return false
end
self:T( { Distance = Distance, LoadRadius = self.LoadRadius } )
if Distance <= self.LoadRadius then
return true
else
return false
end
end
return nil
end
--- Check if Cargo Group is in the report radius.
-- @param #CARGO_GROUP self
-- @param Core.Point#Coordinate Coordinate
-- @return #boolean true if the Cargo Group is within the report radius.
function CARGO_GROUP:IsInReportRadius( Coordinate )
--self:T( { Coordinate } )
local Cargo = self:GetFirstAlive() -- Cargo.Cargo#CARGO
if Cargo then
self:T( { Cargo } )
local Distance = 0
if Cargo:IsUnLoaded() then
Distance = Coordinate:Get2DDistance( Cargo.CargoObject:GetCoordinate() )
--self:T( Distance )
if Distance <= self.LoadRadius then
return true
end
end
end
return nil
end
--- Signal a flare at the position of the CargoGroup.
-- @param #CARGO_GROUP self
-- @param Utilities.Utils#FLARECOLOR FlareColor
function CARGO_GROUP:Flare( FlareColor )
local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO
if Cargo then
Cargo:Flare( FlareColor )
end
end
--- Smoke the CargoGroup.
-- @param #CARGO_GROUP self
-- @param Utilities.Utils#SMOKECOLOR SmokeColor The color of the smoke.
-- @param #number Radius The radius of randomization around the center of the first element of the CargoGroup.
function CARGO_GROUP:Smoke( SmokeColor, Radius )
local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO
if Cargo then
Cargo:Smoke( SmokeColor, Radius )
end
end
--- Check if the first element of the CargoGroup is the given @{Core.Zone}.
-- @param #CARGO_GROUP self
-- @param Core.Zone#ZONE_BASE Zone
-- @return #boolean **true** if the first element of the CargoGroup is in the Zone
-- @return #boolean **false** if there is no element of the CargoGroup in the Zone.
function CARGO_GROUP:IsInZone( Zone )
--self:T( { Zone } )
local Cargo = self.CargoSet:GetFirst() -- Cargo.Cargo#CARGO
if Cargo then
return Cargo:IsInZone( Zone )
end
return nil
end
--- Get the transportation method of the Cargo.
-- @param #CARGO_GROUP self
-- @return #string The transportation method of the Cargo.
function CARGO_GROUP:GetTransportationMethod()
if self:IsLoaded() then
return "for unboarding"
else
if self:IsUnLoaded() then
return "for boarding"
else
if self:IsDeployed() then
return "delivered"
end
end
end
return ""
end
end -- CARGO_GROUP
@@ -1,277 +0,0 @@
--- **Cargo** - Management of single cargo crates, which are based on a STATIC object. The cargo can only be slingloaded.
--
-- ===
--
-- ### [Demo Missions]()
--
-- ### [YouTube Playlist]()
--
-- ===
--
-- ### Author: **FlightControl**
-- ### Contributions:
--
-- ===
--
-- @module Cargo.CargoSlingload
-- @image Cargo_Slingload.JPG
do -- CARGO_SLINGLOAD
--- Models the behaviour of cargo crates, which can only be slingloaded.
-- @type CARGO_SLINGLOAD
-- @extends Cargo.Cargo#CARGO_REPRESENTABLE
--- Defines a cargo that is represented by a UNIT object within the simulator, and can be transported by a carrier.
--
-- The above cargo classes are also used by the TASK_CARGO_ classes to allow human players to transport cargo as part of a tasking:
--
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_TRANSPORT} to transport cargo by human players.
-- * @{Tasking.Task_Cargo_Transport#TASK_CARGO_CSAR} to transport downed pilots by human players.
--
-- # 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
--
-- ===
--
-- @field #CARGO_SLINGLOAD
CARGO_SLINGLOAD = {
ClassName = "CARGO_SLINGLOAD"
}
--- CARGO_SLINGLOAD Constructor.
-- @param #CARGO_SLINGLOAD self
-- @param Wrapper.Static#STATIC CargoStatic
-- @param #string Type
-- @param #string Name
-- @param #number LoadRadius (optional)
-- @param #number NearRadius (optional)
-- @return #CARGO_SLINGLOAD
function CARGO_SLINGLOAD:New( CargoStatic, Type, Name, LoadRadius, NearRadius )
local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoStatic, Type, Name, nil, LoadRadius, NearRadius ) ) -- #CARGO_SLINGLOAD
self:T( { Type, Name, NearRadius } )
self.CargoObject = CargoStatic
-- Cargo objects are added to the _DATABASE and SET_CARGO objects.
_EVENTDISPATCHER:CreateEventNewCargo( self )
self:HandleEvent( EVENTS.Dead, self.OnEventCargoDead )
self:HandleEvent( EVENTS.Crash, self.OnEventCargoDead )
--self:HandleEvent( EVENTS.RemoveUnit, self.OnEventCargoDead )
self:HandleEvent( EVENTS.PlayerLeaveUnit, self.OnEventCargoDead )
self:SetEventPriority( 4 )
self.NearRadius = NearRadius or 25
return self
end
-- @param #CARGO_SLINGLOAD self
-- @param Core.Event#EVENTDATA EventData
function CARGO_SLINGLOAD:OnEventCargoDead( EventData )
local Destroyed = false
if self:IsDestroyed() or self:IsUnLoaded() then
if self.CargoObject:GetName() == EventData.IniUnitName then
if not self.NoDestroy then
Destroyed = true
end
end
end
if Destroyed then
self:I( { "Cargo crate destroyed: " .. self.CargoObject:GetName() } )
self:Destroyed()
end
end
--- Check if the cargo can be Slingloaded.
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:CanSlingload()
return true
end
--- Check if the cargo can be Boarded.
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:CanBoard()
return false
end
--- Check if the cargo can be Unboarded.
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:CanUnboard()
return false
end
--- Check if the cargo can be Loaded.
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:CanLoad()
return false
end
--- Check if the cargo can be Unloaded.
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:CanUnload()
return false
end
--- Check if Cargo Crate is in the radius for the Cargo to be reported.
-- @param #CARGO_SLINGLOAD self
-- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Crate is within the report radius.
function CARGO_SLINGLOAD:IsInReportRadius( Coordinate )
--self:T( { Coordinate, LoadRadius = self.LoadRadius } )
local Distance = 0
if self:IsUnLoaded() then
Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() )
if Distance <= self.LoadRadius then
return true
end
end
return false
end
--- Check if Cargo Slingload is in the radius for the Cargo to be Boarded or Loaded.
-- @param #CARGO_SLINGLOAD self
-- @param Core.Point#COORDINATE Coordinate
-- @return #boolean true if the Cargo Slingload is within the loading radius.
function CARGO_SLINGLOAD:IsInLoadRadius( Coordinate )
--self:T( { Coordinate } )
local Distance = 0
if self:IsUnLoaded() then
Distance = Coordinate:Get2DDistance( self.CargoObject:GetCoordinate() )
if Distance <= self.NearRadius then
return true
end
end
return false
end
--- Get the current Coordinate of the CargoGroup.
-- @param #CARGO_SLINGLOAD self
-- @return Core.Point#COORDINATE The current Coordinate of the first Cargo of the CargoGroup.
-- @return #nil There is no valid Cargo in the CargoGroup.
function CARGO_SLINGLOAD:GetCoordinate()
--self:T()
return self.CargoObject:GetCoordinate()
end
--- Check if the CargoGroup is alive.
-- @param #CARGO_SLINGLOAD self
-- @return #boolean true if the CargoGroup is alive.
-- @return #boolean false if the CargoGroup is dead.
function CARGO_SLINGLOAD:IsAlive()
local Alive = true
-- When the Cargo is Loaded, the Cargo is in the CargoCarrier, so we check if the CargoCarrier is alive.
-- When the Cargo is not Loaded, the Cargo is the CargoObject, so we check if the CargoObject is alive.
if self:IsLoaded() then
Alive = Alive == true and self.CargoCarrier:IsAlive()
else
Alive = Alive == true and self.CargoObject:IsAlive()
end
return Alive
end
--- Route Cargo to Coordinate and randomize locations.
-- @param #CARGO_SLINGLOAD self
-- @param Core.Point#COORDINATE Coordinate
function CARGO_SLINGLOAD:RouteTo( Coordinate )
--self:T( {Coordinate = Coordinate } )
end
--- Check if Cargo is near to the Carrier.
-- The Cargo is near to the Carrier within NearRadius.
-- @param #CARGO_SLINGLOAD self
-- @param Wrapper.Group#GROUP CargoCarrier
-- @param #number NearRadius
-- @return #boolean The Cargo is near to the Carrier.
-- @return #nil The Cargo is not near to the Carrier.
function CARGO_SLINGLOAD:IsNear( CargoCarrier, NearRadius )
--self:T( {NearRadius = NearRadius } )
return self:IsNear( CargoCarrier:GetCoordinate(), NearRadius )
end
--- Respawn the CargoGroup.
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:Respawn()
--self:T( { "Respawning slingload " .. self:GetName() } )
-- Respawn the group...
if self.CargoObject then
self.CargoObject:ReSpawn() -- A cargo destroy crates a DEAD event.
self:__Reset( -0.1 )
end
end
--- Respawn the CargoGroup.
-- @param #CARGO_SLINGLOAD self
function CARGO_SLINGLOAD:onafterReset()
--self:T( { "Reset slingload " .. self:GetName() } )
-- Respawn the group...
if self.CargoObject then
self:SetDeployed( false )
self:SetStartState( "UnLoaded" )
self.CargoCarrier = nil
-- Cargo objects are added to the _DATABASE and SET_CARGO objects.
_EVENTDISPATCHER:CreateEventNewCargo( self )
end
end
--- Get the transportation method of the Cargo.
-- @param #CARGO_SLINGLOAD self
-- @return #string The transportation method of the Cargo.
function CARGO_SLINGLOAD:GetTransportationMethod()
if self:IsLoaded() then
return "for sling loading"
else
if self:IsUnLoaded() then
return "for sling loading"
else
if self:IsDeployed() then
return "delivered"
end
end
end
return ""
end
end
-397
View File
@@ -1,397 +0,0 @@
--- **Cargo** - Management of single cargo logistics, which are based on a UNIT object.
--
-- ===
--
-- ### [Demo Missions]()
--
-- ### [YouTube Playlist]()
--
-- ===
--
-- ### Author: **FlightControl**
-- ### Contributions:
--
-- ===
--
-- @module Cargo.CargoUnit
-- @image Cargo_Units.JPG
do -- CARGO_UNIT
--- Models CARGO in the form of units, which can be boarded, unboarded, loaded, unloaded.
-- @type CARGO_UNIT
-- @extends Cargo.Cargo#CARGO_REPRESENTABLE
--- 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_UNIT objects to and from carriers.
-- Note that ground forces behave in a group, and thus, act in formation, regardless if one unit is commanded to move.
--
-- This class is used in CARGO_GROUP, and is not meant to be used by mission designers individually.
--
-- # 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
--
-- ===
--
-- @field #CARGO_UNIT CARGO_UNIT
--
CARGO_UNIT = {
ClassName = "CARGO_UNIT"
}
--- CARGO_UNIT Constructor.
-- @param #CARGO_UNIT self
-- @param Wrapper.Unit#UNIT CargoUnit
-- @param #string Type
-- @param #string Name
-- @param #number Weight
-- @param #number LoadRadius (optional)
-- @param #number NearRadius (optional)
-- @return #CARGO_UNIT
function CARGO_UNIT:New( CargoUnit, Type, Name, LoadRadius, NearRadius )
-- Inherit CARGO_REPRESENTABLE.
local self = BASE:Inherit( self, CARGO_REPRESENTABLE:New( CargoUnit, Type, Name, LoadRadius, NearRadius ) ) -- #CARGO_UNIT
-- Debug info.
self:T({Type=Type, Name=Name, LoadRadius=LoadRadius, NearRadius=NearRadius})
-- Set cargo object.
self.CargoObject = CargoUnit
-- Set event prio.
self:SetEventPriority( 5 )
return self
end
--- Enter UnBoarding State.
-- @param #CARGO_UNIT self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius (optional) Defaut 25 m.
function CARGO_UNIT:onenterUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:T( { From, Event, To, ToPointVec2, NearRadius } )
local Angle = 180
local Speed = 60
local DeployDistance = 9
local RouteDistance = 60
if From == "Loaded" then
if not self:IsDestroyed() then
local CargoCarrier = self.CargoCarrier -- Wrapper.Controllable#CONTROLLABLE
if CargoCarrier:IsAlive() then
local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2()
local CargoCarrierHeading = self.CargoCarrier:GetHeading() -- Get Heading of object in degrees.
local CargoDeployHeading = ( ( CargoCarrierHeading + Angle ) >= 360 ) and ( CargoCarrierHeading + Angle - 360 ) or ( CargoCarrierHeading + Angle )
local CargoRoutePointVec2 = CargoCarrierPointVec2:Translate( RouteDistance, CargoDeployHeading )
-- if there is no ToPointVec2 given, then use the CargoRoutePointVec2
local FromDirectionVec3 = CargoCarrierPointVec2:GetDirectionVec3( ToPointVec2 or CargoRoutePointVec2 )
local FromAngle = CargoCarrierPointVec2:GetAngleDegrees(FromDirectionVec3)
local FromPointVec2 = CargoCarrierPointVec2:Translate( DeployDistance, FromAngle )
--local CargoDeployPointVec2 = CargoCarrierPointVec2:GetRandomCoordinateInRadius( 10, 5 )
ToPointVec2 = ToPointVec2 or CargoCarrierPointVec2:GetRandomCoordinateInRadius( NearRadius, DeployDistance )
-- Respawn the group...
if self.CargoObject then
if CargoCarrier:IsShip() then
-- If CargoCarrier is a ship, we don't want to spawn the units in the water next to the boat. Use destination coord instead.
self.CargoObject:ReSpawnAt( ToPointVec2, CargoDeployHeading )
else
self.CargoObject:ReSpawnAt( FromPointVec2, CargoDeployHeading )
end
self:T( { "CargoUnits:", self.CargoObject:GetGroup():GetName() } )
self.CargoCarrier = nil
local Points = {}
-- From
Points[#Points+1] = FromPointVec2:WaypointGround( Speed, "Vee" )
-- To
Points[#Points+1] = ToPointVec2:WaypointGround( Speed, "Vee" )
local TaskRoute = self.CargoObject:TaskRoute( Points )
self.CargoObject:SetTask( TaskRoute, 1 )
self:__UnBoarding( 1, ToPointVec2, NearRadius )
end
else
-- the Carrier is dead. This cargo is dead too!
self:Destroyed()
end
end
end
end
--- Leave UnBoarding State.
-- @param #CARGO_UNIT self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius (optional) Defaut 100 m.
function CARGO_UNIT:onleaveUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:T( { From, Event, To, ToPointVec2, NearRadius } )
local Angle = 180
local Speed = 10
local Distance = 5
if From == "UnBoarding" then
--if self:IsNear( ToPointVec2, NearRadius ) then
return true
--else
--self:__UnBoarding( 1, ToPointVec2, NearRadius )
--end
--return false
end
end
--- UnBoard Event.
-- @param #CARGO_UNIT self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE ToPointVec2
-- @param #number NearRadius (optional) Defaut 100 m.
function CARGO_UNIT:onafterUnBoarding( From, Event, To, ToPointVec2, NearRadius )
self:T( { From, Event, To, ToPointVec2, NearRadius } )
self.CargoInAir = self.CargoObject:InAir()
self:T( self.CargoInAir )
-- Only unboard the cargo when the carrier is not in the air.
-- (eg. cargo can be on a oil derrick, moving the cargo on the oil derrick will drop the cargo on the sea).
if not self.CargoInAir then
end
self:__UnLoad( 1, ToPointVec2, NearRadius )
end
--- Enter UnLoaded State.
-- @param #CARGO_UNIT self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Core.Point#COORDINATE
function CARGO_UNIT:onenterUnLoaded( From, Event, To, ToPointVec2 )
self:T( { ToPointVec2, From, Event, To } )
local Angle = 180
local Speed = 10
local Distance = 5
if From == "Loaded" then
local StartPointVec2 = self.CargoCarrier:GetPointVec2()
local CargoCarrierHeading = self.CargoCarrier:GetHeading() -- Get Heading of object in degrees.
local CargoDeployHeading = ( ( CargoCarrierHeading + Angle ) >= 360 ) and ( CargoCarrierHeading + Angle - 360 ) or ( CargoCarrierHeading + Angle )
local CargoDeployCoord = StartPointVec2:Translate( Distance, CargoDeployHeading )
ToPointVec2 = ToPointVec2 or COORDINATE:New( CargoDeployCoord.x, CargoDeployCoord.z )
-- Respawn the group...
if self.CargoObject then
self.CargoObject:ReSpawnAt( ToPointVec2, 0 )
self.CargoCarrier = nil
end
end
if self.OnUnLoadedCallBack then
self.OnUnLoadedCallBack( self, unpack( self.OnUnLoadedParameters ) )
self.OnUnLoadedCallBack = nil
end
end
--- Board Event.
-- @param #CARGO_UNIT self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Group#GROUP CargoCarrier
-- @param #number NearRadius
function CARGO_UNIT:onafterBoard( From, Event, To, CargoCarrier, NearRadius, ... )
self:T( { From, Event, To, CargoCarrier, NearRadius = NearRadius } )
self.CargoInAir = self.CargoObject:InAir()
local Desc = self.CargoObject:GetDesc()
local MaxSpeed = Desc.speedMaxOffRoad
local TypeName = Desc.typeName
--self:T({Unit=self.CargoObject:GetName()})
-- A cargo unit can only be boarded if it is not dead
-- Only move the group to the carrier when the cargo is not in the air
-- (eg. cargo can be on a oil derrick, moving the cargo on the oil derrick will drop the cargo on the sea).
if not self.CargoInAir then
-- If NearRadius is given, then use the given NearRadius, otherwise calculate the NearRadius
-- based upon the Carrier bounding radius, which is calculated from the bounding rectangle on the Y axis.
local NearRadius = NearRadius or CargoCarrier:GetBoundingRadius() + 5
if self:IsNear( CargoCarrier:GetPointVec2(), NearRadius ) then
self:Load( CargoCarrier, NearRadius, ... )
else
if MaxSpeed and MaxSpeed == 0 or TypeName and TypeName == "Stinger comm" then
self:Load( CargoCarrier, NearRadius, ... )
else
local Speed = 90
local Angle = 180
local Distance = 0
local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2()
local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees.
local CargoDeployHeading = ( ( CargoCarrierHeading + Angle ) >= 360 ) and ( CargoCarrierHeading + Angle - 360 ) or ( CargoCarrierHeading + Angle )
local CargoDeployPointVec2 = CargoCarrierPointVec2:Translate( Distance, CargoDeployHeading )
-- Set the CargoObject to state Green to ensure it is boarding!
self.CargoObject:OptionAlarmStateGreen()
local Points = {}
local PointStartVec2 = self.CargoObject:GetPointVec2()
Points[#Points+1] = PointStartVec2:WaypointGround( Speed )
Points[#Points+1] = CargoDeployPointVec2:WaypointGround( Speed )
local TaskRoute = self.CargoObject:TaskRoute( Points )
self.CargoObject:SetTask( TaskRoute, 2 )
self:__Boarding( -5, CargoCarrier, NearRadius, ... )
self.RunCount = 0
end
end
end
end
--- Boarding Event.
-- @param #CARGO_UNIT self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Client#CLIENT CargoCarrier
-- @param #number NearRadius Default 25 m.
function CARGO_UNIT:onafterBoarding( From, Event, To, CargoCarrier, NearRadius, ... )
self:T( { From, Event, To, CargoCarrier:GetName(), NearRadius = NearRadius } )
self:T( { IsAlive=self.CargoObject:IsAlive() } )
if CargoCarrier and CargoCarrier:IsAlive() then -- and self.CargoObject and self.CargoObject:IsAlive() then
if (CargoCarrier:IsAir() and not CargoCarrier:InAir()) or true then
local NearRadius = NearRadius or CargoCarrier:GetBoundingRadius( NearRadius ) + 5
if self:IsNear( CargoCarrier:GetPointVec2(), NearRadius ) then
self:__Load( -1, CargoCarrier, ... )
else
if self:IsNear( CargoCarrier:GetPointVec2(), 20 ) then
self:__Boarding( -1, CargoCarrier, NearRadius, ... )
self.RunCount = self.RunCount + 1
else
self:__Boarding( -2, CargoCarrier, NearRadius, ... )
self.RunCount = self.RunCount + 2
end
if self.RunCount >= 40 then
self.RunCount = 0
local Speed = 90
local Angle = 180
local Distance = 0
--self:T({Unit=self.CargoObject:GetName()})
local CargoCarrierPointVec2 = CargoCarrier:GetPointVec2()
local CargoCarrierHeading = CargoCarrier:GetHeading() -- Get Heading of object in degrees.
local CargoDeployHeading = ( ( CargoCarrierHeading + Angle ) >= 360 ) and ( CargoCarrierHeading + Angle - 360 ) or ( CargoCarrierHeading + Angle )
local CargoDeployPointVec2 = CargoCarrierPointVec2:Translate( Distance, CargoDeployHeading )
-- Set the CargoObject to state Green to ensure it is boarding!
self.CargoObject:OptionAlarmStateGreen()
local Points = {}
local PointStartVec2 = self.CargoObject:GetPointVec2()
Points[#Points+1] = PointStartVec2:WaypointGround( Speed, "Off road" )
Points[#Points+1] = CargoDeployPointVec2:WaypointGround( Speed, "Off road" )
local TaskRoute = self.CargoObject:TaskRoute( Points )
self.CargoObject:SetTask( TaskRoute, 0.2 )
end
end
else
self.CargoObject:MessageToGroup( "Cancelling Boarding... Get back on the ground!", 5, CargoCarrier:GetGroup(), self:GetName() )
self:CancelBoarding( CargoCarrier, NearRadius, ... )
self.CargoObject:SetCommand( self.CargoObject:CommandStopRoute( true ) )
end
else
self:T("Something is wrong")
end
end
--- Loaded State.
-- @param #CARGO_UNIT self
-- @param #string Event
-- @param #string From
-- @param #string To
-- @param Wrapper.Unit#UNIT CargoCarrier
function CARGO_UNIT:onenterLoaded( From, Event, To, CargoCarrier )
self:T( { From, Event, To, CargoCarrier } )
self.CargoCarrier = CargoCarrier
--self:T({Unit=self.CargoObject:GetName()})
-- Only destroy the CargoObject if there is a CargoObject (packages don't have CargoObjects).
if self.CargoObject then
self.CargoObject:Destroy( false )
--self.CargoObject:ReSpawnAt( COORDINATE:NewFromVec2( {x=0,y=0} ), 0 )
end
end
--- Get the transportation method of the Cargo.
-- @param #CARGO_UNIT self
-- @return #string The transportation method of the Cargo.
function CARGO_UNIT:GetTransportationMethod()
if self:IsLoaded() then
return "for unboarding"
else
if self:IsUnLoaded() then
return "for boarding"
else
if self:IsDeployed() then
return "delivered"
end
end
end
return ""
end
end -- CARGO_UNIT
+11 -7
View File
@@ -320,10 +320,12 @@ end
--- Set valid neighbours to be in a certain distance.
-- @param #ASTAR self
-- @param #number MaxDistance Max distance between nodes in meters. Default is 2000 m.
-- @param #number MaxDistance (Optional) Max distance between nodes in meters. Default is 2000 m.
-- @return #ASTAR self
function ASTAR:SetValidNeighbourDistance(MaxDistance)
MaxDistance = MaxDistance or 2000
self:SetValidNeighbourFunction(ASTAR.DistMax, MaxDistance)
return self
@@ -331,10 +333,12 @@ end
--- Set valid neighbours to be in a certain distance.
-- @param #ASTAR self
-- @param #number MaxDistance Max distance between nodes in meters. Default is 2000 m.
-- @param #number MaxDistance (Optional) Max distance between nodes in meters. Default is 2000 m.
-- @return #ASTAR self
function ASTAR:SetValidNeighbourRoad(MaxDistance)
MaxDistance = MaxDistance or 2000
self:SetValidNeighbourFunction(ASTAR.Road, MaxDistance)
return self
@@ -397,10 +401,10 @@ end
-- The coordinate system is oriented along the line between start and end point.
-- @param #ASTAR self
-- @param #table ValidSurfaceTypes Valid surface types. By default is all surfaces are allowed.
-- @param #number BoxHY Box "height" in meters along the y-coordinate. Default 40000 meters (40 km).
-- @param #number SpaceX Additional space in meters before start and after end coordinate. Default 10000 meters (10 km).
-- @param #number deltaX Increment in the direction of start to end coordinate in meters. Default 2000 meters.
-- @param #number deltaY Increment perpendicular to the direction of start to end coordinate in meters. Default is same as deltaX.
-- @param #number BoxHY (Optional) Box "height" in meters along the y-coordinate. Default 40000 meters (40 km).
-- @param #number SpaceX (Optional) Additional space in meters before start and after end coordinate. Default 10000 meters (10 km).
-- @param #number deltaX (Optional) Increment in the direction of start to end coordinate in meters. Default 2000 meters.
-- @param #number deltaY (Optional) Increment perpendicular to the direction of start to end coordinate in meters. Default is same as deltaX.
-- @param #boolean MarkGrid If true, create F10 map markers at grid nodes.
-- @return #ASTAR self
function ASTAR:CreateGrid(ValidSurfaceTypes, BoxHY, SpaceX, deltaX, deltaY, MarkGrid)
@@ -547,7 +551,7 @@ end
--- Function to check if distance between two nodes is less than a threshold distance.
-- @param #ASTAR.Node nodeA First node.
-- @param #ASTAR.Node nodeB Other node.
-- @param #number distmax Max distance in meters. Default is 2000 m.
-- @param #number distmax (Optional) Max distance in meters. Default is 2000 m.
-- @return #boolean If true, distance between the two nodes is below threshold.
function ASTAR.DistMax(nodeA, nodeB, distmax)
+23 -1
View File
@@ -735,6 +735,12 @@ do -- Event Handling
-- @function [parent=#BASE] OnEventPlayerEnterAircraft
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when an option is changed for an AI group.
-- The event identifies the initiating group, but does not provide the option ID or value.
-- @function [parent=#BASE] OnEventGroupChangeOption
-- @param #BASE self
-- @param Core.Event#EVENTDATA EventData The EventData structure.
--- Occurs when a player creates a dynamic cargo object from the F8 ground crew menu.
-- *** NOTE *** this is a workarounf for DCS not creating these events as of Aug 2024.
@@ -855,7 +861,7 @@ end
-- @param DCS#Time EventTime The time stamp of the event.
-- @param DCS#Object Initiator The initiating object of the event.
function BASE:CreateEventTakeoff( EventTime, Initiator )
self:F( { EventTime, Initiator } )
--self:F( { EventTime, Initiator } )
local Event = {
id = world.event.S_EVENT_TAKEOFF,
@@ -880,6 +886,22 @@ end
world.onEvent(Event)
end
--- Creation of a `S_EVENT_GROUP_CHANGE_OPTION` event.
-- @param #BASE self
-- @param DCS#Time EventTime The time stamp of the event.
-- @param DCS#Group Initiator The initiating group of the event.
function BASE:CreateEventGroupChangeOption( EventTime, Initiator )
self:F( { EventTime, Initiator } )
local Event = {
id = EVENTS.GroupChangeOption,
time = EventTime,
initiator = Initiator,
}
world.onEvent( Event )
end
--- Creation of a S_EVENT_NEW_DYNAMIC_CARGO event.
-- @param #BASE self
+3 -3
View File
@@ -257,7 +257,7 @@ end
--- Evaluate conditon functions.
-- @param #CONDITION self
-- @param #boolean AnyTrue If `true`, evaluation return `true` if *any* condition function returns `true`. By default, *all* condition functions must return true.
-- @param #boolean AnyTrue (Optional) If `true`, evaluation return `true` if *any* condition function returns `true`. By default, *all* condition functions must return true.
-- @return #boolean Result of condition functions.
function CONDITION:Evaluate(AnyTrue)
@@ -401,7 +401,7 @@ end
--- Condition to check if time is greater than a given threshold time.
-- @param #number Time Time in seconds.
-- @param #boolean Absolute If `true`, abs. mission time from `timer.getAbsTime()` is checked. Default is relative mission time from `timer.getTime()`.
-- @param #boolean Absolute (Optional) If `true`, abs. mission time from `timer.getAbsTime()` is checked. Default is relative mission time from `timer.getTime()`.
-- @return #boolean Returns `true` if time is greater than give the time.
function CONDITION.IsTimeGreater(Time, Absolute)
@@ -424,7 +424,7 @@ end
--- Function that returns `true` (success) with a certain probability. For example, if you specify `Probability=80` there is an 80% chance that `true` is returned.
-- Technically, a random number between 0 and 100 is created. If the given success probability is less then this number, `true` is returned.
-- @param #number Probability Success probability in percent. Default 50 %.
-- @param #number Probability (Optional) Success probability in percent. Default 50 %.
-- @return #boolean Returns `true` for success and `false` otherwise.
function CONDITION.IsRandomSuccess(Probability)
+12 -124
View File
@@ -54,7 +54,6 @@
-- * AIRBASES
-- * PLAYERSJOINED
-- * PLAYERS
-- * CARGOS
-- * STORAGES (DCS warehouses)
-- * DYNAMICCARGO
--
@@ -81,7 +80,6 @@ DATABASE = {
PLAYERSJOINED = {},
PLAYERUNITS = {},
CLIENTS = {},
CARGOS = {},
AIRBASES = {},
COUNTRY_ID = {},
COUNTRY_NAME = {},
@@ -141,8 +139,6 @@ function DATABASE:New()
self:HandleEvent( EVENTS.RemoveUnit, self._EventOnDeadOrCrash )
self:HandleEvent( EVENTS.UnitLost, self._EventOnDeadOrCrash ) -- DCS 2.7.1 for Aerial units no dead event ATM
self:HandleEvent( EVENTS.Hit, self.AccountHits )
self:HandleEvent( EVENTS.NewCargo )
self:HandleEvent( EVENTS.DeleteCargo )
self:HandleEvent( EVENTS.NewZone )
self:HandleEvent( EVENTS.DeleteZone )
--self:HandleEvent( EVENTS.PlayerEnterUnit, self._EventOnPlayerEnterUnit ) -- This is not working anymore!, handling this through the birth event.
@@ -746,102 +742,6 @@ do -- OpsZone
end -- OpsZone
do -- cargo
--- Adds a Cargo based on the Cargo Name in the DATABASE.
-- @param #DATABASE self
-- @param #string CargoName The name of the airbase
function DATABASE:AddCargo( Cargo )
if not self.CARGOS[Cargo.Name] then
self.CARGOS[Cargo.Name] = Cargo
end
end
--- Deletes a Cargo from the DATABASE based on the Cargo Name.
-- @param #DATABASE self
-- @param #string CargoName The name of the airbase
function DATABASE:DeleteCargo( CargoName )
self.CARGOS[CargoName] = nil
end
--- Finds an CARGO based on the CargoName.
-- @param #DATABASE self
-- @param #string CargoName
-- @return Cargo.Cargo#CARGO The found CARGO.
function DATABASE:FindCargo( CargoName )
local CargoFound = self.CARGOS[CargoName]
return CargoFound
end
--- Checks if the Template name has a #CARGO tag.
-- If yes, the group is a cargo.
-- @param #DATABASE self
-- @param #string TemplateName
-- @return #boolean
function DATABASE:IsCargo( TemplateName )
TemplateName = env.getValueDictByKey( TemplateName )
local Cargo = TemplateName:match( "#(CARGO)" )
return Cargo and Cargo == "CARGO"
end
--- Private method that registers new Static Templates within the DATABASE Object.
-- @param #DATABASE self
-- @return #DATABASE self
function DATABASE:_RegisterCargos()
local Groups = UTILS.DeepCopy( self.GROUPS ) -- This is a very important statement. CARGO_GROUP:New creates a new _DATABASE.GROUP entry, which will confuse the loop. I searched 4 hours on this to find the bug!
for CargoGroupName, CargoGroup in pairs( Groups ) do
if self:IsCargo( CargoGroupName ) then
local CargoInfo = CargoGroupName:match("#CARGO(.*)")
local CargoParam = CargoInfo and CargoInfo:match( "%((.*)%)")
local CargoName1 = CargoGroupName:match("(.*)#CARGO%(.*%)")
local CargoName2 = CargoGroupName:match(".*#CARGO%(.*%)(.*)")
local CargoName = CargoName1 .. ( CargoName2 or "" )
local Type = CargoParam and CargoParam:match( "T=([%a%d ]+),?")
local Name = CargoParam and CargoParam:match( "N=([%a%d]+),?") or CargoName
local LoadRadius = CargoParam and tonumber( CargoParam:match( "RR=([%a%d]+),?") )
local NearRadius = CargoParam and tonumber( CargoParam:match( "NR=([%a%d]+),?") )
self:I({"Register CargoGroup:",Type=Type,Name=Name,LoadRadius=LoadRadius,NearRadius=NearRadius})
CARGO_GROUP:New( CargoGroup, Type, Name, LoadRadius, NearRadius )
end
end
for CargoStaticName, CargoStatic in pairs( self.STATICS ) do
if self:IsCargo( CargoStaticName ) then
local CargoInfo = CargoStaticName:match("#CARGO(.*)")
local CargoParam = CargoInfo and CargoInfo:match( "%((.*)%)")
local CargoName = CargoStaticName:match("(.*)#CARGO")
local Type = CargoParam and CargoParam:match( "T=([%a%d ]+),?")
local Category = CargoParam and CargoParam:match( "C=([%a%d ]+),?")
local Name = CargoParam and CargoParam:match( "N=([%a%d]+),?") or CargoName
local LoadRadius = CargoParam and tonumber( CargoParam:match( "RR=([%a%d]+),?") )
local NearRadius = CargoParam and tonumber( CargoParam:match( "NR=([%a%d]+),?") )
if Category == "SLING" then
self:I({"Register CargoSlingload:",Type=Type,Name=Name,LoadRadius=LoadRadius,NearRadius=NearRadius})
CARGO_SLINGLOAD:New( CargoStatic, Type, Name, LoadRadius, NearRadius )
else
if Category == "CRATE" then
self:I({"Register CargoCrate:",Type=Type,Name=Name,LoadRadius=LoadRadius,NearRadius=NearRadius})
CARGO_CRATE:New( CargoStatic, Type, Name, LoadRadius, NearRadius )
end
end
end
end
end
end -- cargo
--- Finds a CLIENT based on the ClientName.
-- @param #DATABASE self
-- @param #string ClientName - Note this is the UNIT name of the client!
@@ -1278,10 +1178,10 @@ end
--- Get a generic static cargo group template from scratch for dynamic cargo spawns register. Does not register the template!
-- @param #DATABASE self
-- @param #string Name Name of the static.
-- @param #string Typename Typename of the static. Defaults to "container_cargo".
-- @param #number Mass Mass of the static. Defaults to 0.
-- @param #number Coalition Coalition of the static. Defaults to coalition.side.BLUE.
-- @param #number Country Country of the static. Defaults to country.id.GERMANY.
-- @param #string Typename (Optional) Typename of the static. Defaults to "container_cargo".
-- @param #number Mass (Optional) Mass of the static. Defaults to 0.
-- @param #number Coalition (Optional) Coalition of the static. Defaults to coalition.side.BLUE.
-- @param #number Country (Optional) Country of the static. Defaults to country.id.GERMANY.
-- @return #table Static template table.
function DATABASE:_GetGenericStaticCargoGroupTemplate(Name,Typename,Mass,Coalition,Country)
local StaticTemplate = {}
@@ -1480,12 +1380,12 @@ function DATABASE:_RegisterDynamicGroup(Groupname)
local DCSUnitName = DCSUnit:getName()
-- Add unit.
self:I(string.format("Register Unit: %s", tostring(DCSUnitName)))
self:T(string.format("Register Unit: %s", tostring(DCSUnitName)))
self:AddUnit( tostring(DCSUnitName), true )
end
else
self:E({"Group does not exist: ", DCSGroup})
self:T({"Group does not exist: ", DCSGroup})
end
return self
end
@@ -1588,27 +1488,28 @@ end
-- @return #DATABASE self
function DATABASE:_RegisterAirbase(airbase)
local IsSyria = UTILS.GetDCSMap() == "Syria" and true or false
local countHSyria = 0
--local IsSyria = UTILS.GetDCSMap() == "Syria" and true or false
--local countHSyria = 0
if airbase then
-- Get the airbase name.
local DCSAirbaseName = airbase:getName()
-- DCS 2.9.8.1107 added 143 helipads all named H with the same object ID ..
--[[ DCS 2.9.8.1107 added 143 helipads all named H with the same object ID ..
if IsSyria and DCSAirbaseName == "H" and countHSyria > 0 then
--[[
--
local p = airbase:getPosition().p
local mgrs = COORDINATE:New(p.x,p.z,p.y):ToStringMGRS()
self:I("Airbase on Syria map named H @ "..mgrs)
countHSyria = countHSyria + 1
if countHSyria > 1 then return self end
--]]
--
return self
elseif IsSyria and DCSAirbaseName == "H" and countHSyria == 0 then
countHSyria = countHSyria + 1
end
--]]
-- This gave the incorrect value to be inserted into the airdromeID for DCS 2.5.6. Is fixed now.
local airbaseID=airbase:getID()
@@ -2050,19 +1951,6 @@ function DATABASE:ForEachClient( IteratorFunction, FinalizeFunction, ... )
return self
end
--- Iterate the DATABASE and call an iterator function for each CARGO, providing the CARGO object to the function and optional parameters.
-- @param #DATABASE self
-- @param #function IteratorFunction The function that will be called for each object in the database. The function needs to accept a CLIENT parameter.
-- @return #DATABASE self
function DATABASE:ForEachCargo( IteratorFunction, FinalizeFunction, ... )
self:F2( arg )
self:ForEach( IteratorFunction, FinalizeFunction, arg, self.CARGOS )
return self
end
--- Handles the OnEventNewCargo event.
-- @param #DATABASE self
-- @param Core.Event#EVENTDATA EventData
+41 -48
View File
@@ -187,19 +187,17 @@ EVENT = {
CreateMarkCoordinateOnEvent = false,
}
world.event.S_EVENT_NEW_CARGO = world.event.S_EVENT_MAX + 1000
world.event.S_EVENT_DELETE_CARGO = world.event.S_EVENT_MAX + 1001
world.event.S_EVENT_NEW_ZONE = world.event.S_EVENT_MAX + 1002
world.event.S_EVENT_DELETE_ZONE = world.event.S_EVENT_MAX + 1003
world.event.S_EVENT_NEW_ZONE_GOAL = world.event.S_EVENT_MAX + 1004
world.event.S_EVENT_DELETE_ZONE_GOAL = world.event.S_EVENT_MAX + 1005
world.event.S_EVENT_REMOVE_UNIT = world.event.S_EVENT_MAX + 1006
world.event.S_EVENT_PLAYER_ENTER_AIRCRAFT = world.event.S_EVENT_MAX + 1007
world.event.S_EVENT_NEW_ZONE = world.event.S_EVENT_MAX + 1000
world.event.S_EVENT_DELETE_ZONE = world.event.S_EVENT_MAX + 1001
world.event.S_EVENT_NEW_ZONE_GOAL = world.event.S_EVENT_MAX + 1002
world.event.S_EVENT_DELETE_ZONE_GOAL = world.event.S_EVENT_MAX + 1003
world.event.S_EVENT_REMOVE_UNIT = world.event.S_EVENT_MAX + 1004
world.event.S_EVENT_PLAYER_ENTER_AIRCRAFT = world.event.S_EVENT_MAX + 1005
-- dynamic cargo
world.event.S_EVENT_NEW_DYNAMIC_CARGO = world.event.S_EVENT_MAX + 1008
world.event.S_EVENT_DYNAMIC_CARGO_LOADED = world.event.S_EVENT_MAX + 1009
world.event.S_EVENT_DYNAMIC_CARGO_UNLOADED = world.event.S_EVENT_MAX + 1010
world.event.S_EVENT_DYNAMIC_CARGO_REMOVED = world.event.S_EVENT_MAX + 1011
world.event.S_EVENT_NEW_DYNAMIC_CARGO = world.event.S_EVENT_MAX + 1006
world.event.S_EVENT_DYNAMIC_CARGO_LOADED = world.event.S_EVENT_MAX + 1007
world.event.S_EVENT_DYNAMIC_CARGO_UNLOADED = world.event.S_EVENT_MAX + 1008
world.event.S_EVENT_DYNAMIC_CARGO_REMOVED = world.event.S_EVENT_MAX + 1009
--- The different types of events supported by MOOSE.
@@ -234,8 +232,6 @@ EVENTS = {
MarkChange = world.event.S_EVENT_MARK_CHANGE,
MarkRemoved = world.event.S_EVENT_MARK_REMOVED,
-- Moose Events
NewCargo = world.event.S_EVENT_NEW_CARGO,
DeleteCargo = world.event.S_EVENT_DELETE_CARGO,
NewZone = world.event.S_EVENT_NEW_ZONE,
DeleteZone = world.event.S_EVENT_DELETE_ZONE,
NewZoneGoal = world.event.S_EVENT_NEW_ZONE_GOAL,
@@ -282,6 +278,7 @@ EVENTS = {
SimulationUnfreeze = world.event.S_EVENT_SIMULATION_UNFREEZE or -1,
HumanAircraftRepairStart = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_START or -1,
HumanAircraftRepairFinish = world.event.S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH or -1,
GroupChangeOption = world.event.S_EVENT_GROUP_CHANGE_OPTION or -1,
-- dynamic cargo
NewDynamicCargo = world.event.S_EVENT_NEW_DYNAMIC_CARGO or -1,
DynamicCargoLoaded = world.event.S_EVENT_DYNAMIC_CARGO_LOADED or -1,
@@ -295,23 +292,25 @@ EVENTS = {
--
-- * A (Object.Category.)UNIT : A UNIT object type is involved in the Event.
-- * A (Object.Category.)STATIC : A STATIC object type is involved in the Event.
-- * A GROUP : A DCS Group object is involved in the Event.
--
-- @type EVENTDATA
-- @field #number id The identifier of the event.
--
-- @field DCS#Unit initiator (UNIT/STATIC/SCENERY) The initiating @{DCS#Unit} or @{DCS#StaticObject}.
-- @field DCS#Unit initiator (UNIT/STATIC/SCENERY/GROUP) The initiating @{DCS#Unit} or @{DCS#StaticObject}. For `S_EVENT_GROUP_CHANGE_OPTION`, this is a DCS Group.
-- @field DCS#Object.Category IniObjectCategory (UNIT/STATIC/SCENERY) The initiator object category ( Object.Category.UNIT or Object.Category.STATIC ).
-- @field DCS#Unit IniDCSUnit (UNIT/STATIC) The initiating @{DCS#Unit} or @{DCS#StaticObject}.
-- @field #string IniDCSUnitName (UNIT/STATIC) The initiating Unit name.
-- @field Wrapper.Unit#UNIT IniUnit (UNIT/STATIC) The initiating MOOSE wrapper @{Wrapper.Unit#UNIT} of the initiator Unit object.
-- @field #string IniUnitName (UNIT/STATIC) The initiating UNIT name (same as IniDCSUnitName).
-- @field DCS#Group IniDCSGroup (UNIT) The initiating {DCSGroup#Group}.
-- @field #string IniDCSGroupName (UNIT) The initiating Group name.
-- @field Wrapper.Group#GROUP IniGroup (UNIT) The initiating MOOSE wrapper @{Wrapper.Group#GROUP} of the initiator Group object.
-- @field #string IniGroupName UNIT) The initiating GROUP name (same as IniDCSGroupName).
-- @field DCS#Group IniDCSGroup (UNIT/GROUP) The initiating @{DCS#Group}.
-- @field #string IniDCSGroupName (UNIT/GROUP) The initiating Group name.
-- @field Wrapper.Group#GROUP IniGroup (UNIT/GROUP) The initiating MOOSE wrapper @{Wrapper.Group#GROUP} of the initiator Group object.
-- @field #string IniGroupName (UNIT/GROUP) The initiating GROUP name (same as IniDCSGroupName).
-- @field DCS#Group.Category IniGroupCategory (GROUP) The category of the initiating group.
-- @field #string IniPlayerName (UNIT) The name of the initiating player in case the Unit is a client or player slot.
-- @field #string IniPlayerUCID (UNIT) The UCID of the initiating player in case the Unit is a client or player slot and on a multi-player server.
-- @field DCS#coalition.side IniCoalition (UNIT) The coalition of the initiator.
-- @field DCS#coalition.side IniCoalition (UNIT/GROUP) The coalition of the initiator.
-- @field DCS#Unit.Category IniCategory (UNIT) The category of the initiator.
-- @field #string IniTypeName (UNIT) The type name of the initiator.
--
@@ -512,16 +511,6 @@ local _EVENTMETA = {
Event = "OnEventMarkRemoved",
Text = "S_EVENT_MARK_REMOVED"
},
[EVENTS.NewCargo] = {
Order = 1,
Event = "OnEventNewCargo",
Text = "S_EVENT_NEW_CARGO"
},
[EVENTS.DeleteCargo] = {
Order = 1,
Event = "OnEventDeleteCargo",
Text = "S_EVENT_DELETE_CARGO"
},
[EVENTS.NewZone] = {
Order = 1,
Event = "OnEventNewZone",
@@ -748,6 +737,12 @@ local _EVENTMETA = {
Side = "I",
Event = "OnEventHumanAircraftRepairFinish",
Text = "S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH"
},
[EVENTS.GroupChangeOption] = {
Order = 1,
Side = "I",
Event = "OnEventGroupChangeOption",
Text = "S_EVENT_GROUP_CHANGE_OPTION"
},
-- dynamic cargo
[EVENTS.NewDynamicCargo] = {
@@ -1248,7 +1243,16 @@ function EVENT:onEvent( Event )
if Event.initiator then
Event.IniObjectCategory = Object.getCategory(Event.initiator)
if Event.id == EVENTS.GroupChangeOption then
Event.IniDCSGroup = Event.initiator
Event.IniDCSGroupName = Group.getName(Event.initiator)
Event.IniGroupName = Event.IniDCSGroupName
Event.IniGroup = GROUP:FindByName(Event.IniDCSGroupName)
Event.IniCoalition = Group.getCoalition(Event.initiator)
Event.IniGroupCategory = Group.getCategory(Event.initiator)
else
Event.IniObjectCategory = Object.getCategory(Event.initiator)
end
if Event.IniObjectCategory == Object.Category.STATIC then
---
@@ -1336,7 +1340,6 @@ function EVENT:onEvent( Event )
Event.IniDynamicCargoName = Event.IniUnitName
Event.IniPlayerName = string.match(Event.IniUnitName,"^(.+)|%d%d:%d%d|PKG%d+")
else
--Event.IniUnit = CARGO:FindByName( Event.IniDCSUnitName )
Event.IniUnit = STATIC:FindByName( Event.IniDCSUnitName, false )
end
Event.IniCoalition = Event.IniDCSUnit:getCoalition()
@@ -1468,7 +1471,12 @@ function EVENT:onEvent( Event )
-- Weapon.
if Event.weapon and type(Event.weapon) == "table" and Event.weapon.isExist and Event.weapon:isExist() then
Event.Weapon = Event.weapon
Event.WeaponName = Event.weapon:isExist() and Event.weapon:getTypeName() or "Unknown Weapon"
if Event.weapon_name == "ZELL Booster" then
Event.WeaponName = "ZELL Booster"
else
Event.WeaponName = Event.weapon:isExist() and Event.weapon.getTypeName and Event.weapon:getTypeName() or "Unknown Weapon"
end
if Event.weapon_name == "ZELL Booster" then Event.WeaponName = "ZELL Booster" end
Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit!
Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon.getPlayerName and Event.Weapon:getPlayerName()
--Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon:getPlayerName()
@@ -1508,12 +1516,6 @@ function EVENT:onEvent( Event )
Event.MarkGroupID = Event.groupID
end
-- Cargo object.
if Event.cargo then
Event.Cargo = Event.cargo
Event.CargoName = Event.cargo.Name
end
-- Dynamic cargo Object
if Event.dynamiccargo then
Event.IniDynamicCargo = Event.dynamiccargo
@@ -1675,15 +1677,6 @@ function EVENT:onEvent( Event )
end
end
-- When cargo was deleted, it may probably be because of an S_EVENT_DEAD.
-- However, in the loading logic, an S_EVENT_DEAD is also generated after a Destroy() call.
-- And this is a problem because it will remove all entries from the SET_CARGOs.
-- To prevent this from happening, the Cargo object has a flag NoDestroy.
-- When true, the SET_CARGO won't Remove the Cargo object from the set.
-- But we need to switch that flag off after the event handlers have been called.
if Event.id == EVENTS.DeleteCargo then
Event.Cargo.NoDestroy = nil
end
else
self:T( { EventMeta.Text, Event } )
end
+10 -12
View File
@@ -45,12 +45,6 @@
-- By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes.
-- **Ready made FSM-based implementations classes** exist within the MOOSE framework that **can easily be re-used,
-- and tailored** by mission designers through **the implementation of Transition Handlers**.
-- Each of these FSM implementation classes start either with:
--
-- * an acronym **AI\_**, which indicates a FSM implementation directing **AI controlled** @{Wrapper.Group#GROUP} and/or @{Wrapper.Unit#UNIT}. These AI\_ classes derive the @{#FSM_CONTROLLABLE} class.
-- * an acronym **TASK\_**, which indicates a FSM implementation executing a @{Tasking.Task#TASK} executed by Groups of players. These TASK\_ classes derive the @{#FSM_TASK} class.
-- * an acronym **ACT\_**, which indicates an Sub-FSM implementation, directing **Humans actions** that need to be done in a @{Tasking.Task#TASK}, seated in a @{Wrapper.Client#CLIENT} (slot) or a @{Wrapper.Unit#UNIT} (CA join). These ACT\_ classes derive the @{#FSM_PROCESS} class.
--
-- Detailed explanations and API specifics are further below clarified and FSM derived class specifics are described in those class documentation sections.
--
-- ##__Disclaimer:__
@@ -61,7 +55,6 @@
--
-- The following derived classes are available in the MOOSE framework, that implement a specialized form of a FSM:
--
-- * @{#FSM_TASK}: Models Finite State Machines for @{Tasking.Task}s.
-- * @{#FSM_PROCESS}: Models Finite State Machines for @{Tasking.Task} actions, which control @{Wrapper.Client}s.
-- * @{#FSM_CONTROLLABLE}: Models Finite State Machines for @{Wrapper.Controllable}s, which are @{Wrapper.Group}s, @{Wrapper.Unit}s, @{Wrapper.Client}s.
-- * @{#FSM_SET}: Models Finite State Machines for @{Core.Set}s. Note that these FSMs control multiple objects!!! So State concerns here
@@ -118,11 +111,6 @@ do -- FSM
-- By efficiently utilizing the FSM class and derived classes, MOOSE allows mission designers to quickly build processes.
-- **Ready made FSM-based implementations classes** exist within the MOOSE framework that **can easily be re-used,
-- and tailored** by mission designers through **the implementation of Transition Handlers**.
-- Each of these FSM implementation classes start either with:
--
-- * an acronym **AI\_**, which indicates an FSM implementation directing **AI controlled** @{Wrapper.Group#GROUP} and/or @{Wrapper.Unit#UNIT}. These AI\_ classes derive the @{#FSM_CONTROLLABLE} class.
-- * an acronym **TASK\_**, which indicates an FSM implementation executing a @{Tasking.Task#TASK} executed by Groups of players. These TASK\_ classes derive the @{#FSM_TASK} class.
-- * an acronym **ACT\_**, which indicates an Sub-FSM implementation, directing **Humans actions** that need to be done in a @{Tasking.Task#TASK}, seated in a @{Wrapper.Client#CLIENT} (slot) or a @{Wrapper.Unit#UNIT} (CA join). These ACT\_ classes derive the @{#FSM_PROCESS} class.
--
-- ![Transition Rules and Transition Handlers and Event Triggers](..\Presentations\FSM\Dia3.JPG)
--
@@ -833,6 +821,16 @@ do -- FSM
return self._handler( self, EventName, ... )
end
end
--- Clear scheduled FSM event.
-- @param #FSM self
-- @param #string EventName Event name.
function FSM:_ClearFSMEvent( EventName )
if self._EventSchedules[EventName] then
self.CallScheduler:Remove( self._EventSchedules[EventName] )
self._EventSchedules[EventName]=nil
end
end
--- Go sub.
-- @param #FSM self
+14 -3
View File
@@ -869,10 +869,21 @@ do
local MenuTable = {}
for MenuText, Menu in pairs( self.Menus or {} ) do
local tag = Menu.MenuTag or math.random(1,10000)
MenuTable[#MenuTable+1] = {Tag=tag, Enty=Menu}
MenuTable[#MenuTable+1] = {Tag=tag, Entry=Menu}
end
table.sort(MenuTable, function (k1, k2) return k1.tag < k2.tag end )
for _, Menu in pairs( MenuTable ) do
local function SortTable(k1,k2)
if not k1 then
if not k2 then return true else return false end
elseif not k2 then
if not k1 then return true else return false end
else
return (k1.Tag or 15) <= (k2.Tag or 15)
end
return false
end
table.sort(MenuTable, SortTable)
--table.sort(MenuTable, function (k1, k2) return (k1.tag or 15) <= (k2.tag or 15) end )
for _, Menu in ipairs( MenuTable ) do
Menu.Entry:Refresh()
end
end
+45 -7
View File
@@ -198,10 +198,41 @@ function MESSAGE:ToClient( Client, Settings )
return self
end
--- Sends a MESSAGE to a SET_GROUP, SET_UNIT, or SET_CLIENT.
-- @param #MESSAGE self
-- @param Core.Set#SET_GROUP Set The set to send to.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @return self
function MESSAGE:ToSet(Set, Settings)
for _,_obj in pairs (Set:GetSetObjects() or {}) do
if _obj and _obj:IsAlive() then
if _obj:IsInstanceOf("SET_GROUP") then
self:ToGroup(_obj, Settings)
elseif _obj:IsInstanceOf("SET_CLIENT") or _obj:IsInstanceOf("SET_UNIT") then
self:ToUnit(_obj, Settings)
end
end
end
return self
end
--- Sends a MESSAGE to a SET_GROUP, SET_UNIT, or SET_CLIENT if a condition is true.
-- @param #MESSAGE self
-- @param Core.Set#SET_GROUP Set The set to send to.
-- @param #boolean Condition The condition which needs to be true.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @return self
function MESSAGE:ToSetIf(Set, Condition, Settings)
if Set and Condition == true then
self:ToSet(Set, Settings)
end
return self
end
--- Sends a MESSAGE to a Group.
-- @param #MESSAGE self
-- @param Wrapper.Group#GROUP Group to which the message is displayed.
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @return #MESSAGE Message object.
function MESSAGE:ToGroup( Group, Settings )
self:F( Group.GroupName )
@@ -226,7 +257,7 @@ end
--- Sends a MESSAGE to a Unit.
-- @param #MESSAGE self
-- @param Wrapper.Unit#UNIT Unit to which the message is displayed.
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @return #MESSAGE Message object.
function MESSAGE:ToUnit( Unit, Settings )
self:F( Unit.IdentifiableName )
@@ -252,7 +283,7 @@ end
--- Sends a MESSAGE to a Country.
-- @param #MESSAGE self
-- @param #number Country to which the message is displayed, e.g. country.id.GERMANY. For all country numbers see here: [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_country)
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @return #MESSAGE Message object.
function MESSAGE:ToCountry( Country, Settings )
self:F(Country )
@@ -274,7 +305,7 @@ end
-- @param #MESSAGE self
-- @param #number Country to which the message is displayed, , e.g. country.id.GERMANY. For all country numbers see here: [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_country)
-- @param #boolean Condition Sends the message only if the condition is true.
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @return #MESSAGE Message object.
function MESSAGE:ToCountryIf( Country, Condition, Settings )
self:F(Country )
@@ -379,7 +410,7 @@ end
--- Sends a MESSAGE to all players.
-- @param #MESSAGE self
-- @param Core.Settings#Settings Settings (Optional) Settings for message display.
-- @param Core.Settings#SETTINGS Settings (Optional) Settings for message display.
-- @param #number Delay (Optional) Delay in seconds before the message is send. Default instantly (`nil`).
-- @return #MESSAGE self
-- @usage
@@ -464,7 +495,9 @@ _MESSAGESRS = {}
-- @param #number Volume (optional) Volume, can be between 0.0 and 1.0 (loudest).
-- @param #string Label (optional) Label, defaults to "MESSAGE" or the Message Category set.
-- @param Core.Point#COORDINATE Coordinate (optional) Coordinate this messages originates from.
-- @param #string Backend (optional) Backend to be used, can be MSRS.Backend.SRSEXE or MSRS.Backend.GRPC
-- @param #string Backend (optional) Backend to be used, can be MSRS.Backend.SRSEXE or MSRS.Backend.GRPC or MSRS.Backend.HOUND etc
-- @param #string Provider (optional) Provider to be used, can be MSRS.Provider.WINDOWS or MSRS.Provider.GOOGLE or MSRS.Provider.PIPER etc
-- @param #string Speaker (optional) Speaker to be used. Only for select provider PIPER TTS Voices, requires HOUND backend.
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- -- Needed once only
@@ -472,7 +505,7 @@ _MESSAGESRS = {}
-- -- later on in your code
-- MESSAGE:New("Test message!",15,"SPAWN"):ToSRS()
--
function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,Gender,Culture,Voice,Coalition,Volume,Label,Coordinate,Backend)
function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,Gender,Culture,Voice,Coalition,Volume,Label,Coordinate,Backend,Provider,Speaker)
_MESSAGESRS.PathToSRS = PathToSRS or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
@@ -505,6 +538,10 @@ function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,G
_MESSAGESRS.MSRS:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
_MESSAGESRS.MSRS:SetProvider(Provider)
end
_MESSAGESRS.label = Label or MSRS.Label or "MESSAGE"
_MESSAGESRS.MSRS:SetLabel(_MESSAGESRS.label)
@@ -515,6 +552,7 @@ function MESSAGE.SetMSRS(PathToSRS,Port,PathToCredentials,Frequency,Modulation,G
_MESSAGESRS.MSRS:SetVolume(_MESSAGESRS.volume)
if Voice then _MESSAGESRS.MSRS:SetVoice(Voice) end
if Speaker then _MESSAGESRS.MSRS:SetSpeakerPiper(Speaker) end
_MESSAGESRS.voice = Voice or MSRS.voice --or MSRS.Voices.Microsoft.Hedda
+5 -5
View File
@@ -253,7 +253,7 @@ end
--- Get the n-th point of the pathline.
-- @param #PATHLINE self
-- @param #number n The index of the point. Default is the first point.
-- @param #number n (optional) The index of the point. Default is the first point.
-- @return #PATHLINE.Point Point.
function PATHLINE:GetPointFromIndex(n)
@@ -275,7 +275,7 @@ end
--- Get the 3D position of the n-th point.
-- @param #PATHLINE self
-- @param #number n The n-th point.
-- @return DCS#VEC3 Position in 3D.
-- @return DCS#Vec3 Position in 3D.
function PATHLINE:GetPoint3DFromIndex(n)
local point=self:GetPointFromIndex(n)
@@ -290,7 +290,7 @@ end
--- Get the 2D position of the n-th point.
-- @param #PATHLINE self
-- @param #number n The n-th point.
-- @return DCS#VEC2 Position in 3D.
-- @return DCS#Vec2 Position in 3D.
function PATHLINE:GetPoint2DFromIndex(n)
local point=self:GetPointFromIndex(n)
@@ -360,8 +360,8 @@ end
--- Draw line on F10 map.
-- @param #PATHLINE self
-- @param #number Recipient Recipent of the line: -1=All.
-- @param #table Color Color as RGB table plus alpha value. Default {1, 0, 0, 1.0}.
-- @param #number LineType Line type: 1=Solid (default).
-- @param #table Color (optional) Color as RGB table plus alpha value. Default {1, 0, 0, 1.0}.
-- @param #number LineType (optional) Line type: 1=Solid (default).
-- @return #PATHLINE self
function PATHLINE:DrawLine(Recipient, Color, LineType)
+175 -79
View File
@@ -471,6 +471,121 @@ do -- COORDINATE
return x - Precision <= self.x and x + Precision >= self.x and z - Precision <= self.z and z + Precision >= self.z
end
---
--Box volume scanning function matching MOOSE COORDINATE:ScanObjects() structure
--For use as COORDINATE:ScanObjectsSquare(sideLength, scanunits, scanstatics, scanscenery)
--Creates a cubic search volume with the COORDINATE as the lower-left (southwest) corner.
--Perfect for grid-based map scanning: increment X and Z by sideLength for next grid cell.
-- @param #COORDINATE self
-- @param #number radius (Optional) Scan radius in meters. Default 100 m.
-- @param #boolean scanunits (Optional) If true scan for units. Default true.
-- @param #boolean scanstatics (Optional) If true scan for static objects. Default true.
-- @param #boolean scanscenery (Optional) If true scan for scenery objects. Default false.
-- @return #boolean True if units were found.
-- @return #boolean True if statics were found.
-- @return #boolean True if scenery objects were found.
-- @return #table Table of MOOSE @{Wrapper.Unit#UNIT} objects found.
-- @return #table Table of DCS static objects found.
-- @return #table Table of DCS scenery objects found.
function COORDINATE:ScanObjectsSquare(sideLength, scanunits, scanstatics, scanscenery)
self:F(string.format("Scanning cube volume (lower-left corner) with side length %.1f m.", sideLength))
local CornerVec3 = self:GetVec3()
local CenterY = CornerVec3.y
local MinVec3 = {
x = CornerVec3.x,
y = CenterY - (sideLength / 2),
z = CornerVec3.z
}
local MaxVec3 = {
x = CornerVec3.x + sideLength,
y = CenterY + (sideLength / 2),
z = CornerVec3.z + sideLength
}
local BoxSearch = {
id = world.VolumeType.BOX,
params = {
min = MinVec3,
max = MaxVec3,
}
}
-- Defaults
if scanunits==nil then
scanunits=true
end
if scanstatics==nil then
scanstatics=true
end
if scanscenery==nil then
scanscenery=false
end
-- {Object.Category.UNIT, Object.Category.STATIC, Object.Category.SCENERY}
local scanobjects={}
if scanunits then
table.insert(scanobjects, Object.Category.UNIT)
end
if scanstatics then
table.insert(scanobjects, Object.Category.STATIC)
end
if scanscenery then
table.insert(scanobjects, Object.Category.SCENERY)
end
-- Found stuff.
local Units = {}
local Statics = {}
local Scenery = {}
local gotstatics=false
local gotunits=false
local gotscenery=false
local function EvaluateZone( ZoneObject )
if ZoneObject then
-- Get category of scanned object.
local ObjectCategory = ZoneObject:getCategory()
-- Check for unit or static objects
if (ObjectCategory == Object.Category.UNIT and ZoneObject:isExist()) then
table.insert(Units, ZoneObject)
gotunits=true
elseif (ObjectCategory == Object.Category.STATIC and ZoneObject:isExist()) then
table.insert(Statics, ZoneObject)
gotstatics=true
elseif ObjectCategory == Object.Category.SCENERY then
table.insert(Scenery, ZoneObject)
gotscenery=true
end
end
return true
end
-- Search the world.
world.searchObjects(scanobjects, BoxSearch, EvaluateZone)
for _,unit in pairs(Units) do
if not unit:isExist() then
gotunits=false
end
end
return gotunits, gotstatics, gotscenery, Units, Statics, Scenery
end
--- Scan/find objects (units, statics, scenery) within a certain radius around the coordinate using the world.searchObjects() DCS API function.
-- @param #COORDINATE self
-- @param #number radius (Optional) Scan radius in meters. Default 100 m.
@@ -610,7 +725,7 @@ do -- COORDINATE
--- Find the closest static to the COORDINATE within a certain radius.
-- @param #COORDINATE self
-- @param #number radius Scan radius in meters. Default 100 m.
-- @param #number radius (Optional) Scan radius in meters. Default 100 m.
-- @return Wrapper.Static#STATIC The closest static or #nil if no unit is inside the given radius.
function COORDINATE:FindClosestStatic(radius)
@@ -633,7 +748,7 @@ do -- COORDINATE
--- Find the closest unit to the COORDINATE within a certain radius.
-- @param #COORDINATE self
-- @param #number radius Scan radius in meters. Default 100 m.
-- @param #number radius (Optional) Scan radius in meters. Default 100 m.
-- @return Wrapper.Unit#UNIT The closest unit or #nil if no unit is inside the given radius.
function COORDINATE:FindClosestUnit(radius)
@@ -678,7 +793,7 @@ do -- COORDINATE
--- Find the closest scenery to the COORDINATE within a certain radius.
-- @param #COORDINATE self
-- @param #number radius Scan radius in meters. Default 100 m.
-- @param #number radius (Optional) Scan radius in meters. Default 100 m.
-- @return Wrapper.Scenery#SCENERY The closest scenery or #nil if no object is inside the given radius.
function COORDINATE:FindClosestScenery(radius)
@@ -716,8 +831,8 @@ do -- COORDINATE
--- Add a Distance in meters from the COORDINATE orthonormal plane, with the given angle, and calculate the new COORDINATE.
-- @param #COORDINATE self
-- @param DCS#Distance Distance The Distance to be added in meters.
-- @param DCS#Angle Angle The Angle in degrees. Defaults to 0 if not specified (nil).
-- @param #boolean Keepalt If true, keep altitude of original coordinate. Default is that the new coordinate is created at the translated land height.
-- @param DCS#Angle Angle (Optional) The Angle in degrees. Defaults to 0 if not specified (nil).
-- @param #boolean Keepalt (Optional) If true, keep altitude of original coordinate. Default is that the new coordinate is created at the translated land height.
-- @param #boolean Overwrite If true, overwrite the original COORDINATE with the translated one. Otherwise, create a new COORDINATE.
-- @return #COORDINATE The new calculated COORDINATE.
function COORDINATE:Translate( Distance, Angle, Keepalt, Overwrite )
@@ -958,7 +1073,7 @@ do -- COORDINATE
--- Return an intermediate COORDINATE between this an another coordinate.
-- @param #COORDINATE self
-- @param #COORDINATE ToCoordinate The other coordinate.
-- @param #number Fraction The fraction (0,1) where the new coordinate is created. Default 0.5, i.e. in the middle.
-- @param #number Fraction (Optional) The fraction (0,1) where the new coordinate is created. Default 0.5, i.e. in the middle.
-- @return #COORDINATE Coordinate between this and the other coordinate.
function COORDINATE:GetIntermediateCoordinate( ToCoordinate, Fraction )
@@ -1514,7 +1629,7 @@ do -- COORDINATE
-- @param Core.Settings#SETTINGS Settings
-- @param #string Language (Optional) Language "en" or "ru"
-- @param #boolean MagVar If true, also state angle in magnetic
-- @param #number Precision Rounding precision, defaults to 0
-- @param #number Precision (Optional) Rounding precision, defaults to 0
-- @return #string The BR Text
function COORDINATE:GetBRText( AngleRadians, Distance, Settings, Language, MagVar, Precision )
@@ -1555,7 +1670,7 @@ do -- COORDINATE
--- Set altitude.
-- @param #COORDINATE self
-- @param #number altitude New altitude in meters.
-- @param #boolean asl Altitude above sea level. Default is above ground level.
-- @param #boolean asl (Optional) Altitude above sea level. Default is above ground level.
-- @return #COORDINATE The COORDINATE with adjusted altitude.
function COORDINATE:SetAltitude(altitude, asl)
local alt=altitude
@@ -1581,7 +1696,7 @@ do -- COORDINATE
-- @param #COORDINATE.WaypointAltType AltType The altitude type.
-- @param #COORDINATE.WaypointType Type The route point type.
-- @param #COORDINATE.WaypointAction Action The route point action.
-- @param DCS#Speed Speed Airspeed in km/h. Default is 500 km/h.
-- @param DCS#Speed Speed (Optional) Airspeed in km/h. Default is 500 km/h.
-- @param #boolean SpeedLocked true means the speed is locked.
-- @param Wrapper.Airbase#AIRBASE airbase The airbase for takeoff and landing points.
-- @param #table DCSTasks A table of @{DCS#Task} items which are executed at the waypoint.
@@ -1741,7 +1856,7 @@ do -- COORDINATE
-- @param #COORDINATE self
-- @param DCS#Speed Speed Airspeed in km/h.
-- @param Wrapper.Airbase#AIRBASE airbase The airbase for takeoff and landing points.
-- @param #number timeReFuAr Time in minutes, the aircraft stays at the airbase. Default 10 min.
-- @param #number timeReFuAr (Optional) Time in minutes, the aircraft stays at the airbase. Default 10 min.
-- @param #table DCSTasks A table of @{DCS#Task} items which are executed at the waypoint.
-- @param #string description A text description of the waypoint, which will be shown on the F10 map.
-- @return #table The route point.
@@ -2148,7 +2263,7 @@ do -- COORDINATE
--- Creates an explosion at the point of a certain intensity.
-- @param #COORDINATE self
-- @param #number ExplosionIntensity Intensity of the explosion in kg TNT. Default 100 kg.
-- @param #number ExplosionIntensity (Optional) Intensity of the explosion in kg TNT. Default 100 kg.
-- @param #number Delay (Optional) Delay before explosion is triggered in seconds.
-- @return #COORDINATE self
function COORDINATE:Explosion( ExplosionIntensity, Delay )
@@ -2163,7 +2278,7 @@ do -- COORDINATE
--- Creates an illumination bomb at the point.
-- @param #COORDINATE self
-- @param #number Power Power of illumination bomb in Candela. Default 1000 cd.
-- @param #number Power (Optional) Power of illumination bomb in Candela. Default 1000 cd.
-- @param #number Delay (Optional) Delay before bomb is ignited in seconds.
-- @return #COORDINATE self
function COORDINATE:IlluminationBomb(Power, Delay)
@@ -2622,10 +2737,10 @@ do -- COORDINATE
-- Creates a line on the F10 map from one point to another.
-- @param #COORDINATE self
-- @param #COORDINATE Endpoint COORDINATE to where the line is drawn.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @param #string Text (Optional) Text displayed when mark is added. Default none.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
@@ -2646,13 +2761,13 @@ do -- COORDINATE
--- Circle to all.
-- Creates a circle on the map with a given radius, color, fill color, and outline.
-- @param #COORDINATE self
-- @param #number Radius Radius in meters. Default 1000 m.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha Transparency [0,1]. Default 0.15.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Radius (Optional) Radius in meters. Default 1000 m.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @param #string Text (Optional) Text displayed when mark is added. Default none.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
@@ -2686,12 +2801,12 @@ do -- COORDINATE
-- Creates a line on the F10 map from one point to another.
-- @param #COORDINATE self
-- @param #COORDINATE Endpoint COORDINATE in the opposite corner.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha Transparency [0,1]. Default 0.15.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @param #string Text (Optional) Text displayed when mark is added. Default none.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
@@ -2722,12 +2837,12 @@ do -- COORDINATE
-- @param #COORDINATE Coord2 Second COORDINATE of the quad shape.
-- @param #COORDINATE Coord3 Third COORDINATE of the quad shape.
-- @param #COORDINATE Coord4 Fourth COORDINATE of the quad shape.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha Transparency [0,1]. Default 0.15.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @param #string Text (Optional) Text displayed when mark is added. Default none.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
@@ -2759,12 +2874,12 @@ do -- COORDINATE
--- Creates a free form shape on the F10 map. The first point is the current COORDINATE. The remaining points need to be specified.
-- @param #COORDINATE self
-- @param #table Coordinates Table of coordinates of the remaining points of the shape.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha Transparency [0,1]. Default 0.15.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @param #string Text (Optional) Text displayed when mark is added. Default none.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
@@ -2865,12 +2980,12 @@ do -- COORDINATE
--- Text to all. Creates a text imposed on the map at the COORDINATE. Text scales with the map.
-- @param #COORDINATE self
-- @param #string Text Text displayed on the F10 map.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha Transparency [0,1]. Default 0.3.
-- @param #number FontSize Font size. Default 14.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.3.
-- @param #number FontSize (Optional) Font size. Default 14.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
function COORDINATE:TextToAll(Text, Coalition, Color, Alpha, FillColor, FillAlpha, FontSize, ReadOnly)
@@ -2895,12 +3010,12 @@ do -- COORDINATE
--- Arrow to all. Creates an arrow from the COORDINATE to the endpoint COORDINATE on the F10 map. There is no control over other dimensions of the arrow.
-- @param #COORDINATE self
-- @param #COORDINATE Endpoint COORDINATE where the tip of the arrow is pointing at.
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha Transparency [0,1]. Default 0.15.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red (default).
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @param #string Text (Optional) Text displayed when mark is added. Default none.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
@@ -2930,7 +3045,7 @@ do -- COORDINATE
--- Returns if a Coordinate has Line of Sight (LOS) with the ToCoordinate.
-- @param #COORDINATE self
-- @param #COORDINATE ToCoordinate
-- @param #number Offset Height offset in meters. Default 2 m.
-- @param #number Offset (Optional) Height offset in meters. Default 2 m.
-- @return #boolean true If the ToCoordinate has LOS with the Coordinate, otherwise false.
function COORDINATE:IsLOS( ToCoordinate, Offset )
@@ -3286,13 +3401,13 @@ do -- COORDINATE
-- @param #COORDINATE FromCoordinate The coordinate to measure the distance and the bearing from.
-- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
-- @param #boolean MagVar If true, also get angle in MagVar for BR/BRA
-- @param #number Precision Rounding precision, currently full km as default (=0)
-- @param #number Precision (Optional) Rounding precision, currently full km as default (=0)
-- @return #string The BR text.
function COORDINATE:ToStringBR( FromCoordinate, Settings, MagVar, Precision )
local DirectionVec3 = FromCoordinate:GetDirectionVec3( self )
local AngleRadians = self:GetAngleRadians( DirectionVec3 )
local Distance = self:Get2DDistance( FromCoordinate )
return "BR, " .. self:GetBRText( AngleRadians, Distance, Settings, nil, MagVar, Precision )
return "BR " .. self:GetBRText( AngleRadians, Distance, Settings, nil, MagVar, Precision )
end
--- Return a Bearing string from a COORDINATE to the (self) COORDINATE.
@@ -3300,7 +3415,7 @@ do -- COORDINATE
-- @param #COORDINATE FromCoordinate The coordinate to measure the distance and the bearing from.
-- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
-- @param #boolean MagVar If true, also get angle in MagVar for BR/BRA
-- @param #number Precision Rounding precision, currently full km as default (=0)
-- @param #number Precision (Optional) Rounding precision, currently full km as default (=0)
-- @return #string The BR text.
function COORDINATE:ToStringBearing( FromCoordinate, Settings, MagVar, Precision )
local DirectionVec3 = FromCoordinate:GetDirectionVec3( self )
@@ -3714,8 +3829,8 @@ do -- COORDINATE
-- * Uses default settings in COORDINATE.
-- * Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
-- @param #COORDINATE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable The controllable to retrieve the settings from, otherwise the default settings will be chosen.
-- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
-- @param Wrapper.Controllable#CONTROLLABLE Controllable (Optional) The controllable to retrieve the settings from, otherwise the default settings will be chosen.
-- @param Core.Settings#SETTINGS Settings (Optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
-- @return #string The coordinate Text in the configured coordinate system.
function COORDINATE:ToString( Controllable, Settings )
@@ -3725,25 +3840,6 @@ do -- COORDINATE
local ModeA2A = nil
--[[
if Task then
if Task:IsInstanceOf( TASK_A2A ) then
ModeA2A = true
else
if Task:IsInstanceOf( TASK_A2G ) then
ModeA2A = false
else
if Task:IsInstanceOf( TASK_CARGO ) then
ModeA2A = false
end
if Task:IsInstanceOf( TASK_CAPTURE_ZONE ) then
ModeA2A = false
end
end
end
end
--]]
if ModeA2A == nil then
local IsAir = Controllable and ( Controllable:IsAirPlane() or Controllable:IsHelicopter() ) or false
if IsAir then
@@ -3769,7 +3865,7 @@ do -- COORDINATE
-- * Can be overridden if for a GROUP containing x clients, a menu was selected to override the default.
-- @param #COORDINATE self
-- @param Wrapper.Controllable#CONTROLLABLE Controllable
-- @param Core.Settings#SETTINGS Settings (optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
-- @param Core.Settings#SETTINGS Settings (Optional) The settings. Can be nil, and in this case the default settings are used. If you want to specify your own settings, use the _SETTINGS object.
-- @return #string The pressure text in the configured measurement system.
function COORDINATE:ToStringPressure( Controllable, Settings )
@@ -375,3 +375,13 @@ function SCHEDULEDISPATCHER:NoTrace( Scheduler )
Scheduler.ShowTrace = false
end
--- Helper for memory cleanup for self stopping schedulers
-- @param #SCHEDULEDISPATCHER self
-- @param Core.Scheduler#SCHEDULER Scheduler Scheduler object.
-- @param #string CallID (Optional) Scheduler Call ID.
function SCHEDULEDISPATCHER:_Reclaim( Scheduler, CallID )
self:Stop( Scheduler, CallID ) -- remove DCS timer, nil ScheduleID
if self.Schedule[Scheduler] then self.Schedule[Scheduler][CallID] = nil end
self.ObjectSchedulers[CallID] = nil
self.PersistentSchedulers[CallID] = nil
end
+1 -1
View File
@@ -231,7 +231,7 @@ end
-- @param #number Repeat Specifies the time interval in seconds when the scheduler will call the event function.
-- @param #number RandomizeFactor Specifies a randomization factor between 0 and 1 to randomize the Repeat.
-- @param #number Stop Time interval in seconds after which the scheduler will be stopped.
-- @param #number TraceLevel Trace level [0,3]. Default 3.
-- @param #number TraceLevel (Optional) Trace level [0,3]. Default 3.
-- @param Core.Fsm#FSM Fsm Finite state model.
-- @return #string The Schedule ID of the planned schedule.
function SCHEDULER:Schedule( MasterObject, SchedulerFunction, SchedulerArguments, Start, Repeat, RandomizeFactor, Stop, TraceLevel, Fsm )
File diff suppressed because it is too large Load Diff
+127 -38
View File
@@ -802,7 +802,7 @@ end
--- [Airplane - F15/16/18/AWACS/B1B/Tanker only] Set the STN Link16 starting number of the Group; each unit of the spawned group will have a consecutive STN set.
-- @param #SPAWN self
-- @param #number Octal The octal number (digits 1..7, max 5 digits, i.e. 1..77777) to set the STN to. Every STN needs to be unique!
-- @param #number Octal The octal number (digits 0..7, max 5 digits, i.e. 1..77777, cannot be zero) to set the STN to. Every STN needs to be unique!
-- @return #SPAWN self
function SPAWN:InitSTN(Octal)
--self:F( { Octal = Octal } )
@@ -820,7 +820,7 @@ end
--- [Airplane - A10-C II only] Set the SADL TN starting number of the Group; each unit of the spawned group will have a consecutive SADL set.
-- @param #SPAWN self
-- @param #number Octal The octal number (digits 1..7, max 4 digits, i.e. 1..7777) to set the SADL to. Every SADL needs to be unique!
-- @param #number Octal The octal number (digits 0..7, max 4 digits, i.e. 1..7777, cannot be zero) to set the SADL to. Every SADL needs to be unique!
-- @return #SPAWN self
function SPAWN:InitSADL(Octal)
--self:F( { Octal = Octal } )
@@ -1184,6 +1184,7 @@ end
--- This method provides the functionality to randomize the spawning of the Groups at a given list of zones of different types.
-- @param #SPAWN self
-- @param #table SpawnZoneTable A table with @{Core.Zone} objects. If nil or empty, the method returns self without effect.
-- @param #table SpawnZoneTable A table with @{Core.Zone} objects. If this table is given, then each spawn will be executed within the given list of @{Core.Zone}s objects.
-- @param #boolean RandomizePositionInZone If nil or true, also the position inside the selected random zone will be randomized. Set to false to use the center of the zone.
-- @return #SPAWN self
@@ -1201,6 +1202,9 @@ end
function SPAWN:InitRandomizeZones( SpawnZoneTable, RandomizePositionInZone )
--self:F( { self.SpawnTemplatePrefix, SpawnZoneTable } )
if not SpawnZoneTable then
return self
end
local temptable = {}
for _,_temp in pairs(SpawnZoneTable) do
temptable[#temptable+1] = _temp
@@ -1241,6 +1245,16 @@ function SPAWN:InitCallSign(ID,Name,Minor,Major)
return self
end
--- [RED AIR only!] This method sets a specific callsign for a spawned group.
-- @param #SPAWN self
-- @param #number ID The number with which to start for the first unit, e.g. 100, further units would then be 101, 102 .. etc.
-- @return #SPAWN self
function SPAWN:InitCallSignRed(ID)
self.SpawnInitCallSign = true
self.SpawnInitCallSignID = ID or 100
self.SpawnInitCallSignRED = true
end
--- This method sets a spawn position for the group that is different from the location of the template.
-- @param #SPAWN self
-- @param Core.Point#COORDINATE Coordinate The position to spawn from
@@ -1295,7 +1309,7 @@ end
--- Respawn group after landing.
-- @param #SPAWN self
-- @param #number WaitingTime Wait this many seconds before despawning the alive group after landing. Defaults to 3 .
-- @param #number WaitingTime (Optional) Wait this many seconds before despawning the alive group after landing. Defaults to 3 .
-- @return #SPAWN self
-- @usage
--
@@ -1601,7 +1615,7 @@ end
-- This method can be used to "reset" the spawn counter to a specific index number.
-- This will actually enable a respawn of groups from the specific index.
-- @param #SPAWN self
-- @param #string SpawnIndex The index of the group from where the spawning will start again. The default value would be 0, which means a complete reset of the spawnindex.
-- @param #string SpawnIndex (Optional) The index of the group from where the spawning will start again. The default value would be 0, which means a complete reset of the spawnindex.
-- @return #SPAWN self
function SPAWN:SetSpawnIndex( SpawnIndex )
self.SpawnIndex = SpawnIndex or 0
@@ -2139,6 +2153,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
local parkingspots = {}
local parkingindex = {}
local spots
local useexplicitspots = false
-- Spawn happens on ground, i.e. at an airbase, a FARP or a ship.
if spawnonground and not SpawnTemplate.parked then
@@ -2168,15 +2183,41 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
local scanscenery = false
local verysafe = false
-- Use exact parking data when provided, otherwise let helicopters on ships/FARPs
-- use the smarter parking search before falling back to the procedural queue path.
-- Number of free parking spots at the airbase.
if autoparking then
if Parkingdata~=nil then
-- Parking data explicitly set by user as input parameter.
nfree = #Parkingdata
spots = Parkingdata
useexplicitspots = true
elseif autoparking and AirbaseCategory == Airbase.Category.HELIPAD and ishelo then
if termtype == nil then
-- Helo is spawned. Try exclusive helo spots first.
spots = SpawnAirbase:FindFreeParkingSpotForAircraft( group, AIRBASE.TerminalType.HelicopterOnly, scanradius, scanunits, scanstatics, scanscenery, verysafe, nunits, nil )
nfree = #spots
if nfree < nunits then
-- Not enough helo ports. Let's try also other terminal types.
spots = SpawnAirbase:FindFreeParkingSpotForAircraft( group, AIRBASE.TerminalType.HelicopterUsable, scanradius, scanunits, scanstatics, scanscenery, verysafe, nunits, nil )
nfree = #spots
end
else
-- Terminal type explicitly given.
spots = SpawnAirbase:FindFreeParkingSpotForAircraft( group, termtype, scanradius, scanunits, scanstatics, scanscenery, verysafe, nunits, nil )
nfree = #spots
end
if nfree >= nunits then
useexplicitspots = true
else
-- These places work procedural and have some kind of build in queue ==> Less effort.
nfree = SpawnAirbase:GetFreeParkingSpotsNumber( termtype, true )
spots = SpawnAirbase:GetFreeParkingSpotsTable( termtype, true )
end
elseif autoparking then
-- These places work procedural and have some kind of build in queue ==> Less effort.
nfree = SpawnAirbase:GetFreeParkingSpotsNumber( termtype, true )
spots = SpawnAirbase:GetFreeParkingSpotsTable( termtype, true )
elseif Parkingdata~=nil then
-- Parking data explicitly set by user as input parameter. (This was commented out for some unknown reason. But I need it this way.)
nfree=#Parkingdata
spots=Parkingdata
else
if ishelo then
if termtype == nil then
@@ -2228,7 +2269,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
local _notenough = false
-- Need to differentiate some cases again.
if autoparking then
if autoparking and not useexplicitspots then
-- On free spot required in these cases.
if nfree >= 1 then
@@ -2261,6 +2302,10 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
end
end
if useexplicitspots and parkingspots[1] then
PointVec3 = parkingspots[1]
end
-- Not enough spots ==> Prepare airstart.
if _notenough then
@@ -2285,9 +2330,16 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
end
Takeoff = GROUP.Takeoff.Air
else
spawnonground = false
else
if not Takeoff == GROUP.Takeoff.Runway then
self:E( string.format( "WARNING: Group %s has no parking spots at %s ==> No emergency air start or uncontrolled spawning ==> No spawn!", self.SpawnTemplatePrefix, SpawnAirbase:GetName() ) )
return nil
else
Takeoff = GROUP.Takeoff.Runway
spawnonground = false
self:E( string.format( "WARNING: Group %s set to runway spawning at %s, this only works in Single Player!", self.SpawnTemplatePrefix, SpawnAirbase:GetName() ) )
end
end
end
@@ -2328,7 +2380,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
if spawnonground then
-- Ships and FARPS seem to have a build in queue.
if autoparking then
if autoparking and not useexplicitspots then
-- Spawn on ship. We take only the position of the ship.
SpawnTemplate.units[UnitID].x = PointVec3.x -- TX
@@ -2346,7 +2398,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
else
-- Spawn in air as requested initially. Original template orientation is perserved, altitude is already correctly set.
-- Spawn in air as requested initially. Original template orientation is preserved, altitude is already correctly set.
SpawnTemplate.units[UnitID].x = TX
SpawnTemplate.units[UnitID].y = TY
SpawnTemplate.units[UnitID].alt = PointVec3.y
@@ -2379,7 +2431,7 @@ function SPAWN:SpawnAtAirbase( SpawnAirbase, Takeoff, TakeoffAltitude, TerminalT
if Takeoff == GROUP.Takeoff.Air then
for UnitID, UnitSpawned in pairs( GroupSpawned:GetUnits() ) do
--SCHEDULER:New( nil, BASE.CreateEventTakeoff, { GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject() }, 5 ) --No need to create a new SCHEDULER instance every time!
self:ScheduleOnce(5, BASE.CreateEventTakeoff, {GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject()})
self:ScheduleOnce(5, BASE.CreateEventTakeoff, GroupSpawned, timer.getTime(), UnitSpawned:GetDCSObject())
end
end
@@ -2571,21 +2623,51 @@ function SPAWN:ParkAircraft( SpawnAirbase, TerminalType, Parkingdata, SpawnIndex
local scanscenery = false
local verysafe = false
-- Number of free parking spots at the airbase.
if spawnonship or spawnonfarp or spawnonrunway then
-- These places work procedural and have some kind of build in queue ==> Less effort.
--self:T2( string.format( "Group %s is spawned on farp/ship/runway %s.", self.SpawnTemplatePrefix, SpawnAirbase:GetName() ) )
nfree = SpawnAirbase:GetFreeParkingSpotsNumber( termtype, true )
spots = SpawnAirbase:GetFreeParkingSpotsTable( termtype, true )
--[[
elseif Parkingdata~=nil then
-- Parking data explicitly set by user as input parameter.
nfree=#Parkingdata
spots=Parkingdata
]]
else
if ishelo then
-- Use exact parking data when provided, otherwise let helicopters on FARPs
-- use the smarter parking search before falling back to the procedural queue path.
local useexplicitspots = false
-- Number of free parking spots at the airbase.
if Parkingdata~=nil then
-- Parking data explicitly set by user as input parameter.
nfree = #Parkingdata
spots = Parkingdata
useexplicitspots = true
elseif spawnonfarp and ishelo then
if termtype == nil then
-- Helo is spawned. Try exclusive helo spots first.
--self:T2( string.format( "Helo group %s is at %s using terminal type %d.", self.SpawnTemplatePrefix, SpawnAirbase:GetName(), AIRBASE.TerminalType.HelicopterOnly ) )
spots = SpawnAirbase:FindFreeParkingSpotForAircraft( TemplateGroup, AIRBASE.TerminalType.HelicopterOnly, scanradius, scanunits, scanstatics, scanscenery, verysafe, nunits, nil )
nfree = #spots
if nfree < nunits then
-- Not enough helo ports. Let's try also other terminal types.
--self:T2( string.format( "Helo group %s is at %s using terminal type %d.", self.SpawnTemplatePrefix, SpawnAirbase:GetName(), AIRBASE.TerminalType.HelicopterUsable ) )
spots = SpawnAirbase:FindFreeParkingSpotForAircraft( TemplateGroup, AIRBASE.TerminalType.HelicopterUsable, scanradius, scanunits, scanstatics, scanscenery, verysafe, nunits, nil )
nfree = #spots
end
else
-- Terminal type explicitly given.
--self:T2( string.format( "Helo group %s is at %s using terminal type %d.", self.SpawnTemplatePrefix, SpawnAirbase:GetName(), termtype ) )
spots = SpawnAirbase:FindFreeParkingSpotForAircraft( TemplateGroup, termtype, scanradius, scanunits, scanstatics, scanscenery, verysafe, nunits, nil )
nfree = #spots
end
if nfree >= nunits then
useexplicitspots = true
else
-- These places work procedural and have some kind of build in queue ==> Less effort.
--self:T2( string.format( "Group %s is spawned on farp %s using procedural spots.", self.SpawnTemplatePrefix, SpawnAirbase:GetName() ) )
nfree = SpawnAirbase:GetFreeParkingSpotsNumber( termtype, true )
spots = SpawnAirbase:GetFreeParkingSpotsTable( termtype, true )
end
elseif spawnonship or spawnonfarp or spawnonrunway then
-- These places work procedural and have some kind of build in queue ==> Less effort.
--self:T2( string.format( "Group %s is spawned on farp/ship/runway %s.", self.SpawnTemplatePrefix, SpawnAirbase:GetName() ) )
nfree = SpawnAirbase:GetFreeParkingSpotsNumber( termtype, true )
spots = SpawnAirbase:GetFreeParkingSpotsTable( termtype, true )
else
if ishelo then
if termtype == nil then
-- Helo is spawned. Try exclusive helo spots first.
--self:T2( string.format( "Helo group %s is at %s using terminal type %d.", self.SpawnTemplatePrefix, SpawnAirbase:GetName(), AIRBASE.TerminalType.HelicopterOnly ) )
spots = SpawnAirbase:FindFreeParkingSpotForAircraft( TemplateGroup, AIRBASE.TerminalType.HelicopterOnly, scanradius, scanunits, scanstatics, scanscenery, verysafe, nunits, Parkingdata )
@@ -2648,7 +2730,7 @@ function SPAWN:ParkAircraft( SpawnAirbase, TerminalType, Parkingdata, SpawnIndex
local _notenough = false
-- Need to differentiate some cases again.
if spawnonship or spawnonfarp or spawnonrunway then
if (spawnonship or spawnonfarp or spawnonrunway) and not useexplicitspots then
-- On free spot required in these cases.
if nfree >= 1 then
@@ -3549,14 +3631,21 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex ) -- R2.2
end
if self.SpawnInitCallSign then
for UnitID = 1, #SpawnTemplate.units do
local Callsign = SpawnTemplate.units[UnitID].callsign
if Callsign and type( Callsign ) ~= "number" then
SpawnTemplate.units[UnitID].callsign[1] = self.SpawnInitCallSignID
SpawnTemplate.units[UnitID].callsign[2] = self.SpawnInitCallSignMinor
SpawnTemplate.units[UnitID].callsign[3] = self.SpawnInitCallSignMajor
SpawnTemplate.units[UnitID].callsign["name"] = string.format("%s%d%d",self.SpawnInitCallSignName,self.SpawnInitCallSignMinor,self.SpawnInitCallSignMajor)
--UTILS.PrintTableToLog(SpawnTemplate.units[UnitID].callsign,1)
if self.SpawnInitCallSignRED == true then
for UnitID = 1, #SpawnTemplate.units do
SpawnTemplate.units[UnitID].callsign = self.SpawnInitCallSignID
self.SpawnInitCallSignID = self.SpawnInitCallSignID + 1
end
else
for UnitID = 1, #SpawnTemplate.units do
local Callsign = SpawnTemplate.units[UnitID].callsign
if Callsign and type( Callsign ) ~= "number" then
SpawnTemplate.units[UnitID].callsign[1] = self.SpawnInitCallSignID
SpawnTemplate.units[UnitID].callsign[2] = self.SpawnInitCallSignMinor
SpawnTemplate.units[UnitID].callsign[3] = self.SpawnInitCallSignMajor
SpawnTemplate.units[UnitID].callsign["name"] = string.format("%s%d%d",self.SpawnInitCallSignName,self.SpawnInitCallSignMinor,self.SpawnInitCallSignMajor)
--UTILS.PrintTableToLog(SpawnTemplate.units[UnitID].callsign,1)
end
end
end
end
@@ -3572,7 +3661,7 @@ function SPAWN:_Prepare( SpawnTemplatePrefix, SpawnIndex ) -- R2.2
local CallsignLen = CallsignName:len()
SpawnTemplate.units[UnitID].callsign[2] = UnitID
SpawnTemplate.units[UnitID].callsign["name"] = CallsignName:sub( 1, CallsignLen ) .. SpawnTemplate.units[UnitID].callsign[2] .. SpawnTemplate.units[UnitID].callsign[3]
elseif type( Callsign ) == "number" then
elseif type( Callsign ) == "number" and self.SpawnInitCallSignRED ~= true then
SpawnTemplate.units[UnitID].callsign = Callsign + SpawnIndex
end
end
+6 -6
View File
@@ -162,7 +162,7 @@ end
--- Creates the main object to spawn a @{Wrapper.Static} given a template table.
-- @param #SPAWNSTATIC self
-- @param #table SpawnTemplate Template used for spawning.
-- @param DCS#country.id CountryID The ID of the country. Default `country.id.USA`.
-- @param DCS#country.id CountryID (Optional) The ID of the country. Default `country.id.USA`.
-- @return #SPAWNSTATIC self
function SPAWNSTATIC:NewFromTemplate(SpawnTemplate, CountryID)
@@ -180,7 +180,7 @@ end
-- @param #SPAWNSTATIC self
-- @param #string StaticType Type of the static.
-- @param #string StaticCategory Category of the static, e.g. "Planes".
-- @param DCS#country.id CountryID The ID of the country. Default `country.id.USA`.
-- @param DCS#country.id CountryID (Optional) The ID of the country. Default `country.id.USA`.
-- @return #SPAWNSTATIC self
function SPAWNSTATIC:NewFromType(StaticType, StaticCategory, CountryID)
@@ -201,7 +201,7 @@ end
--- (Internal/Cargo) Init the resource table for STATIC object that should be spawned containing storage objects.
-- NOTE that you have to init many other parameters as the resources.
-- @param #SPAWNSTATIC self
-- @param #number CombinedWeight The weight this cargo object should have (some have fixed weights!), defaults to 1kg.
-- @param #number CombinedWeight (Optional) The weight this cargo object should have (some have fixed weights!), defaults to 1kg.
-- @return #SPAWNSTATIC self
function SPAWNSTATIC:_InitResourceTable(CombinedWeight)
if not self.TemplateStaticUnit.resourcePayload then
@@ -300,9 +300,9 @@ end
--- Initialize parameters for spawning FARPs.
-- @param #SPAWNSTATIC self
-- @param #number CallsignID Callsign ID. Default 1 (="London").
-- @param #number Frequency Frequency in MHz. Default 127.5 MHz.
-- @param #number Modulation Modulation 0=AM, 1=FM.
-- @param #number CallsignID (Optional) Callsign ID. Default 1 (="London").
-- @param #number Frequency (Optional) Frequency in MHz. Default 127.5 MHz.
-- @param #number Modulation (Optional) Modulation 0=AM, 1=FM. Defaults to 0
-- @param #boolean DynamicSpawns If true, allow Dynamic Spawns
-- @param #boolean DynamicHotStarts If true, and DynamicSpawns is true, then allow Dynamic Spawns with hot starts.
-- @return #SPAWNSTATIC self
+1 -1
View File
@@ -388,7 +388,7 @@ do
--- Set laser start position relative to the lasing unit.
-- @param #SPOT self
-- @param #table position Start position of the laser relative to the lasing unit. Default is { x = 0, y = 2, z = 0 }
-- @param #table position (Optional) Start position of the laser relative to the lasing unit. Default is { x = 0, y = 2, z = 0 }
-- @return #SPOT self
-- @usage
-- -- Set lasing position to be the position of the optics of the Gazelle M:
+20 -20
View File
@@ -583,7 +583,7 @@ end
--- Return an intermediate VECTOR between this and another given vector.
-- @param #VECTOR self
-- @param #VECTOR Vector The destination vector.
-- @param #number Fraction The fraction (0,1) where the new vector is created. Default 0.5, *i.e.* in the middle.
-- @param #number Fraction (Optional) The fraction (0,1) where the new vector is created. Default 0.5, *i.e.* in the middle.
-- @return #VECTOR Vector between this and the other vector.
function VECTOR:GetIntermediateVector(Vector, Fraction)
@@ -625,7 +625,7 @@ end
--- Set x-component of vector. The x-axis points to the North.
-- @param #VECTOR self
-- @param #number x Value of x. Default 0.
-- @param #number x (Optional) Value of x. Default 0.
-- @return #VECTOR self
function VECTOR:SetX(x)
self.x=x or 0
@@ -634,7 +634,7 @@ end
--- Set y-component of vector. The y-axis points to the upwards and describes the altitude above mean sea level.
-- @param #VECTOR self
-- @param #number y Value of y. Default land/surface height at this point.
-- @param #number y (Optional) Value of y. Default land/surface height at this point.
-- @return #VECTOR self
function VECTOR:SetY(y)
@@ -647,7 +647,7 @@ end
--- Set z-component of vector. The z-axis points to the East.
-- @param #VECTOR self
-- @param #number z Value of z. Default 0.
-- @param #number z (Optional) Value of z. Default 0.
-- @return #VECTOR self
function VECTOR:SetZ(z)
self.z=z or 0
@@ -783,8 +783,8 @@ end
--- Translate the vector by a given distance and angle.
-- @param #VECTOR self
-- @param #number Distance Distance in meters. Default 1000 meters.
-- @param #number Heading Heading angle in degrees. Default 0° = North.
-- @param #number Distance (Optional) Distance in meters. Default 1000 meters.
-- @param #number Heading (Optional) Heading angle in degrees. Default 0° = North.
-- @param #boolean Copy Create a copy of the VECTOR so the original stays unchanged.
-- @return #VECTOR The translated vector or a copy of it.
function VECTOR:Translate(Distance, Heading, Copy)
@@ -807,7 +807,7 @@ end
--- Rotate the VECTOR clockwise in the 2D (x,z) plane.
-- @param #VECTOR self
-- @param #number Angle Rotation angle in degrees). Default 0.
-- @param #number Angle (Optional) Rotation angle in degrees). Default 0.
-- @param #boolean Copy Create a copy of the VECTOR so the original stays unchanged.
-- @return #VECTOR The translated vector or a copy of it.
function VECTOR:Rotate2D(Angle, Copy)
@@ -1001,7 +1001,7 @@ end
--- Returns an intercept point at which a ray drawn from the this vector in the passed normalized direction for a specified distance.
-- @param #VECTOR self
-- @param DCS#Vec3 DirectionVector Directional vector.
-- @param #number Distance Distance in meters. Default 1000 m.
-- @param #number Distance (Optional) Distance in meters. Default 1000 m.
-- @return #VECTOR Intercept vector. Can be `nil` if no intercept point is found.
function VECTOR:GetInterceptPoint(DirectionVector, Distance)
@@ -1080,7 +1080,7 @@ end
--- Creates a smoke at this vector.
-- @param #VECTOR self
-- @param #number Color Color of the smoke: 0=Green, 1=Red, 2=White, 3=Orange, 4=Blue. Default 0.
-- @param #number Color (Optional) Color of the smoke: 0=Green, 1=Red, 2=White, 3=Orange, 4=Blue. Default 0.
-- @param #number Duration (Optional) Duration of the smoke in seconds. Default nil.
-- @return #string Name of the smoke object. Can be used to stop it.
function VECTOR:Smoke(Color, Duration)
@@ -1115,8 +1115,8 @@ end
-- * 8 = huge smoke
--
-- @param #VECTOR self
-- @param #number Preset Preset of smoke. Default `BIGSMOKEPRESET.LargeSmokeAndFire`.
-- @param #number Density Density between [0,1]. Default 0.5.
-- @param #number Preset (Optional) Preset of smoke. Default `BIGSMOKEPRESET.LargeSmokeAndFire`.
-- @param #number Density (Optional) Density between [0,1]. Default 0.5.
-- @param #number Duration (Optional) Duration of the smoke and fire in seconds.
-- @return #string Name of the smoke. Can be used to stop it.
function VECTOR:SmokeAndFire(Preset, Density, Duration)
@@ -1161,7 +1161,7 @@ end
--- Creates an illumination bomb at the specified point.
-- @param #VECTOR self
-- @param #number Power The power in Candela (cd). Should be between 1 and 1000000. Default 1000 cd.
-- @param #number Power (Optional) The power in Candela (cd). Should be between 1 and 1000000. Default 1000 cd.
-- @param #number Altitude (Optional) Altitude [m] at which the illumination bomb is created.
-- @return #VECTOR self
function VECTOR:IlluminationBomb(Power, Altitude)
@@ -1180,7 +1180,7 @@ end
--- Creates an explosion at a given point at the specified power.
-- @param #VECTOR self
-- @param #number Power The power in kg TNT. Default 100 kg.
-- @param #number Power (Optional) The power in kg TNT. Default 100 kg.
-- @return #VECTOR self
function VECTOR:Explosion(Power)
@@ -1193,8 +1193,8 @@ end
--- Creates a signal flare at the given point in the specified color. The flare will be launched in the direction of the azimuth angle.
-- @param #VECTOR self
-- @param #number Color Color of flare. Default Green.
-- @param #number Azimuth Azimuth angle in degrees. Default 0.
-- @param #number Color (Optional) Color of flare. Default Green.
-- @param #number Azimuth (Optional) Azimuth angle in degrees. Default 0.
-- @return #VECTOR self
function VECTOR:Flare(Color, Azimuth)
@@ -1209,10 +1209,10 @@ end
--- Creates a arrow from this VECTOR to another vector on the F10 map.
-- @param #VECTOR self
-- @param #VECTOR Vector The vector defining the endpoint.
-- @param #number Coalition Coalition Id: -1=All, 0=Neutral, 1=Red, 2=Blue. Default -1.
-- @param #table Color RGB color with alpha {r, g, b, alpha}. Default {1, 0, 0, 0.7}.
-- @param #table FillColor RGB color with alpha {r, g, b, alpha}. Default {1, 0, 0, 0.5}.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot Dash, 5=Long Dash, 6=Two Dash. Default 1.
-- @param #number Coalition (Optional) Coalition Id: -1=All, 0=Neutral, 1=Red, 2=Blue. Default -1.
-- @param #table Color (Optional) RGB color with alpha {r, g, b, alpha}. Default {1, 0, 0, 0.7}.
-- @param #table FillColor (Optional) RGB color with alpha {r, g, b, alpha}. Default {1, 0, 0, 0.5}.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot Dash, 5=Long Dash, 6=Two Dash. Default 1.
-- @return #number Marker ID. Can be used to remove the drawing.
function VECTOR:ArrowTo(Vector, Coalition, Color, FillColor, LineType)
@@ -1237,7 +1237,7 @@ end
--- Create mark on F10 map.
-- @param #VECTOR self
-- @param #string MarkText Free format text that shows the marking clarification.
-- @param #number Recipient Recipient of the mark: -1=All (default), 0=Neutral, 1=Red, 2=Blue. Can also be a `GROUP` object.
-- @param #number Recipient (Optional) Recipient of the mark: -1=All (default), 0=Neutral, 1=Red, 2=Blue. Can also be a `GROUP` object.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @return #number Mark ID.
function VECTOR:Mark(MarkText, Recipient, ReadOnly)
+38 -38
View File
@@ -369,7 +369,7 @@ end
--- Set draw coalition of zone.
-- @param #ZONE_BASE self
-- @param #number Coalition Coalition. Default -1.
-- @param #number Coalition (Optional) Coalition. Default -1.
-- @return #ZONE_BASE self
function ZONE_BASE:SetDrawCoalition(Coalition)
self.drawCoalition=Coalition or -1
@@ -385,8 +385,8 @@ end
--- Set color of zone.
-- @param #ZONE_BASE self
-- @param #table RGBcolor RGB color table. Default `{1, 0, 0}`.
-- @param #number Alpha Transparency between 0 and 1. Default 0.15.
-- @param #table RGBcolor (Optional) RGB color table. Default `{1, 0, 0}`.
-- @param #number Alpha (Optional) Transparency between 0 and 1. Default 0.15.
-- @return #ZONE_BASE self
function ZONE_BASE:SetColor(RGBcolor, Alpha)
@@ -432,8 +432,8 @@ end
--- Set fill color of zone.
-- @param #ZONE_BASE self
-- @param #table RGBcolor RGB color table. Default `{1, 0, 0}`.
-- @param #number Alpha Transparacy between 0 and 1. Default 0.15.
-- @param #table RGBcolor (Optional) RGB color table. Default `{1, 0, 0}`.
-- @param #number Alpha (Optional) Transparacy between 0 and 1. Default 0.15.
-- @return #ZONE_BASE self
function ZONE_BASE:SetFillColor(RGBcolor, Alpha)
@@ -586,7 +586,7 @@ end
--- Set the check time for ZONE:Trigger()
-- @param #ZONE_BASE self
-- @param #number seconds Check every seconds for objects entering or leaving the zone. Defaults to 5 secs.
-- @param #number seconds (Optional) Check every seconds for objects entering or leaving the zone. Defaults to 5 secs.
-- @return #ZONE_BASE self
function ZONE_BASE:SetCheckTime(seconds)
self.Checktime = seconds or 5
@@ -862,7 +862,7 @@ ZONE_RADIUS = {
-- @param #string ZoneName Name of the zone.
-- @param DCS#Vec2 Vec2 The location of the zone.
-- @param DCS#Distance Radius The radius of the zone.
-- @param DCS#Boolean DoNotRegisterZone Determines if the Zone should not be registered in the _Database Table. Default=false
-- @param DCS#Boolean DoNotRegisterZone (Optional) Determines if the Zone should not be registered in the _Database Table. Default=false
-- @return #ZONE_RADIUS self
function ZONE_RADIUS:New( ZoneName, Vec2, Radius, DoNotRegisterZone )
@@ -946,12 +946,12 @@ end
--- Draw the zone circle on the F10 map.
-- @param #ZONE_RADIUS self
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha Transparency [0,1]. Default 0.15.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value.
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @return #ZONE_RADIUS self
function ZONE_RADIUS:DrawZone(Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly)
@@ -2506,7 +2506,7 @@ end
--- Get a vertex of the polygon.
-- @param #ZONE_POLYGON_BASE self
-- @param #number Index Index of the vertex. Default 1.
-- @param #number Index (Optional) Index of the vertex. Default 1.
-- @return DCS#Vec2 Vertex of the polygon.
function ZONE_POLYGON_BASE:GetVertexVec2(Index)
return self._.Polygon[Index or 1]
@@ -2514,7 +2514,7 @@ end
--- Get a vertex of the polygon.
-- @param #ZONE_POLYGON_BASE self
-- @param #number Index Index of the vertex. Default 1.
-- @param #number Index (Optional) Index of the vertex. Default 1.
-- @return DCS#Vec3 Vertex of the polygon.
function ZONE_POLYGON_BASE:GetVertexVec3(Index)
local vec2=self:GetVertexVec2(Index)
@@ -2527,7 +2527,7 @@ end
--- Get a vertex of the polygon.
-- @param #ZONE_POLYGON_BASE self
-- @param #number Index Index of the vertex. Default 1.
-- @param #number Index (Optional) Index of the vertex. Default 1.
-- @return Core.Point#COORDINATE Vertex of the polygon.
function ZONE_POLYGON_BASE:GetVertexCoordinate(Index)
local vec2=self:GetVertexVec2(Index)
@@ -2657,12 +2657,12 @@ end
--- Draw the zone on the F10 map. Infinite number of points supported
--- ported from https://github.com/nielsvaes/CCMOOSE/blob/master/Moose%20Development/Moose/Shapes/Polygon.lua
-- @param #ZONE_POLYGON_BASE self
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value. -- doesn't seem to work
-- @param #number FillAlpha Transparency [0,1]. Default 0.15. -- doesn't seem to work
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value. -- doesn't seem to work
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15. -- doesn't seem to work
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.s
-- @return #ZONE_POLYGON_BASE self
function ZONE_POLYGON_BASE:DrawZone(Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly, IncludeTriangles)
@@ -2710,7 +2710,7 @@ end
--- Change/Re-fill a Polygon Zone
-- @param #ZONE_POLYGON_BASE self
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @return #ZONE_POLYGON_BASE self
function ZONE_POLYGON_BASE:ReFill(Color,Alpha)
local color = Color or self:GetFillColorRGB() or {1,0,0}
@@ -2740,8 +2740,8 @@ end
--- Change/Re-draw the border of a Polygon Zone
-- @param #ZONE_POLYGON_BASE self
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @return #ZONE_POLYGON_BASE
function ZONE_POLYGON_BASE:ReDrawBorderline(Color, Alpha, LineType)
local color = Color or self:GetFillColorRGB() or {1,0,0}
@@ -2840,7 +2840,7 @@ end
--- Remove junk inside the zone. Due to DCS limitations, this works only for rectangular zones. So we get the smallest rectangular zone encompassing all points points of the polygon zone.
-- @param #ZONE_POLYGON_BASE self
-- @param #number Height Height of the box in meters. Default 1000.
-- @param #number Height (Optional) Height of the box in meters. Default 1000.
-- @return #number Number of removed objects.
function ZONE_POLYGON_BASE:RemoveJunk(Height)
@@ -3761,8 +3761,8 @@ do -- ZONE_ELASTIC
--- Update the convex hull of the polygon.
-- This uses the [Graham scan](https://en.wikipedia.org/wiki/Graham_scan).
-- @param #ZONE_ELASTIC self
-- @param #number Delay Delay in seconds before the zone is updated. Default 0.
-- @param #boolean Draw Draw the zone. Default `nil`.
-- @param #number Delay (Optional) Delay in seconds before the zone is updated. Default 0.
-- @param #boolean Draw (Optional) Draw the zone. Default `nil`.
-- @return #ZONE_ELASTIC self
function ZONE_ELASTIC:Update(Delay, Draw)
@@ -3803,9 +3803,9 @@ do -- ZONE_ELASTIC
--- Start the updating scheduler.
-- @param #ZONE_ELASTIC self
-- @param #number Tstart Time in seconds before the updating starts.
-- @param #number dT Time interval in seconds between updates. Default 60 sec.
-- @param #number Tstop Time in seconds after which the updating stops. Default `nil`.
-- @param #boolean Draw Draw the zone. Default `nil`.
-- @param #number dT (Optional) Time interval in seconds between updates. Default 60 sec.
-- @param #number Tstop (Optional) Time in seconds after which the updating stops. Default `nil`.
-- @param #boolean Draw (Optional) Draw the zone. Default `nil`.
-- @return #ZONE_ELASTIC self
function ZONE_ELASTIC:StartUpdate(Tstart, dT, Tstop, Draw)
@@ -3816,7 +3816,7 @@ do -- ZONE_ELASTIC
--- Stop the updating scheduler.
-- @param #ZONE_ELASTIC self
-- @param #number Delay Delay in seconds before the scheduler will be stopped. Default 0.
-- @param #number Delay (Optional) Delay in seconds before the scheduler will be stopped. Default 0.
-- @return #ZONE_ELASTIC self
function ZONE_ELASTIC:StopUpdate(Delay)
@@ -4066,12 +4066,12 @@ end
--- Draw the zone on the F10 map.
--- ported from https://github.com/nielsvaes/CCMOOSE/blob/master/Moose%20Development/Moose/Shapes/Oval.lua
-- @param #ZONE_OVAL self
-- @param #number Coalition Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha Transparency [0,1]. Default 1.
-- @param #table FillColor RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value. -- doesn't seem to work
-- @param #number FillAlpha Transparency [0,1]. Default 0.15. -- doesn't seem to work
-- @param #number LineType Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Coalition (Optional) Coalition: All=-1, Neutral=0, Red=1, Blue=2. Default -1=All.
-- @param #table Color (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red.
-- @param #number Alpha (Optional) Transparency [0,1]. Default 1.
-- @param #table FillColor (Optional) RGB color table {r, g, b}, e.g. {1,0,0} for red. Default is same as `Color` value. -- doesn't seem to work
-- @param #number FillAlpha (Optional) Transparency [0,1]. Default 0.15. -- doesn't seem to work
-- @param #number LineType (Optional) Line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly (Optional) Mark is readonly and cannot be removed by users. Default false.
-- @return #ZONE_OVAL self
function ZONE_OVAL:DrawZone(Coalition, Color, Alpha, FillColor, FillAlpha, LineType)
+7 -3
View File
@@ -87,7 +87,8 @@ do -- world
-- @field S_EVENT_SIMULATION_UNFREEZE = 58
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_START = 59
-- @field S_EVENT_HUMAN_AIRCRAFT_REPAIR_FINISH = 60
-- @field S_EVENT_MAX = 61
-- @field S_EVENT_GROUP_CHANGE_OPTION = 61
-- @field S_EVENT_MAX = 62
--- The birthplace enumerator is used to define where an aircraft or helicopter has spawned in association with birth events.
-- @type world.BirthPlace
@@ -131,7 +132,7 @@ do -- world
--- Returns a table of DCS airbase objects.
-- @function [parent=#world] getAirbases
-- @param #number coalitionId The coalition side number ID. Default is all airbases are returned.
-- @param #number coalitionId (Optional) The coalition side number ID. Default is all airbases are returned.
-- @return #table Table of DCS airbase objects.
@@ -1033,7 +1034,7 @@ do -- Spot
--- Sets the number that is used to define the laser code for which laser designation can track.
-- @function [parent=#Spot] setCode
-- @param #Spot self
-- @param #number Code The laser code. Default value is 1688.
-- @param #number Code (Optional) The laser code. Default value is 1688.
--- Destroys the spot.
-- @function [parent=#Spot] destroy
@@ -1672,6 +1673,9 @@ do -- AI
-- @field OPTION_RADIO_USAGE_KILL
-- @field JETT_TANKS_IF_EMPTY
-- @field FORCED_ATTACK
-- @field PREFER_VERTICAL
-- @field ALLOW_FORMATION_SIDE_SWAP
-- @field AI_RUNWAY_LINE_UP
---
-- @type AI.Option.Air.val
+27 -11
View File
@@ -308,7 +308,7 @@ AICSAR.RadioLength = {
-- @param #string Helotemplate Helicopter template name.
-- @param Wrapper.Airbase#AIRBASE FARP FARP object or Airbase from where to start.
-- @param Core.Zone#ZONE MASHZone Zone where to drop pilots after rescue.
-- @param #number Helonumber Max number of alive Ai Helos at the same time. Defaults to three.
-- @param #number Helonumber (Optional) Max number of alive Ai Helos at the same time. Defaults to 3.
-- @return #AICSAR self
function AICSAR:New(Alias,Coalition,Pilottemplate,Helotemplate,FARP,MASHZone,Helonumber)
-- Inherit everything from FSM class.
@@ -543,10 +543,10 @@ end
-- @param #AICSAR self
-- @param #boolean OnOff Switch on (true) or off (false).
-- @param #string Path Path to your SRS Server External Audio Component, e.g. "C:\\\\Program Files\\\\DCS-SimpleRadio-Standalone\\\\ExternalAudio"
-- @param #number Frequency Defaults to 243 (guard)
-- @param #number Modulation Radio modulation. Defaults to radio.modulation.AM
-- @param #string SoundPath Where to find the audio files. Defaults to nil, i.e. add messages via "Sound to..." in the Mission Editor.
-- @param #number Port Port of the SRS, defaults to 5002.
-- @param #number Frequency (Optional) Defaults to 243 (guard)
-- @param #number Modulation (Optional) Radio modulation. Defaults to radio.modulation.AM
-- @param #string SoundPath (Optional) Where to find the audio files. Defaults to nil, i.e. add messages via "Sound to..." in the Mission Editor.
-- @param #number Port (Optional) Port of the SRS, defaults to 5002.
-- @return #AICSAR self
function AICSAR:SetSRSRadio(OnOff,Path,Frequency,Modulation,SoundPath,Port)
self:T(self.lid .. "SetSRSRadio")
@@ -579,8 +579,10 @@ end
-- @param #string Culture (Optional) The culture to be used, defaults to "en-GB"
-- @param #string Gender (Optional) The gender to be used, defaults to "male"
-- @param #string GoogleCredentials (Optional) Path to google credentials
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #AICSAR self
function AICSAR:SetSRSTTSRadio(OnOff,Path,Frequency,Modulation,Port,Voice,Culture,Gender,GoogleCredentials)
function AICSAR:SetSRSTTSRadio(OnOff,Path,Frequency,Modulation,Port,Voice,Culture,Gender,GoogleCredentials,Provider,Speaker)
self:T(self.lid .. "SetSRSTTSRadio")
self.SRSTTSRadio = OnOff and true
self.SRSRadio = false
@@ -594,13 +596,19 @@ function AICSAR:SetSRSTTSRadio(OnOff,Path,Frequency,Modulation,Port,Voice,Cultur
self.SRS:SetCoalition(self.coalition)
self.SRS:SetLabel("ACSR")
self.SRS:SetVoice(Voice)
if Speaker then
self.SRS:SetSpeakerPiper(Speaker)
end
self.SRS:SetCulture(Culture)
self.SRS:SetGender(Gender)
if GoogleCredentials then
if GoogleCredentials and not Provider then
self.SRS:SetProviderOptionsGoogle(GoogleCredentials,GoogleCredentials)
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
self.SRSGoogle = true
end
if Provider then
self.SRS:SetProvider(Provider)
end
self.SRSQ = MSRSQUEUE:New(self.alias)
end
return self
@@ -612,13 +620,17 @@ end
-- Specific voices override culture and gender!
-- @param #string Culture (Optional) The culture to be used, defaults to "en-US"
-- @param #string Gender (Optional) The gender to be used, defaults to "male"
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #AICSAR self
function AICSAR:SetPilotTTSVoice(Voice,Culture,Gender)
function AICSAR:SetPilotTTSVoice(Voice,Culture,Gender,Speaker)
self:T(self.lid .. "SetPilotTTSVoice")
self.SRSPilotVoice = true
self.SRSPilot = MSRS:New(self.SRSPath,self.SRSFrequency,self.SRSModulation)
self.SRSPilot:SetCoalition(self.coalition)
self.SRSPilot:SetVoice(Voice)
if Speaker then
self.SRSPilot:SetSpeakerPiper(Speaker)
end
self.SRSPilot:SetCulture(Culture or "en-US")
self.SRSPilot:SetGender(Gender or "male")
self.SRSPilot:SetLabel("PILOT")
@@ -636,13 +648,17 @@ end
-- Specific voices override culture and gender!
-- @param #string Culture (Optional) The culture to be used, defaults to "en-GB"
-- @param #string Gender (Optional) The gender to be used, defaults to "female"
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #AICSAR self
function AICSAR:SetOperatorTTSVoice(Voice,Culture,Gender)
function AICSAR:SetOperatorTTSVoice(Voice,Culture,Gender,Speaker)
self:T(self.lid .. "SetOperatorTTSVoice")
self.SRSOperatorVoice = true
self.SRSOperator = MSRS:New(self.SRSPath,self.SRSFrequency,self.SRSModulation)
self.SRSOperator:SetCoalition(self.coalition)
self.SRSOperator:SetVoice(Voice)
if Speaker then
self.SRSOperator:SetSpeakerPiper(Speaker)
end
self.SRSOperator:SetCulture(Culture or "en-GB")
self.SRSOperator:SetGender(Gender or "female")
self.SRSOperator:SetLabel("RESCUE")
@@ -657,8 +673,8 @@ end
--- [User] Switch sound output on and use normale (DCS) radio
-- @param #AICSAR self
-- @param #boolean OnOff Switch on (true) or off (false).
-- @param #number Frequency Defaults to 243 (guard).
-- @param #number Modulation Radio modulation. Defaults to radio.modulation.AM.
-- @param #number Frequency(Optional) Defaults to 243 (guard).
-- @param #number Modulation (Optional) Radio modulation. Defaults to radio.modulation.AM.
-- @param Wrapper.Group#GROUP Group The group to use as sending station.
-- @return #AICSAR self
function AICSAR:SetDCSRadio(OnOff,Frequency,Modulation,Group)
@@ -419,14 +419,6 @@
-- arty set, battery "Mortar Bravo", rearming group "Ammo Truck M939"
-- Note that the name of the rearming group has to be given in quotation marks and spelt exactly as the group name defined in the mission editor.
--
-- ## Transporting
--
-- ARTY groups can be transported to another location as @{Cargo.Cargo} by means of classes such as @{AI.AI_Cargo_APC}, @{AI.AI_Cargo_Dispatcher_APC},
-- @{AI.AI_Cargo_Helicopter}, @{AI.AI_Cargo_Dispatcher_Helicopter} or @{AI.AI_Cargo_Airplane}.
--
-- In order to do this, one needs to define an ARTY object via the @{#ARTY.NewFromCargoGroup}(*cargogroup*, *alias*) function.
-- The first argument *cargogroup* has to be a @{Cargo.CargoGroup#CARGO_GROUP} object. The second argument *alias* is a string which can be freely chosen by the user.
--
-- ## Fine Tuning
--
-- The mission designer has a few options to tailor the ARTY object according to his needs.
@@ -511,24 +503,6 @@
-- -- Start ARTY process.
-- normandy:Start()
--
-- ### Transportation as Cargo
-- This example demonstates how an ARTY group can be transported to another location as cargo.
-- -- Define a group as CARGO_GROUP
-- CargoGroupMortars=CARGO_GROUP:New(GROUP:FindByName("Mortars"), "Mortars", "Mortar Platoon Alpha", 100 , 10)
--
-- -- Define the mortar CARGO GROUP as ARTY object
-- mortars=ARTY:NewFromCargoGroup(CargoGroupMortars, "Mortar Platoon Alpha")
--
-- -- Start ARTY process
-- mortars:Start()
--
-- -- Setup AI cargo dispatcher for e.g. helos
-- SetHeloCarriers = SET_GROUP:New():FilterPrefixes("CH-47D"):FilterStart()
-- SetCargoMortars = SET_CARGO:New():FilterTypes("Mortars"):FilterStart()
-- SetZoneDepoly = SET_ZONE:New():FilterPrefixes("Deploy"):FilterStart()
-- CargoHelo=AI_CARGO_DISPATCHER_HELICOPTER:New(SetHeloCarriers, SetCargoMortars, SetZoneDepoly)
-- CargoHelo:Start()
-- The ARTY group will be transported and resume its normal operation after it has been deployed. New targets can be assigned at any time also during the transportation process.
--
-- @field #ARTY
ARTY={
@@ -1230,37 +1204,6 @@ function ARTY:New(group, alias)
return self
end
--- Creates a new ARTY object from a MOOSE CARGO_GROUP object.
-- @param #ARTY self
-- @param Cargo.CargoGroup#CARGO_GROUP cargogroup The CARGO GROUP object for which artillery tasks should be assigned.
-- @param alias (Optional) Alias name the group will be calling itself when sending messages. Default is the group name.
-- @return #ARTY ARTY object or nil if group does not exist or is not a ground or naval group.
function ARTY:NewFromCargoGroup(cargogroup, alias)
if cargogroup then
BASE:T(string.format("ARTY script version %s. Added CARGO group %s.", ARTY.version, cargogroup:GetName()))
else
BASE:E("ERROR: Requested ARTY CARGO GROUP does not exist! (Has to be a MOOSE CARGO(!) group.)")
return nil
end
-- Get group belonging to the cargo group.
local group=cargogroup:GetObject()
-- Create ARTY object.
local arty=ARTY:New(group,alias)
-- Set iscargo flag.
arty.iscargo=true
-- Set cargo group object.
arty.cargogroup=cargogroup
return arty
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- User Functions
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1448,7 +1391,7 @@ end
-- @param #ARTY self
-- @param Core.Point#COORDINATE coord Coordinates of the new position.
-- @param #string time (Optional) Day time at which the group should start moving. Passed as a string in format "08:13:45". Default is now.
-- @param #number speed (Optinal) Speed in km/h the group should move at. Default 70% of max posible speed of group.
-- @param #number speed (Optional) Speed in km/h the group should move at. Default 70% of max posible speed of group.
-- @param #boolean onroad (Optional) If true, group will mainly use roads. Default off, i.e. go directly towards the specified coordinate.
-- @param #boolean cancel (Optional) If true, cancel any running attack when move should begin. Default is false.
-- @param #string name (Optional) Name of the coordinate. Default is LL DMS string of the coordinate. If the name was already given, the numbering "#01", "#02",... is appended automatically.
@@ -1559,7 +1502,7 @@ end
--- Set minimum firing range. Targets closer than this distance are not engaged.
-- @param #ARTY self
-- @param #number range Min range in kilometers. Default is 0.1 km.
-- @param #number range (Optional) Min range in kilometers. Default is 0.1 km.
-- @return self
function ARTY:SetMinFiringRange(range)
self:F({range=range})
@@ -1569,7 +1512,7 @@ end
--- Set maximum firing range. Targets further away than this distance are not engaged.
-- @param #ARTY self
-- @param #number range Max range in kilometers. Default is 1000 km.
-- @param #number range (Optional) Max range in kilometers. Default is 1000 km.
-- @return self
function ARTY:SetMaxFiringRange(range)
self:F({range=range})
@@ -1579,7 +1522,7 @@ end
--- Set time interval between status updates. During the status check, new events are triggered.
-- @param #ARTY self
-- @param #number interval Time interval in seconds. Default 10 seconds.
-- @param #number interval (Optional) Time interval in seconds. Default 10 seconds.
-- @return self
function ARTY:SetStatusInterval(interval)
self:F({interval=interval})
@@ -1589,7 +1532,7 @@ end
--- Set time interval for weapon tracking.
-- @param #ARTY self
-- @param #number interval Time interval in seconds. Default 0.2 seconds.
-- @param #number interval (Optional) Time interval in seconds. Default 0.2 seconds.
-- @return self
function ARTY:SetTrackInterval(interval)
self.dtTrack=interval or 0.2
@@ -1598,7 +1541,7 @@ end
--- Set time how it is waited a unit the first shot event happens. If no shot is fired after this time, the task to fire is aborted and the target removed.
-- @param #ARTY self
-- @param #number waittime Time in seconds. Default 300 seconds.
-- @param #number waittime (Optional) Time in seconds. Default 300 seconds.
-- @return self
function ARTY:SetWaitForShotTime(waittime)
self:F({waittime=waittime})
@@ -1608,7 +1551,7 @@ end
--- Define the safe distance between ARTY group and rearming unit or rearming place at which rearming process is possible.
-- @param #ARTY self
-- @param #number distance Safe distance in meters. Default is 100 m.
-- @param #number distance (Optional) Safe distance in meters. Default is 100 m.
-- @return self
function ARTY:SetRearmingDistance(distance)
self:F({distance=distance})
@@ -1870,7 +1813,7 @@ end
--- Set nuclear warhead explosion strength.
-- @param #ARTY self
-- @param #number strength Explosion strength in kilo tons TNT. Default is 0.075 kt.
-- @param #number strength (Optional) Explosion strength in kilo tons TNT. Default is 0.075 kt.
-- @return self
function ARTY:SetTacNukeWarhead(strength)
self.nukewarhead=strength or 0.075
@@ -3960,7 +3903,7 @@ end
--- Get the number of shells a unit or group currently has. For a group the ammo count of all units is summed up.
-- @param #ARTY self
-- @param #boolean display Display ammo table as message to all. Default false.
-- @param #boolean display (Optional) Display ammo table as message to all. Default false.
-- @return #number Total amount of ammo the whole group has left.
-- @return #number Number of shells the group has left.
-- @return #number Number of rockets the group has left.
+18 -10
View File
@@ -427,7 +427,7 @@ end
--- (User) Set minimum threat level for target selection, can be 0 (lowest) to 10 (highest).
-- @param #AUTOLASE self
-- @param #number Level Level used for filtering, defaults to 0. SAM systems and manpads have level 7 to 10, AAA level 6, MTBs and armoured vehicles level 3 to 5, APC, Artillery, Infantry and EWR level 1 to 2.
-- @param #number Level (Optional) Level used for filtering, defaults to 0. SAM systems and manpads have level 7 to 10, AAA level 6, MTBs and armoured vehicles level 3 to 5, APC, Artillery, Infantry and EWR level 1 to 2.
-- @return #AUTOLASE self
-- @usage Filter for level 3 and above:
-- `myautolase:SetMinThreatLevel(3)`
@@ -502,10 +502,12 @@ end
-- @param #number Port (Optional) Defaults to 5002
-- @param #string Voice (Optional) Use a specifc voice with the @{Sound.SRS#SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest)
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest).
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS.
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #AUTOLASE self
function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Culture,Port,Voice,Volume,PathToGoogleKey)
function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,Provider,Speaker)
if OnOff then
self.useSRS = true
self.SRSPath = Path or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
@@ -526,12 +528,18 @@ function AUTOLASE:SetUsingSRS(OnOff,Path,Frequency,Modulation,Label,Gender,Cultu
self.SRS:SetCulture(self.Culture)
self.SRS:SetPort(self.Port)
self.SRS:SetVoice(self.Voice)
if Speaker then
self.SRS:SetSpeakerPiper(Speaker)
end
self.SRS:SetCoalition(self.coalition)
self.SRS:SetVolume(self.Volume)
if self.PathToGoogleKey then
if self.PathToGoogleKey and not Provider then
self.SRS:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
self.SRS:SetProvider(Provider)
end
self.SRSQueue = MSRSQUEUE:New(self.alias)
else
self.useSRS = false
@@ -593,8 +601,8 @@ end
--- (User) Function to force laser cooldown and cool down time
-- @param #AUTOLASE self
-- @param #boolean OnOff Switch cool down on (true) or off (false) - defaults to true
-- @param #number Seconds Number of seconds for cooldown - dafaults to 60 seconds
-- @param #boolean OnOff (Optional) Switch cool down on (true) or off (false) - defaults to true
-- @param #number Seconds (Optional) Number of seconds for cooldown - dafaults to 60 seconds
-- @return #AUTOLASE self
function AUTOLASE:SetLaserCoolDown(OnOff, Seconds)
self.forcecooldown = OnOff and true
@@ -615,8 +623,8 @@ end
--- (User) Function to set lasing distance in meters and duration in seconds
-- @param #AUTOLASE self
-- @param #number Distance (Max) distance for lasing in meters - default 5000 meters
-- @param #number Duration (Max) duration for lasing in seconds - default 300 secs
-- @param #number Distance (Optional) Max distance for lasing in meters - default 5000 meters
-- @param #number Duration (Optional) Max duration for lasing in seconds - default 300 secs
-- @return #AUTOLASE self
function AUTOLASE:SetLasingParameters(Distance, Duration)
self.LaseDistance = Distance or 5000
@@ -640,7 +648,7 @@ end
--- (User) Function to set rounding precision for BR distance output.
-- @param #AUTOLASE self
-- @param #number IDP Rounding precision before/after the decimal sign. Defaults to zero. Positive values round right of the decimal sign, negative ones left of the decimal sign.
-- @param #number IDP (Optional) Rounding precision before/after the decimal sign. Defaults to zero. Positive values round right of the decimal sign, negative ones left of the decimal sign.
-- @return #AUTOLASE self
function AUTOLASE:SetRoundingPrecsion(IDP)
self.RoundingPrecision = IDP or 0
@@ -178,7 +178,7 @@ end
-- Note, one can also use the method @{#CLEANUP_AIRBASE.RemoveAirbase}() to remove the airbase from the control process as a whole,
-- when an enemy unit is near. That is also an option...
-- @param #CLEANUP_AIRBASE self
-- @param #string CleanMissiles (Default=true) If true, missiles fired are immediately destroyed. If false missiles are not controlled.
-- @param #boolean CleanMissiles (Optional) (Default=true) If true, missiles fired are immediately destroyed. If false missiles are not controlled.
-- @return #CLEANUP_AIRBASE
function CLEANUP_AIRBASE:SetCleanMissiles( CleanMissiles )
@@ -301,12 +301,11 @@ do -- DESIGNATE
--- DESIGNATE Constructor. This class is an abstract class and should not be instantiated.
-- @param #DESIGNATE self
-- @param Tasking.CommandCenter#COMMANDCENTER CC
-- @param Wrapper.Group#GROUP CC Group as Commandcenter standin. Currently unused (03/2026)
-- @param Functional.Detection#DETECTION_BASE Detection
-- @param Core.Set#SET_GROUP AttackSet The Attack collection of GROUP objects to designate and report for.
-- @param Tasking.Mission#MISSION Mission (Optional) The Mission where the menu needs to be attached.
-- @return #DESIGNATE
function DESIGNATE:New( CC, Detection, AttackSet, Mission )
function DESIGNATE:New( CC, Detection, AttackSet )
local self = BASE:Inherit( self, FSM:New() ) -- #DESIGNATE
self:F( { Detection } )
@@ -468,7 +467,7 @@ do -- DESIGNATE
-- @param #DESIGNATE self
-- @param #number Delay
self.CC = CC
--self.CC = CC
self.Detection = Detection
self.AttackSet = AttackSet
self.RecceSet = Detection:GetDetectionSet()
@@ -480,7 +479,7 @@ do -- DESIGNATE
self:SetFlashStatusMenu( false )
self:SetFlashDetectionMessages( true )
self:SetMission( Mission )
--self:SetMission( Mission )
self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
self:SetAutoLase( false, false ) -- set self.Autolase and don't send message.
@@ -682,7 +681,7 @@ do -- DESIGNATE
--- Set the lase duration for designations.
-- @param #DESIGNATE self
-- @param #number LaseDuration The time in seconds a lase will continue to hold on target. The default is 120 seconds.
-- @param #number LaseDuration (Optional) The time in seconds a lase will continue to hold on target. The default is 120 seconds.
-- @return #DESIGNATE
function DESIGNATE:SetLaseDuration( LaseDuration )
self.LaseDuration = LaseDuration or 120
@@ -754,10 +753,12 @@ do -- DESIGNATE
if Message then
local AutoLaseOnOff = ( self.AutoLase == true ) and "On" or "Off"
local CC = self.CC:GetPositionable()
if CC then
CC:MessageToSetGroup( self.DesignateName .. ": Auto Lase " .. AutoLaseOnOff .. ".", 15, self.AttackSet )
end
MESSAGE:New(self.DesignateName .. ": Auto Lase " .. AutoLaseOnOff .. ".",15):ToSet(self.AttackSet)
--local CC = self.CC:GetPositionable()
--if CC then
--CC:MessageToSetGroup( self.DesignateName .. ": Auto Lase " .. AutoLaseOnOff .. ".", 15, self.AttackSet )
--end
end
self:CoordinateLase()
@@ -777,14 +778,14 @@ do -- DESIGNATE
return self
end
--- Set the MISSION object for which designate will function.
--- [DEPRECATED DO NOT USE] Set the MISSION object for which designate will function.
-- When a MISSION object is assigned, the menu for the designation will be located at the Mission Menu.
-- @param #DESIGNATE self
-- @param Tasking.Mission#MISSION Mission The MISSION object.
-- @return #DESIGNATE
function DESIGNATE:SetMission( Mission ) --R2.2
self.Mission = Mission
--self.Mission = Mission
return self
end
@@ -830,7 +831,8 @@ do -- DESIGNATE
function( AttackGroup )
if AttackGroup:IsAlive() == true then
local DetectionText = self.Detection:DetectedItemReportSummary( DetectedItem, AttackGroup ):Text( ", " )
self.CC:GetPositionable():MessageToGroup( "Targets out of LOS\n" .. DetectionText, 10, AttackGroup, self.DesignateName )
--self.CC:GetPositionable():MessageToGroup( "Targets out of LOS\n" .. DetectionText, 10, AttackGroup, self.DesignateName )
MESSAGE:New("Targets out of LOS\n" .. DetectionText,10,self.DesignateName):ToGroup(AttackGroup)
end
end
)
@@ -855,7 +857,8 @@ do -- DESIGNATE
function( AttackGroup )
if self.FlashDetectionMessage[AttackGroup] == true then
local DetectionText = self.Detection:DetectedItemReportSummary( DetectedItem, AttackGroup ):Text( ", " )
self.CC:GetPositionable():MessageToGroup( "Targets detected at \n" .. DetectionText, 10, AttackGroup, self.DesignateName )
--self.CC:GetPositionable():MessageToGroup( "Targets detected at \n" .. DetectionText, 10, AttackGroup, self.DesignateName )
MESSAGE:New( "Targets detected at \n" .. DetectionText,10,self.DesignateName):ToGroup(AttackGroup)
end
end
)
@@ -929,9 +932,10 @@ do -- DESIGNATE
end
end
local CC = self.CC:GetPositionable()
-- local CC = self.CC:GetPositionable()
CC:MessageTypeToGroup( DetectedReport:Text( "\n" ), MESSAGE.Type.Information, AttackGroup, self.DesignateName )
--CC:MessageTypeToGroup( DetectedReport:Text( "\n" ), MESSAGE.Type.Information, AttackGroup, self.DesignateName )
MESSAGE:New( DetectedReport:Text( "\n" ),15,self.DesignateName):ToGroup(AttackGroup)
local DesignationReport = REPORT:New( "Marking Targets:" )
@@ -965,10 +969,10 @@ do -- DESIGNATE
local MissionMenu = nil
if self.Mission then
--if self.Mission then
--MissionMenu = self.Mission:GetRootMenu( AttackGroup )
MissionMenu = self.Mission:GetMenu( AttackGroup )
end
--MissionMenu = self.Mission:GetMenu( AttackGroup )
--end
local MenuTime = timer.getTime()
@@ -1356,12 +1360,13 @@ do -- DESIGNATE
-- @param #DESIGNATE self
-- @return #DESIGNATE
function DESIGNATE:onafterLaseOff( From, Event, To, Index )
local CC = self.CC:GetPositionable()
MESSAGE:New("Stopped lasing.",5,self.DesignateName):ToSet(self.AttackSet)
--local CC = self.CC:GetPositionable()
if CC then
CC:MessageToSetGroup( "Stopped lasing.", 5, self.AttackSet, self.DesignateName )
end
--if CC then
--CC:MessageToSetGroup( "Stopped lasing.", 5, self.AttackSet, self.DesignateName )
--end
local DetectedItem = self.Detection:GetDetectedItemByIndex( Index )
local TargetSetUnit = self.Detection:GetDetectedItemSet( DetectedItem )
@@ -1052,9 +1052,9 @@ do -- DETECTION_BASE
--- Method to make the radar detection less accurate, e.g. for WWII scenarios.
-- @param #DETECTION_BASE self
-- @param #number minheight Minimum flight height to be detected, in meters AGL (above ground)
-- @param #number thresheight Threshold to escape the radar if flying below minheight, defaults to 90 (90% escape chance)
-- @param #number thresblur Threshold to be detected by the radar overall, defaults to 85 (85% chance to be found)
-- @param #number closing Closing-in in km - the limit of km from which on it becomes increasingly difficult to escape radar detection if flying towards the radar position. Should be about 1/3 of the radar detection radius in kilometers, defaults to 20.
-- @param #number thresheight (Optional) Threshold to escape the radar if flying below minheight, defaults to 90 (90% escape chance)
-- @param #number thresblur (Optional) Threshold to be detected by the radar overall, defaults to 85 (85% chance to be found)
-- @param #number closing (Optional) Closing-in in km - the limit of km from which on it becomes increasingly difficult to escape radar detection if flying towards the radar position. Should be about 1/3 of the radar detection radius in kilometers, defaults to 20.
-- @return #DETECTION_BASE self
function DETECTION_BASE:SetRadarBlur(minheight,thresheight,thresblur,closing)
self.RadarBlur = true
@@ -1104,12 +1104,14 @@ do -- DETECTION_BASE
--- Set the parameters to calculate to optimal intercept point.
-- @param #DETECTION_BASE self
-- @param #boolean Intercept Intercept is true if an intercept point is calculated. Intercept is false if it is disabled. The default Intercept is false.
-- @param #boolean Intercept (Optional) Intercept is true if an intercept point is calculated. Intercept is false if it is disabled. The default Intercept is false.
-- @param #number InterceptDelay If Intercept is true, then InterceptDelay is the average time it takes to get airplanes airborne.
-- @return #DETECTION_BASE self
function DETECTION_BASE:SetIntercept( Intercept, InterceptDelay )
self:F2()
Intercept = Intercept or false
self.Intercept = Intercept
self.InterceptDelay = InterceptDelay
@@ -1611,8 +1613,8 @@ do -- DETECTION_BASE
-- The DetectedItem is a table and contains a SET_UNIT in the field Set.
-- @param #DETECTION_BASE self
-- @param #string ItemPrefix Prefix of detected item.
-- @param #number DetectedItemKey The key of the DetectedItem. Default self.DetectedItemMax. Could also be a string in principle.
-- @param Core.Set#SET_UNIT Set (optional) The Set of Units to be added.
-- @param #number DetectedItemKey (Optional) The key of the DetectedItem. Default self.DetectedItemMax. Could also be a string in principle.
-- @param Core.Set#SET_UNIT Set (Optional) The Set of Units to be added.
-- @return #DETECTION_BASE.DetectedItem
function DETECTION_BASE:AddDetectedItem( ItemPrefix, DetectedItemKey, Set )
@@ -1846,7 +1848,7 @@ do -- DETECTION_BASE
return self
end
--- Validate if the detected item is locked.
--- Validate if the detected item is locked (not in the radar sense, though!).
-- @param #DETECTION_BASE self
-- @param #DETECTION_BASE.DetectedItem DetectedItem The DetectedItem.
-- @return #boolean
@@ -1856,7 +1858,7 @@ do -- DETECTION_BASE
end
--- Lock a detected item.
--- Lock a detected item (not in the radar sense, though!).
-- @param #DETECTION_BASE self
-- @param #DETECTION_BASE.DetectedItem DetectedItem The DetectedItem.
-- @return #DETECTION_BASE
@@ -1867,7 +1869,7 @@ do -- DETECTION_BASE
return self
end
--- Unlock a detected item.
--- Unlock a detected item (not in the radar sense, though!).
-- @param #DETECTION_BASE self
-- @param #DETECTION_BASE.DetectedItem DetectedItem The DetectedItem.
-- @return #DETECTION_BASE
@@ -2536,7 +2538,7 @@ do -- DETECTION_AREAS
--- DETECTION_AREAS constructor.
-- @param #DETECTION_AREAS self
-- @param Core.Set#SET_GROUP DetectionSetGroup The @{Core.Set} of GROUPs in the Forward Air Controller role.
-- @param #number DetectionZoneRange The range in meters within which targets are grouped upon the first detected target. Default 5000m.
-- @param #number DetectionZoneRange (Optional) The range in meters within which targets are grouped upon the first detected target. Default 5000m.
-- @return #DETECTION_AREAS
function DETECTION_AREAS:New( DetectionSetGroup, DetectionZoneRange )
+13 -13
View File
@@ -179,7 +179,7 @@ ESCORT = {
-- @param Wrapper.Client#CLIENT EscortClient The client escorted by the EscortGroup.
-- @param Wrapper.Group#GROUP EscortGroup The group AI escorting the EscortClient.
-- @param #string EscortName Name of the escort.
-- @param #string EscortBriefing A text showing the ESCORT briefing to the player. Note that if no EscortBriefing is provided, the default briefing will be shown.
-- @param #string EscortBriefing (Optional) A text showing the ESCORT briefing to the player. Note that if no EscortBriefing is provided, the default briefing will be shown.
-- @return #ESCORT self
-- @usage
-- -- Declare a new EscortPlanes object as follows:
@@ -333,9 +333,9 @@ end
--- Defines a menu slot to let the escort hold at their current position and stay low with a specified height during a specified time in seconds.
-- This menu will appear under **Hold position**.
-- @param #ESCORT self
-- @param DCS#Distance Height Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
-- @param DCS#Time Seconds Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
-- @param #string MenuTextFormat Optional parameter that shows the menu option text. The text string is formatted, and should contain two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.
-- @param DCS#Distance Height (Optional) parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
-- @param DCS#Time Seconds (Optional) parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
-- @param #string MenuTextFormat (Optional) parameter that shows the menu option text. The text string is formatted, and should contain two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.
-- @return #ESCORT
-- TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.
function ESCORT:MenuHoldAtEscortPosition( Height, Seconds, MenuTextFormat )
@@ -394,9 +394,9 @@ end
--- Defines a menu slot to let the escort hold at the client position and stay low with a specified height during a specified time in seconds.
-- This menu will appear under **Navigation**.
-- @param #ESCORT self
-- @param DCS#Distance Height Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
-- @param DCS#Time Seconds Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
-- @param #string MenuTextFormat Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.
-- @param DCS#Distance Height (Optional) parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
-- @param DCS#Time Seconds (Optional) parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
-- @param #string MenuTextFormat (Optional) parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.
-- @return #ESCORT
-- TODO: Implement Seconds parameter. Challenge is to first develop the "continue from last activity" function.
function ESCORT:MenuHoldAtLeaderPosition( Height, Seconds, MenuTextFormat )
@@ -455,9 +455,9 @@ end
--- Defines a menu slot to let the escort scan for targets at a certain height for a certain time in seconds.
-- This menu will appear under **Scan targets**.
-- @param #ESCORT self
-- @param DCS#Distance Height Optional parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
-- @param DCS#Time Seconds Optional parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
-- @param #string MenuTextFormat Optional parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.
-- @param DCS#Distance Height (Optional) parameter that sets the height in meters to let the escort orbit at the current location. The default value is 30 meters.
-- @param DCS#Time Seconds (Optional) parameter that lets the escort orbit at the current position for a specified time. (not implemented yet). The default value is 0 seconds, meaning, that the escort will orbit forever until a sequent command is given.
-- @param #string MenuTextFormat (Optional) parameter that shows the menu option text. The text string is formatted, and should contain one or two %d tokens in the string. The first for the Height, the second for the Time (if given). If no text is given, the default text will be displayed.
-- @return #ESCORT
function ESCORT:MenuScanForTargets( Height, Seconds, MenuTextFormat )
self:F( { Height, Seconds, MenuTextFormat } )
@@ -514,7 +514,7 @@ end
-- This menu will appear under **Navigation**.
-- The flare will be fired from the first unit in the group.
-- @param #ESCORT self
-- @param #string MenuTextFormat Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.
-- @param #string MenuTextFormat (Optional) parameter that shows the menu option text. If no text is given, the default text will be displayed.
-- @return #ESCORT
function ESCORT:MenuFlare( MenuTextFormat )
self:F()
@@ -546,7 +546,7 @@ end
-- Note that smoke menu options will only be displayed for ships and ground units. Not for air units.
-- The smoke will be fired from the first unit in the group.
-- @param #ESCORT self
-- @param #string MenuTextFormat Optional parameter that shows the menu option text. If no text is given, the default text will be displayed.
-- @param #string MenuTextFormat (Optional) parameter that shows the menu option text. If no text is given, the default text will be displayed.
-- @return #ESCORT
function ESCORT:MenuSmoke( MenuTextFormat )
self:F()
@@ -580,7 +580,7 @@ end
-- This menu will appear under **Report targets**.
-- Note that if a report targets menu is not specified, no targets will be detected by the escort, and the attack and assisted attack menus will not be displayed.
-- @param #ESCORT self
-- @param DCS#Time Seconds Optional parameter that lets the escort report their current detected targets after specified time interval in seconds. The default time is 30 seconds.
-- @param DCS#Time Seconds (Optional) parameter that lets the escort report their current detected targets after specified time interval in seconds. The default time is 30 seconds.
-- @return #ESCORT
function ESCORT:MenuReportTargets( Seconds )
self:F( { Seconds } )
@@ -515,7 +515,7 @@ end
--- Set time interval between updates of the formation.
-- @param #FORMATION self
-- @param #number dt Time step in seconds between formation updates. Default is every 0.5 seconds.
-- @param #number dt (Optional) Time step in seconds between formation updates. Default is every 0.5 seconds.
-- @return #FORMATION
function FORMATION:SetFollowTimeInterval(dt)
self.dtFollow=dt or 0.5
+5 -5
View File
@@ -459,7 +459,7 @@ end
--- Set explosion power. This is an "artificial" explosion generated when the missile is destroyed. Just for the visual effect.
-- Don't set the explosion power too big or it will harm the aircraft in the vicinity.
-- @param #FOX self
-- @param #number power Explosion power in kg TNT. Default 0.1 kg.
-- @param #number power (Optional) Explosion power in kg TNT. Default 0.1 kg.
-- @return #FOX self
function FOX:SetExplosionPower(power)
@@ -470,7 +470,7 @@ end
--- Set missile-player distance when missile is destroyed.
-- @param #FOX self
-- @param #number distance Distance in meters. Default 200 m.
-- @param #number distance (Optional) Distance in meters. Default 200 m.
-- @return #FOX self
function FOX:SetExplosionDistance(distance)
@@ -481,8 +481,8 @@ end
--- Set missile-player distance when BIG missiles are destroyed.
-- @param #FOX self
-- @param #number distance Distance in meters. Default 500 m.
-- @param #number explosivemass Explosive mass of missile threshold in kg TNT. Default 50 kg.
-- @param #number distance (Optional) Distance in meters. Default 500 m.
-- @param #number explosivemass (Optional) Explosive mass of missile threshold in kg TNT. Default 50 kg.
-- @return #FOX self
function FOX:SetExplosionDistanceBigMissiles(distance, explosivemass)
@@ -516,7 +516,7 @@ end
--- Set verbosity level.
-- @param #FOX self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #FOX self
function FOX:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
File diff suppressed because it is too large Load Diff
@@ -172,7 +172,7 @@ end
--- Set duration how long messages are displayed.
-- @param #PSEUDOATC self
-- @param #number duration Time in seconds. Default is 30 sec.
-- @param #number duration (Optional) Time in seconds. Default is 30 sec.
function PSEUDOATC:SetMessageDuration(duration)
self.mdur=duration or 30
end
@@ -186,21 +186,21 @@ end
--- Set time interval after which the F10 radio menu is refreshed.
-- @param #PSEUDOATC self
-- @param #number interval Interval in seconds. Default is every 120 sec.
-- @param #number interval (Optional) Interval in seconds. Default is every 120 sec.
function PSEUDOATC:SetMenuRefresh(interval)
self.mrefresh=interval or 120
end
--- [Deprecated] Enable/disable event handling by MOOSE or DCS.
-- @param #PSEUDOATC self
-- @param #boolean switch If true, events are handled by MOOSE (default). If false, events are handled directly by DCS.
-- @param #boolean switch (Optional) If true, events are handled by MOOSE (default). If false, events are handled directly by DCS.
function PSEUDOATC:SetEventsMoose(switch)
self.eventsmoose=switch
end
--- Set time interval for reporting altitude until touchdown.
-- @param #PSEUDOATC self
-- @param #number interval Interval in seconds. Default is every 3 sec.
-- @param #number interval (Optional) Interval in seconds. Default is every 3 sec.
function PSEUDOATC:SetReportAltInterval(interval)
self.talt=interval or 3
end
+43 -24
View File
@@ -1055,7 +1055,7 @@ end
--- Set the friendly coalitions from which the airports can be used as departure and destination.
-- @param #RAT self
-- @param #string friendly "same"=own coalition+neutral (default), "sameonly"=own coalition only, "neutral"=all neutral airports.
-- @param #string friendly (Optional) "same"=own coalition+neutral (default), "sameonly"=own coalition only, "neutral"=all neutral airports.
-- Default is "same", so aircraft will use airports of the coalition their spawn template has plus all neutral airports.
-- @return #RAT RAT self object.
-- @usage yak:SetCoalition("neutral") will spawn aircraft randomly on all neutral airports.
@@ -1137,7 +1137,7 @@ end
--- Set the scan radius around parking spots. Parking spot is considered to be occupied if any obstacle is found with the radius.
-- @param #RAT self
-- @param #number radius Radius in meters. Default 50 m.
-- @param #number radius (Optional) Radius in meters. Default 50 m.
-- @return #RAT RAT self object.
function RAT:SetParkingScanRadius(radius)
self:F2(radius)
@@ -1503,7 +1503,7 @@ end
--- Set the delay before first group is spawned.
-- @param #RAT self
-- @param #number delay Delay in seconds. Default is 5 seconds. Minimum delay is 0.5 seconds.
-- @param #number delay (Optional) Delay in seconds. Default is 5 seconds. Minimum delay is 0.5 seconds.
-- @return #RAT RAT self object.
function RAT:SetSpawnDelay(delay)
self:F2(delay)
@@ -1514,7 +1514,7 @@ end
--- Set the interval between spawnings of the template group.
-- @param #RAT self
-- @param #number interval Interval in seconds. Default is 5 seconds. Minimum is 0.5 seconds.
-- @param #number interval (Optional) Interval in seconds. Default is 5 seconds. Minimum is 0.5 seconds.
-- @return #RAT RAT self object.
function RAT:SetSpawnInterval(interval)
self:F2(interval)
@@ -1525,7 +1525,7 @@ end
--- Set max number of groups that will be spawned. When this limit is reached, no more RAT groups are spawned.
-- @param #RAT self
-- @param #number Nmax Max number of groups. Default `nil`=unlimited.
-- @param #number Nmax (Optional) Max number of groups. Default `nil`=unlimited.
-- @return #RAT RAT self object.
function RAT:SetSpawnLimit(Nmax)
self.NspawnMax=Nmax
@@ -1545,7 +1545,7 @@ end
--- Sets the delay between despawning and respawning aircraft.
-- @param #RAT self
-- @param #number delay Delay in seconds until respawn happens. Default is 1 second. Minimum is 1 second.
-- @param #number delay (Optional) Delay in seconds until respawn happens. Default is 1 second. Minimum is 1 second.
-- @return #RAT RAT self object.
function RAT:SetRespawnDelay(delay)
self:F2(delay)
@@ -1566,7 +1566,7 @@ end
--- Number of tries to respawn an aircraft in case it has accidentally been spawned on runway.
-- @param #RAT self
-- @param #number n Number of retries. Default is 3.
-- @param #number n (Optional) Number of retries. Default is 3.
-- @return #RAT RAT self object.
function RAT:SetMaxRespawnTriedWhenSpawnedOnRunway(n)
self:F2(n)
@@ -1624,7 +1624,7 @@ end
--- Check if aircraft have accidentally been spawned on the runway. If so they will be removed immediately.
-- @param #RAT self
-- @param #boolean switch If true, check is performed. If false, this check is omitted.
-- @param #number radius Distance in meters until a unit is considered to have spawned accidentally on the runway. Default is 75 m.
-- @param #number radius (Optional) Distance in meters until a unit is considered to have spawned accidentally on the runway. Default is 75 m.
-- @return #RAT RAT self object.
function RAT:CheckOnRunway(switch, distance)
self:F2(switch)
@@ -1639,7 +1639,7 @@ end
--- Check if aircraft have accidentally been spawned on top of each other. If yes, they will be removed immediately.
-- @param #RAT self
-- @param #boolean switch If true, check is performed. If false, this check is omitted.
-- @param #number radius Radius in meters until which a unit is considered to be on top of each other. Default is 2 m.
-- @param #number radius (Optional) Radius in meters until which a unit is considered to be on top of each other. Default is 2 m.
-- @return #RAT RAT self object.
function RAT:CheckOnTop(switch, radius)
self:F2(switch)
@@ -1755,10 +1755,10 @@ end
--- Define how aircraft that are spawned in uncontrolled state are activate.
-- @param #RAT self
-- @param #number maxactivated Maximal numnber of activated aircraft. Absolute maximum will be the number of spawned groups. Default is 1.
-- @param #number delay Time delay in seconds before (first) aircraft is activated. Default is 1 second.
-- @param #number delta Time difference in seconds before next aircraft is activated. Default is 1 second.
-- @param #number frand Factor [0,...,1] for randomization of time difference between aircraft activations. Default is 0, i.e. no randomization.
-- @param #number maxactivated (Optional) Maximal numnber of activated aircraft. Absolute maximum will be the number of spawned groups. Default is 1.
-- @param #number delay (Optional) Time delay in seconds before (first) aircraft is activated. Default is 1 second.
-- @param #number delta (Optional) Time difference in seconds before next aircraft is activated. Default is 1 second.
-- @param #number frand (Optional) Factor [0,...,1] for randomization of time difference between aircraft activations. Default is 0, i.e. no randomization.
-- @return #RAT RAT self object.
function RAT:ActivateUncontrolled(maxactivated, delay, delta, frand)
self:F2({max=maxactivated, delay=delay, delta=delta, rand=frand})
@@ -1784,7 +1784,7 @@ end
--- Set the time after which inactive groups will be destroyed.
-- @param #RAT self
-- @param #number time Time in seconds. Default is 600 seconds = 10 minutes. Minimum is 60 seconds.
-- @param #number time (Optional) Time in seconds. Default is 600 seconds = 10 minutes. Minimum is 60 seconds.
-- @return #RAT RAT self object.
function RAT:TimeDestroyInactive(time)
self:F2(time)
@@ -1818,7 +1818,7 @@ end
--- Set the climb rate. This automatically sets the climb angle.
-- @param #RAT self
-- @param #number rate Climb rate in ft/min. Default is 1500 ft/min. Minimum is 100 ft/min. Maximum is 15,000 ft/min.
-- @param #number rate (Optional) Climb rate in ft/min. Default is 1500 ft/min. Minimum is 100 ft/min. Maximum is 15,000 ft/min.
-- @return #RAT RAT self object.
function RAT:SetClimbRate(rate)
self:F2(rate)
@@ -1912,7 +1912,7 @@ end
--- Max number of planes that get landing clearance of the RAT ATC. This setting effects all RAT objects and groups!
-- @param #RAT self
-- @param #number n Number of aircraft that are allowed to land simultaniously. Default is 2.
-- @param #number n (Optional) Number of aircraft that are allowed to land simultaniously. Default is 2.
-- @return #RAT RAT self object.
function RAT:ATC_Clearance(n)
self:F2(n)
@@ -1922,7 +1922,7 @@ end
--- Delay between granting landing clearance for simultanious landings. This setting effects all RAT objects and groups!
-- @param #RAT self
-- @param #number time Delay time when the next aircraft will get landing clearance event if the previous one did not land yet. Default is 240 sec.
-- @param #number time (Optional) Delay time when the next aircraft will get landing clearance event if the previous one did not land yet. Default is 240 sec.
-- @return #RAT RAT self object.
function RAT:ATC_Delay(time)
self:F2(time)
@@ -2102,6 +2102,8 @@ function RAT:_InitAircraft(DCSgroup)
local DCSdesc=DCSunit:getDesc()
local DCScategory=DCSgroup:getCategory()
local DCStype=DCSunit:getTypeName()
self:I({typename=DCStype})
UTILS.PrintTableToLog(DCSdesc.box,1,noprint,3,seen)
-- set category
if DCScategory==Group.Category.AIRPLANE then
@@ -2136,7 +2138,12 @@ function RAT:_InitAircraft(DCSgroup)
-- Store all descriptors.
--self.aircraft.descriptors=DCSdesc
-- Tomcat sizing as default
self.aircraft.length=12
self.aircraft.height=4
self.aircraft.width=10.3
-- aircraft dimensions
if DCSdesc.box then
self.aircraft.length=DCSdesc.box.max.x
@@ -2158,6 +2165,10 @@ function RAT:_InitAircraft(DCSgroup)
self.aircraft.length=11.48
self.aircraft.height=4.11
self.aircraft.width=13.41
elseif DCStype == "F-14A-135-GR" then
self.aircraft.length=12
self.aircraft.height=4
self.aircraft.width=10.3
end
self.aircraft.box=math.max(self.aircraft.length,self.aircraft.width)
@@ -2767,7 +2778,7 @@ end
--- Despawn group. The `FLIGHTGROUP` is despawned and stopped. The ratcraft is removed from the self.ratcraft table. Menues are removed.
-- @param #RAT self
-- @param Wrapper.Group#GROUP group Group to be despawned.
-- @param #number delay Delay in seconds before the despawn happens. Default is immidiately.
-- @param #number delay (Optional) Delay in seconds before the despawn happens. Default is immidiately.
function RAT:_Despawn(group, delay)
if delay and delay>0 then
@@ -3042,6 +3053,14 @@ function RAT:_SetRoute(takeoff, landing, _departure, _destination, _waypoint)
if landing==RAT.wp.air then
local vec2=destination:GetRandomVec2()
Pdestination=COORDINATE:NewFromVec2(vec2)
elseif destination:IsShip() then
-- Crudely predict where the ship will be
local _ship = UNIT:FindByName(destination:GetName())
local _shipHeading = _ship:GetHeading()
Pdestination=destination:GetCoordinate()
local _transitTime = Pdeparture:Get2DDistance(Pdestination) / VxCruise
Pdestination.x = Pdestination.x + (_ship:GetGroundSpeed() * math.cos(math.rad(_shipHeading)) * _transitTime)
Pdestination.z = Pdestination.z + (_ship:GetGroundSpeed() * math.sin(math.rad(_shipHeading)) * _transitTime)
else
Pdestination=destination:GetCoordinate()
end
@@ -4697,7 +4716,7 @@ end
--- Anticipated group name from alias and spawn index.
-- @param #RAT self
-- @param #number index Spawnindex of group if given or self.SpawnIndex+1 by default.
-- @param #number index (Optional) Spawnindex of group if given or self.SpawnIndex+1 by default.
-- @return #string Name the group will get after it is spawned.
function RAT:_AnticipatedGroupName(index)
local index=index or self.SpawnIndex+1
@@ -6005,7 +6024,7 @@ end
--- Adds a RAT object to the RAT manager. Parameter min specifies the limit how many RAT groups are at least alive.
-- @param #RATMANAGER self
-- @param #RAT ratobject RAT object to be managed.
-- @param #number min Minimum number of groups for this RAT object. Default is 1.
-- @param #number min (Optional) Minimum number of groups for this RAT object. Default is 1.
-- @return #RATMANAGER RATMANAGER self object.
function RATMANAGER:Add(ratobject,min)
@@ -6033,7 +6052,7 @@ end
--- Starts the RAT manager and spawns the initial random number RAT groups for each RAT object.
-- @param #RATMANAGER self
-- @param #number delay Time delay in seconds after which the RAT manager is started. Default is 5 seconds.
-- @param #number delay (Optional) Time delay in seconds after which the RAT manager is started. Default is 5 seconds.
-- @return #RATMANAGER RATMANAGER self object.
function RATMANAGER:Start(delay)
@@ -6106,7 +6125,7 @@ end
--- Stops the RAT manager.
-- @param #RATMANAGER self
-- @param #number delay Delay in seconds before the manager is stopped. Default is 1 second.
-- @param #number delay (Optional) Delay in seconds before the manager is stopped. Default is 1 second.
-- @return #RATMANAGER RATMANAGER self object.
function RATMANAGER:Stop(delay)
delay=delay or 1
@@ -6142,7 +6161,7 @@ end
--- Sets the time interval between spawning of groups.
-- @param #RATMANAGER self
-- @param #number dt Time interval in seconds. Default is 1 second.
-- @param #number dt (Optional) Time interval in seconds. Default is 1 second.
-- @return #RATMANAGER RATMANAGER self object.
function RATMANAGER:SetTspawn(dt)
self.dTspawn=dt or 1.0
+59 -38
View File
@@ -949,7 +949,7 @@ end
--- Set maximal strafing altitude. Player entering a strafe pit above that altitude are not registered for a valid pass.
-- @param #RANGE self
-- @param #number maxalt Maximum altitude in meters AGL. Default is 914 m = 3000 ft.
-- @param #number maxalt (Optional) Maximum altitude in meters AGL. Default is 914 m = 3000 ft.
-- @return #RANGE self
function RANGE:SetMaxStrafeAlt( maxalt )
self.strafemaxalt = maxalt or RANGE.Defaults.strafemaxalt
@@ -958,7 +958,7 @@ end
--- Set time interval for tracking bombs. A smaller time step increases accuracy but needs more CPU time.
-- @param #RANGE self
-- @param #number dt Time interval in seconds. Default is 0.005 s.
-- @param #number dt (Optional) Time interval in seconds. Default is 0.005 s.
-- @return #RANGE self
function RANGE:SetBombtrackTimestep( dt )
self.dtBombtrack = dt or RANGE.Defaults.dtBombtrack
@@ -967,7 +967,7 @@ end
--- Set time how long (most) messages are displayed.
-- @param #RANGE self
-- @param #number time Time in seconds. Default is 30 s.
-- @param #number time (Optional) Time in seconds. Default is 30 s.
-- @return #RANGE self
function RANGE:SetMessageTimeDuration( time )
self.Tmsg = time or RANGE.Defaults.Tmsg
@@ -1009,8 +1009,8 @@ end
--- Set FunkMan socket. Bombing and strafing results will be send to your Discord bot.
-- **Requires running FunkMan program**.
-- @param #RANGE self
-- @param #number Port Port. Default `10042`.
-- @param #string Host Host. Default "127.0.0.1".
-- @param #number Port (Optional) Port. Default `10042`.
-- @param #string Host (Optional) Host. Default "127.0.0.1".
-- @return #RANGE self
function RANGE:SetFunkManOn(Port, Host)
@@ -1032,7 +1032,7 @@ end
--- Set max number of player results that are displayed.
-- @param #RANGE self
-- @param #number nmax Number of results. Default is 10.
-- @param #number nmax (Optional) Number of results. Default is 10.
-- @return #RANGE self
function RANGE:SetDisplayedMaxPlayerResults( nmax )
self.ndisplayresult = nmax or RANGE.Defaults.ndisplayresult
@@ -1041,7 +1041,7 @@ end
--- Set range radius. Defines the area in which e.g. bomb impacts are smoked.
-- @param #RANGE self
-- @param #number radius Radius in km. Default 5 km.
-- @param #number radius (Optional) Radius in km. Default 5 km.
-- @return #RANGE self
function RANGE:SetRangeRadius( radius )
self.rangeradius = radius * 1000 or RANGE.Defaults.rangeradius
@@ -1050,7 +1050,7 @@ end
--- Set player setting whether bomb impact points are smoked or not.
-- @param #RANGE self
-- @param #boolean switch If true nor nil default is to smoke impact points of bombs.
-- @param #boolean switch (Optional) If true nor nil default is to smoke impact points of bombs.
-- @return #RANGE self
function RANGE:SetDefaultPlayerSmokeBomb( switch )
if switch == true or switch == nil then
@@ -1063,7 +1063,7 @@ end
--- Set bomb track threshold distance. Bombs/rockets/missiles are only tracked if player-range distance is less than this distance. Default 25 km.
-- @param #RANGE self
-- @param #number distance Threshold distance in km. Default 25 km.
-- @param #number distance (Optional) Threshold distance in km. Default 25 km.
-- @return #RANGE self
function RANGE:SetBombtrackThreshold( distance )
self.BombtrackThreshold = (distance or 25) * 1000
@@ -1110,7 +1110,7 @@ end
--- Enable range ceiling. Aircraft must be below the ceiling altitude to be considered in the range zone.
-- @param #RANGE self
-- @param #boolean enabled True if you would like to enable the ceiling check. If no value give, will Default to false.
-- @param #boolean enabled (Optional) True if you would like to enable the ceiling check. If no value give, will Default to false.
-- @return #RANGE self
function RANGE:EnableRangeCeiling( enabled )
self:T(self.lid.."EnableRangeCeiling")
@@ -1126,7 +1126,7 @@ end
--- Set smoke color for marking bomb targets. By default bomb targets are marked by red smoke.
-- @param #RANGE self
-- @param Utilities.Utils#SMOKECOLOR colorid Color id. Default `SMOKECOLOR.Red`.
-- @param Utilities.Utils#SMOKECOLOR colorid (Optional) Color id. Default `SMOKECOLOR.Red`.
-- @return #RANGE self
function RANGE:SetBombTargetSmokeColor( colorid )
self.BombSmokeColor = colorid or SMOKECOLOR.Red
@@ -1135,7 +1135,7 @@ end
--- Set score bomb distance.
-- @param #RANGE self
-- @param #number distance Distance in meters. Default 1000 m.
-- @param #number distance (Optional) Distance in meters. Default 1000 m.
-- @return #RANGE self
function RANGE:SetScoreBombDistance( distance )
self.scorebombdistance = distance or 1000
@@ -1144,7 +1144,7 @@ end
--- Set smoke color for marking strafe targets. By default strafe targets are marked by green smoke.
-- @param #RANGE self
-- @param Utilities.Utils#SMOKECOLOR colorid Color id. Default `SMOKECOLOR.Green`.
-- @param Utilities.Utils#SMOKECOLOR colorid (Optional) Color id. Default `SMOKECOLOR.Green`.
-- @return #RANGE self
function RANGE:SetStrafeTargetSmokeColor( colorid )
self.StrafeSmokeColor = colorid or SMOKECOLOR.Green
@@ -1153,7 +1153,7 @@ end
--- Set smoke color for marking strafe pit approach boxes. By default strafe pit boxes are marked by white smoke.
-- @param #RANGE self
-- @param Utilities.Utils#SMOKECOLOR colorid Color id. Default `SMOKECOLOR.White`.
-- @param Utilities.Utils#SMOKECOLOR colorid (Optional) Color id. Default `SMOKECOLOR.White`.
-- @return #RANGE self
function RANGE:SetStrafePitSmokeColor( colorid )
self.StrafePitSmokeColor = colorid or SMOKECOLOR.White
@@ -1162,7 +1162,7 @@ end
--- Set time delay between bomb impact and starting to smoke the impact point.
-- @param #RANGE self
-- @param #number delay Time delay in seconds. Default is 3 seconds.
-- @param #number delay (Optional) Time delay in seconds. Default is 3 seconds.
-- @return #RANGE self
function RANGE:SetSmokeTimeDelay( delay )
self.TdelaySmoke = delay or RANGE.Defaults.TdelaySmoke
@@ -1252,14 +1252,16 @@ end
--- Use SRS Simple-Text-To-Speech for transmissions. No sound files necessary.
-- @param #RANGE self
-- @param #string PathToSRS Path to SRS directory.
-- @param #number Port SRS port. Default 5002.
-- @param #number Coalition Coalition side, e.g. `coalition.side.BLUE` or `coalition.side.RED`. Default `coalition.side.BLUE`.
-- @param #number Frequency Frequency to use. Default is 256 MHz for range control and 305 MHz for instructor. If given, both control and instructor get this frequency.
-- @param #number Modulation Modulation to use, defaults to radio.modulation.AM
-- @param #number Volume Volume, between 0.0 and 1.0. Defaults to 1.0
-- @param #number Port (Optional) SRS port. Default 5002.
-- @param #number Coalition (Optional) Coalition side, e.g. `coalition.side.BLUE` or `coalition.side.RED`. Default `coalition.side.BLUE`.
-- @param #number Frequency (Optional) Frequency to use. Default is 256 MHz for range control and 305 MHz for instructor. If given, both control and instructor get this frequency.
-- @param #number Modulation (Optional) Modulation to use, defaults to radio.modulation.AM
-- @param #number Volume (Optional) Volume, between 0.0 and 1.0. Defaults to 1.0
-- @param #string PathToGoogleKey Path to Google TTS credentials.
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Backend (Optional) TTS Backend to be used.
-- @return #RANGE self
function RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume, PathToGoogleKey)
function RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume, PathToGoogleKey,Provider,Backend)
if PathToSRS or MSRS.path then
@@ -1273,6 +1275,9 @@ function RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume,
if self.rangezone then
self.controlmsrs:SetCoordinate(self.rangezone:GetCoordinate())
end
if Backend then
self.controlmsrs:SetBackend(Backend)
end
self.controlsrsQ = MSRSQUEUE:New("CONTROL")
self.instructmsrs=MSRS:New(PathToSRS or MSRS.path, Frequency or 305, Modulation or radio.modulation.AM)
@@ -1291,7 +1296,13 @@ function RANGE:SetSRS(PathToSRS, Port, Coalition, Frequency, Modulation, Volume,
self.instructmsrs:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
self.instructmsrs:SetProvider(MSRS.Provider.GOOGLE)
end
if Backend then
self.instructmsrs:SetBackend(Backend)
end
if Provider then
self.controlmsrs:SetProvider(Provider)
self.instructmsrs:SetProvider(Provider)
end
else
self:E(self.lid..string.format("ERROR: No SRS path specified!"))
end
@@ -1300,14 +1311,15 @@ end
--- (SRS) Set range control frequency and voice. Use `RANGE:SetSRS()` once first before using this function.
-- @param #RANGE self
-- @param #number frequency Frequency in MHz. Default 256 MHz.
-- @param #number modulation Modulation, defaults to radio.modulation.AM.
-- @param #number frequency (Optional) Frequency in MHz. Default 256 MHz.
-- @param #number modulation (Optional) Modulation, defaults to radio.modulation.AM.
-- @param #string voice Voice.
-- @param #string culture Culture, defaults to "en-US".
-- @param #string gender Gender, defaults to "female".
-- @param #string culture (Optional) Culture, defaults to "en-US".
-- @param #string gender (Optional) Gender, defaults to "female".
-- @param #string relayunitname Name of the unit used for transmission location.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #RANGE self
function RANGE:SetSRSRangeControl( frequency, modulation, voice, culture, gender, relayunitname )
function RANGE:SetSRSRangeControl( frequency, modulation, voice, culture, gender, relayunitname, Speaker )
if not self.instructmsrs then
self:E(self.lid.."Use myrange:SetSRS() once first before using myrange:SetSRSRangeControl!")
return self
@@ -1316,6 +1328,9 @@ function RANGE:SetSRSRangeControl( frequency, modulation, voice, culture, gender
self.controlmsrs:SetFrequencies(self.rangecontrolfreq)
self.controlmsrs:SetModulations(modulation or radio.modulation.AM)
self.controlmsrs:SetVoice(voice)
if Speaker then
self.controlmsrs:SetSpeakerPiper(Speaker)
end
self.controlmsrs:SetCulture(culture or "en-US")
self.controlmsrs:SetGender(gender or "female")
self.rangecontrol = true
@@ -1334,14 +1349,15 @@ end
--- (SRS) Set range instructor frequency and voice. Use `RANGE:SetSRS()` once first before using this function.
-- @param #RANGE self
-- @param #number frequency Frequency in MHz. Default 305 MHz.
-- @param #number modulation Modulation, defaults to radio.modulation.AM.
-- @param #number frequency (Optional) Frequency in MHz. Default 305 MHz.
-- @param #number modulation (Optional) Modulation, defaults to radio.modulation.AM.
-- @param #string voice Voice.
-- @param #string culture Culture, defaults to "en-US".
-- @param #string gender Gender, defaults to "male".
-- @param #string culture (Optional) Culture, defaults to "en-US".
-- @param #string gender (Optional) Gender, defaults to "male".
-- @param #string relayunitname Name of the unit used for transmission location.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #RANGE self
function RANGE:SetSRSRangeInstructor( frequency, modulation, voice, culture, gender, relayunitname )
function RANGE:SetSRSRangeInstructor( frequency, modulation, voice, culture, gender, relayunitname, Speaker )
if not self.instructmsrs then
self:E(self.lid.."Use myrange:SetSRS() once first before using myrange:SetSRSRangeInstructor!")
return self
@@ -1350,6 +1366,9 @@ function RANGE:SetSRSRangeInstructor( frequency, modulation, voice, culture, gen
self.instructmsrs:SetFrequencies(self.instructorfreq)
self.instructmsrs:SetModulations(modulation or radio.modulation.AM)
self.instructmsrs:SetVoice(voice)
if Speaker then
self.instructmsrs:SetSpeakerPiper(Speaker)
end
self.instructmsrs:SetCulture(culture or "en-US")
self.instructmsrs:SetGender(gender or "male")
self.instructor = true
@@ -1368,7 +1387,7 @@ end
--- Enable range control and set frequency (non-SRS).
-- @param #RANGE self
-- @param #number frequency Frequency in MHz. Default 256 MHz.
-- @param #number frequency (Optional) Frequency in MHz. Default 256 MHz.
-- @param #string relayunitname Name of the unit used for transmission.
-- @return #RANGE self
function RANGE:SetRangeControl( frequency, relayunitname )
@@ -1379,7 +1398,7 @@ end
--- Enable instructor radio and set frequency (non-SRS).
-- @param #RANGE self
-- @param #number frequency Frequency in MHz. Default 305 MHz.
-- @param #number frequency (Optional) Frequency in MHz. Default 305 MHz.
-- @param #string relayunitname Name of the unit used for transmission.
-- @return #RANGE self
function RANGE:SetInstructorRadio( frequency, relayunitname )
@@ -1390,7 +1409,7 @@ end
--- Set sound files folder within miz file.
-- @param #RANGE self
-- @param #string path Path for sound files. Default "Range Soundfiles/". Mind the slash "/" at the end!
-- @param #string path (Optional) Path for sound files. Default "Range Soundfiles/". Mind the slash "/" at the end!
-- @return #RANGE self
function RANGE:SetSoundfilesPath( path )
self.soundpath = tostring( path or "Range Soundfiles/" )
@@ -1630,11 +1649,13 @@ end
-- @param #RANGE self
-- @param #table targetnames Single or multiple (Table) names of unit or static objects serving as bomb targets.
-- @param #number goodhitrange (Optional) Max distance from target unit (in meters) which is considered as a good hit. Default is 25 m.
-- @param #boolean randommove If true, unit will move randomly within the range. Default is false.
-- @param #boolean randommove (Optional) If true, unit will move randomly within the range. Default is false.
-- @return #RANGE self
function RANGE:AddBombingTargets( targetnames, goodhitrange, randommove )
self:F( { targetnames = targetnames, goodhitrange = goodhitrange, randommove = randommove } )
randommove = randommove or false
-- Create a table if necessary.
if type( targetnames ) ~= "table" then
targetnames = { targetnames }
@@ -1669,7 +1690,7 @@ end
-- @param #RANGE self
-- @param Wrapper.Positionable#POSITIONABLE unit Positionable (unit or static) of the bombing target.
-- @param #number goodhitrange Max distance from unit which is considered as a good hit.
-- @param #boolean randommove If true, unit will move randomly within the range. Default is false.
-- @param #boolean randommove (Optional) If true, unit will move randomly within the range. Default is false.
-- @return #RANGE self
function RANGE:AddBombingTargetUnit( unit, goodhitrange, randommove )
self:F( { unit = unit, goodhitrange = goodhitrange, randommove = randommove } )
@@ -1785,7 +1806,7 @@ end
-- @param #RANGE self
-- @param Wrapper.Group#GROUP group Group of bombing targets. Can also be given as group name.
-- @param #number goodhitrange Max distance from unit which is considered as a good hit.
-- @param #boolean randommove If true, unit will move randomly within the range. Default is false.
-- @param #boolean randommove (Optional) If true, unit will move randomly within the range. Default is false.
-- @return #RANGE self
function RANGE:AddBombingTargetGroup( group, goodhitrange, randommove )
self:F( { group = group, goodhitrange = goodhitrange, randommove = randommove } )
@@ -394,7 +394,7 @@ end
--- Set a prefix string that will be displayed at each scoring message sent.
-- @param #SCORING self
-- @param #string DisplayMessagePrefix (Default="Scoring: ") The scoring prefix string.
-- @param #string DisplayMessagePrefix (Optional) (Default="Scoring: ") The scoring prefix string.
-- @return #SCORING
function SCORING:SetDisplayMessagePrefix( DisplayMessagePrefix )
self.DisplayMessagePrefix = DisplayMessagePrefix or ""
+2 -2
View File
@@ -182,7 +182,7 @@ end
--- Sets the engagement range of the SAMs. Defaults to 75% to make it more deadly. Feature Request #1355
-- @param #SEAD self
-- @param #number range Set the engagement range in percent, e.g. 55 (default 75)
-- @param #number range (Optional) Set the engagement range in percent, e.g. 55 (default 75)
-- @return #SEAD self
function SEAD:SetEngagementRange(range)
self:T( { range } )
@@ -197,7 +197,7 @@ end
--- Set the padding in seconds, which extends the radar off time calculated by SEAD
-- @param #SEAD self
-- @param #number Padding Extra number of seconds to add for the switch-on (default 10 seconds)
-- @param #number Padding (Optional) Extra number of seconds to add for the switch-on (default 10 seconds)
-- @return #SEAD self
function SEAD:SetPadding(Padding)
self:T( { Padding } )
+22 -17
View File
@@ -158,15 +158,15 @@ do
--- Instantiates a new SHORAD object
-- @param #SHORAD self
-- @param #string Name Name of this SHORAD
-- @param #string ShoradPrefix Filter for the Shorad #SET_GROUP
-- @param Core.Set#SET_GROUP Samset The #SET_GROUP of SAM sites to defend
-- @param #number Radius Defense radius in meters, used to switch on SHORAD groups **within** this radius
-- @param #number ActiveTimer Determines how many seconds the systems stay on red alert after wake-up call
-- @param #string Name (Optional) Name of this SHORAD. Default "MyShorad"
-- @param #string ShoradPrefix (Optional) Filter for the Shorad #SET_GROUP. Default "SAM SHORAD"
-- @param Core.Set#SET_GROUP Samset (Optional) The #SET_GROUP of SAM sites to defend. Default is based on default ShoradPrefix and default Coalition.
-- @param #number Radius (Optional) Defense radius in meters, used to switch on SHORAD groups **within** this radius. Default is 20000m.
-- @param #number ActiveTimer (Optional) Determines how many seconds the systems stay on red alert after wake-up call. Default 600s
-- @param #string Coalition Coalition, i.e. "blue", "red", or "neutral"
-- @param #boolean UseEmOnOff Use Emissions On/Off rather than Alarm State Red/Green (default: use Emissions switch)
-- @param #boolean SmokeDecoy Throw smoke decoy when getting activated. Defaults to false.
-- @param #number SmokeDecoyColor SMOLECOLOR to use. Defaults to SMOLECOLOR.White
-- @param #boolean SmokeDecoy (Optional) Throw smoke decoy when getting activated. Defaults to false.
-- @param #number SmokeDecoyColor (Optional) SMOLECOLOR to use. Defaults to SMOLECOLOR.White
-- @return #SHORAD self
function SHORAD:New(Name, ShoradPrefix, Samset, Radius, ActiveTimer, Coalition, UseEmOnOff, SmokeDecoy, SmokeDecoyColor)
local self = BASE:Inherit( self, FSM:New() )
@@ -240,9 +240,9 @@ do
--- Add a SET_ZONE of zones for Shoot&Scoot
-- @param #SHORAD self
-- @param Core.Set#SET_ZONE ZoneSet Set of zones to be used. Units will move around to the next (random) zone between 100m and 3000m away.
-- @param #number Number Number of closest zones to be considered, defaults to 3.
-- @param #number Number (Optional) Number of closest zones to be considered, defaults to 3.
-- @param #boolean Random If true, use a random coordinate inside the next zone to scoot to.
-- @param #string Formation Formation to use, defaults to "Cone". See mission editor dropdown for options.
-- @param #string Formation (Optional) Formation to use, defaults to "Cone". See mission editor dropdown for options.
-- @return #SHORAD self
function SHORAD:AddScootZones(ZoneSet, Number, Random, Formation)
self:T(self.lid .. " AddScootZones")
@@ -795,15 +795,20 @@ do
local tgtgrp1 = self.Samset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtcoord1 = tgtgrp1:GetCoordinate()
local tgtgrp2 = self.Groupset:FindNearestGroupFromPointVec2(tgtcoord)
local tgtcoord2 = tgtgrp2:GetCoordinate()
local dist1 = tgtcoord:Get2DDistance(tgtcoord1)
local dist2 = tgtcoord:Get2DDistance(tgtcoord2)
if dist1 < dist2 then
targetunit = tgtgrp1
targetcat = Object.Category.UNIT
if tgtgrp2 then
local tgtcoord2 = tgtgrp2:GetCoordinate()
local dist1 = tgtcoord:Get2DDistance(tgtcoord1)
local dist2 = tgtcoord:Get2DDistance(tgtcoord2)
if dist1 < dist2 then
targetunit = tgtgrp1
targetcat = Object.Category.UNIT
else
targetunit = tgtgrp2
targetcat = Object.Category.UNIT
end
else
targetunit = tgtgrp2
targetunit = tgtgrp1
targetcat = Object.Category.UNIT
end
end
+10 -10
View File
@@ -251,7 +251,7 @@ STRATEGO.Type = {
-- @param #STRATEGO self
-- @param #string Name Name of the Adviser.
-- @param #number Coalition Coalition, e.g. coalition.side.BLUE.
-- @param #number MaxDist Maximum distance of a single route in kilometers, defaults to 150.
-- @param #number MaxDist (Optional) Maximum distance of a single route in kilometers, defaults to 150.
-- @return #STRATEGO self
function STRATEGO:New(Name,Coalition,MaxDist)
-- Inherit everything from FSM class.
@@ -362,7 +362,7 @@ end
--- [USER] Set up usage of budget and set an initial budget in points.
-- @param #STRATEGO self
-- @param #boolean Usebudget If true, use budget for advisory calculations.
-- @param #number StartBudget Initial budget to be used, defaults to 500.
-- @param #number StartBudget (Optional) Initial budget to be used, defaults to 500.
function STRATEGO:SetUsingBudget(Usebudget,StartBudget)
self:T(self.lid.."SetUsingBudget")
self.usebudget = Usebudget
@@ -394,10 +394,10 @@ end
--- [USER] Set weights for nodes and routes to determine their importance.
-- @param #STRATEGO self
-- @param #number MaxRunways Set the maximum number of runways the big (equals strategic) airbases on the map have. Defaults to 3. The weight of an airbase node hence equals the number of runways.
-- @param #number PortWeight Set what weight a port node has. Defaults to 3.
-- @param #number POIWeight Set what weight a POI node has. Defaults to 1.
-- @param #number RouteFactor Defines which weight each route between two defined nodes gets: Weight * RouteFactor.
-- @param #number MaxRunways (Optional) Set the maximum number of runways the big (equals strategic) airbases on the map have. Defaults to 3. The weight of an airbase node hence equals the number of runways.
-- @param #number PortWeight (Optional) Set what weight a port node has. Defaults to 3.
-- @param #number POIWeight (Optional) Set what weight a POI node has. Defaults to 1.
-- @param #number RouteFactor (Optional) Defines which weight each route between two defined nodes gets: Weight * RouteFactor. Defaults to 5.
-- @return #STRATEGO self
function STRATEGO:SetWeights(MaxRunways,PortWeight,POIWeight,RouteFactor)
self:T(self.lid.."SetWeights")
@@ -410,7 +410,7 @@ end
--- [USER] Set neutral benefit, i.e. how many points it is cheaper to decide for a neutral vs an enemy node when taking decisions.
-- @param #STRATEGO self
-- @param #number NeutralBenefit Pointsm defaults to 100.
-- @param #number NeutralBenefit (Optional) Pointsm defaults to 100.
-- @return #STRATEGO self
function STRATEGO:SetNeutralBenefit(NeutralBenefit)
self:T(self.lid.."SetNeutralBenefit")
@@ -420,9 +420,9 @@ end
--- [USER] Set how many units of which minimum threat level are needed to capture one node (i.e. the underlying OpsZone).
-- @param #STRATEGO self
-- @param #number CaptureUnits Number of units needed, defaults to three.
-- @param #number CaptureThreatlevel Threat level needed, can be 0..10, defaults to one.
-- @param #table CaptureCategories Table of object categories which can capture a node, defaults to `{Object.Category.UNIT}`.
-- @param #number CaptureUnits (Optional) Number of units needed, defaults to 3.
-- @param #number CaptureThreatlevel (Optional) Threat level needed, can be 0..10, defaults to 1.
-- @param #table CaptureCategories (Optional) Table of object categories which can capture a node, defaults to `{Object.Category.UNIT}`.
-- @return #STRATEGO self
function STRATEGO:SetCaptureOptions(CaptureUnits,CaptureThreatlevel,CaptureCategories)
self:T(self.lid.."SetCaptureOptions")
@@ -308,7 +308,7 @@ SUPPRESSION.version="0.9.4"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Creates a new AI_suppression object.
--- Creates a new suppression object.
-- @param #SUPPRESSION self
-- @param Wrapper.Group#GROUP group The GROUP object for which suppression should be applied.
-- @return #SUPPRESSION self
@@ -642,7 +642,7 @@ end
--- Set average, minimum and maximum time a unit is suppressed each time it gets hit.
-- @param #SUPPRESSION self
-- @param #number Tave Average time [seconds] a group will be suppressed. Default is 15 seconds.
-- @param #number Tave (Optional) Average time [seconds] a group will be suppressed. Default is 15 seconds.
-- @param #number Tmin (Optional) Minimum time [seconds] a group will be suppressed. Default is 5 seconds.
-- @param #number Tmax (Optional) Maximum time a group will be suppressed. Default is 25 seconds.
function SUPPRESSION:SetSuppressionTime(Tave, Tmin, Tmax)
@@ -697,7 +697,7 @@ end
--- Set the formation a group uses for fall back, hide or retreat.
-- @param #SUPPRESSION self
-- @param #string formation Formation of the group. Default "Vee".
-- @param #string formation (Optional) Formation of the group. Default "Vee".
function SUPPRESSION:SetFormation(formation)
self:F(formation)
self.Formation=formation or "Vee"
@@ -705,7 +705,7 @@ end
--- Set speed a group moves at for fall back, hide or retreat.
-- @param #SUPPRESSION self
-- @param #number speed Speed in km/h of group. Default max speed the group can do.
-- @param #number speed (Optional) Speed in km/h of group. Default max speed the group can do.
function SUPPRESSION:SetSpeed(speed)
self:F(speed)
self.Speed=speed or self.SpeedMax
@@ -793,7 +793,7 @@ end
-- If the group consists of only a singe unit, this referrs to the life of the unit.
-- If the group consists of more than one unit, this referrs to the group strength relative to its initial strength.
-- @param #SUPPRESSION self
-- @param #number damage Damage in percent. If group gets damaged above this value, the group will retreat. Default 50 %.
-- @param #number damage (Optional) Damage in percent. If group gets damaged above this value, the group will retreat. Default 50 %.
function SUPPRESSION:SetRetreatDamage(damage)
self:F(damage)
self.RetreatDamage=damage or 50
@@ -801,7 +801,7 @@ end
--- Set time a group waits in the retreat zone before it resumes its mission. Default is two hours.
-- @param #SUPPRESSION self
-- @param #number time Time in seconds. Default 7200 seconds = 2 hours.
-- @param #number time (Optional) Time in seconds. Default 7200 seconds = 2 hours.
function SUPPRESSION:SetRetreatWait(time)
self:F(time)
self.RetreatWait=time or 7200
@@ -809,7 +809,7 @@ end
--- Set alarm state a group will get after it returns from a fall back or take cover.
-- @param #SUPPRESSION self
-- @param #string alarmstate Alarm state. Possible "Auto", "Green", "Red". Default is "Auto".
-- @param #string alarmstate (Optional) Alarm state. Possible "Auto", "Green", "Red". Default is "Auto".
function SUPPRESSION:SetDefaultAlarmState(alarmstate)
self:F(alarmstate)
if alarmstate:lower()=="auto" then
@@ -825,7 +825,7 @@ end
--- Set Rules of Engagement (ROE) a group will get when it recovers from suppression.
-- @param #SUPPRESSION self
-- @param #string roe ROE after suppression. Possible "Free", "Hold" or "Return". Default "Free".
-- @param #string roe (Optional) ROE after suppression. Possible "Free", "Hold" or "Return". Default "Free".
function SUPPRESSION:SetDefaultROE(roe)
self:F(roe)
if roe:lower()=="free" then
@@ -841,7 +841,7 @@ end
--- Create an F10 menu entry for the suppressed group. The menu is mainly for Debugging purposes.
-- @param #SUPPRESSION self
-- @param #boolean switch Enable=true or disable=false menu group. Default is true.
-- @param #boolean switch (Optional) Enable=true or disable=false menu group. Default is true.
function SUPPRESSION:MenuOn(switch)
self:F(switch)
if switch==nil then
@@ -909,7 +909,7 @@ function SUPPRESSION:StatusReport(message)
self:GetState(), nunits, self.IniGroupStrength, self.CurrentROE, self.CurrentAlarmState, self.Nhit, life_min, life_max, life_ave, life_ave0, ammotot, detectedG, detectedU)
MESSAGE:New(text, 10):ToAllIf(message or self.Debug)
self:I(self.lid..text)
self:T(self.lid..text)
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -1194,7 +1194,7 @@ function SUPPRESSION:onafterFightBack(Controllable, From, Event, To)
local Waypoints = group:GetTemplateRoutePoints()
-- env.info("FF waypoints",showMessageBox)
-- self:I(Waypoints)
self:T2({Waypoints})
group:Route(Waypoints, 5)
@@ -1337,7 +1337,7 @@ function SUPPRESSION:onafterOutOfAmmo(Controllable, From, Event, To)
self:_EventFromTo("onafterOutOfAmmo", Event, From, To)
-- Info to log.
self:I(self.lid..string.format("Out of ammo!"))
self:T(self.lid..string.format("Out of ammo!"))
-- Order retreat if retreat zone was specified.
if self.RetreatZone then
@@ -1485,7 +1485,7 @@ function SUPPRESSION:onafterStop(Controllable, From, Event, To)
local text=string.format("Stopping SUPPRESSION for group %s", self.Controllable:GetName())
MESSAGE:New(text, 10):ToAllIf(self.Debug)
self:I(self.lid..text)
self:T(self.lid..text)
-- Clear all pending schedules
self.CallScheduler:Clear()
@@ -1682,9 +1682,9 @@ end
--- Make group run/drive to a certain point. We put in several intermediate waypoints because sometimes the group stops before it arrived at the desired point.
--@param #SUPPRESSION self
--@param Core.Point#COORDINATE fin Coordinate where we want to go.
--@param #number speed Speed of group. Default is 20.
--@param #string formation Formation of group. Default is "Vee".
--@param #number wait Time the group will wait/hold at final waypoint. Default is 30 seconds.
--@param #number speed (Optional) Speed of group. Default is 20.
--@param #string formation (Optional) Formation of group. Default is "Vee".
--@param #number wait (Optional) Time the group will wait/hold at final waypoint. Default is 30 seconds.
function SUPPRESSION:_Run(fin, speed, formation, wait)
speed=speed or 20
@@ -1946,7 +1946,7 @@ end
--- Sets the ROE for the group and updates the current ROE variable.
-- @param #SUPPRESSION self
-- @param #string roe ROE the group will get. Possible "Free", "Hold", "Return". Default is self.DefaultROE.
-- @param #string roe (Optional) ROE the group will get. Possible "Free", "Hold", "Return". Default is self.DefaultROE.
function SUPPRESSION:_SetROE(roe)
local group=self.Controllable --Wrapper.Controllable#CONTROLLABLE
@@ -1975,7 +1975,7 @@ end
--- Sets the alarm state of the group and updates the current alarm state variable.
-- @param #SUPPRESSION self
-- @param #string state Alarm state the group will get. Possible "Auto", "Green", "Red". Default is self.DefaultAlarmState.
-- @param #string state (Optional) Alarm state the group will get. Possible "Auto", "Green", "Red". Default is self.DefaultAlarmState.
function SUPPRESSION:_SetAlarmState(state)
local group=self.Controllable --Wrapper.Controllable#CONTROLLABLE
@@ -181,8 +181,8 @@ end
--- [USER] Set activation radius for Helos and Planes in Nautical Miles.
-- @param #TIRESIAS self
-- @param #number HeloMiles Radius around a Helicopter in which AI ground units will be activated. Defaults to 10NM.
-- @param #number PlaneMiles Radius around an Airplane in which AI ground units will be activated. Defaults to 25NM.
-- @param #number HeloMiles (Optional) Radius around a Helicopter in which AI ground units will be activated. Defaults to 10NM.
-- @param #number PlaneMiles (Optional) Radius around an Airplane in which AI ground units will be activated. Defaults to 25NM.
-- @return #TIRESIAS self
function TIRESIAS:SetActivationRanges(HeloMiles, PlaneMiles)
self.HeloSwitchRange = HeloMiles or 10
@@ -194,8 +194,8 @@ end
---[USER] Set AAA Ranges - AAA equals non-SAM systems which qualify as AAA in DCS world.
-- @param #TIRESIAS self
-- @param #number FiringRange The engagement range that AAA units will be set to. Can be 0 to 100 (percent). Defaults to 60.
-- @param #boolean SwitchAAA Decide if these system will have their AI switched off, too. Defaults to true.
-- @param #number FiringRange (Optional) The engagement range that AAA units will be set to. Can be 0 to 100 (percent). Defaults to 60.
-- @param #boolean SwitchAAA (Optional) Decide if these system will have their AI switched off, too. Defaults to true.
-- @return #TIRESIAS self
function TIRESIAS:SetAAARanges(FiringRange, SwitchAAA)
self.AAARange = FiringRange or 60
+75 -227
View File
@@ -35,7 +35,6 @@
-- ===
--
-- ### Author: **funkyfranky**
-- ### Co-author: FlightControl (cargo dispatcher classes)
--
-- ===
--
@@ -132,14 +131,7 @@
-- a reasonable degree in DCS at the moment and hence cannot be used yet.
--
-- Furthermore, ground assets can be transferred between warehouses by transport units. These are APCs, helicopters and airplanes. The transportation process is modeled
-- in a realistic way by using the corresponding cargo dispatcher classes, i.e.
--
-- * @{AI.AI_Cargo_Dispatcher_APC#AI_DISPATCHER_APC}
-- * @{AI.AI_Cargo_Dispatcher_Helicopter#AI_DISPATCHER_HELICOPTER}
-- * @{AI.AI_Cargo_Dispatcher_Airplane#AI_DISPATCHER_AIRPLANE}
--
-- Depending on which cargo dispatcher is used (ground or airbore), similar considerations like in the self propelled case are necessary. Howver, note that
-- the dispatchers as of yet cannot use user defined off road paths for example since they are classes of their own and use a different routing logic.
-- in a realistic way by using the @{Ops.OpsTransport#OPSTRANSPORT} class.
--
-- ===
--
@@ -230,18 +222,6 @@
-- of 630 kg. This is important as groups cannot be split between carrier units when transporting, i.e. the total weight of the whole group must be smaller than the
-- cargo bay of the transport carrier.
--
-- ### Setting the Load Radius
-- Boading and loading of cargo into a carrier is modeled in a realistic fashion in the AI\_CARGO\DISPATCHER classes, which are used inernally by the WAREHOUSE class.
-- Meaning that troops (cargo) will board, i.e. run or drive to the carrier, and only once they are in close proximity to the transporter they will be loaded (disappear).
--
-- Unfortunately, there are some situations where problems can occur. For example, in DCS tanks have the strong tentendcy not to drive around obstacles but rather to roll over them.
-- I have seen cases where an aircraft of the same coalition as the tank was in its way and the tank drove right through the plane waiting on a parking spot and destroying it.
--
-- As a workaround it is possible to set a larger load radius so that the cargo units are despawned further away from the carrier via the optional **loadradius** parameter:
--
-- warehouseBatumi:AddAsset("Leopard 2", nil, nil, nil, nil, 250)
--
-- Adding the asset like this will cause the units to be loaded into the carrier already at a distance of 250 meters.
--
-- ### Setting the AI Skill
--
@@ -486,7 +466,7 @@
-- and the road connection is less than 3 km.
--
-- The user can set the road connection manually with the @{#WAREHOUSE.SetRoadConnection} function. This is only functional for self propelled assets at the moment
-- and not if using the AI dispatcher classes since these have a different logic to find the route.
-- and not if using the OPSTRANSPORT class since this has a different logic to find the route.
--
-- ## Off Road Connections
--
@@ -595,7 +575,7 @@
--
-- ## Cargo Bay and Weight Limitations
--
-- The transportation of cargo is handled by the AI\_Dispatcher classes. These take the cargo bay of a carrier and the weight of
-- The transportation of cargo is handled by the `OPSTRANSPORT` class. This takes the cargo bay of a carrier and the weight of
-- the cargo into account so that a carrier can only load a realistic amount of cargo.
--
-- However, if troops are supposed to be transported between warehouses, there is one important limitations one has to keep in mind.
@@ -1798,12 +1778,13 @@ _WAREHOUSEDB = {
--- Warehouse class version.
-- @field #string version
WAREHOUSE.version="1.0.2a"
WAREHOUSE.version="2.0.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO: Warehouse todo list.
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- DONE: Switch from AI Dispatchers to OPSTRANSPORT
-- TODO: Add check if assets "on the move" are stationary. Can happen if ground units get stuck in buildings. If stationary auto complete transport by adding assets to request warehouse? Time?
-- TODO: Optimize findpathonroad. Do it only once (first time) and safe paths between warehouses similar to off-road paths.
-- NOGO: Spawn assets only virtually, i.e. remove requested assets from stock but do NOT spawn them ==> Interface to A2A dispatcher! Maybe do a negative sign on asset number?
@@ -2486,14 +2467,14 @@ function WAREHOUSE:New(warehouse, alias)
--- Triggers the FSM event "Save" when the warehouse assets are saved to file on disk.
-- @function [parent=#WAREHOUSE] Save
-- @param #WAREHOUSE self
-- @param #string path Path where the file is saved. Default is the DCS installation root directory.
-- @param #string path (Optional) Path where the file is saved. Default is the DCS installation root directory.
-- @param #string filename (Optional) File name. Default is WAREHOUSE-<UID>_<ALIAS>.txt.
--- Triggers the FSM event "Save" with a delay when the warehouse assets are saved to a file.
-- @function [parent=#WAREHOUSE] __Save
-- @param #WAREHOUSE self
-- @param #number delay Delay in seconds.
-- @param #string path Path where the file is saved. Default is the DCS installation root directory.
-- @param #string path (Optional) Path where the file is saved. Default is the DCS installation root directory.
-- @param #string filename (Optional) File name. Default is WAREHOUSE-<UID>_<ALIAS>.txt.
--- On after "Save" event user function. Called when the warehouse assets are saved to disk.
@@ -2502,21 +2483,21 @@ function WAREHOUSE:New(warehouse, alias)
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #string path Path where the file is saved. Default is the DCS installation root directory.
-- @param #string path (Optional) Path where the file is saved. Default is the DCS installation root directory.
-- @param #string filename (Optional) File name. Default is WAREHOUSE-<UID>_<ALIAS>.txt.
--- Triggers the FSM event "Load" when the warehouse is loaded from a file on disk.
-- @function [parent=#WAREHOUSE] Load
-- @param #WAREHOUSE self
-- @param #string path Path where the file is located. Default is the DCS installation root directory.
-- @param #string path (Optional) Path where the file is located. Default is the DCS installation root directory.
-- @param #string filename (Optional) File name. Default is WAREHOUSE-<UID>_<ALIAS>.txt.
--- Triggers the FSM event "Load" with a delay when the warehouse assets are loaded from disk.
-- @function [parent=#WAREHOUSE] __Load
-- @param #WAREHOUSE self
-- @param #number delay Delay in seconds.
-- @param #string path Path where the file is located. Default is the DCS installation root directory.
-- @param #string path (Optional) Path where the file is located. Default is the DCS installation root directory.
-- @param #string filename (Optional) File name. Default is WAREHOUSE-<UID>_<ALIAS>.txt.
--- On after "Load" event user function. Called when the warehouse assets are loaded from disk.
@@ -2525,7 +2506,7 @@ function WAREHOUSE:New(warehouse, alias)
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #string path Path where the file is located. Default is the DCS installation root directory.
-- @param #string path (Optional) Path where the file is located. Default is the DCS installation root directory.
-- @param #string filename (Optional) File name. Default is WAREHOUSE-<UID>_<ALIAS>.txt.
@@ -2595,7 +2576,7 @@ end
--- Set low fuel threshold. If one unit of an asset has less fuel than this number, the event AssetLowFuel will be fired.
-- @param #WAREHOUSE self
-- @param #number threshold Relative low fuel threshold, i.e. a number in [0,1]. Default 0.15 (15%).
-- @param #number threshold (Optional) Relative low fuel threshold, i.e. a number in [0,1]. Default 0.15 (15%).
-- @return #WAREHOUSE self
function WAREHOUSE:SetLowFuelThreshold(threshold)
self.lowfuelthresh=threshold or 0.15
@@ -2613,7 +2594,7 @@ end
--- Set verbosity level.
-- @param #WAREHOUSE self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #WAREHOUSE self
function WAREHOUSE:SetVerbosityLevel(VerbosityLevel)
self.verbosity=VerbosityLevel or 0
@@ -2724,7 +2705,7 @@ end
--- Enable auto save of warehouse assets at mission end event.
-- @param #WAREHOUSE self
-- @param #string path Path where to save the asset data file.
-- @param #string filename File name. Default is generated automatically from warehouse id.
-- @param #string filename (Optional) File name. Default is generated automatically from warehouse id.
-- @return #WAREHOUSE self
function WAREHOUSE:SetSaveOnMissionEnd(path, filename)
self.autosave=true
@@ -3368,7 +3349,7 @@ end
-- Note that this is the time, the DCS engine uses not something we can control on a user level or we could get via scripting.
-- You need to input the value. On the DCS forum it was stated that this is currently one hour. Hence this is the default value.
-- @param #WAREHOUSE self
-- @param #number RepairTime Time in seconds until the runway is repaired. Default 3600 sec (one hour).
-- @param #number RepairTime (Optional) Time in seconds until the runway is repaired. Default 3600 sec (one hour).
-- @return #WAREHOUSE self
function WAREHOUSE:SetRunwayRepairtime(RepairTime)
self.runwayrepairtime=RepairTime or 3600
@@ -3743,12 +3724,15 @@ function WAREHOUSE:_JobDone()
-- Check conditions for being back home.
local ishome=false
if category==Group.Category.GROUND or category==Group.Category.HELICOPTER then
-- Units go back to the spawn zone, helicopters land and they should not move any more.
ishome=inspawnzone and onground and notmoving
if category==Group.Category.GROUND then
-- Ground units go back to the spawn zone and they should not move any more.
ishome=inspawnzone and notmoving
elseif category==Group.Category.AIRPLANE then
-- Planes need to be on ground at their home airbase and should not move any more.
ishome=athomebase and onground and notmoving
elseif category==Group.Category.HELICOPTER then
-- Helicopters go back to their airbase or spawn zone and should not move any more.
ishome=(athomebase or inspawnzone) and onground and notmoving
end
-- Debug text.
@@ -3907,7 +3891,7 @@ end
-- @param #string Event Event.
-- @param #string To To state.
-- @param Wrapper.Group#GROUP group Group or template group to be added to the warehouse stock.
-- @param #number ngroups Number of groups to add to the warehouse stock. Default is 1.
-- @param #number ngroups (Optional) Number of groups to add to the warehouse stock. Default is 1.
-- @param #WAREHOUSE.Attribute forceattribute (Optional) Explicitly force a generalized attribute for the asset. This has to be an @{#WAREHOUSE.Attribute}.
-- @param #number forcecargobay (Optional) Explicitly force cargobay weight limit in kg for cargo carriers. This is for each *unit* of the group.
-- @param #number forceweight (Optional) Explicitly force weight in kg of each unit in the group.
@@ -4113,7 +4097,7 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
-- Get name of template group.
local templategroupname=group:GetName()
local unit = group:GetUnit(1)
local Descriptors= (unit and unit:IsAlive()) and unit:GetDesc() or {}
local Descriptors= (unit and unit:IsAlive()~=nil) and unit:GetDesc() or {}
local Category=group:GetCategory()
local TypeName=group:GetTypeName() or "none"
local SpeedMax=group:GetSpeedMax()
@@ -4131,7 +4115,7 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
for _i,_unit in pairs(group:GetUnits()) do
local unit=_unit --Wrapper.Unit#UNIT
local Desc=unit:GetDesc()
-- Weight. We sum up all units in the group.
local unitweight=forceweight or Desc.massEmpty
if unitweight then
@@ -4697,136 +4681,48 @@ function WAREHOUSE:onafterRequestSpawned(From, Event, To, Request, CargoGroupSet
------------------------------------------------------------------------------------------------------------------------------------
-- Prepare cargo groups for transport
------------------------------------------------------------------------------------------------------------------------------------
-- TODO: set asset.weight for cargos
-- Board radius, i.e. when the cargo will begin to board the carrier
local _boardradius=500
-------------------------
-- Create OPSTRANSPORT --
-------------------------
if Request.transporttype==WAREHOUSE.TransportType.AIRPLANE then
_boardradius=5000
elseif Request.transporttype==WAREHOUSE.TransportType.HELICOPTER then
--_loadradius=1000
--_boardradius=nil
elseif Request.transporttype==WAREHOUSE.TransportType.APC then
--_boardradius=nil
elseif Request.transporttype==WAREHOUSE.TransportType.SHIP or Request.transporttype==WAREHOUSE.TransportType.AIRCRAFTCARRIER
or Request.transporttype==WAREHOUSE.TransportType.ARMEDSHIP or Request.transporttype==WAREHOUSE.TransportType.WARSHIP then
_boardradius=6000
end
-- Empty cargo group set.
local CargoGroups=SET_CARGO:New()
-- Add cargo groups to set.
for _,_group in pairs(CargoGroupSet:GetSetObjects()) do
-- Find asset belonging to this group.
local asset=self:FindAssetInDB(_group)
-- New cargo group object.
local cargogroup=CARGO_GROUP:New(_group, _cargotype,_group:GetName(),_boardradius, asset.loadradius)
-- Set weight for this group.
cargogroup:SetWeight(asset.weight)
-- Add group to group set.
CargoGroups:AddCargo(cargogroup)
end
------------------------
-- Create Dispatchers --
------------------------
-- Cargo dispatcher.
local CargoTransport --AI.AI_Cargo_Dispatcher#AI_CARGO_DISPATCHER
-- OPSTRANSPORT
local CargoTransport --Ops.OpsTransport#OPSTRANSPORT
if Request.transporttype==WAREHOUSE.TransportType.AIRPLANE then
-- Pickup and deploy zones.
local PickupAirbaseSet = SET_ZONE:New():AddZone(ZONE_AIRBASE:New(self.airbase:GetName()))
local DeployAirbaseSet = SET_ZONE:New():AddZone(ZONE_AIRBASE:New(Request.airbase:GetName()))
-- Define dispatcher for this task.
CargoTransport = AI_CARGO_DISPATCHER_AIRPLANE:New(TransportGroupSet, CargoGroups, PickupAirbaseSet, DeployAirbaseSet)
-- Set home zone.
CargoTransport:SetHomeZone(ZONE_AIRBASE:New(self.airbase:GetName()))
CargoTransport = OPSTRANSPORT:New(CargoGroupSet, ZONE_AIRBASE:New(self.airbase:GetName()), ZONE_AIRBASE:New(Request.airbase:GetName()))
CargoTransport:SetEmbarkZone(self.spawnzone)
CargoTransport:SetDisembarkZone(Request.warehouse.spawnzone)
elseif Request.transporttype==WAREHOUSE.TransportType.HELICOPTER then
-- Pickup and deploy zones.
local PickupZoneSet = SET_ZONE:New():AddZone(self.spawnzone)
local DeployZoneSet = SET_ZONE:New():AddZone(Request.warehouse.spawnzone)
-- Define dispatcher for this task.
CargoTransport = AI_CARGO_DISPATCHER_HELICOPTER:New(TransportGroupSet, CargoGroups, PickupZoneSet, DeployZoneSet)
-- Home zone.
CargoTransport:SetHomeZone(self.spawnzone)
CargoTransport = OPSTRANSPORT:New(CargoGroupSet, self.spawnzone, Request.warehouse.spawnzone)
elseif Request.transporttype==WAREHOUSE.TransportType.APC then
-- Pickup and deploy zones.
local PickupZoneSet = SET_ZONE:New():AddZone(self.spawnzone)
local DeployZoneSet = SET_ZONE:New():AddZone(Request.warehouse.spawnzone)
-- Define dispatcher for this task.
CargoTransport = AI_CARGO_DISPATCHER_APC:New(TransportGroupSet, CargoGroups, PickupZoneSet, DeployZoneSet, 0)
-- Set home zone.
CargoTransport:SetHomeZone(self.spawnzone)
CargoTransport = OPSTRANSPORT:New(CargoGroupSet, self.spawnzone, Request.warehouse.spawnzone)
elseif Request.transporttype==WAREHOUSE.TransportType.SHIP or Request.transporttype==WAREHOUSE.TransportType.AIRCRAFTCARRIER
or Request.transporttype==WAREHOUSE.TransportType.ARMEDSHIP or Request.transporttype==WAREHOUSE.TransportType.WARSHIP then
-- Pickup and deploy zones.
local PickupZoneSet = SET_ZONE:New():AddZone(self.portzone)
PickupZoneSet:AddZone(self.harborzone)
local DeployZoneSet = SET_ZONE:New():AddZone(Request.warehouse.harborzone)
or Request.transporttype==WAREHOUSE.TransportType.ARMEDSHIP or Request.transporttype==WAREHOUSE.TransportType.WARSHIP then
CargoTransport = OPSTRANSPORT:New(CargoGroupSet, self.portzone, Request.warehouse.portzone)
CargoTransport:SetEmbarkZone(self.spawnzone)
CargoTransport:SetDisembarkZone(Request.warehouse.spawnzone)
-- Get the shipping lane to use and pass it to the Dispatcher
local remotename = Request.warehouse.warehouse:GetName()
local ShippingLane = self.shippinglanes[remotename][math.random(#self.shippinglanes[remotename])]
-- Define dispatcher for this task.
CargoTransport = AI_CARGO_DISPATCHER_SHIP:New(TransportGroupSet, CargoGroups, PickupZoneSet, DeployZoneSet, ShippingLane)
-- Set home zone
CargoTransport:SetHomeZone(self.portzone)
-- TODO: Add shipping lane
-- CargoTransport:AddPathTransport(PathGroup)
else
self:E(self.lid.."ERROR: Unknown transporttype!")
end
-- Set pickup and deploy radii.
-- The 20 m inner radius are to ensure that the helo does not land on the warehouse itself in the middle of the default spawn zone.
local pickupouter = 200
local pickupinner = 0
local deployouter = 200
local deployinner = 0
if Request.transporttype==WAREHOUSE.TransportType.SHIP or Request.transporttype==WAREHOUSE.TransportType.AIRCRAFTCARRIER
or Request.transporttype==WAREHOUSE.TransportType.ARMEDSHIP or Request.transporttype==WAREHOUSE.TransportType.WARSHIP then
pickupouter=1000
pickupinner=20
deployouter=1000
deployinner=0
else
pickupouter=200
pickupinner=0
if self.spawnzone.Radius~=nil then
pickupouter=self.spawnzone.Radius
pickupinner=20
end
deployouter=200
deployinner=0
if self.spawnzone.Radius~=nil then
deployouter=Request.warehouse.spawnzone.Radius
deployinner=20
end
end
CargoTransport:SetPickupRadius(pickupouter, pickupinner)
CargoTransport:SetDeployRadius(deployouter, deployinner)
-- Adjust carrier units. This has to come AFTER the dispatchers have been defined because they set the cargobay free weight!
Request.carriercargo={}
@@ -4847,111 +4743,63 @@ function WAREHOUSE:onafterRequestSpawned(From, Event, To, Request, CargoGroupSet
end
end
--------------------------------
-- Dispatcher Event Functions --
--------------------------------
----------------------------------
-- Opstransport Event Functions --
----------------------------------
--- Function called after carrier picked up something.
function CargoTransport:OnAfterPickedUp(From, Event, To, Carrier, PickupZone)
-- Get warehouse state.
local warehouse=Carrier:GetState(Carrier, "WAREHOUSE") --#WAREHOUSE
-- Debug message.
local text=string.format("Carrier group %s picked up at pickup zone %s.", Carrier:GetName(), PickupZone:GetName())
warehouse:T(warehouse.lid..text)
end
--- Function called if something was deployed.
function CargoTransport:OnAfterDeployed(From, Event, To, Carrier, DeployZone)
-- Get warehouse state.
local warehouse=Carrier:GetState(Carrier, "WAREHOUSE") --#WAREHOUSE
-- Debug message.
-- TODO: Depoloy zone is nil!
--local text=string.format("Carrier group %s deployed at deploy zone %s.", Carrier:GetName(), DeployZone:GetName())
--warehouse:T(warehouse.lid..text)
end
--- Function called if carrier group is going home.
function CargoTransport:OnAfterHome(From, Event, To, Carrier, Coordinate, Speed, Height, HomeZone)
-- Get warehouse state.
local warehouse=Carrier:GetState(Carrier, "WAREHOUSE") --#WAREHOUSE
-- Debug message.
local text=string.format("Carrier group %s going home to zone %s.", Carrier:GetName(), HomeZone:GetName())
warehouse:T(warehouse.lid..text)
end
CargoTransport.warehouse = self
--- Function called when a carrier unit has loaded a cargo group.
function CargoTransport:OnAfterLoaded(From, Event, To, Carrier, Cargo, CarrierUnit, PickupZone)
function CargoTransport:OnAfterLoaded(From, Event, To, OpsGroupCargo, OpsGroupCarrier, CarrierElement)
-- Get warehouse state.
local warehouse=Carrier:GetState(Carrier, "WAREHOUSE") --#WAREHOUSE
-- Debug message.
local text=string.format("Carrier group %s loaded cargo %s into unit %s in pickup zone %s", Carrier:GetName(), Cargo:GetName(), CarrierUnit:GetName(), PickupZone:GetName())
warehouse:T(warehouse.lid..text)
local warehouse=CargoTransport.warehouse --#WAREHOUSE
-- Get cargo group object.
local group=Cargo:GetObject() --Wrapper.Group#GROUP
local group=OpsGroupCargo:GetGroup() --Cargo:GetObject() --Wrapper.Group#GROUP
-- Get request.
local request=warehouse:_GetRequestOfGroup(group, warehouse.pending)
-- Add cargo group to this carrier.
table.insert(request.carriercargo[CarrierUnit:GetName()], warehouse:_GetNameWithOut(Cargo:GetName()))
table.insert(request.carriercargo[CarrierElement.name], warehouse:_GetNameWithOut(group:GetName()))
end
--- Function called when cargo has arrived and was unloaded.
function CargoTransport:OnAfterUnloaded(From, Event, To, Carrier, Cargo, CarrierUnit, DeployZone)
function CargoTransport:OnAfterUnloaded(From, Event, To, OpsGroupCargo, OpsGroupCarrier)
-- Get warehouse state.
local warehouse=Carrier:GetState(Carrier, "WAREHOUSE") --#WAREHOUSE
local warehouse=CargoTransport.warehouse --Carrier:GetState(Carrier, "WAREHOUSE") --#WAREHOUSE
-- Get group obejet.
local group=Cargo:GetObject() --Wrapper.Group#GROUP
local group=OpsGroupCargo:GetGroup() --Cargo:GetObject() --Wrapper.Group#GROUP
-- Debug message.
local text=string.format("Cargo group %s was unloaded from carrier unit %s.", tostring(group:GetName()), tostring(CarrierUnit:GetName()))
local text=string.format("Cargo group %s was unloaded from carrier group %s.", tostring(group:GetName()), tostring(OpsGroupCarrier:GetName()))
warehouse:T(warehouse.lid..text)
-- Load the cargo in the warehouse.
--Cargo:Load(warehouse.warehouse)
-- Trigger Arrived event.
warehouse:Arrived(group)
end
-- TODO: Probably can also add some cargo/carrier dead functions here to simplify things at other places
--- On after BackHome event.
function CargoTransport:OnAfterBackHome(From, Event, To, Carrier)
-- Intellisense.
local carrier=Carrier --Wrapper.Group#GROUP
-- Get warehouse state.
local warehouse=carrier:GetState(carrier, "WAREHOUSE") --#WAREHOUSE
carrier:SmokeWhite()
-- Debug info.
local text=string.format("Carrier %s is back home at warehouse %s.", tostring(Carrier:GetName()), tostring(warehouse.warehouse:GetName()))
MESSAGE:New(text, 5):ToAllIf(warehouse.Debug)
warehouse:I(warehouse.lid..text)
-- Call arrived event for carrier.
warehouse:__Arrived(1, Carrier)
-- Assign cargo to carriers
for _,carriergroup in pairs(TransportGroupSet:GetSetObjects()) do
local opsgroup=nil
if Request.transporttype==WAREHOUSE.TransportType.AIRPLANE or Request.transporttype==WAREHOUSE.TransportType.HELICOPTER then
opsgroup=FLIGHTGROUP:New(carriergroup)
elseif Request.transporttype==WAREHOUSE.TransportType.APC then
opsgroup=ARMYGROUP:New(carriergroup)
elseif Request.transporttype==WAREHOUSE.TransportType.SHIP or Request.transporttype==WAREHOUSE.TransportType.AIRCRAFTCARRIER
or Request.transporttype==WAREHOUSE.TransportType.ARMEDSHIP or Request.transporttype==WAREHOUSE.TransportType.WARSHIP then
opsgroup=NAVYGROUP:New(carriergroup)
end
opsgroup:AddOpsTransport(CargoTransport)
end
-- Start dispatcher.
CargoTransport:__Start(5)
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -6378,7 +6226,7 @@ end
-- @param #WAREHOUSE self
-- @param Wrapper.Group#GROUP Group The train group.
-- @param Core.Point#COORDINATE Coordinate of the destination. Tail will be routed to the closest point
-- @param #number Speed Speed in km/h to drive to the destination coordinate. Default is 60% of max possible speed the unit can go.
-- @param #number Speed (Optional) Speed in km/h to drive to the destination coordinate. Default is 60% of max possible speed the unit can go.
function WAREHOUSE:_RouteTrain(Group, Coordinate, Speed)
if Group and Group:IsAlive() then
@@ -8935,7 +8783,7 @@ end
--- Info Message. Message send to coalition if reports or debug mode activated (and duration > 0). Text self:I(text) added to DCS.log file.
-- @param #WAREHOUSE self
-- @param #string text The text of the error message.
-- @param #number duration Message display duration in seconds. Default 20 sec. If duration is zero, no message is displayed.
-- @param #number duration (Optional) Message display duration in seconds. Default 20 sec. If duration is zero, no message is displayed.
function WAREHOUSE:_InfoMessage(text, duration)
duration=duration or 20
if duration>0 and self.Debug or self.Report then
@@ -8948,7 +8796,7 @@ end
--- Debug message. Message send to all if debug mode is activated (and duration > 0). Text self:T(text) added to DCS.log file.
-- @param #WAREHOUSE self
-- @param #string text The text of the error message.
-- @param #number duration Message display duration in seconds. Default 20 sec. If duration is zero, no message is displayed.
-- @param #number duration (Optional) Message display duration in seconds. Default 20 sec. If duration is zero, no message is displayed.
function WAREHOUSE:_DebugMessage(text, duration)
duration=duration or 20
if self.Debug and duration>0 then
@@ -8960,7 +8808,7 @@ end
--- Error message. Message send to all (if duration > 0). Text self:E(text) added to DCS.log file.
-- @param #WAREHOUSE self
-- @param #string text The text of the error message.
-- @param #number duration Message display duration in seconds. Default 20 sec. If duration is zero, no message is displayed.
-- @param #number duration (Optional) Message display duration in seconds. Default 20 sec. If duration is zero, no message is displayed.
function WAREHOUSE:_ErrorMessage(text, duration)
duration=duration or 20
if duration>0 then
@@ -48,7 +48,7 @@
do -- ZONE_CAPTURE_COALITION
-- @type ZONE_CAPTURE_COALITION
--- @type ZONE_CAPTURE_COALITION
-- @field #string ClassName Name of the class.
-- @field #number MarkBlue ID of blue F10 mark.
-- @field #number MarkRed ID of red F10 mark.
@@ -220,36 +220,6 @@ do -- ZONE_CAPTURE_COALITION
-- A capture zone has been setup that guards the presence of the troops.
-- Troops are guarded by red forces. Blue is required to destroy the red forces and capture the zones.
--
-- At first, we setup the Command Centers
--
-- do
--
-- RU_CC = COMMANDCENTER:New( GROUP:FindByName( "REDHQ" ), "Russia HQ" )
-- US_CC = COMMANDCENTER:New( GROUP:FindByName( "BLUEHQ" ), "USA HQ" )
--
-- end
--
-- Next, we define the mission, and add some scoring to it.
--
-- do -- Missions
--
-- US_Mission_EchoBay = MISSION:New( US_CC, "Echo Bay", "Primary",
-- "Welcome trainee. The airport Groom Lake in Echo Bay needs to be captured.\n" ..
-- "There are five random capture zones located at the airbase.\n" ..
-- "Move to one of the capture zones, destroy the fuel tanks in the capture zone, " ..
-- "and occupy each capture zone with a platoon.\n " ..
-- "Your orders are to hold position until all capture zones are taken.\n" ..
-- "Use the map (F10) for a clear indication of the location of each capture zone.\n" ..
-- "Note that heavy resistance can be expected at the airbase!\n" ..
-- "Mission 'Echo Bay' is complete when all five capture zones are taken, and held for at least 5 minutes!"
-- , coalition.side.RED )
--
-- US_Mission_EchoBay:Start()
--
-- end
--
--
-- Now the real work starts.
-- We define a **CaptureZone** object, which is a ZONE object.
-- Within the mission, a trigger zone is created with the name __CaptureZone__, with the defined radius within the mission editor.
--
@@ -280,12 +250,12 @@ do -- ZONE_CAPTURE_COALITION
-- self:E( { Coalition = Coalition } )
-- if Coalition == coalition.side.BLUE then
-- ZoneCaptureCoalition:Smoke( SMOKECOLOR.Blue )
-- US_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- MESSAGE:New(string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.BLUE)
-- MESSAGE:New(string.format( "%s is under protection of the USA", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.RED)
-- else
-- ZoneCaptureCoalition:Smoke( SMOKECOLOR.Red )
-- RU_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- US_CC:MessageTypeToCoalition( string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- MESSAGE:New(string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.BLUE)
-- MESSAGE:New(string.format( "%s is under protection of Russia", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.RED)
-- end
-- end
-- end
@@ -297,8 +267,8 @@ do -- ZONE_CAPTURE_COALITION
-- -- @param Functional.Protect#ZONE_CAPTURE_COALITION self
-- function ZoneCaptureCoalition:OnEnterEmpty()
-- self:Smoke( SMOKECOLOR.Green )
-- US_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- RU_CC:MessageTypeToCoalition( string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- MESSAGE:New(string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.BLUE)
-- MESSAGE:New(string.format( "%s is unprotected, and can be captured!", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.RED)
-- end
--
-- The next Event Handlers speak for itself.
@@ -310,11 +280,11 @@ do -- ZONE_CAPTURE_COALITION
-- local Coalition = self:GetCoalition()
-- self:E({Coalition = Coalition})
-- if Coalition == coalition.side.BLUE then
-- US_CC:MessageTypeToCoalition( string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- RU_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- MESSAGE:New(string.format( "%s is under attack by Russia", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.BLUE)
-- MESSAGE:New(string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.RED)
-- else
-- RU_CC:MessageTypeToCoalition( string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- US_CC:MessageTypeToCoalition( string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- MESSAGE:New(string.format( "%s is under attack by the USA", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.RED)
-- MESSAGE:New(string.format( "We are attacking %s", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.BLUE)
-- end
-- end
--
@@ -326,12 +296,12 @@ do -- ZONE_CAPTURE_COALITION
-- local Coalition = self:GetCoalition()
-- self:E({Coalition = Coalition})
-- if Coalition == coalition.side.BLUE then
-- RU_CC:MessageTypeToCoalition( string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- US_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- MESSAGE:New(string.format( "%s is captured by the USA, we lost it!", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.RED)
-- MESSAGE:New(string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.BLUE)
-- else
-- US_CC:MessageTypeToCoalition( string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- RU_CC:MessageTypeToCoalition( string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ), MESSAGE.Type.Information )
-- end
-- MESSAGE:New(string.format( "%s is captured by Russia, we lost it!", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.BLUE)
-- MESSAGE:New(string.format( "We captured %s, Excellent job!", ZoneCaptureCoalition:GetZoneName() ),15,MESSAGE.Type.Information):ToCoalition(coalition.side.RED)
-- end
--
-- self:__Guard( 30 )
-- end
@@ -365,8 +335,8 @@ do -- ZONE_CAPTURE_COALITION
-- @param #ZONE_CAPTURE_COALITION self
-- @param Core.Zone#ZONE Zone A @{Core.Zone} object with the goal to be achieved. Alternatively, can be handed as the name of late activated group describing a @{Core.Zone#ZONE_POLYGON} with its waypoints.
-- @param #number Coalition The initial coalition owning the zone.
-- @param #table UnitCategories Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @param #table ObjectCategories Table of unit categories. See [DCS Class Object](https://wiki.hoggitworld.com/view/DCS_Class_Object). Default {Object.Category.UNIT, Object.Category.STATIC}, i.e. all UNITS and STATICS.
-- @param #table UnitCategories (Optional) Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @param #table ObjectCategories (Optional) Table of unit categories. See [DCS Class Object](https://wiki.hoggitworld.com/view/DCS_Class_Object). Default {Object.Category.UNIT, Object.Category.STATIC}, i.e. all UNITS and STATICS.
-- @return #ZONE_CAPTURE_COALITION
-- @usage
--
@@ -1,458 +0,0 @@
--- **Functional** - Base class that models processes to achieve goals involving a Zone and Cargo.
--
-- ===
--
-- ZONE_GOAL_CARGO models processes that have a Goal with a defined achievement involving a Zone and Cargo.
-- Derived classes implement the ways how the achievements can be realized.
--
-- # 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
--
-- ===
--
-- ### Author: **FlightControl**
--
-- ===
--
-- @module Functional.ZoneGoalCargo
-- @image MOOSE.JPG
do -- ZoneGoal
-- @type ZONE_GOAL_CARGO
-- @extends Functional.ZoneGoal#ZONE_GOAL
--- Models processes that have a Goal with a defined achievement involving a Zone and Cargo.
-- Derived classes implement the ways how the achievements can be realized.
--
-- ## 1. ZONE_GOAL_CARGO constructor
--
-- * @{#ZONE_GOAL_CARGO.New}(): Creates a new ZONE_GOAL_CARGO object.
--
-- ## 2. ZONE_GOAL_CARGO is a finite state machine (FSM).
--
-- ### 2.1 ZONE_GOAL_CARGO States
--
-- * **Deployed**: The Zone has been captured by an other coalition.
-- * **Airborne**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
-- * **Loaded**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
--
-- ### 2.2 ZONE_GOAL_CARGO Events
--
-- * **Capture**: The Zone has been captured by an other coalition.
-- * **Attack**: The Zone is currently intruded by an other coalition. There are units of the owning coalition and an other coalition in the Zone.
-- * **Guard**: The Zone is guarded by the owning coalition. There is no other unit of an other coalition in the Zone.
-- * **Empty**: The Zone is empty. There is not valid unit in the Zone.
--
-- ### 2.3 ZONE_GOAL_CARGO State Machine
--
-- @field #ZONE_GOAL_CARGO
ZONE_GOAL_CARGO = {
ClassName = "ZONE_GOAL_CARGO",
}
-- @field #table ZONE_GOAL_CARGO.States
ZONE_GOAL_CARGO.States = {}
--- ZONE_GOAL_CARGO Constructor.
-- @param #ZONE_GOAL_CARGO self
-- @param Core.Zone#ZONE Zone A @{Core.Zone} object with the goal to be achieved.
-- @param #number Coalition The initial coalition owning the zone.
-- @return #ZONE_GOAL_CARGO
function ZONE_GOAL_CARGO:New( Zone, Coalition )
local self = BASE:Inherit( self, ZONE_GOAL:New( Zone ) ) -- #ZONE_GOAL_CARGO
self:F( { Zone = Zone, Coalition = Coalition } )
self:SetCoalition( Coalition )
do
--- Captured State Handler OnLeave for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnLeaveCaptured
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Captured State Handler OnEnter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnEnterCaptured
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
end
do
--- Attacked State Handler OnLeave for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnLeaveAttacked
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Attacked State Handler OnEnter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnEnterAttacked
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
end
do
--- Guarded State Handler OnLeave for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnLeaveGuarded
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Guarded State Handler OnEnter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnEnterGuarded
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
end
do
--- Empty State Handler OnLeave for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnLeaveEmpty
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Empty State Handler OnEnter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnEnterEmpty
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
end
self:AddTransition( "*", "Guard", "Guarded" )
--- Guard Handler OnBefore for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnBeforeGuard
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Guard Handler OnAfter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnAfterGuard
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Guard Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] Guard
-- @param #ZONE_GOAL_CARGO self
--- Guard Asynchronous Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] __Guard
-- @param #ZONE_GOAL_CARGO self
-- @param #number Delay
self:AddTransition( "*", "Empty", "Empty" )
--- Empty Handler OnBefore for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnBeforeEmpty
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Empty Handler OnAfter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnAfterEmpty
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Empty Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] Empty
-- @param #ZONE_GOAL_CARGO self
--- Empty Asynchronous Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] __Empty
-- @param #ZONE_GOAL_CARGO self
-- @param #number Delay
self:AddTransition( { "Guarded", "Empty" }, "Attack", "Attacked" )
--- Attack Handler OnBefore for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnBeforeAttack
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Attack Handler OnAfter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnAfterAttack
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Attack Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] Attack
-- @param #ZONE_GOAL_CARGO self
--- Attack Asynchronous Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] __Attack
-- @param #ZONE_GOAL_CARGO self
-- @param #number Delay
self:AddTransition( { "Guarded", "Attacked", "Empty" }, "Capture", "Captured" )
--- Capture Handler OnBefore for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnBeforeCapture
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #boolean
--- Capture Handler OnAfter for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] OnAfterCapture
-- @param #ZONE_GOAL_CARGO self
-- @param #string From
-- @param #string Event
-- @param #string To
--- Capture Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] Capture
-- @param #ZONE_GOAL_CARGO self
--- Capture Asynchronous Trigger for ZONE_GOAL_CARGO
-- @function [parent=#ZONE_GOAL_CARGO] __Capture
-- @param #ZONE_GOAL_CARGO self
-- @param #number Delay
return self
end
--- Set the owning coalition of the zone.
-- @param #ZONE_GOAL_CARGO self
-- @param #number Coalition
function ZONE_GOAL_CARGO:SetCoalition( Coalition )
self.Coalition = Coalition
end
--- Get the owning coalition of the zone.
-- @param #ZONE_GOAL_CARGO self
-- @return #number Coalition.
function ZONE_GOAL_CARGO:GetCoalition()
return self.Coalition
end
--- Get the owning coalition name of the zone.
-- @param #ZONE_GOAL_CARGO self
-- @return #string Coalition name.
function ZONE_GOAL_CARGO:GetCoalitionName()
if self.Coalition == coalition.side.BLUE then
return "Blue"
end
if self.Coalition == coalition.side.RED then
return "Red"
end
if self.Coalition == coalition.side.NEUTRAL then
return "Neutral"
end
return ""
end
function ZONE_GOAL_CARGO:IsGuarded()
local IsGuarded = self.Zone:IsAllInZoneOfCoalition( self.Coalition )
self:F( { IsGuarded = IsGuarded } )
return IsGuarded
end
function ZONE_GOAL_CARGO:IsEmpty()
local IsEmpty = self.Zone:IsNoneInZone()
self:F( { IsEmpty = IsEmpty } )
return IsEmpty
end
function ZONE_GOAL_CARGO:IsCaptured()
local IsCaptured = self.Zone:IsAllInZoneOfOtherCoalition( self.Coalition )
self:F( { IsCaptured = IsCaptured } )
return IsCaptured
end
function ZONE_GOAL_CARGO:IsAttacked()
local IsAttacked = self.Zone:IsSomeInZoneOfCoalition( self.Coalition )
self:F( { IsAttacked = IsAttacked } )
return IsAttacked
end
--- Mark.
-- @param #ZONE_GOAL_CARGO self
function ZONE_GOAL_CARGO:Mark()
local Coord = self.Zone:GetCoordinate()
local ZoneName = self:GetZoneName()
local State = self:GetState()
if self.MarkRed and self.MarkBlue then
self:F( { MarkRed = self.MarkRed, MarkBlue = self.MarkBlue } )
Coord:RemoveMark( self.MarkRed )
Coord:RemoveMark( self.MarkBlue )
end
if self.Coalition == coalition.side.BLUE then
self.MarkBlue = Coord:MarkToCoalitionBlue( "Guard Zone: " .. ZoneName .. "\nStatus: " .. State )
self.MarkRed = Coord:MarkToCoalitionRed( "Capture Zone: " .. ZoneName .. "\nStatus: " .. State )
else
self.MarkRed = Coord:MarkToCoalitionRed( "Guard Zone: " .. ZoneName .. "\nStatus: " .. State )
self.MarkBlue = Coord:MarkToCoalitionBlue( "Capture Zone: " .. ZoneName .. "\nStatus: " .. State )
end
end
--- Bound.
-- @param #ZONE_GOAL_CARGO self
function ZONE_GOAL_CARGO:onenterGuarded()
--self:GetParent( self ):onenterGuarded()
if self.Coalition == coalition.side.BLUE then
--elf.ProtectZone:BoundZone( 12, country.id.USA )
else
--self.ProtectZone:BoundZone( 12, country.id.RUSSIA )
end
self:Mark()
end
function ZONE_GOAL_CARGO:onenterCaptured()
--self:GetParent( self ):onenterCaptured()
local NewCoalition = self.Zone:GetCoalition()
self:F( { NewCoalition = NewCoalition } )
self:SetCoalition( NewCoalition )
self:Mark()
end
function ZONE_GOAL_CARGO:onenterEmpty()
--self:GetParent( self ):onenterEmpty()
self:Mark()
end
function ZONE_GOAL_CARGO:onenterAttacked()
--self:GetParent( self ):onenterAttacked()
self:Mark()
end
--- When started, check the Coalition status.
-- @param #ZONE_GOAL_CARGO self
function ZONE_GOAL_CARGO:onafterGuard()
--self:F({BASE:GetParent( self )})
--BASE:GetParent( self ).onafterGuard( self )
if not self.SmokeScheduler then
self.SmokeScheduler = self:ScheduleRepeat( 1, 1, 0.1, nil, self.StatusSmoke, self )
end
if not self.ScheduleStatusZone then
self.ScheduleStatusZone = self:ScheduleRepeat( 15, 15, 0.1, nil, self.StatusZone, self )
end
end
function ZONE_GOAL_CARGO:IsCaptured()
local IsCaptured = self.Zone:IsAllInZoneOfOtherCoalition( self.Coalition )
self:F( { IsCaptured = IsCaptured } )
return IsCaptured
end
function ZONE_GOAL_CARGO:IsAttacked()
local IsAttacked = self.Zone:IsSomeInZoneOfCoalition( self.Coalition )
self:F( { IsAttacked = IsAttacked } )
return IsAttacked
end
--- Check status Coalition ownership.
-- @param #ZONE_GOAL_CARGO self
function ZONE_GOAL_CARGO:StatusZone()
local State = self:GetState()
self:F( { State = self:GetState() } )
self.Zone:Scan()
if State ~= "Guarded" and self:IsGuarded() then
self:Guard()
end
if State ~= "Empty" and self:IsEmpty() then
self:Empty()
end
if State ~= "Attacked" and self:IsAttacked() then
self:Attack()
end
if State ~= "Captured" and self:IsCaptured() then
self:Capture()
end
end
end
@@ -54,8 +54,8 @@ do -- ZoneGoal
--- ZONE_GOAL_COALITION Constructor.
-- @param #ZONE_GOAL_COALITION self
-- @param Core.Zone#ZONE Zone A @{Core.Zone} object with the goal to be achieved.
-- @param #number Coalition The initial coalition owning the zone. Default coalition.side.NEUTRAL.
-- @param #table UnitCategories Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @param #number Coalition (Optional) The initial coalition owning the zone. Default coalition.side.NEUTRAL.
-- @param #table UnitCategories (Optional) Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @return #ZONE_GOAL_COALITION
function ZONE_GOAL_COALITION:New( Zone, Coalition, UnitCategories )
@@ -90,7 +90,7 @@ do -- ZoneGoal
--- Set the owning coalition of the zone.
-- @param #ZONE_GOAL_COALITION self
-- @param #table UnitCategories Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @param #table UnitCategories (Optional) Table of unit categories. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit). Default {Unit.Category.GROUND_UNIT}.
-- @return #ZONE_GOAL_COALITION
function ZONE_GOAL_COALITION:SetUnitCategories( UnitCategories )
@@ -105,7 +105,7 @@ do -- ZoneGoal
--- Set the owning coalition of the zone.
-- @param #ZONE_GOAL_COALITION self
-- @param #table ObjectCategories Table of unit categories. See [DCS Class Object](https://wiki.hoggitworld.com/view/DCS_Class_Object). Default {Object.Category.UNIT, Object.Category.STATIC}, i.e. all UNITS and STATICS.
-- @param #table ObjectCategories (Optional) Table of unit categories. See [DCS Class Object](https://wiki.hoggitworld.com/view/DCS_Class_Object). Default {Object.Category.UNIT, Object.Category.STATIC}, i.e. all UNITS and STATICS.
-- @return #ZONE_GOAL_COALITION
function ZONE_GOAL_COALITION:SetObjectCategories( ObjectCategories )
-3
View File
@@ -13,9 +13,6 @@ _DATABASE = DATABASE:New() -- Core.Database#DATABASE
_SETTINGS = SETTINGS:Set() -- Core.Settings#SETTINGS
_SETTINGS:SetPlayerMenuOn()
--- Register cargos.
_DATABASE:_RegisterCargos()
--- Register zones.
_DATABASE:_RegisterZones()
_DATABASE:_RegisterAirbases()
+4 -6
View File
@@ -50,11 +50,6 @@ __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Net.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/Storage.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Wrapper/DynamicCargo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/Cargo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoUnit.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoSlingload.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoCrate.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Cargo/CargoGroup.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Scoring.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/CleanUp.lua' )
@@ -80,7 +75,6 @@ __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Shorad.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/AICSAR.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/AmmoTruck.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Autolase.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ZoneGoalCargo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Tiresias.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/Stratego.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Functional/ClientWatch.lua')
@@ -91,6 +85,9 @@ __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/RecoveryTanker.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/RescueHelo.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/ATIS.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CTLD.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CTLD_CARGO.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CTLD_Localization.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CTLD_Hercules.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/CSAR.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/AirWing.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/ArmyGroup.lua' )
@@ -118,6 +115,7 @@ __Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Squadron.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/Target.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/EasyGCICAP.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/EasyA2G.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Ops/TARS.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/ShapeBase.lua' )
__Moose.Include( MOOSE_DEVELOPMENT_FOLDER..'/Moose/Shapes/Circle.lua' )
@@ -242,7 +242,7 @@ end
--- Find closest beacons to a given coordinate.
-- @param #BEACONS self
-- @param Core.Point#COORDINATE Coordinate The reference coordinate.
-- @param #number Nmax Max number of beacons. Default 5.
-- @param #number Nmax (Optional) Max number of beacons. Default 5.
-- @param #number TypeID (Optional) Only search for specific beacon types, *e.g.* `BEACON.Type.TACAN`.
-- @param #number DistMax (Optional) Max search distance in meters.
-- @return #table Table of #BEACONS.Beacon closest beacons.
+6 -6
View File
@@ -115,7 +115,7 @@ NAVFIX.version="0.1.0"
--- Create a new NAVFIX class instance from a given VECTOR.
-- @param #NAVFIX self
-- @param #string Name Name/ident of the point. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string Type (Optional) Type of the point. Default `NAVFIX.Type.POINT`.
-- @param Core.Vector#VECTOR Vector Position vector of the navpoint.
-- @return #NAVFIX self
function NAVFIX:NewFromVector(Name, Type, Vector)
@@ -150,7 +150,7 @@ end
--- Create a new NAVFIX class instance from a given COORDINATE.
-- @param #NAVFIX self
-- @param #string Name Name of the fix. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string Type (Optional) Type of the point. Default `NAVFIX.Type.POINT`.
-- @param Core.Point#COORDINATE Coordinate Coordinate of the point.
-- @return #NAVFIX self
function NAVFIX:NewFromCoordinate(Name, Type, Coordinate)
@@ -168,7 +168,7 @@ end
--- Create a new NAVFIX instance from given latitude and longitude in degrees, minutes and seconds (DMS).
-- @param #NAVFIX self
-- @param #string Name Name of the fix. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string Type (Optional) Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string Latitude Latitude in DMS as string.
-- @param #string Longitude Longitude in DMS as string.
-- @return #NAVFIX self
@@ -186,7 +186,7 @@ end
--- Create a new NAVFIX instance from given latitude and longitude in decimal degrees (DD).
-- @param #NAVFIX self
-- @param #string Name Name of the fix. Should be unique!
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string Type (Optional) Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #number Latitude Latitude in DD.
-- @param #number Longitude Longitude in DD.
-- @return #NAVFIX self
@@ -523,7 +523,7 @@ NAVAID.version="0.1.0"
--- Create a new NAVAID class instance.
-- @param #NAVAID self
-- @param #string Name Name/ident of this navaid.
-- @param #string Type Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string Type (Optional) Type of the point. Default `NAVFIX.Type.POINT`.
-- @param #string ZoneName Name of the zone to scan the scenery.
-- @param #string SceneryName Name of the scenery object.
-- @return #NAVAID self
@@ -579,7 +579,7 @@ end
--- Set channel of, *e.g.*, TACAN beacons.
-- @param #NAVAID self
-- @param #number Channel The channel.
-- @param #string Band The band either `"X"` (default) or `"Y"`.
-- @param #string Band (Optional) The band either `"X"` (default) or `"Y"`.
-- @return #NAVAID self
function NAVAID:SetChannel(Channel, Band)
@@ -249,7 +249,7 @@ end
--- Find closest radios to a given coordinate.
-- @param #RADIOS self
-- @param Core.Point#COORDINATE Coordinate The reference coordinate.
-- @param #number Nmax Max number of radios. Default 5.
-- @param #number Nmax (Optional) Max number of radios. Default 5.
-- @param #number DistMax (Optional) Max search distance in meters.
-- @return #table Table of #RADIOS.Radio closest radios.
function RADIOS:GetClosestRadios(Coordinate, Nmax, DistMax)
+1 -1
View File
@@ -240,7 +240,7 @@ end
--- Find closest towns to a given coordinate.
-- @param #TOWNS self
-- @param Core.Point#COORDINATE Coordinate The reference coordinate.
-- @param #number Nmax Max number of towns. Default 5.
-- @param #number Nmax (Optional) Max number of towns. Default 5.
-- @param #number DistMax (Optional) Max search distance in meters.
-- @return #table Table of #TOWNS.Town closest towns.
function TOWNS:GetClosestTowns(Coordinate, Nmax, DistMax)
+32 -24
View File
@@ -1003,8 +1003,8 @@ ATIS.version = "1.0.1"
--- Create a new ATIS class object for a specific airbase.
-- @param #ATIS self
-- @param #string AirbaseName Name of the airbase.
-- @param #number Frequency Radio frequency in MHz. Default 143.00 MHz. When using **SRS** this can be passed as a table of multiple frequencies.
-- @param #number Modulation Radio modulation: 0=AM, 1=FM. Default 0=AM. See `radio.modulation.AM` and `radio.modulation.FM` enumerators. When using **SRS** this can be passed as a table of multiple modulations.
-- @param #number Frequency (Optional) Radio frequency in MHz. Default 143.00 MHz. When using **SRS** this can be passed as a table of multiple frequencies.
-- @param #number Modulation (Optional) Radio modulation: 0=AM, 1=FM. Default 0=AM. See `radio.modulation.AM` and `radio.modulation.FM` enumerators. When using **SRS** this can be passed as a table of multiple modulations.
-- @return #ATIS self
function ATIS:New(AirbaseName, Frequency, Modulation)
@@ -1161,9 +1161,9 @@ end
--- Set sound files folder within miz file (not your local hard drive!).
-- @param #ATIS self
-- @param #string pathMain Path to folder containing main sound files. Default "ATIS Soundfiles/". Mind the slash "/" at the end!
-- @param #string pathAirports Path folder containing the airport names sound files. Default is `"ATIS Soundfiles/<Map Name>"`, *e.g.* `"ATIS Soundfiles/Caucasus/"`.
-- @param #string pathNato Path folder containing the NATO alphabet sound files. Default is "ATIS Soundfiles/NATO Alphabet/".
-- @param #string pathMain (Optional) Path to folder containing main sound files. Default "ATIS Soundfiles/". Mind the slash "/" at the end!
-- @param #string pathAirports (Optional) Path folder containing the airport names sound files. Default is `"ATIS Soundfiles/<Map Name>"`, *e.g.* `"ATIS Soundfiles/Caucasus/"`.
-- @param #string pathNato (Optional) Path folder containing the NATO alphabet sound files. Default is "ATIS Soundfiles/NATO Alphabet/".
-- @return #ATIS self
function ATIS:SetSoundfilesPath( pathMain, pathAirports, pathNato )
self.soundpath = tostring( pathMain or "ATIS Soundfiles/" )
@@ -1283,8 +1283,8 @@ end
--- Set the active runway for landing.
-- @param #ATIS self
-- @param #string runway : Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
-- @param #boolean preferleft : If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
-- @param #string runway (Optional) Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
-- @param #boolean preferleft (Optional) If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
-- @return #ATIS self
function ATIS:SetActiveRunwayLanding(runway, preferleft)
self.airbase:SetActiveRunwayLanding(runway,preferleft)
@@ -1294,7 +1294,7 @@ end
--- Set the active runway for take-off.
-- @param #ATIS self
-- @param #string runway : Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
-- @param #boolean preferleft : If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
-- @param #boolean preferleft (Optional) If true, perfer the left runway. If false, prefer the right runway. If nil (default), do not care about left or right.
-- @return #ATIS self
function ATIS:SetActiveRunwayTakeoff(runway,preferleft)
self.airbase:SetActiveRunwayTakeoff(runway,preferleft)
@@ -1328,7 +1328,7 @@ end
--- Set radio power. Note that this only applies if no relay unit is used.
-- @param #ATIS self
-- @param #number power Radio power in Watts. Default 100 W.
-- @param #number power (Optional) Radio power in Watts. Default 100 W.
-- @return #ATIS self
function ATIS:SetRadioPower( power )
self.power = power or 100
@@ -1337,7 +1337,7 @@ end
--- Use F10 map mark points.
-- @param #ATIS self
-- @param #boolean switch If *true* or *nil*, marks are placed on F10 map. If *false* this feature is set to off (default).
-- @param #boolean switch (Optional) If *true* or *nil*, marks are placed on F10 map. If *false* this feature is set to off (default).
-- @return #ATIS self
function ATIS:SetMapMarks( switch )
if switch == nil or switch == true then
@@ -1406,7 +1406,7 @@ end
--- Set duration how long subtitles are displayed.
-- @param #ATIS self
-- @param #number duration Duration in seconds. Default 10 seconds.
-- @param #number duration (Optional) Duration in seconds. Default 10 seconds.
-- @return #ATIS self
function ATIS:SetSubtitleDuration( duration )
self.subduration = tonumber( duration or 10 )
@@ -1449,7 +1449,7 @@ end
--- Set relative humidity. This is used to approximately calculate the dew point.
-- Note that the dew point is only an artificial information as DCS does not have an atmospheric model that includes humidity (yet).
-- @param #ATIS self
-- @param #number Humidity Relative Humidity, i.e. a number between 0 and 100 %. Default is 50 %.
-- @param #number Humidity (Optional) Relative Humidity, i.e. a number between 0 and 100 %. Default is 50 %.
-- @return #ATIS self
function ATIS:SetRelativeHumidity( Humidity )
self.relHumidity = Humidity or 50
@@ -1524,7 +1524,7 @@ end
-- Or you make your life simple and just include the sign so you don't have to bother about East/West.
--
-- @param #ATIS self
-- @param #number magvar Magnetic variation in degrees. Positive for easterly and negative for westerly variation. Default is magnatic declinaton of the used map, c.f. @{Utilities.Utils#UTILS.GetMagneticDeclination}.
-- @param #number magvar (Optional) Magnetic variation in degrees. Positive for easterly and negative for westerly variation. Default is magnatic declinaton of the used map, c.f. @{Utilities.Utils#UTILS.GetMagneticDeclination}.
-- @return #ATIS self
function ATIS:SetMagneticDeclination( magvar )
self.magvar = magvar or UTILS.GetMagneticDeclination()
@@ -1654,7 +1654,7 @@ end
--- Place marks with runway data on the F10 map.
-- @param #ATIS self
-- @param #boolean markall If true, mark all runways of the map. By default only the current ATIS runways are marked.
-- @param #boolean markall (Optional) If true, mark all runways of the map. By default only the current ATIS runways are marked.
function ATIS:MarkRunways( markall )
local airbases = AIRBASE.GetAllAirbases()
for _, _airbase in pairs( airbases ) do
@@ -1667,14 +1667,16 @@ end
--- Use SRS Simple-Text-To-Speech for transmissions. No sound files necessary.`SetSRS()` will try to use as many attributes configured with @{Sound.SRS#MSRS.LoadConfigFile}() as possible.
-- @param #ATIS self
-- @param #string PathToSRS Path to SRS directory (only necessary if SRS exe backend is used).
-- @param #string Gender Gender: "male" or "female" (default).
-- @param #string Culture Culture, e.g. "en-GB" (default).
-- @param #string Voice Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Port SRS port. Default 5002.
-- @param #string GoogleKey Path to Google JSON-Key (SRS exe backend) or Google API key (DCS-gRPC backend).
-- @param #string PathToSRS (Optional) Path to SRS directory (only necessary if SRS exe backend is used).
-- @param #string Gender (Optional) Gender: "male" or "female" (default).
-- @param #string Culture (Optional) Culture, e.g. "en-GB" (default).
-- @param #string Voice (Optional) Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Port (Optional) SRS port. Default 5002.
-- @param #string GoogleKey (Optional) Path to Google JSON-Key (SRS exe backend) or Google API key (DCS-gRPC backend).
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #ATIS self
function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey)
function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey,Provider,Speaker)
--if PathToSRS or MSRS.path then
self.useSRS=true
@@ -1700,6 +1702,12 @@ function ATIS:SetSRS(PathToSRS, Gender, Culture, Voice, Port, GoogleKey)
end
self.msrs:SetVoice(voice)
self.msrs:SetCoordinate(self.airbase:GetCoordinate())
if Provider then
self.msrs:SetProvider(Provider)
end
if Speaker then
self.msrs:SetSpeakerPiper(Speaker)
end
self.msrsQ = MSRSQUEUE:New("ATIS")
self.msrsQ:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers)
if self.dTQueueCheck<=10 then
@@ -1727,7 +1735,7 @@ end
--- Set the time interval between radio queue updates.
-- @param #ATIS self
-- @param #number TimeInterval Interval in seconds. Default 5 sec.
-- @param #number TimeInterval (Optional) Interval in seconds. Default 5 sec.
-- @return #ATIS self
function ATIS:SetQueueUpdateTime( TimeInterval )
self.dTQueueCheck = TimeInterval or 5
@@ -3195,7 +3203,7 @@ end
--- Get active runway runway.
-- @param #ATIS self
-- @param #boolean Takeoff If `true`, get runway for takeoff. Default is for landing.
-- @param #boolean Takeoff (Optional) If `true`, get runway for takeoff. Default is for landing.
-- @return #string Active runway, e.g. "31" for 310 deg.
-- @return #boolean Use Left=true, Right=false, or nil.
function ATIS:GetActiveRunway(Takeoff)
@@ -3305,7 +3313,7 @@ end
-- @param #ATIS.Soundfile sound ATIS sound object.
-- @param #number interval Interval in seconds after the last transmission finished.
-- @param #string subtitle Subtitle of the transmission.
-- @param #string path Path to sound file. Default `self.soundpath`.
-- @param #string path (Optional) Path to sound file. Default `self.soundpath`.
function ATIS:Transmission( sound, interval, subtitle, path )
self.radioqueue:NewTransmission( sound.filename, sound.duration, path or self.soundpath, nil, interval, subtitle, self.subduration )
end
+26 -26
View File
@@ -369,9 +369,9 @@ end
--- Add a **new** payload to the airwing resources.
-- @param #AIRWING self
-- @param Wrapper.Unit#UNIT Unit The unit, the payload is extracted from. Can also be given as *#string* name of the unit.
-- @param #number Npayloads Number of payloads to add to the airwing resources. Default 99 (which should be enough for most scenarios). Set to -1 for unlimited.
-- @param #number Npayloads (Optional) Number of payloads to add to the airwing resources. Default 99 (which should be enough for most scenarios). Set to -1 for unlimited.
-- @param #table MissionTypes Mission types this payload can be used for.
-- @param #number Performance A number between 0 (worst) and 100 (best) to describe the performance of the loadout for the given mission types. Default is 50.
-- @param #number Performance (Optional) A number between 0 (worst) and 100 (best) to describe the performance of the loadout for the given mission types. Default is 50.
-- @return #AIRWING.Payload The payload table or nil if the unit does not exist.
function AIRWING:NewPayload(Unit, Npayloads, MissionTypes, Performance)
@@ -454,7 +454,7 @@ end
--- Set the number of payload available.
-- @param #AIRWING self
-- @param #AIRWING.Payload Payload The payload table created by the `:NewPayload` function.
-- @param #number Navailable Number of payloads available to the airwing resources. Default 99 (which should be enough for most scenarios). Set to -1 for unlimited.
-- @param #number Navailable (Optional) Number of payloads available to the airwing resources. Default 99 (which should be enough for most scenarios). Set to -1 for unlimited.
-- @return #AIRWING self
function AIRWING:SetPayloadAmount(Payload, Navailable)
@@ -477,7 +477,7 @@ end
--- Increase or decrease the amount of available payloads. Unlimited playloads first need to be set to a limited number with the `SetPayloadAmount` function.
-- @param #AIRWING self
-- @param #AIRWING.Payload Payload The payload table created by the `:NewPayload` function.
-- @param #number N Number of payloads to be added. Use negative number to decrease amount. Default 1.
-- @param #number N (Optional) Number of payloads to be added. Use negative number to decrease amount. Default 1.
-- @return #AIRWING self
function AIRWING:IncreasePayloadAmount(Payload, N)
@@ -516,7 +516,7 @@ end
-- @param #AIRWING self
-- @param #AIRWING.Payload Payload The payload table to which the capability should be added.
-- @param #table MissionTypes Mission types to be added.
-- @param #number Performance A number between 0 (worst) and 100 (best) to describe the performance of the loadout for the given mission types. Default is 50.
-- @param #number Performance (Optional) A number between 0 (worst) and 100 (best) to describe the performance of the loadout for the given mission types. Default is 50.
-- @return #AIRWING self
function AIRWING:AddPayloadCapability(Payload, MissionTypes, Performance)
@@ -739,7 +739,7 @@ end
--- Set number of CAP flights constantly carried out.
-- @param #AIRWING self
-- @param #number n Number of flights. Default 1.
-- @param #number n (Optional) Number of flights. Default 1.
-- @return #AIRWING self
function AIRWING:SetNumberCAP(n)
self.nflightsCAP=n or 1
@@ -757,7 +757,7 @@ end
--- Set CAP close race track.We'll utilize the AUFTRAG PatrolRaceTrack instead of a standard race track orbit task.
-- @param #AIRWING self
-- @param #boolean OnOff If true, switch this on, else switch off. Off by default.
-- @param #boolean OnOff (Optional) If true, switch this on, else switch off. Off by default.
-- @return #AIRWING self
function AIRWING:SetCapCloseRaceTrack(OnOff)
self.capOptionPatrolRaceTrack = OnOff
@@ -777,7 +777,7 @@ end
--- Set number of TANKER flights with Boom constantly in the air.
-- @param #AIRWING self
-- @param #number Nboom Number of flights. Default 1.
-- @param #number Nboom (Optional) Number of flights. Default 1.
-- @return #AIRWING self
function AIRWING:SetNumberTankerBoom(Nboom)
self.nflightsTANKERboom=Nboom or 1
@@ -799,7 +799,7 @@ end
--- Set number of TANKER flights with Probe constantly in the air.
-- @param #AIRWING self
-- @param #number Nprobe Number of flights. Default 1.
-- @param #number Nprobe (Optional) Number of flights. Default 1.
-- @return #AIRWING self
function AIRWING:SetNumberTankerProbe(Nprobe)
self.nflightsTANKERprobe=Nprobe or 1
@@ -808,7 +808,7 @@ end
--- Set number of AWACS flights constantly in the air.
-- @param #AIRWING self
-- @param #number n Number of flights. Default 1.
-- @param #number n (Optional) Number of flights. Default 1.
-- @return #AIRWING self
function AIRWING:SetNumberAWACS(n)
self.nflightsAWACS=n or 1
@@ -817,7 +817,7 @@ end
--- Set number of RECON flights constantly in the air.
-- @param #AIRWING self
-- @param #number n Number of flights. Default 1.
-- @param #number n (Optional) Number of flights. Default 1.
-- @return #AIRWING self
function AIRWING:SetNumberRecon(n)
self.nflightsRecon=n or 1
@@ -826,7 +826,7 @@ end
--- Set number of Rescue helo flights constantly in the air.
-- @param #AIRWING self
-- @param #number n Number of flights. Default 1.
-- @param #number n (Optional) Number of flights. Default 1.
-- @return #AIRWING self
function AIRWING:SetNumberRescuehelo(n)
self.nflightsRescueHelo=n or 1
@@ -868,13 +868,13 @@ end
--- Create a new generic patrol point.
-- @param #AIRWING self
-- @param #string Type Patrol point type, e.g. "CAP" or "AWACS". Default "Unknown".
-- @param Core.Point#COORDINATE Coordinate Coordinate of the patrol point. Default 10-15 NM away from the location of the airwing. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone).
-- @param #number Altitude Orbit altitude in feet. Default random between Angels 10 and 20.
-- @param #number Heading Heading in degrees. Default random (0, 360] degrees.
-- @param #number LegLength Length of race-track orbit in NM. Default 15 NM.
-- @param #number Speed Orbit speed in knots. Default 350 knots.
-- @param #number RefuelSystem Refueling system: 0=Boom, 1=Probe. Default nil=any.
-- @param #string Type (Optional) Patrol point type, e.g. "CAP" or "AWACS". Default "Unknown".
-- @param Core.Point#COORDINATE Coordinate (Optional) Coordinate of the patrol point. Default 10-15 NM away from the location of the airwing. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone).
-- @param #number Altitude (Optional) Orbit altitude in feet. Default random between Angels 10 and 20.
-- @param #number Heading (Optional) Heading in degrees. Default random (0, 360] degrees.
-- @param #number LegLength (Optional) Length of race-track orbit in NM. Default 15 NM.
-- @param #number Speed (Optional) Orbit speed in knots. Default 350 knots.
-- @param #number RefuelSystem (Optional) Refueling system: 0=Boom, 1=Probe. Default nil=any.
-- @return #AIRWING.PatrolData Patrol point table.
function AIRWING:NewPatrolPoint(Type, Coordinate, Altitude, Speed, Heading, LegLength, RefuelSystem)
@@ -944,7 +944,7 @@ end
-- @param #number Speed Orbit speed in knots.
-- @param #number Heading Heading in degrees.
-- @param #number LegLength Length of race-track orbit in NM.
-- @param #number RefuelSystem Set refueling system of tanker: 0=boom, 1=probe. Default any (=nil).
-- @param #number RefuelSystem (Optional) Set refueling system of tanker: 0=boom, 1=probe. Default any (=nil).
-- @return #AIRWING self
function AIRWING:AddPatrolPointTANKER(Coordinate, Altitude, Speed, Heading, LegLength, RefuelSystem)
@@ -984,7 +984,7 @@ end
--- Set takeoff type. All assets of this airwing will be spawned with this takeoff type.
-- Spawning on runways is not supported.
-- @param #AIRWING self
-- @param #string TakeoffType Take off type: "Cold" (default) or "Hot" with engines on or "Air" for spawning in air.
-- @param #string TakeoffType (Optional) Take off type: "Cold" (default) or "Hot" with engines on or "Air" for spawning in air.
-- @return #AIRWING self
function AIRWING:SetTakeoffType(TakeoffType)
TakeoffType=TakeoffType or "Cold"
@@ -1067,7 +1067,7 @@ end
--- Set despawn after landing. Aircraft will be despawned after the landing event.
-- Can help to avoid DCS AI taxiing issues.
-- @param #AIRWING self
-- @param #boolean Switch If `true` (default), activate despawn after landing.
-- @param #boolean Switch (Optional) If `true` (default), activate despawn after landing.
-- @return #AIRWING self
function AIRWING:SetDespawnAfterLanding(Switch)
if Switch then
@@ -1081,7 +1081,7 @@ end
--- Set despawn after holding. Aircraft will be despawned when they arrive at their holding position at the airbase.
-- Can help to avoid DCS AI taxiing issues.
-- @param #AIRWING self
-- @param #boolean Switch If `true` (default), activate despawn after landing.
-- @param #boolean Switch (Optional) If `true` (default), activate despawn after landing.
-- @return #AIRWING self
function AIRWING:SetDespawnAfterHolding(Switch)
if Switch then
@@ -1581,9 +1581,9 @@ end
--- Count payloads in stock.
-- @param #AIRWING self
-- @param #table MissionTypes Types on mission to be checked. Default *all* possible types `AUFTRAG.Type`.
-- @param #table UnitTypes Types of units.
-- @param #table Payloads Specific payloads to be counted only.
-- @param #table MissionTypes (Optional) Types on mission to be checked. Default *all* possible types `AUFTRAG.Type`.
-- @param #table UnitTypes (Optional) Types of units.
-- @param #table Payloads (Optional) Specific payloads to be counted only.
-- @return #number Count of available payloads in stock.
function AIRWING:CountPayloadsInStock(MissionTypes, UnitTypes, Payloads)
+149 -108
View File
@@ -2456,7 +2456,7 @@ end
--- Set carrier controlled area (CCA).
-- This is a large zone around the carrier, which is constantly updated wrt the carrier position.
-- @param #AIRBOSS self
-- @param #number Radius Radius of zone in nautical miles (NM). Default 50 NM.
-- @param #number Radius (Optional) Radius of zone in nautical miles (NM). Default 50 NM.
-- @return #AIRBOSS self
function AIRBOSS:SetCarrierControlledArea( Radius )
@@ -2470,7 +2470,7 @@ end
--- Set carrier controlled zone (CCZ).
-- This is a small zone (usually 5 NM radius) around the carrier, which is constantly updated wrt the carrier position.
-- @param #AIRBOSS self
-- @param #number Radius Radius of zone in nautical miles (NM). Default 5 NM.
-- @param #number Radius (Optional) Radius of zone in nautical miles (NM). Default 5 NM.
-- @return #AIRBOSS self
function AIRBOSS:SetCarrierControlledZone( Radius )
@@ -2483,7 +2483,7 @@ end
--- Set distance up to which water ahead is scanned for collisions.
-- @param #AIRBOSS self
-- @param #number Distance Distance in NM. Default 5 NM.
-- @param #number Distance (Optional) Distance in NM. Default 5 NM.
-- @return #AIRBOSS self
function AIRBOSS:SetCollisionDistance( Distance )
self.collisiondist = UTILS.NMToMeters( Distance or 5 )
@@ -2492,7 +2492,7 @@ end
--- Set the default recovery case.
-- @param #AIRBOSS self
-- @param #number Case Case of recovery. Either 1, 2 or 3. Default 1.
-- @param #number Case (Optional) Case of recovery. Either 1, 2 or 3. Default 1.
-- @return #AIRBOSS self
function AIRBOSS:SetRecoveryCase( Case )
@@ -2509,7 +2509,7 @@ end
-- Usually, this is +-15 or +-30 degrees. You should not use and offset angle >= 90 degrees, because this will cause a devision by zero in some of the equations used to calculate the approach corridor.
-- So best stick to the defaults up to 30 degrees.
-- @param #AIRBOSS self
-- @param #number Offset Offset angle in degrees. Default 0.
-- @param #number Offset (Optional) Offset angle in degrees. Default 0.
-- @return #AIRBOSS self
function AIRBOSS:SetHoldingOffsetAngle( Offset )
@@ -2524,10 +2524,10 @@ end
--- Enable F10 menu to manually start recoveries.
-- @param #AIRBOSS self
-- @param #number Duration Default duration of the recovery in minutes. Default 30 min.
-- @param #number WindOnDeck Default wind on deck in knots. Default 25 knots.
-- @param #boolean Uturn U-turn after recovery window closes on=true or off=false/nil. Default off.
-- @param #number Offset Relative Marshal radial in degrees for Case II/III recoveries. Default 30°.
-- @param #number Duration (Optional) Default duration of the recovery in minutes. Default 30 min.
-- @param #number WindOnDeck(Optional) Default wind on deck in knots. Default 25 knots.
-- @param #boolean Uturn (Optional) U-turn after recovery window closes on=true or off=false/nil. Default off.
-- @param #number Offset (Optional) Relative Marshal radial in degrees for Case II/III recoveries. Default 30°.
-- @return #AIRBOSS self
function AIRBOSS:SetMenuRecovery( Duration, WindOnDeck, Uturn, Offset )
@@ -2547,13 +2547,13 @@ end
--- Add aircraft recovery time window and recovery case.
-- @param #AIRBOSS self
-- @param #string starttime Start time, e.g. "8:00" for eight o'clock. Default now.
-- @param #string stoptime Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.
-- @param #number case Recovery case for that time slot. Number between one and three.
-- @param #number holdingoffset Only for CASE II/III: Angle in degrees the holding pattern is offset.
-- @param #string starttime (Optional) Start time, e.g. "8:00" for eight o'clock. Default now.
-- @param #string stoptime (Optional) Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.
-- @param #number case (Optional) Recovery case for that time slot. Number between one and three. Defaults to 1.
-- @param #number holdingoffset (Optional) Only for CASE II/III: Angle in degrees the holding pattern is offset. Defaults to 0.
-- @param #boolean turnintowind If true, carrier will turn into the wind 5 minutes before the recovery window opens.
-- @param #number speed Speed in knots during turn into wind leg.
-- @param #boolean uturn If true (or nil), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.
-- @param #number speed (Optional) Speed in knots during turn into wind leg. Default is 20.
-- @param #boolean uturn (Optional) If true (or nil), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.
-- @return #AIRBOSS.Recovery Recovery window.
function AIRBOSS:AddRecoveryWindow( starttime, stoptime, case, holdingoffset, turnintowind, speed, uturn )
@@ -2717,17 +2717,27 @@ function AIRBOSS:DeleteRecoveryWindow( Window, Delay )
self:ScheduleOnce( Delay, self.DeleteRecoveryWindow, self, Window )
else
for i, _recovery in pairs( self.recoverytimes ) do
local recovery = _recovery -- #AIRBOSS.Recovery
if not Window then
return
end
if Window and Window.ID == recovery.ID then
if Window.OPEN then
-- Window is currently open.
self:RecoveryStop()
else
table.remove( self.recoverytimes, i )
end
-- If this window is currently open, stop recovery first. Mark it OVER so the
-- recovery time check cannot re-open it before/while we remove it.
if Window.OPEN then
Window.OPEN = false
Window.OVER = true
if self:IsRecovering() then
self:RecoveryStop()
end
end
-- Remove the window from the queue by its unique ID. Iterate over a numerically
-- indexed copy of the keys and remove via ipairs-safe reverse loop so that the
-- removal does not corrupt traversal (the window may appear once).
for i = #self.recoverytimes, 1, -1 do
local recovery = self.recoverytimes[i] -- #AIRBOSS.Recovery
if recovery and recovery.ID == Window.ID then
table.remove( self.recoverytimes, i )
end
end
end
@@ -2735,7 +2745,7 @@ end
--- Set time before carrier turns and recovery window opens.
-- @param #AIRBOSS self
-- @param #number Interval Time interval in seconds. Default 300 sec.
-- @param #number Interval (Optional) Time interval in seconds. Default 300 sec.
-- @return #AIRBOSS self
function AIRBOSS:SetRecoveryTurnTime( Interval )
self.dTturn = Interval or 300
@@ -2744,7 +2754,7 @@ end
--- Set multiplayer environment wire correction.
-- @param #AIRBOSS self
-- @param #number Dcorr Correction distance in meters. Default 12 m.
-- @param #number Dcorr (Optional) Correction distance in meters. Default 12 m.
-- @return #AIRBOSS self
function AIRBOSS:SetMPWireCorrection( Dcorr )
self.mpWireCorrection = Dcorr or 12
@@ -2753,7 +2763,7 @@ end
--- Set time interval for updating queues and other stuff.
-- @param #AIRBOSS self
-- @param #number TimeInterval Time interval in seconds. Default 30 sec.
-- @param #number TimeInterval (Optional) Time interval in seconds. Default 30 sec.
-- @return #AIRBOSS self
function AIRBOSS:SetQueueUpdateTime( TimeInterval )
self.dTqueue = TimeInterval or 30
@@ -2762,7 +2772,7 @@ end
--- Set time interval between LSO calls. Optimal time in the groove is ~16 seconds. So the default of 4 seconds gives around 3-4 correction calls in the groove.
-- @param #AIRBOSS self
-- @param #number TimeInterval Time interval in seconds between LSO calls. Default 4 sec.
-- @param #number TimeInterval (Optional) Time interval in seconds between LSO calls. Default 4 sec.
-- @return #AIRBOSS self
function AIRBOSS:SetLSOCallInterval( TimeInterval )
self.LSOdT = TimeInterval or 4
@@ -2835,7 +2845,7 @@ end
--- Give AI aircraft the refueling task if a recovery tanker is present or send them to the nearest divert airfield.
-- @param #AIRBOSS self
-- @param #number LowFuelThreshold Low fuel threshold in percent. AI will go refueling if their fuel level drops below this value. Default 10 %.
-- @param #number LowFuelThreshold (Optional) Low fuel threshold in percent. AI will go refueling if their fuel level drops below this value. Default 10 %.
-- @return #AIRBOSS self
function AIRBOSS:SetRefuelAI( LowFuelThreshold )
self.lowfuelAI = LowFuelThreshold or 10
@@ -2844,7 +2854,7 @@ end
--- Set max altitude to register flights in the initial zone. Aircraft above this altitude will not be registerered.
-- @param #AIRBOSS self
-- @param #number MaxAltitude Max altitude in feet. Default 1300 ft.
-- @param #number MaxAltitude (Optional) Max altitude in feet. Default 1300 ft.
-- @return #AIRBOSS self
function AIRBOSS:SetInitialMaxAlt( MaxAltitude )
self.initialmaxalt = UTILS.FeetToMeters( MaxAltitude or 1300 )
@@ -2878,7 +2888,7 @@ end
--- Set time interval for updating player status and other things.
-- @param #AIRBOSS self
-- @param #number TimeInterval Time interval in seconds. Default 0.5 sec.
-- @param #number TimeInterval (Optional) Time interval in seconds. Default 0.5 sec.
-- @return #AIRBOSS self
function AIRBOSS:SetStatusUpdateTime( TimeInterval )
self.dTstatus = TimeInterval or 0.5
@@ -2887,7 +2897,7 @@ end
--- Set duration how long messages are displayed to players.
-- @param #AIRBOSS self
-- @param #number Duration Duration in seconds. Default 10 sec.
-- @param #number Duration (Optional) Duration in seconds. Default 10 sec.
-- @return #AIRBOSS self
function AIRBOSS:SetDefaultMessageDuration( Duration )
self.Tmessage = Duration or 10
@@ -2978,7 +2988,7 @@ end
--- Set Case I Marshal radius. This is the radius of the valid zone around "the post" aircraft are supposed to be holding in the Case I Marshal stack.
-- The post is 2.5 NM port of the carrier.
-- @param #AIRBOSS self
-- @param #number Radius Radius in NM. Default 2.8 NM, which gives a diameter of 5.6 NM.
-- @param #number Radius (Optional) Radius in NM. Default 2.8 NM, which gives a diameter of 5.6 NM.
-- @return #AIRBOSS self
function AIRBOSS:SetMarshalRadius( Radius )
self.marshalradius = UTILS.NMToMeters( Radius or 2.8 )
@@ -3112,9 +3122,9 @@ end
--- Set up SRS for usage without sound files
-- @param #AIRBOSS self
-- @param #string PathToSRS Path to SRS folder, e.g. "C:\\Program Files\\DCS-SimpleRadio\\ExternalAudio".
-- @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 #number Port (Optional) Port of the SRS server, defaults to 5002.
-- @param #string Culture (Optional) (Optional, Airboss Culture) Culture, defaults to "en-US".
-- @param #string Gender (Optional) (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 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).
@@ -3143,7 +3153,10 @@ function AIRBOSS:EnableSRS(PathToSRS,Port,Culture,Gender,Voice,GoogleCreds,Volum
self.SRS:SetVoice(Voice)
end
if (not Voice) and self.SRS and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
self.SRS.voice = MSRS.poptions["gcloud"].voice or MSRS.Voices.Google.Standard.en_US_Standard_B
self.SRS.voice = MSRS.Voices.Google.Standard.en_US_Standard_B
if MSRS.poptions and MSRS.poptions["gcloud"] and MSRS.poptions["gcloud"].voice then
self.SRS.voice = MSRS.poptions["gcloud"].voice
end
end
--self.SRS:SetVolume(Volume or 1.0)
-- SRSQUEUE
@@ -3362,7 +3375,7 @@ end
--- Set number of aircraft units, which can be in the landing pattern before the pattern is full.
-- @param #AIRBOSS self
-- @param #number nmax Max number. Default 4. Minimum is 1, maximum is 6.
-- @param #number nmax (Optional) Max number. Default 4. Minimum is 1, maximum is 6.
-- @return #AIRBOSS self
function AIRBOSS:SetMaxLandingPattern( nmax )
nmax = nmax or 4
@@ -3375,7 +3388,7 @@ end
--- Set number available Case I Marshal stacks. If Marshal stacks are full, flights requesting Marshal will be told to hold outside 10 NM zone until a stack becomes available again.
-- Marshal stacks for Case II/III are unlimited.
-- @param #AIRBOSS self
-- @param #number nmax Max number of stacks available to players and AI flights. Default 3, i.e. angels 2, 3, 4. Minimum is 1.
-- @param #number nmax (Optional) Max number of stacks available to players and AI flights. Default 3, i.e. angels 2, 3, 4. Minimum is 1.
-- @return #AIRBOSS self
function AIRBOSS:SetMaxMarshalStacks( nmax )
self.Nmaxmarshal = nmax or 3
@@ -3397,7 +3410,7 @@ 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.
-- @param #number dmax (Optional) 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
@@ -3413,7 +3426,7 @@ 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.
-- @param #number nmax (Optional) Number of max allowed flights per stack. Default is two. Minimum is one, maximum is 4.
-- @return #AIRBOSS self
function AIRBOSS:SetMaxFlightsPerStack( nmax )
nmax = nmax or 2
@@ -3433,7 +3446,7 @@ end
--- Will play the inbound calls, commencing, initial, etc. from the player when requesteing marshal
-- @param #AIRBOSS self
-- @param #AIRBOSS status Boolean to activate (true) / deactivate (false) the radio inbound calls (default is ON)
-- @param #AIRBOSS status (Optional) Boolean to activate (true) / deactivate (false) the radio inbound calls (default is ON)
-- @return #AIRBOSS self
function AIRBOSS:SetExtraVoiceOvers(status)
self.xtVoiceOvers=status
@@ -3442,7 +3455,7 @@ end
--- Will simulate the inbound call, commencing, initial, etc from the AI when requested by Airboss
-- @param #AIRBOSS self
-- @param #AIRBOSS status Boolean to activate (true) / deactivate (false) the radio inbound calls (default is ON)
-- @param #AIRBOSS status (Optional) Boolean to activate (true) / deactivate (false) the radio inbound calls (default is ON)
-- @return #AIRBOSS self
function AIRBOSS:SetExtraVoiceOversAI(status)
self.xtVoiceOversAI=status
@@ -3481,7 +3494,7 @@ end
-- * "Naval Aviator" = @{#AIRBOSS.Difficulty.Normal}
-- * "TOPGUN Graduate" = @{#AIRBOSS.Difficulty.Hard}
-- @param #AIRBOSS self
-- @param #string skill Player skill. Default "Naval Aviator".
-- @param #string skill (Optional) Player skill. Default "Naval Aviator".
-- @return #AIRBOSS self
function AIRBOSS:SetDefaultPlayerSkill( skill )
@@ -3507,8 +3520,8 @@ end
--- Enable auto save of player results each time a player is *finally* graded. *Finally* means after the player landed on the carrier! After intermediate passes (bolter or waveoff) the stats are *not* saved.
-- @param #AIRBOSS self
-- @param #string path Path where to save the asset data file. Default is the DCS root installation directory or your "Saved Games\\DCS" folder if lfs was desanitized.
-- @param #string filename File name. Default is generated automatically from airboss carrier name/alias.
-- @param #string path (Optional) Path where to save the asset data file. Default is the DCS root installation directory or your "Saved Games\\DCS" folder if lfs was desanitized.
-- @param #string filename (Optional) File name. Default is generated automatically from airboss carrier name/alias.
-- @return #AIRBOSS self
function AIRBOSS:SetAutoSave( path, filename )
self.autosave = true
@@ -3540,7 +3553,7 @@ end
--- Set the magnetic declination (or variation). By default this is set to the standard declination of the map.
-- @param #AIRBOSS self
-- @param #number declination Declination in degrees or nil for default declination of the map.
-- @param #number declination (Optional) Declination in degrees or nil for default declination of the map.
-- @return #AIRBOSS self
function AIRBOSS:SetMagneticDeclination( declination )
self.magvar = declination or UTILS.GetMagneticDeclination()
@@ -3559,8 +3572,8 @@ end
--- Set FunkMan socket. LSO grades and trap sheets will be send to your Discord bot.
-- **Requires running FunkMan program**.
-- @param #AIRBOSS self
-- @param #number Port Port. Default `10042`.
-- @param #string Host Host. Default `"127.0.0.1"`.
-- @param #number Port (Optional) Port. Default `10042`.
-- @param #string Host (Optional) Host. Default `"127.0.0.1"`.
-- @return #AIRBOSS self
function AIRBOSS:SetFunkManOn(Port, Host)
@@ -3571,7 +3584,7 @@ end
--- Get next time the carrier will start recovering aircraft.
-- @param #AIRBOSS self
-- @param #boolean InSeconds If true, abs. mission time seconds is returned. Default is a clock #string.
-- @param #boolean InSeconds (Optional) If true, abs. mission time seconds is returned. Default is a clock #string.
-- @return #string Clock start (or start time in abs. seconds).
-- @return #string Clock stop (or stop time in abs. seconds).
function AIRBOSS:GetNextRecoveryTime( InSeconds )
@@ -4075,15 +4088,23 @@ function AIRBOSS:_CheckRecoveryTimes()
if self:IsRecovering() then
-- Carrier is already recovering.
state = "in progress"
else
-- Start recovery.
elseif not recovery.OVER then
-- Start recovery. Only if the window has not already been closed/cancelled.
-- The OVER guard prevents a window that was stopped manually (e.g. via the
-- Skipper "Stop Recovery" menu) from being immediately re-opened on the next
-- status tick while its [START,STOP) range is still active.
self:RecoveryStart( recovery.CASE, recovery.OFFSET )
state = "starting now"
recovery.OPEN = true
else
-- Window was already closed/cancelled within its active time range.
state = "cancelled"
end
-- Set current recovery window.
currwindow = recovery
-- Set current recovery window (unless this window has been cancelled).
if not recovery.OVER then
currwindow = recovery
end
else -- Stop time HAS passed.
@@ -4180,13 +4201,16 @@ function AIRBOSS:_CheckRecoveryTimes()
-- Time into the wind 1 day or if longer recovery time + the 5 min early.
local t = math.max( nextwindow.STOP - nextwindow.START + self.dTturn, 60 * 60 * 24 )
-- Recovery wind on deck in knots.
-- Recovery wind on deck in knots.
-- NOTE: Do NOT clamp the desired wind-over-deck (WOD) to the carrier's max hull
-- speed here. WOD = carrier speed + headwind, so a WOD target above the hull's
-- top speed is achievable whenever there is wind. CarrierTurnIntoWind ->
-- GetHeadingIntoWind already converts the WOD target into the required hull
-- speed and caps THAT at the carrier's max speed (Vmax) internally. Clamping the
-- WOD target itself capped achievable WOD at ~30 kts (the supercarrier's max
-- hull speed) even in strong wind, which made high-WOD recovery windows fall
-- short of their requested value.
local v = UTILS.KnotsToMps( nextwindow.SPEED )
-- Check that we do not go above max possible speed.
local vmax = self.carrier:GetSpeedMax() / 3.6 -- convert to m/s
v = math.min( v, vmax )
-- Route carrier into the wind. Sets self.turnintowind=true
self:CarrierTurnIntoWind( t, v, uturn )
@@ -4358,11 +4382,20 @@ function AIRBOSS:onafterRecoveryStop( From, Event, To )
self:CarrierResumeRoute( coord )
end
-- Delete current recovery window if open.
if self.recoverywindow and self.recoverywindow.OPEN == true then
-- Mark the current recovery window closed and cancelled, then remove it from the
-- queue. We do NOT gate this on Window.OPEN: that flag is only set by
-- _CheckRecoveryTimes (not by RecoveryStart), and the recovery time check nils and
-- rebuilds self.recoverywindow every status tick, so OPEN is not a reliable signal
-- here. Setting OVER=true is what actually prevents the window from being re-opened
-- on the next tick while its [START,STOP) range is still active.
--
-- The removal is deferred by one tick (Delay>0) so it does not mutate the
-- recoverytimes table while _CheckRecoveryTimes may be iterating over it (the natural
-- close path calls RecoveryStop() from inside that loop).
if self.recoverywindow then
self.recoverywindow.OPEN = false
self.recoverywindow.OVER = true
self:DeleteRecoveryWindow( self.recoverywindow )
self:DeleteRecoveryWindow( self.recoverywindow, 1 )
end
-- Check recovery windows. This sets self.recoverywindow to the next window.
@@ -6734,7 +6767,7 @@ end
--- Get marshal altitude and two positions of a counter-clockwise race track pattern.
-- @param #AIRBOSS self
-- @param #number stack Assigned stack number. Counting starts at one, i.e. stack=1 is the first stack.
-- @param #number case Recovery case. Default is self.case.
-- @param #number case (Optional) Recovery case. Default is self.case.
-- @return #number Holding altitude in meters.
-- @return Core.Point#COORDINATE First race track coordinate.
-- @return Core.Point#COORDINATE Second race track coordinate.
@@ -7095,8 +7128,8 @@ end
--- Get next free Marshal stack. Depending on AI/human and recovery case.
-- @param #AIRBOSS self
-- @param #boolean ai If true, get a free stack for an AI flight group.
-- @param #number case Recovery case. Default current (self) case in progress.
-- @param #boolean empty Return lowest stack that is completely empty.
-- @param #number case (Optional) Recovery case. Default current (self) case in progress.
-- @param #boolean empty (Optional) Return lowest stack that is completely empty.
-- @return #number Lowest free stack available for the given case or nil if all Case I stacks are taken.
function AIRBOSS:_GetFreeStack( ai, case, empty )
@@ -7185,7 +7218,7 @@ end
--- Get next free Marshal stack. Depending on AI/human and recovery case.
-- @param #AIRBOSS self
-- @param #boolean ai If true, get a free stack for an AI flight group.
-- @param #number case Recovery case. Default current (self) case in progress.
-- @param #number case (Optional) Recovery case. Default current (self) case in progress.
-- @param #boolean empty Return lowest stack that is completely empty.
-- @return #number Lowest free stack available for the given case or nil if all Case I stacks are taken.
function AIRBOSS:_GetFreeStack_Old( ai, case, empty )
@@ -7253,7 +7286,7 @@ end
--- Get number of (airborne) units in a flight.
-- @param #AIRBOSS self
-- @param #AIRBOSS.FlightGroup flight The flight group.
-- @param #boolean onground If true, include units on the ground. By default only airborne units are counted.
-- @param #boolean onground (Optional) If true, include units on the ground. By default only airborne units are counted.
-- @return #number Number of units in flight including section members.
-- @return #number Number of units in flight excluding section members.
-- @return #number Number of section members.
@@ -10958,9 +10991,9 @@ end
--- Get groove zone.
-- @param #AIRBOSS self
-- @param #number l Length of the groove in NM. Default 1.5 NM.
-- @param #number w Width of the groove in NM. Default 0.25 NM.
-- @param #number b Width of the beginning in NM. Default 0.10 NM.
-- @param #number l (Optional) Length of the groove in NM. Default 1.5 NM.
-- @param #number w (Optional) Width of the groove in NM. Default 0.25 NM.
-- @param #number b (Optional) Width of the beginning in NM. Default 0.10 NM.
-- @return Core.Zone#ZONE_POLYGON_BASE Groove zone.
function AIRBOSS:_GetZoneGroove( l, w, b )
@@ -11131,7 +11164,7 @@ end
--- Get approach corridor zone. Shape depends on recovery case.
-- @param #AIRBOSS self
-- @param #number case Recovery case.
-- @param #number l Length of the zone in NM. Default 31 (=21+10) NM.
-- @param #number l (Optional) Length of the zone in NM. Default 31 (=21+10) NM.
-- @return Core.Zone#ZONE_POLYGON_BASE Box zone.
function AIRBOSS:_GetZoneCorridor( case, l )
@@ -11977,7 +12010,7 @@ end
--- Get true (or magnetic) heading of carrier.
-- @param #AIRBOSS self
-- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned.
-- @param #boolean magnetic (Optional) If true, calculate magnetic heading. By default true heading is returned.
-- @return #number Carrier heading in degrees.
function AIRBOSS:GetHeading( magnetic )
self:F3( { magnetic = magnetic } )
@@ -12010,8 +12043,8 @@ end
--- Get wind direction and speed at carrier position.
-- @param #AIRBOSS self
-- @param #number alt Altitude ASL in meters. Default 18 m.
-- @param #boolean magnetic Direction including magnetic declination.
-- @param #number alt (Optional) Altitude ASL in meters. Default 18 m.
-- @param #boolean magnetic (Optional) Direction including magnetic declination.
-- @param Core.Point#COORDINATE coord (Optional) Coordinate at which to get the wind. Default is current carrier position.
-- @return #number Direction the wind is blowing **from** in degrees.
-- @return #number Wind speed in m/s.
@@ -12037,7 +12070,7 @@ end
--- Get wind speed on carrier deck parallel and perpendicular to runway.
-- @param #AIRBOSS self
-- @param #number alt Altitude in meters. Default 18 m.
-- @param #number alt (Optional) Altitude in meters. Default 18 m.
-- @return #number Wind component parallel to runway im m/s.
-- @return #number Wind component perpendicular to runway in m/s.
-- @return #number Total wind strength in m/s.
@@ -12083,7 +12116,7 @@ end
--- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway.
-- @param #AIRBOSS self
-- @param #number vdeck Desired wind velocity over deck in knots.
-- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned.
-- @param #boolean magnetic (Optional) If true, calculate magnetic heading. By default true heading is returned.
-- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position.
-- @return #number Carrier heading in degrees.
-- @return #number Carrier speed in knots to reach desired wind speed on deck.
@@ -12103,7 +12136,7 @@ end
--- Get true (or magnetic) heading of carrier into the wind. This accounts for the angled runway.
-- @param #AIRBOSS self
-- @param #number vdeck Desired wind velocity over deck in knots.
-- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned.
-- @param #boolean magnetic (Optional) If true, calculate magnetic heading. By default true heading is returned.
-- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position.
-- @return #number Carrier heading in degrees.
function AIRBOSS:GetHeadingIntoWind_old( vdeck, magnetic, coord )
@@ -12176,7 +12209,7 @@ end
-- Implementation based on [Mags & Bambi](https://magwo.github.io/carrier-cruise/).
-- @param #AIRBOSS self
-- @param #number vdeck Desired wind velocity over deck in knots.
-- @param #boolean magnetic If true, calculate magnetic heading. By default true heading is returned.
-- @param #boolean magnetic (Optional) If true, calculate magnetic heading. By default true heading is returned.
-- @param Core.Point#COORDINATE coord (Optional) Coordinate from which heading is calculated. Default is current carrier position.
-- @return #number Carrier heading in degrees.
-- @return #number Carrier speed in knots to reach desired wind speed on deck.
@@ -12307,9 +12340,9 @@ end
--
-- @param #AIRBOSS self
-- @param #number case Recovery case.
-- @param #boolean magnetic If true, magnetic radial is returned. Default is true radial.
-- @param #boolean offset If true, inlcude holding offset.
-- @param #boolean inverse Return inverse, i.e. radial-180 degrees.
-- @param #boolean magnetic (Optional) If true, magnetic radial is returned. Default is true radial.
-- @param #boolean offset (Optional) If true, inlcude holding offset.
-- @param #boolean inverse (Optional) Return inverse, i.e. radial-180 degrees.
-- @return #number Radial in degrees.
function AIRBOSS:GetRadial( case, magnetic, offset, inverse )
@@ -12900,6 +12933,14 @@ function AIRBOSS:_LSOgrade( playerData )
-- Circuit edit only take points awary from a 1 wire if there are more than 4 other deviations
if playerData.wire == 1 and points >= 3 and N > 4 then
points = points -1
-- We also need to change the grade based on the new points.
if points == 4 then
grade = "OK"
elseif points == 3 then
grade = "(OK)"
elseif points == 2 then
grade = "--"
end
end
env.info("Returning: " .. grade .. " " .. points .. " " .. G)
@@ -13255,7 +13296,7 @@ end
--- Get short name of the grove step.
-- @param #AIRBOSS self
-- @param #string step Player step.
-- @param #number n Use -1 for previous or +1 for next. Default 0.
-- @param #number n (Optional) Use -1 for previous or +1 for next. Default 0.
-- @return #string Shortcut name "X", "RB", "IM", "AR", "IW".
function AIRBOSS:_GS( step, n )
local gp
@@ -13454,7 +13495,7 @@ end
--- Display hint to player.
-- @param #AIRBOSS self
-- @param #AIRBOSS.PlayerData playerData Player data table.
-- @param #number delay Delay before playing sound messages. Default 0 sec.
-- @param #number delay (Optional) Delay before playing sound messages. Default 0 sec.
-- @param #boolean soundoff If true, don't play and sound hint.
function AIRBOSS:_PlayerHint( playerData, delay, soundoff )
@@ -14276,7 +14317,7 @@ end
--- Check Collision.
-- @param #AIRBOSS self
-- @param Core.Point#COORDINATE fromcoord Coordinate from which the path to the next WP is calculated. Default current carrier position.
-- @param Core.Point#COORDINATE fromcoord (Optional) Coordinate from which the path to the next WP is calculated. Default current carrier position.
-- @return #boolean If true, surface type ahead is not deep water.
function AIRBOSS:_CheckFreePathToNextWP( fromcoord )
@@ -14354,9 +14395,9 @@ end
--- Let the carrier make a detour to a given point. When it reaches the point, it will resume its normal route.
-- @param #AIRBOSS self
-- @param Core.Point#COORDINATE coord Coordinate of the detour.
-- @param #number speed Speed in knots. Default is current carrier velocity.
-- @param #number speed (Optional) Speed in knots. Default is current carrier velocity.
-- @param #boolean uturn (Optional) If true, carrier will go back to where it came from before it resumes its route to the next waypoint.
-- @param #number uspeed Speed in knots after U-turn. Default is same as before.
-- @param #number uspeed (Optional) Speed in knots after U-turn. Default is same as before.
-- @param Core.Point#COORDINATE tcoord Additional coordinate to make turn smoother.
-- @return #AIRBOSS self
function AIRBOSS:CarrierDetour( coord, speed, uturn, uspeed, tcoord )
@@ -16090,11 +16131,11 @@ end
-- @param #AIRBOSS self
-- @param #AIRBOSS.PlayerData playerData Player data.
-- @param #string message The message to send.
-- @param #string sender The person who sends the message or nil.
-- @param #string receiver The person who receives the message. Default player's onboard number. Set to "" for no receiver.
-- @param #number duration Display message duration. Default 10 seconds.
-- @param #boolean clear If true, clear screen from previous messages.
-- @param #number delay Delay in seconds, before the message is displayed.
-- @param #string sender (Optional) The person who sends the message or nil. Defaults to nil.
-- @param #string receiver (Optional) The person who receives the message. Default player's onboard number. Set to "" for no receiver.
-- @param #number duration (Optional) Display message duration. Default 10 seconds.
-- @param #boolean clear I(Optional) f true, clear screen from previous messages. Defaults to false.
-- @param #number delay (Optional) Delay in seconds, before the message is displayed.
function AIRBOSS:MessageToPlayer( playerData, message, sender, receiver, duration, clear, delay )
self:T({sender,receiver,message})
if playerData and message and message ~= "" then
@@ -16218,11 +16259,11 @@ end
-- Message format will be "SENDER: RECCEIVER, MESSAGE".
-- @param #AIRBOSS self
-- @param #string message The message to send.
-- @param #string sender The person who sends the message or nil.
-- @param #string receiver The person who receives the message. Default player's onboard number. Set to "" for no receiver.
-- @param #number duration Display message duration. Default 10 seconds.
-- @param #boolean clear If true, clear screen from previous messages.
-- @param #number delay Delay in seconds, before the message is displayed.
-- @param #string sender (Optional) The person who sends the message or nil. Defaults to "LSO".
-- @param #string receiver (Optional) The person who receives the message. Default player's onboard number. Set to "" for no receiver.
-- @param #number duration (Optional) Display message duration. Default 10 seconds.
-- @param #boolean clear (Optional) If true, clear screen from previous messages.
-- @param #number delay (Optional) Delay in seconds, before the message is displayed.
function AIRBOSS:MessageToPattern( message, sender, receiver, duration, clear, delay )
-- Create new (fake) radio call to show the subtitile.
@@ -16237,11 +16278,11 @@ end
-- Message format will be "SENDER: RECCEIVER, MESSAGE".
-- @param #AIRBOSS self
-- @param #string message The message to send.
-- @param #string sender The person who sends the message or nil.
-- @param #string receiver The person who receives the message. Default player's onboard number. Set to "" for no receiver.
-- @param #number duration Display message duration. Default 10 seconds.
-- @param #boolean clear If true, clear screen from previous messages.
-- @param #number delay Delay in seconds, before the message is displayed.
-- @param #string sender (Optional) The person who sends the message or nil. Defaults to "Marshal".
-- @param #string receiver (Optional) The person who receives the message. Default player's onboard number. Set to "" for no receiver.
-- @param #number duration (Optional) Display message duration. Default 10 seconds.
-- @param #boolean clear (Optional) If true, clear screen from previous messages.
-- @param #number delay (Optional) Delay in seconds, before the message is displayed.
function AIRBOSS:MessageToMarshal( message, sender, receiver, duration, clear, delay )
-- Create new (fake) radio call to show the subtitile.
@@ -16255,11 +16296,11 @@ end
--- Generate a new radio call (deepcopy) from an existing default call.
-- @param #AIRBOSS self
-- @param #AIRBOSS.RadioCall call Radio call to be enhanced.
-- @param #string sender Sender of the message. Default is the radio alias.
-- @param #string subtitle Subtitle of the message. Default from original radio call. Use "" for no subtitle.
-- @param #number subduration Time in seconds the subtitle is displayed. Default 10 seconds.
-- @param #string modexreceiver Onboard number of the receiver or nil.
-- @param #string modexsender Onboard number of the sender or nil.
-- @param #string sender (Optional) Sender of the message. Default is the radio alias.
-- @param #string subtitle (Optional) Subtitle of the message. Default from original radio call. Use "" for no subtitle.
-- @param #number subduration (Optional) Time in seconds the subtitle is displayed. Default 10 seconds.
-- @param #string modexreceiver (Optional) Onboard number of the receiver or nil.
-- @param #string modexsender (Optional) Onboard number of the sender or nil.
function AIRBOSS:_NewRadioCall( call, sender, subtitle, subduration, modexreceiver, modexsender )
-- Create a new call
@@ -19201,7 +19242,7 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #string path Path where the file is loaded from. Default is the DCS root installation folder or your "Saved Games\\DCS" folder if lfs was desanizied.
-- @param #string path (Optional) Path where the file is loaded from. Default is the DCS root installation folder or your "Saved Games\\DCS" folder if lfs was desanizied.
-- @param #string filename (Optional) File name for saving the player grades. Default is "AIRBOSS-<ALIAS>_LSOgrades.csv".
function AIRBOSS:onafterLoad( From, Event, To, path, filename )
+248 -41
View File
@@ -68,7 +68,7 @@ ARMYGROUP = {
--- Army Group version.
-- @field #string version
ARMYGROUP.version="1.0.3"
ARMYGROUP.version="1.0.4"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -463,10 +463,10 @@ end
-- @param #ARMYGROUP self
-- @param Core.Point#COORDINATE Coordinate Coordinate of the target.
-- @param #string Clock Time when to start the attack.
-- @param #number Radius Radius in meters. Default 100 m.
-- @param #number Nshots Number of shots to fire. Default 3.
-- @param #number WeaponType Type of weapon. Default auto.
-- @param #number Prio Priority of the task.
-- @param #number Radius (Optional) Radius in meters. Default 100 m.
-- @param #number Nshots (Optional) Number of shots to fire. Default 3.
-- @param #number WeaponType (Optional) Type of weapon. Default auto.
-- @param #number Prio (Optional) Priority of the task. Defaults to 50.
-- @return Ops.OpsGroup#OPSGROUP.Task The task table.
function ARMYGROUP:AddTaskFireAtPoint(Coordinate, Clock, Radius, Nshots, WeaponType, Prio)
@@ -485,10 +485,10 @@ end
-- @param #number Heading Heading min in Degrees.
-- @param #number Alpha Shooting angle in Degrees.
-- @param #number Altitude Altitude in meters.
-- @param #number Radius Radius in meters. Default 100 m.
-- @param #number Nshots Number of shots to fire. Default nil.
-- @param #number WeaponType Type of weapon. Default auto.
-- @param #number Prio Priority of the task.
-- @param #number Radius (Optional) Radius in meters. Default 100 m.
-- @param #number Nshots (Optional) Number of shots to fire. Default nil.
-- @param #number WeaponType (Optional) Type of weapon. Default auto.
-- @param #number Prio (Optional) Priority of the task. Defaults to 50.
-- @return Ops.OpsGroup#OPSGROUP.Task The task table.
function ARMYGROUP:AddTaskBarrage(Clock, Heading, Alpha, Altitude, Radius, Nshots, WeaponType, Prio)
@@ -516,11 +516,11 @@ end
--- Add a *waypoint* task to fire at a given coordinate.
-- @param #ARMYGROUP self
-- @param Core.Point#COORDINATE Coordinate Coordinate of the target.
-- @param Ops.OpsGroup#OPSGROUP.Waypoint Waypoint Where the task is executed. Default is next waypoint.
-- @param #number Radius Radius in meters. Default 100 m.
-- @param #number Nshots Number of shots to fire. Default 3.
-- @param #number WeaponType Type of weapon. Default auto.
-- @param #number Prio Priority of the task.
-- @param Ops.OpsGroup#OPSGROUP.Waypoint Waypoint (Optional) Where the task is executed. Default is next waypoint.
-- @param #number Radius (Optional) Radius in meters. Default 100 m.
-- @param #number Nshots (Optional) Number of shots to fire. Default 3.
-- @param #number WeaponType (Optional) Type of weapon. Default auto.
-- @param #number Prio (Optional) Priority of the task. Defaults to 50.
-- @return Ops.OpsGroup#OPSGROUP.Task The task table.
function ARMYGROUP:AddTaskWaypointFireAtPoint(Coordinate, Waypoint, Radius, Nshots, WeaponType, Prio)
@@ -538,10 +538,10 @@ end
--- Add a *scheduled* task.
-- @param #ARMYGROUP self
-- @param Wrapper.Group#GROUP TargetGroup Target group.
-- @param #number WeaponExpend How much weapons does are used.
-- @param #number WeaponType Type of weapon. Default auto.
-- @param #string Clock Time when to start the attack.
-- @param #number Prio Priority of the task.
-- @param #number WeaponExpend (Optional) How much weapons does are used. Defaults to "Auto".
-- @param #number WeaponType (Optional) Type of weapon. Default auto.
-- @param #string Clock (Optional) Time when to start the attack. Defaults to 5.
-- @param #number Prio (Optional) Priority of the task. Defaults to 50.
-- @return Ops.OpsGroup#OPSGROUP.Task The task table.
function ARMYGROUP:AddTaskAttackGroup(TargetGroup, WeaponExpend, WeaponType, Clock, Prio)
@@ -574,7 +574,7 @@ end
--- Define a set of possible retreat zones.
-- @param #ARMYGROUP self
-- @param Core.Set#SET_ZONE RetreatZoneSet The retreat zone set. Default is an empty set.
-- @param Core.Set#SET_ZONE RetreatZoneSet (Optional) The retreat zone set. Default is an empty set.
-- @return #ARMYGROUP self
function ARMYGROUP:SetRetreatZones(RetreatZoneSet)
self.retreatZones=RetreatZoneSet or SET_ZONE:New()
@@ -592,7 +592,7 @@ end
--- Set suppression on. average, minimum and maximum time a unit is suppressed each time it gets hit.
-- @param #ARMYGROUP self
-- @param #number Tave Average time [seconds] a group will be suppressed. Default is 15 seconds.
-- @param #number Tave (Optional) Average time [seconds] a group will be suppressed. Default is 15 seconds.
-- @param #number Tmin (Optional) Minimum time [seconds] a group will be suppressed. Default is 5 seconds.
-- @param #number Tmax (Optional) Maximum time a group will be suppressed. Default is 25 seconds.
-- @return #ARMYGROUP self
@@ -995,10 +995,10 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #number n Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
-- @param #number Speed Speed in knots. Default cruise speed.
-- @param #number Formation Formation of the group.
-- @param #number n (Optional) Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N (Optional) Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
-- @param #number Speed (Optional) Speed in knots. Default cruise speed.
-- @param #number Formation (Optional) Formation of the group.
function ARMYGROUP:onbeforeUpdateRoute(From, Event, To, n, N, Speed, Formation)
-- Is transition allowed? We assume yes until proven otherwise.
@@ -1082,10 +1082,10 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #number n Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
-- @param #number Speed Speed in knots. Default cruise speed.
-- @param #number Formation Formation of the group.
-- @param #number n (Optional) Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N (Optional) Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
-- @param #number Speed (Optional) Speed in knots. Default cruise speed.
-- @param #number Formation (Optional) Formation of the group.
function ARMYGROUP:onafterUpdateRoute(From, Event, To, n, N, Speed, Formation)
-- Update route from this waypoint number onwards.
@@ -1358,7 +1358,7 @@ end
-- @param #string Event Event.
-- @param #string To To state.
-- @param Core.Point#COORDINATE Coordinate Coordinate where to go.
-- @param #number Speed Speed in knots. Default cruise speed.
-- @param #number Speed (Optional) Speed in knots. Default cruise speed.
-- @param #number Formation Formation of the group.
-- @param #number ResumeRoute If true, resume route after detour point was reached. If false, the group will stop at the detour point and wait for futher commands.
function ARMYGROUP:onafterDetour(From, Event, To, Coordinate, Speed, Formation, ResumeRoute)
@@ -1738,7 +1738,7 @@ end
-- @param #string To To state.
-- @param Wrapper.Group#GROUP Group the group to be engaged.
-- @param #number Speed Speed in knots.
-- @param #string Formation Formation used in the engagement. Default `ENUMS.Formation.Vehicle.Vee`.
-- @param #string Formation (Optional) Formation used in the engagement. Default `ENUMS.Formation.Vehicle.Vee`.
function ARMYGROUP:onbeforeEngageTarget(From, Event, To, Target, Speed, Formation)
local dt=nil
@@ -1779,7 +1779,7 @@ end
-- @param #string To To state.
-- @param Ops.Target#TARGET Target The target to be engaged. Can also be a group or unit.
-- @param #number Speed Attack speed in knots.
-- @param #string Formation Formation used in the engagement. Default `ENUMS.Formation.Vehicle.Vee`.
-- @param #string Formation (Optional) Formation used in the engagement. Default `ENUMS.Formation.Vehicle.Vee`.
function ARMYGROUP:onafterEngageTarget(From, Event, To, Target, Speed, Formation)
self:T(self.lid.."Engaging Target")
@@ -1983,10 +1983,10 @@ end
--- Add an a waypoint to the route.
-- @param #ARMYGROUP self
-- @param Core.Point#COORDINATE Coordinate The coordinate of the waypoint.
-- @param #number Speed Speed in knots. Default is default cruise speed or 70% of max speed.
-- @param #number AfterWaypointWithID Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #string Formation Formation the group will use.
-- @param #boolean Updateroute If true or nil, call UpdateRoute. If false, no call.
-- @param #number Speed (Optional) Speed in knots. Default is default cruise speed or 70% of max speed.
-- @param #number AfterWaypointWithID (Optional) Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #string Formation (Optional) Formation the group will use.
-- @param #boolean Updateroute (Optional) If true or nil, call UpdateRoute. If false, no call.
-- @return Ops.OpsGroup#OPSGROUP.Waypoint Waypoint table.
function ARMYGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Formation, Updateroute)
@@ -2047,8 +2047,8 @@ end
--- Initialize group parameters. Also initializes waypoints if self.waypoints is nil.
-- @param #ARMYGROUP self
-- @param #table Template Template used to init the group. Default is `self.template`.
-- @param #number Delay Delay in seconds before group is initialized. Default `nil`, *i.e.* instantaneous.
-- @param #table Template (Optional) Template used to init the group. Default is `self.template`.
-- @param #number Delay (Optional) Delay in seconds before group is initialized. Default `nil`, *i.e.* instantaneous.
-- @return #ARMYGROUP self
function ARMYGROUP:_InitGroup(Template, Delay)
@@ -2145,9 +2145,9 @@ end
--- Switch to a specific formation.
-- @param #ARMYGROUP self
-- @param #number Formation New formation the group will fly in. Default is the setting of `SetDefaultFormation()`.
-- @param #boolean Permanently If true, formation always used from now on.
-- @param #boolean NoRouteUpdate If true, route is not updated.
-- @param #number Formation (Optional) New formation the group will fly in. Default is the setting of `SetDefaultFormation()`.
-- @param #boolean Permanently (Optional) If true, formation always used from now on. Defaults to false.
-- @param #boolean NoRouteUpdate (Optional) If true, route is not updated. Defaults to false.
-- @return #ARMYGROUP self
function ARMYGROUP:SwitchFormation(Formation, Permanently, NoRouteUpdate)
@@ -2191,7 +2191,7 @@ end
--- Find the neares ammo supply group within a given radius.
-- @param #ARMYGROUP self
-- @param #number Radius Search radius in NM. Default 30 NM.
-- @param #number Radius (Optional) Search radius in NM. Default 30 NM.
-- @return Wrapper.Group#GROUP Closest ammo supplying group or `nil` if no group is in the given radius.
-- @return #number Distance to closest group in meters.
function ARMYGROUP:FindNearestAmmoSupply(Radius)
@@ -2332,6 +2332,213 @@ function ARMYGROUP:onafterUnsuppressed(From, Event, To)
end
----------------------------------------------------------------
-- HuntingPatrol.lua
--
-- Adds simple "hunting patrol" behavior on top of ARMYGROUP:
--
-- * Group patrols normally using its existing waypoints
-- * While combat-ready, periodically scans a zone for enemies
-- * When an enemy is found, lock it and call EngageTarget()
-- * Stay on that target until it dies
-- * When target is dead, Disengage() and let ARMYGROUP resume patrol
----------------------------------------------------------------
--- Module table
ARMYGROUP.HuntingPatrol = {}
----------------------------------------------------------------
-- ARMYGROUP extension state
----------------------------------------------------------------
-- We store a few extra fields on ARMYGROUP:
-- hp_zone : ZONE object to hunt inside
-- hp_speed : speed in knots when engaging
-- hp_formation : formation string when engaging
-- hp_target : currently locked UNIT (or nil)
-- hp_timer : TIMER object for periodic updates
-- hp_interval : scan interval in seconds
----------------------------------------------------------------
--- Enable hunting patrol behavior for this ARMYGROUP.
-- @param #ARMYGROUP self
-- @param Core.Zone#ZONE_BASE Zone The zone to hunt inside.
-- @param #number Speed Speed in knots when engaging.
-- @param #string Formation Formation used during engagement (optional).
-- @param #number Interval Scan interval in seconds (optional, default 5).
-- @return #ARMYGROUP self
function ARMYGROUP:EnableHuntingPatrol(Zone, Speed, Formation, Interval)
self.hp_zone = Zone
self.hp_speed = tonumber(Speed) or 20
self.hp_formation = Formation or nil
-- Force numeric, safe interval
local intervalNum = tonumber(Interval)
if not intervalNum or intervalNum <= 0 then
intervalNum = 5
end
self.hp_interval = intervalNum
self.hp_target = nil
if self.hp_timer then
self.hp_timer:Stop()
self.hp_timer = nil
end
self.hp_timer = TIMER:New(self._HuntingPatrolUpdate, self):Start(1, self.hp_interval)
self:T(self.lid .. "HuntingPatrol: enabled. Interval=" .. tostring(self.hp_interval))
return self
end
--- Disable hunting patrol behavior.
-- @param #ARMYGROUP self
-- @return #ARMYGROUP self
function ARMYGROUP:DisableHuntingPatrol()
if self.hp_timer then
self.hp_timer:Stop()
self.hp_timer = nil
end
if self.HuntingEnemySet then
self.HuntingEnemySet:FilterStop()
self.HuntingEnemySet = nil
end
self.hp_target = nil
self:T(self.lid .. "HuntingPatrol: disabled.")
return self
end
----------------------------------------------------------------
-- Internal: periodic update
----------------------------------------------------------------
-- This is called by the TIMER created in EnableHuntingPatrol().
-- It:
--
-- - checks if group is alive & combat-ready
-- - if a target is locked, checks if it is still alive
-- - if no target, scans the zone for enemies and locks one
-- - uses ARMYGROUP:EngageTarget() / Disengage()
--
----------------------------------------------------------------
-- @param #ARMYGROUP self
-- @return #ARMYGROUP self
function ARMYGROUP:_HuntingPatrolUpdate()
-- If group is dead, stop.
if not self:IsAlive() then
self:DisableHuntingPatrol()
return
end
-- Only run during PATROLZONE missions
local mission = self:GetMissionCurrent()
if not mission or mission.type ~= AUFTRAG.Type.PATROLZONE then
return
end
-- Only act when combat-ready
if not self:IsCombatReady() then
return
end
-- If we have a locked target, keep or drop it
if self.hp_target then
if not self.hp_target:IsAlive() then
self.hp_target = nil
self:Disengage()
end
return
end
-- No target → scan for new enemies
local enemy = self:_HuntingPatrolFindEnemyInZone(self.hp_zone)
if enemy then
self.hp_target = enemy
self:EngageTarget(enemy, self.hp_speed, self.hp_formation)
end
end
----------------------------------------------------------------
-- Internal: find one enemy ground unit inside a zone
----------------------------------------------------------------
-- Very simple: build a SET_UNIT, filter by coalition and zone,
-- and pick the closest unit to this ARMYGROUP.
----------------------------------------------------------------
-- @param #ARMYGROUP self
-- @param Core.Zone#ZONE Zone The zont to look at
-- @return Wrapper.Unit#UNIT Enemy The nearest enemy UNIT in zone
function ARMYGROUP:_HuntingPatrolFindEnemyInZone(Zone)
if not Zone then return nil end
-- Determine our coalition.
local myCoalition = self:GetCoalition()
if not self.HuntingEnemySet then
self.HuntingEnemySet = SET_UNIT:New()
:FilterActive(true)
:FilterCategories("ground")
:FilterStart()
end
local enemies = {}
self.HuntingEnemySet:ForEachUnitCompletelyInZone(Zone, function(unit)
if unit:GetCoalition() ~= myCoalition and unit:IsAlive() then
table.insert(enemies, unit)
end
end)
if #enemies == 0 then
return nil
end
-- Pick the closest enemy.
local myCoord = self:GetCoordinate()
table.sort(enemies, function(a, b)
return myCoord:Get2DDistance(a:GetCoordinate()) <
myCoord:Get2DDistance(b:GetCoordinate())
end)
return enemies[1]
end
----------------------------------------------------------------
-- Optional helper: convenience wrapper for your campaign code
----------------------------------------------------------------
-- Example usage in your ArmyManagement:
--
-- local group = GROUP:FindByName("MyDefenseGroup")
-- local army = ARMYGROUP:New(group)
-- army:SetPatrolAdInfinitum(true)
-- army:EnableHuntingPatrol(myZone, 20, "Off Road", 5)
--
-- ARMYGROUP will:
--
-- * patrol its waypoints forever
-- * periodically scan myZone
-- * when an enemy appears, EngageTarget()
-- * when target dies, Disengage() and resume patrol
--
----------------------------------------------------------------
-- @param Wrapper.Group#GROUP group The GROUP object to be made into an ARMYGROUP and send hunting.
-- @param Core.Zone#ZONE zone The zone object where to search for enemies.
-- @param #number speed Speed in knots when engaging.
-- @param #string formation Formation used during engagement (optional).
-- @param #number interval Scan interval in seconds (optional, default 5).
-- @return #ARMYGROUP ArmyGroup The new ArmyGroup.
function ARMYGROUP.EnableHuntingPatrolForGroup(group, zone, speed, formation, interval)
local army = ARMYGROUP:New(group)
army:SetPatrolAdInfinitum(true)
army:EnableHuntingPatrol(zone, speed, formation, interval)
return army
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
File diff suppressed because it is too large Load Diff
+61 -36
View File
@@ -17,7 +17,7 @@
-- ===
--
-- ### Author: **applevangelist**
-- @date Last Update July 2025
-- @date Last Update Feb 2026
-- @module Ops.AWACS
-- @image OPS_AWACS.jpg
@@ -1410,16 +1410,18 @@ end
--- [User] Set the tactical information option, create 10 radio channels groups can subscribe and get Bogey Dope on a specific frequency automatically. You **need** to set up SRS first before using this!
-- @param #AWACS self
-- @param #number BaseFreq Base Frequency to use, defaults to 130.
-- @param #number Increase Increase to use, defaults to 0.5, thus channels created are 130, 130.5, 131 .. etc.
-- @param #number Modulation Modulation to use, defaults to radio.modulation.AM.
-- @param #number BaseFreq (Optional) Base Frequency to use, defaults to 130.
-- @param #number Increase (Optional) Increase to use, defaults to 0.5, thus channels created are 130, 130.5, 131 .. etc.
-- @param #number Modulation (Optional) Modulation to use, defaults to radio.modulation.AM.
-- @param #number Interval Seconds between each update call.
-- @param #number Number Number of Frequencies to create, can be 1..10.
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #AWACS self
function AWACS:SetTacticalRadios(BaseFreq,Increase,Modulation,Interval,Number)
function AWACS:SetTacticalRadios(BaseFreq,Increase,Modulation,Interval,Number,Provider,Speaker)
self:T(self.lid.."SetTacticalRadios")
if not self.AwacsSRS then
MESSAGE:New("AWACS: Setup SRS in your code BEFORE trying to add tac radios please!",30,"ERROR",true):ToLog():ToAll()
MESSAGE:New("AWACS: Setup SRS in your code BEFORE trying to add tactical radios please!",30,"ERROR",true):ToLog():ToAll()
return self
end
self.TacticalMenu = true
@@ -1440,6 +1442,9 @@ function AWACS:SetTacticalRadios(BaseFreq,Increase,Modulation,Interval,Number)
self.TacticalSRS:SetGender(self.Gender)
self.TacticalSRS:SetCulture(self.Culture)
self.TacticalSRS:SetVoice(self.Voice)
if Speaker then
self.TacticalSRS:SetSpeakerPiper(Speaker)
end
self.TacticalSRS:SetPort(self.Port)
self.TacticalSRS:SetLabel("AWACS")
self.TacticalSRS:SetVolume(self.Volume)
@@ -1448,6 +1453,9 @@ function AWACS:SetTacticalRadios(BaseFreq,Increase,Modulation,Interval,Number)
self.TacticalSRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.AccessKey)
self.TacticalSRS:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
self.TacticalSRS:SetProvider(Provider)
end
self.TacticalSRSQ = MSRSQUEUE:New("Tactical AWACS")
end
return self
@@ -1694,8 +1702,8 @@ end
--- [User] Set TOS Time-on-Station in Hours
-- @param #AWACS self
-- @param #number AICHours AWACS stays this number of hours on station before shift change, default is 4.
-- @param #number CapHours (optional) CAP stays this number of hours on station before shift change, default is 4.
-- @param #number AICHours (Optional) AWACS stays this number of hours on station before shift change, default is 4.
-- @param #number CapHours (Optional) CAP stays this number of hours on station before shift change, default is 4.
-- @return #AWACS self
function AWACS:SetTOS(AICHours,CapHours)
self:T(self.lid.."SetTOS")
@@ -1990,7 +1998,7 @@ end
--- [User] Set AWACS Player Guidance - influences missile callout and the "New" label in group callouts.
-- @param #AWACS self
-- @param #boolean Switch If true (default) it is on, if false, it is off.
-- @param #boolean Switch (Optional) If true (default) it is on, if false, it is off.
-- @return #AWACS self
function AWACS:SetPlayerGuidance(Switch)
if (Switch == nil) or (Switch == true) then
@@ -2010,9 +2018,9 @@ end
--- [User] Set AWACS intercept timeline support distance.
-- @param #AWACS self
-- @param #number TacDistance Distance for TAC call, default 45nm
-- @param #number MeldDistance Distance for Meld call, default 35nm
-- @param #number ThreatDistance Distance for Threat call, default 25nm
-- @param #number TacDistance (Optional) Distance for TAC call, default 45nm
-- @param #number MeldDistance (Optional) Distance for Meld call, default 35nm
-- @param #number ThreatDistance (Optional) Distance for Threat call, default 25nm
-- @return #AWACS self
function AWACS:SetInterceptTimeline(TacDistance, MeldDistance, ThreatDistance)
self.TacDistance = TacDistance or 45
@@ -2119,12 +2127,12 @@ end
--- [User] Set AWACS flight details
-- @param #AWACS self
-- @param #number CallSign Defaults to CALLSIGN.AWACS.Magic
-- @param #number CallSignNo Defaults to 1
-- @param #number Angels Defaults to 25 (i.e. 25000 ft)
-- @param #number Speed Defaults to 250kn
-- @param #number Heading Defaults to 0 (North)
-- @param #number Leg Defaults to 25nm
-- @param #number CallSign (Optional) Defaults to CALLSIGN.AWACS.Magic
-- @param #number CallSignNo (Optional) Defaults to 1
-- @param #number Angels (Optional) Defaults to 25 (i.e. 25000 ft)
-- @param #number Speed (Optional) Defaults to 250kn
-- @param #number Heading (Optional) Defaults to 0 (North)
-- @param #number Leg (Optional) Defaults to 25nm
-- @return #AWACS self
function AWACS:SetAwacsDetails(CallSign,CallSignNo,Angels,Speed,Heading,Leg)
self:T(self.lid.."SetAwacsDetails")
@@ -2176,18 +2184,20 @@ end
--- [User] Set AWACS SRS TTS details - see @{Sound.SRS} for details. `SetSRS()` will try to use as many attributes configured with @{Sound.SRS#MSRS.LoadConfigFile}() as possible.
-- @param #AWACS self
-- @param #string PathToSRS Defaults to "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
-- @param #string Gender Defaults to "male"
-- @param #string Culture Defaults to "en-US"
-- @param #number Port Defaults to 5002
-- @param #string PathToSRS (Optional) Defaults to "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
-- @param #string Gender (Optional) Defaults to "male"
-- @param #string Culture (Optional) Defaults to "en-US"
-- @param #number Port (Optional) Defaults to 5002
-- @param #string Voice (Optional) Use a specifc voice with the @{Sound.SRS#SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
-- @param #number Volume Volume - between 0.0 (silent) and 1.0 (loudest)
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest) Defaults to 1.0.
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS; if you use a config file for MSRS, hand in nil here.
-- @param #string AccessKey (Optional) Your Google API access key. This is necessary if DCS-gRPC is used as backend; if you use a config file for MSRS, hand in nil here.
-- @param #string Backend (Optional) Your MSRS Backend if different from your config file settings, e.g. MSRS.Backend.SRSEXE or MSRS.Backend.GRPC
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #AWACS self
function AWACS:SetSRS(PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,AccessKey,Backend)
function AWACS:SetSRS(PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,AccessKey,Backend,Provider,Speaker)
self:T(self.lid.."SetSRS")
self.PathToSRS = PathToSRS or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
self.Gender = Gender or MSRS.gender or "male"
@@ -2198,6 +2208,7 @@ function AWACS:SetSRS(PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey
self.AccessKey = AccessKey
self.Volume = Volume or 1.0
self.Backend = Backend or MSRS.backend
self.Provider = Provider
BASE:I({backend = self.Backend})
self.AwacsSRS = MSRS:New(self.PathToSRS,self.MultiFrequency,self.MultiModulation,self.Backend)
self.AwacsSRS:SetCoalition(self.coalition)
@@ -2206,10 +2217,16 @@ function AWACS:SetSRS(PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey
self.AwacsSRS:SetPort(self.Port)
self.AwacsSRS:SetLabel("AWACS")
self.AwacsSRS:SetVolume(Volume)
if Speaker then
self.AwacsSRS:SetSpeakerPiper(Speaker)
end
if self.PathToGoogleKey then
--self.AwacsSRS:SetGoogle(self.PathToGoogleKey)
self.AwacsSRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.AccessKey)
self.AwacsSRS:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
self.AwacsSRS:SetProvider(Provider)
end
-- Pre-configured Google?
if (not PathToGoogleKey) and self.AwacsSRS:GetProvider() == MSRS.Provider.GOOGLE then
@@ -2223,25 +2240,27 @@ end
--- [User] Set AWACS Voice Details for AI CAP Planes - SRS TTS - see @{Sound.SRS} for details
-- @param #AWACS self
-- @param #string Gender Defaults to "male"
-- @param #string Culture Defaults to "en-US"
-- @param #string Gender (Optional) Defaults to "male"
-- @param #string Culture (Optional) Defaults to "en-US"
-- @param #string Voice (Optional) Use a specifc voice with the @{#MSRS.SetVoice} function, e.g, `:SetVoice("Microsoft Hedda Desktop")`.
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #AWACS self
function AWACS:SetSRSVoiceCAP(Gender, Culture, Voice)
function AWACS:SetSRSVoiceCAP(Gender, Culture, Voice, Speaker)
self:T(self.lid.."SetSRSVoiceCAP")
self.CAPGender = Gender or "male"
self.CAPCulture = Culture or "en-US"
self.CAPVoice = Voice or "en-GB-Standard-B"
self.CAPSpeaker = Speaker
return self
end
--- [User] Set AI CAP Plane Details
-- @param #AWACS self
-- @param #number Callsign Callsign name of AI CAP, e.g. CALLSIGN.Aircraft.Dodge. Defaults to CALLSIGN.Aircraft.Colt. Note that not all available callsigns work for all plane types.
-- @param #number MaxAICap Maximum number of AI CAP planes on station that AWACS will set up automatically. Default to 4.
-- @param #number TOS Time on station, in hours. AI planes might go back to base earlier if they run out of fuel or missiles.
-- @param #number Speed Airspeed to be used in knots. Will be adjusted to flight height automatically. Defaults to 270.
-- @param #number Callsign (Optional) Callsign name of AI CAP, e.g. CALLSIGN.Aircraft.Dodge. Defaults to CALLSIGN.Aircraft.Colt. Note that not all available callsigns work for all plane types.
-- @param #number MaxAICap (Optional) Maximum number of AI CAP planes on station that AWACS will set up automatically. Default to 4.
-- @param #number TOS (Optional) Time on station, in hours. AI planes might go back to base earlier if they run out of fuel or missiles. Defaults to 4.
-- @param #number Speed (Optional) Airspeed to be used in knots. Will be adjusted to flight height automatically. Defaults to 270.
-- @return #AWACS self
function AWACS:SetAICAPDetails(Callsign,MaxAICap,TOS,Speed)
self:T(self.lid.."SetAICAPDetails")
@@ -2257,7 +2276,7 @@ end
-- @param #number EscortNumber Number of fighther plane GROUPs to accompany this AWACS. 0 or nil means no escorts. If you want >1 plane in an escort group, you can either set the respective squadron grouping to the desired number, or use a template for escorts with >1 unit.
-- @param #number Formation Formation the escort should take (if more than one plane), e.g. `ENUMS.Formation.FixedWing.FingerFour.Group`. Formation is used on GROUP level, multiple groups of one unit will NOT conform to this formation.
-- @param #table OffsetVector Offset the escorts should fly behind the AWACS, given as table, distance in meters, e.g. `{x=-500,y=0,z=500}` - 500m behind (negative value) and to the right (negative for left), no vertical separation (positive over, negative under the AWACS flight). For multiple groups, the vectors will be slightly changed to avoid collisions.
-- @param #number EscortEngageMaxDistance Escorts engage air targets max this NM away, defaults to 45NM.
-- @param #number EscortEngageMaxDistance (Optional) Escorts engage air targets max this NM away, defaults to 45NM.
-- @return #AWACS self
function AWACS:SetEscort(EscortNumber,Formation,OffsetVector,EscortEngageMaxDistance)
self:T(self.lid.."SetEscort")
@@ -3823,7 +3842,13 @@ function AWACS:_CheckInAI(FlightGroup,Group,AuftragsNr)
CAPVoice = self.CapVoices[math.floor(math.random(1,10))]
end
FlightGroup:SetSRS(self.PathToSRS,self.CAPGender,self.CAPCulture,CAPVoice,self.Port,self.PathToGoogleKey,"FLIGHT",1)
FlightGroup:SetSRS(self.PathToSRS,self.CAPGender,self.CAPCulture,CAPVoice,self.Port,self.PathToGoogleKey,"FLIGHT",1,self.Provider)
if self.Backend then
FlightGroup.srs:SetBackend(self.Backend)
end
if self.CAPSpeaker then
FlightGroup.srs:SetSpeakerPiper(self.CAPSpeaker)
end
local checkai = self.gettext:GetEntry("CHECKINAI",self.locale)
text = string.format(checkai,self.callsigntxt, managedgroup.CallSign, self.CAPTimeOnStation, self.AOName)
@@ -6855,7 +6880,7 @@ function AWACS:onafterCheckTacticalQueue(From,Event,To)
end
-- AI AWACS Speaking
local gtext = RadioEntry.TextTTS
if self.PathToGoogleKey then
if self.PathToGoogleKey and self.Backend ~= MSRS.Backend.HOUND then
gtext = string.format("<speak><prosody rate='medium'>%s</prosody></speak>",gtext)
end
self.TacticalSRSQ:NewTransmission(gtext,nil,self.TacticalSRS,nil,0.5,nil,nil,nil,frequency,self.TacticalModulation)
@@ -6914,7 +6939,7 @@ function AWACS:onafterCheckRadioQueue(From,Event,To)
if not RadioEntry.FromAI then
-- AI AWACS Speaking
if self.PathToGoogleKey then
if self.PathToGoogleKey and self.Backend ~= MSRS.Backend.HOUND then
local gtext = RadioEntry.TextTTS
gtext = string.format("<speak><prosody rate='medium'>%s</prosody></speak>",gtext)
self.AwacsSRS:PlayTextExt(gtext,nil,self.MultiFrequency,self.MultiModulation,self.Gender,self.Culture,self.Voice,self.Volume,"AWACS")
@@ -6927,7 +6952,7 @@ function AWACS:onafterCheckRadioQueue(From,Event,To)
if RadioEntry.GroupID and RadioEntry.GroupID ~= 0 then
local managedgroup = self.ManagedGrps[RadioEntry.GroupID] -- #AWACS.ManagedGroup
if managedgroup and managedgroup.FlightGroup and managedgroup.FlightGroup:IsAlive() then
if self.PathToGoogleKey then
if self.PathToGoogleKey and self.Backend ~= MSRS.Backend.HOUND then
local gtext = RadioEntry.TextTTS
gtext = string.format("<speak><prosody rate='medium'>%s</prosody></speak>",gtext)
managedgroup.FlightGroup:RadioTransmission(gtext,1,false)
+329 -57
View File
@@ -31,7 +31,7 @@
-- @image OPS_CSAR.jpg
---
-- Last Update Jan 2026
-- Last Update Feb 2026
-------------------------------------------------------------------------
--- **CSAR** class, extends Core.Base#BASE, Core.Fsm#FSM
@@ -136,11 +136,16 @@
-- mycsar.SRSModulation = radio.modulation.AM -- modulation
-- mycsar.SRSport = 5002 -- and SRS Server port
-- mycsar.SRSCulture = "en-GB" -- SRS voice culture
-- mycsar.SRSVoice = nil -- SRS voice for downed pilot, relevant for Google TTS
-- mycsar.SRSGPathToCredentials = nil -- Path to your Google credentials json file, set this if you want to use Google TTS
-- mycsar.SRSVoice = nil -- TTS voice for downed pilot, relevant for Google TTS
-- mycsar.SRSSpeaker = nil -- TTS sub-voice, only relevant for Piper TTS with Hound backend
-- mycsar.SRSGPathToCredentials = nil -- Path to your Google credentials json file, set this if you want to use Google TTS as provider
-- mycsar.SRSBackend = MSRS.Backend.SRSEXE -- default backend is windows
-- mycsar.SRSProvider = MSRS.Provider.WINDOWS -- default TTS provider is windows
-- mycsar.SRSSpeed = 1.0 -- default speech speed - does not work with all providers
-- mycsar.SRSVolume = 1 -- Volume, between 0 and 1
-- mycsar.SRSGender = "male" -- male or female voice
-- mycsar.CSARVoice = MSRS.Voices.Google.Standard.en_US_Standard_A -- SRS voice for CSAR Controller, relevant for Google TTS
-- mycsar.CSARVoice = MSRS.Voices.Google.Standard.en_US_Standard_A -- TTS voice for CSAR Controller, relevant for Google TTS
-- mycsar.CSARSpeaker = nil -- TTS sub-voice, only relevant for Piper TTS with Hound backend
-- mycsar.CSARVoiceMS = MSRS.Voices.Microsoft.Hedda -- SRS voice for CSAR Controller, relevant for MS Desktop TTS
-- mycsar.coordinate -- Coordinate from which CSAR TTS is sending. Defaults to a random MASH object position
-- --
@@ -231,6 +236,65 @@
-- **Caveat:**
-- Dropped troop noMessage and forcedesc parameters aren't saved.
--
-- ## 6. Message localization
--
-- Use the following option to use one of the build-in translations,"en" is the default one:
--
-- mycsar.locale = "fr" -- available are "en", "de" and "fr" (English, German, French)
--
-- To add your own text, you can do this by adding your locale and translations for these texts before calling `CSAR:New()`:
-- (NOTE - the lua placeholders like %s, %d must remain the same in type and number!)
--
-- CSAR.Messages.EN = {
-- HEARYOULONG = "%s: %s. I hear you! Finally, that is music in my ears!\nI'll pop a smoke when you are %s away.\nLand or hover by the smoke.",
-- HEARYOUSHORT = "%s: %s. I hear you! Finally, that is music in my ears!\nRequest a flare or smoke if you need.",
-- WEARECRAMMED = "%s, %s. We\'re already crammed with %d guys! Sorry!",
-- IAMINHELO = "%s: %s I\'m in! Get to the MASH ASAP! ",
-- YOUARECLOSE = "%s: %s. You\'re close now! Land or hover at the smoke.",
-- YOUARECLOSELONG = "%s: %s. You\'re close now! Land in a safe place, I will go there ",
-- WAITMORE = "Wait till %s gets in. \nETA %d more seconds.",
-- OPENTHEDOORIN = "Open the door to let me in!",
-- HOVERABOVE = "Hovering above %s. \n\nHold hover for %d seconds to winch them up. \n\nIf the countdown stops you\'re too far away!",
-- TOOHIGHWINCH = "Too high to winch %s \nReduce height and hover for 10 seconds!",
-- OPENTHEDOOROUT = "Open the door to let me out!",
-- TAKECLINIC = "%s: The %d pilot(s) have been taken to the\nmedical clinic. Good job!",
-- KILOMETERS = " kilometer",
-- NAUTMILES = " nautical miles",
-- FIRINGFLARE = "%s - Firing signal flare at your %s o\'clock. Distance %s",
-- NOPILOTSINRANGE = "No Pilots within %s",
-- IRSTROBE = "%s - IR Strobe active at your %s o\'clock. Distance %s",
-- POPPINGSMOKE = "%s - Popping smoke at your %s o\'clock. Distance %s",
-- POPPINGSMOKEMASH = "%s - Popping smoke at the closest rescue point: %s",
-- NORESCUEPOINTWITHIN = "No rescue point within %s",
-- NOPILOTSONBOARD = "No Rescued Pilots onboard",
-- MENUTOP = "CSAR",
-- MENUACTIVE = "List Active CSAR",
-- MENUCHECK = "Check Onboard",
-- MENUFLARE = "Request Signal Flare",
-- MENUSMOKE = "Request Smoke",
-- MENUSTROBE = "Request IR Strobe",
-- MENUMASH = "Smoke Closest MASH",
-- BOARDED = "Onboard - RTB to FARP/Airfield or MASH: ",
-- MAYDAY = "MAYDAY MAYDAY! %s is down. ",
-- CONTACT = "Troops In Contact. %s requests CASEVAC. ",
-- PICKUPZONE = "Pickup Zone at %s.",
-- REQUESTSAR = "%s requests SAR at %s, beacon at %.2f KHz!",
-- REQUESTSARBEACON = "%s requests SAR at %s, beacon at %.2f KHz!",
-- KHZ = "kilo hertz",
-- FILLAT = "at",
-- FILLFOR = "for",
-- },
--
-- e.g. for Spanish:
--
-- CSAR.Messages.ES = {
-- HEARYOULONG = "%s: %s. ¡Te escucho! ¡Por fin, eso es música para mis oídos!\nLanzaré una señal de humo cuando estés a %s de distancia.\nAterrice o quédese en vuelo estacionario junto al humo.",
-- HEARYOUSHORT = "%s: %s. ¡Te escucho! ¡Por fin, eso es música para mis oídos!\nSolicite una bengala o humo si lo necesita.",
-- WEARECRAMMED = "%s, %s. ¡Ya estamos abarrotados con %d personas! ¡Lo siento!",
-- IAMINHELO = "%s: %s ¡Estoy dentro! ¡Dirígete al MASH lo antes posible!",
-- ...
-- }
--
-- @field #CSAR
CSAR = {
ClassName = "CSAR",
@@ -275,6 +339,129 @@ CSAR = {
IRStrobeRuntime = 300,
FARPRescueDistance = 500,
EnableMenuSmokeMASH = true,
locale = "en",
}
---
-- @field Messages
CSAR.Messages = {
EN = {
HEARYOULONG = "%s: %s. I hear you! Finally, that is music in my ears!\nI'll pop a smoke when you are %s away.\nLand or hover by the smoke.",
HEARYOUSHORT = "%s: %s. I hear you! Finally, that is music in my ears!\nRequest a flare or smoke if you need.",
WEARECRAMMED = "%s, %s. We\'re already crammed with %d guys! Sorry!",
IAMINHELO = "%s: %s I\'m in! Get to the MASH ASAP! ",
YOUARECLOSE = "%s: %s. You\'re close now! Land or hover at the smoke.",
YOUARECLOSELONG = "%s: %s. You\'re close now! Land in a safe place, I will go there ",
WAITMORE = "Wait till %s gets in. \nETA %d more seconds.",
OPENTHEDOORIN = "Open the door to let me in!",
HOVERABOVE = "Hovering above %s. \n\nHold hover for %d seconds to winch them up. \n\nIf the countdown stops you\'re too far away!",
TOOHIGHWINCH = "Too high to winch %s \nReduce height and hover for 10 seconds!",
OPENTHEDOOROUT = "Open the door to let me out!",
TAKECLINIC = "%s: The %d pilot(s) have been taken to the\nmedical clinic. Good job!",
KILOMETERS = " kilometer",
NAUTMILES = " nautical miles",
FIRINGFLARE = "%s - Firing signal flare at your %s o\'clock. Distance %s",
NOPILOTSINRANGE = "No Pilots within %s",
IRSTROBE = "%s - IR Strobe active at your %s o\'clock. Distance %s",
POPPINGSMOKE = "%s - Popping smoke at your %s o\'clock. Distance %s",
POPPINGSMOKEMASH = "%s - Popping smoke at the closest rescue point: %s",
NORESCUEPOINTWITHIN = "No rescue point within %s",
NOPILOTSONBOARD = "No Rescued Pilots onboard",
MENUTOP = "CSAR",
MENUACTIVE = "List Active CSAR",
MENUCHECK = "Check Onboard",
MENUFLARE = "Request Signal Flare",
MENUSMOKE = "Request Smoke",
MENUSTROBE = "Request IR Strobe",
MENUMASH = "Smoke Closest MASH",
BOARDED = "Onboard - RTB to FARP/Airfield or MASH: ",
MAYDAY = "MAYDAY MAYDAY! %s is down. ",
CONTACT = "Troops In Contact. %s requests CASEVAC. ",
PICKUPZONE = "Pickup Zone at %s.",
REQUESTSAR = "%s requests SAR at %s, beacon at %.2f KHz!",
REQUESTSARBEACON = "%s requests SAR at %s, beacon at %.2f KHz!",
KHZ = "kilo hertz",
FILLAT = "at",
FILLFOR = "for",
},
DE = {
HEARYOULONG = "%s: %s. Ich höre Sie! Endlich, das ist Musik in meinen Ohren!\nIch zünde eine Rauchgranate, wenn Sie %s entfernt sind.\nLanden Sie oder hovern Sie beim Rauch.",
HEARYOUSHORT = "%s: %s. Ich höre Sie! Endlich, das ist Musik in meinen Ohren!\nFordern Sie eine Leuchtrakete oder Rauch an, falls nötig.",
IAMINHELO = "%s: %s Ich bin drin! Jetzt sofort zum Lazarett! ",
YOUARECLOSE = "%s: %s. Sie sind jetzt nah dran! Landen Sie oder hovern Sie beim Rauch.",
YOUARECLOSELONG = "%s: %s. Sie sind jetzt nah dran! Landen Sie an einem sicheren Ort, ich komme dorthin.",
WAITMORE = "Warten Sie, bis %s eingestiegen ist. \nNoch %d Sekunden.",
OPENTHEDOORIN = "Öffnen Sie die Tür, damit ich einsteigen kann!",
HOVERABOVE = "Hovere über %s. \n\nPositon für %d Sekunden halten, um zu winschen. \n\nWenn der Countdown stoppt, sind Sie zu weit entfernt!",
TOOHIGHWINCH = "Zu hoch, um %s zu winschen. \nHöhe reduzieren und %d Sekunden halten!",
OPENTHEDOOROUT = "Öffnen Sie die Tür, damit ich aussteigen kann!",
FIRINGFLARE = "%s - Feuere Signalrakete auf Ihrer %s-Uhr-Position ab. Entfernung %s",
NOPILOTSINRANGE = "Keine Piloten in %s Reichweite",
IRSTROBE = "%s - IR-Blinklicht aktiv auf Ihrer %s-Uhr-Position. Entfernung %s",
POPPINGSMOKE = "%s - Zünde Rauchgranate auf Ihrer %s-Uhr-Position. Entfernung %s",
POPPINGSMOKEMASH = "%s - Zünde Rauchgranate am nächsten Rettungspunkt: %s",
NORESCUEPOINTWITHIN = "Kein Rettungspunkt innerhalb von %s",
NOPILOTSONBOARD = "Keine geretteten Piloten an Bord",
MENUTOP = "CSAR",
MENUACTIVE = "Aktive CSAR",
MENUCHECK = "Ladung prüfen",
MENUFLARE = "Signalrakete anfordern",
MENUSMOKE = "Rauch anfordern",
MENUSTROBE = "IR-Blinklicht anfordern",
MENUMASH = "Nächstes MASH markieren",
WEARECRAMMED = "%s, %s. Wir sind bereits voll mit %d Mann! Tut mir leid!",
TAKECLINIC = "%s: Die %d Pilot(en) wurden ins\nLazarett gebracht. Gute Arbeit!",
KILOMETERS = " Kilometer",
NAUTMILES = " Meilen",
BOARDED = "An Bord - RTB zu FARP/Flugplatz oder Lazarett: ",
MAYDAY = "MAYDAY MAYDAY! %s ist abgestürzt. ",
CONTACT = "Truppen im Kontakt. %s fordern CASEVAC an. ",
PICKUPZONE = "Aufnahmezone bei %s.",
REQUESTSAR = "%s fordert SAR bei %s an, ADF %.2f KHz!",
REQUESTSARBEACON = "%s fordert SAR bei %s an, ADF %.2f KHz!",
KHZ = "Kilohertz",
FILLAT = "bei",
FILLFOR = "für",
},
FR = {
HEARYOULONG = "%s: %s. Je vous entends! Enfin, c'est de la musique dans mes oreilles!\nJe lancerai une fumée quand vous serez à %s.\nAtterrissez ou survolez la fumée.",
HEARYOUSHORT = "%s: %s. Je vous entends! Enfin, c'est de la musique dans mes oreilles!\nDemandez une fusée éclairante ou de la fumée si nécessaire.",
IAMINHELO = "%s: %s Je suis à bord! Direction le MASH immédiatement! ",
YOUARECLOSE = "%s: %s. Vous êtes proche maintenant! Atterrissez ou survolez la fumée.",
YOUARECLOSELONG = "%s: %s. Vous êtes proche maintenant! Atterrissez dans un endroit sûr, j'y vais.",
WAITMORE = "Attendez que %s monte à bord. \nEncore %d secondes.",
OPENTHEDOORIN = "Ouvrez la porte pour me laisser entrer!",
HOVERABOVE = "En vol stationnaire au-dessus de %s. \n\nMaintenir la position pendant %d secondes pour hélitreuiller. \n\nSi le compte à rebours s'arrête, vous êtes trop loin!",
TOOHIGHWINCH = "Trop haut pour hélitreuiller %s. \nRéduisez l'altitude et maintenez la position pendant %d secondes!",
OPENTHEDOOROUT = "Ouvrez la porte pour me laisser sortir!",
FIRINGFLARE = "%s - Tir d'une fusée éclairante à vos %s heures. Distance %s",
NOPILOTSINRANGE = "Aucun pilote dans un rayon de %s",
IRSTROBE = "%s - Stroboscope IR actif à vos %s heures. Distance %s",
POPPINGSMOKE = "%s - Lancement de fumigène à vos %s heures. Distance %s",
POPPINGSMOKEMASH = "%s - Lancement de fumigène au point de sauvetage le plus proche: %s",
NORESCUEPOINTWITHIN = "Aucun point de sauvetage dans un rayon de %s",
NOPILOTSONBOARD = "Aucun pilote secouru à bord",
MENUTOP = "CSAR",
MENUACTIVE = "Lister les CSAR actifs",
MENUCHECK = "Vérifier qui est à bord",
MENUFLARE = "Demander une fusée éclairante",
MENUSMOKE = "Demander un fumigène",
MENUSTROBE = "Demander un stroboscope IR",
MENUMASH = "Fumée au MASH le plus proche",
WEARECRAMMED = "%s, %s. Nous sommes déjà pleins avec %d hommes! Désolé!",
TAKECLINIC = "%s: Les %d pilote(s) ont été transportés à \n l'hôpital. Bon travail!",
KILOMETERS = " kilomètres",
NAUTMILES = " milles nautiques",
BOARDED = "À bord - RTB vers FARP/Aérodrome ou MASH: ",
MAYDAY = "MAYDAY MAYDAY ! %s est à terre. ",
CONTACT = "Troupes au contact. %s demande un CASEVAC. ",
PICKUPZONE = "Zone de ramassage à %s.",
REQUESTSAR = "%s demande un SAR à %s, balise à %.2f KHz!",
REQUESTSARBEACON = "%s demande un SAR à %s, balise à %.2f KHz!",
KHZ = "kilohertz",
FILLAT = "au",
FILLFOR = "pour",
},
}
--- Downed pilots info.
@@ -317,10 +504,13 @@ CSAR.AircraftType["OH58D"] = 2
CSAR.AircraftType["CH-47Fbl1"] = 31
CSAR.AircraftType["AH-6J"] = 2
CSAR.AircraftType["MH-6J"] = 2
CSAR.AircraftType["Ka-50_3"] = 0
CSAR.AircraftType["Ka-50"] = 0
CSAR.AircraftType["AV8BNA"] = 0
--- CSAR class version.
-- @field #string version
CSAR.version="1.0.36"
CSAR.version="1.1.39"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
@@ -329,6 +519,7 @@ CSAR.version="1.0.36"
-- DONE: SRS Integration (to be tested)
-- TODO: Maybe - add option to smoke/flare closest MASH
-- DONE: shagrat Add cargoWeight to helicopter when pilot boarded
-- DONE: Localization
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Constructor
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -499,7 +690,11 @@ function CSAR:New(Coalition, Template, Alias)
self.SRSGender = "male" -- male or female
self.CSARVoice = MSRS.Voices.Google.Standard.en_US_Standard_A
self.CSARVoiceMS = MSRS.Voices.Microsoft.Hedda
self.SRSBackend = MSRS.Backend.SRSEXE
self.SRSProvider = MSRS.Provider.WINDOWS
self.SRSSpeed = 1.0
self.coordinate = nil -- Core.Point#COORDINATE
self.locale = "en"
local AliaS = string.gsub(self.alias," ","_")
self.filename = string.format("CSAR_%s_Persist.csv",AliaS)
@@ -649,6 +844,23 @@ end
--- Helper Functions ---
------------------------
--- [Internal] Init localization
-- @param #CSAR self
-- @return #CSAR self
function CSAR:_InitLocalization()
self:T(self.lid.."_InitLocalization")
self.gettext = TEXTANDSOUND:New("CSAR","en") -- Core.TextAndSound#TEXTANDSOUND
for locale,table in pairs(self.Messages) do
local Locale = string.lower(tostring(locale))
self:T("**** Adding locale: "..Locale)
for ID,Text in pairs(table) do
self:T(string.format('Adding ID %s',tostring(ID)))
self.gettext:AddEntry(Locale,tostring(ID),Text)
end
end
return self
end
--- (Internal) Function to insert downed pilot tracker object.
-- @param #CSAR self
-- @param Wrapper.Group#GROUP Group The #GROUP object
@@ -842,9 +1054,13 @@ function CSAR:_AddCsar(_coalition , _country, _point, _typeName, _unitName, _pla
if not noMessage then
if _freq ~= 0 then --shagrat different CASEVAC msg
self:_DisplayToAllSAR("MAYDAY MAYDAY! " .. _typeName .. " is down. ", self.coalition, self.messageTime)
local text = self.gettext:GetEntry("MAYDAY",self.locale)
text = string.format(text,_typeName)
self:_DisplayToAllSAR(text, self.coalition, self.messageTime)
else
self:_DisplayToAllSAR("Troops In Contact. " .. _typeName .. " requests CASEVAC. ", self.coalition, self.messageTime)
local text = self.gettext:GetEntry("CONTACT",self.locale)
text = string.format(text,_typeName)
self:_DisplayToAllSAR(text, self.coalition, self.messageTime)
end
end
@@ -1304,23 +1520,26 @@ function CSAR:_InitSARForPilot(_downedGroup, _GroupName, _freq, _nomessage, _pla
if not _nomessage then
if _freq ~= 0 then --shagrat
local _text = string.format("%s requests SAR at %s, beacon at %.2f KHz", _groupName, _coordinatesText, _freqk)--shagrat _groupName to prevent 'f15_Pilot_Parachute'
local request = self.gettext:GetEntry("REQUESTSAR",self.locale)
local _text = string.format(request, _groupName, _coordinatesText, _freqk)--shagrat _groupName to prevent 'f15_Pilot_Parachute'
if self.coordtype ~= 2 then --not MGRS
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime)
else
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,false,true)
local coordtext = UTILS.MGRSStringToSRSFriendly(_coordinatesText,true)
local _text = string.format("%s requests SAR at %s, beacon at %.2f kilo hertz", _groupName, coordtext, _freqk)
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,true,false)
local coordtext = UTILS.MGRSStringToSRSFriendly(_coordinatesText,true,self.SRSBackend)
local request = self.gettext:GetEntry("REQUESTSARBEACON",self.locale)
local _text = string.format(request, _groupName, coordtext, _freqk)
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,true,false,self.SRSBackend)
end
else --shagrat CASEVAC msg
local _text = string.format("Pickup Zone at %s.", _coordinatesText )
local request = self.gettext:GetEntry("PICKUPZONE",self.locale)
local _text = string.format(request, _coordinatesText )
if self.coordtype ~= 2 then --not MGRS
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime)
else
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,false,true)
local coordtext = UTILS.MGRSStringToSRSFriendly(_coordinatesText,true)
local _text = string.format("Pickup Zone at %s.", coordtext )
local coordtext = UTILS.MGRSStringToSRSFriendly(_coordinatesText,true,self.SRSBackend)
local _text = string.format(request, coordtext )
self:_DisplayToAllSAR(_text,self.coalition,self.messageTime,true,false)
end
end
@@ -1459,9 +1678,11 @@ function CSAR:_CheckWoundedGroupStatus(heliname,woundedgroupname)
local dist = UTILS.MetersToNM(self.autosmokedistance)
disttext = string.format("%.0fnm",dist)
end
self:_DisplayMessageToSAR(_heliUnit, string.format("%s: %s. I hear you! Finally, that is music in my ears!\nI'll pop a smoke when you are %s away.\nLand or hover by the smoke.", self:_GetCustomCallSign(_heliName), _pilotName, disttext), self.messageTime,false,true)
local text = self.gettext:GetEntry("HEARYOULONG",self.locale)
self:_DisplayMessageToSAR(_heliUnit, string.format(text, self:_GetCustomCallSign(_heliName), _pilotName, disttext), self.messageTime,false,true)
else
self:_DisplayMessageToSAR(_heliUnit, string.format("%s: %s. I hear you! Finally, that is music in my ears!\nRequest a flare or smoke if you need.", self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,false,true)
local text = self.gettext:GetEntry("HEARYOUSHORT",self.locale)
self:_DisplayMessageToSAR(_heliUnit, string.format(text, self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,false,true)
end
--mark as shown for THIS heli and THIS group
self.heliVisibleMessage[_lookupKeyHeli] = true
@@ -1525,7 +1746,8 @@ function CSAR:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupNam
_maxUnits = self.max_units
end
if _unitsInHelicopter + 1 > _maxUnits then
self:_DisplayMessageToSAR(_heliUnit, string.format("%s, %s. We\'re already crammed with %d guys! Sorry!", _pilotName, self:_GetCustomCallSign(_heliName), _unitsInHelicopter, _unitsInHelicopter), self.messageTime,false,false,true)
local text = self.gettext:GetEntry("WEARECRAMMED",self.locale)
self:_DisplayMessageToSAR(_heliUnit, string.format(text, _pilotName, self:_GetCustomCallSign(_heliName), _unitsInHelicopter, _unitsInHelicopter), self.messageTime,false,false,true)
return self
end
@@ -1542,8 +1764,9 @@ function CSAR:_PickupUnit(_heliUnit, _pilotName, _woundedGroup, _woundedGroupNam
_woundedGroup:Destroy(false)
self:_RemoveNameFromDownedPilots(_woundedGroupName,true)
self:_DisplayMessageToSAR(_heliUnit, string.format("%s: %s I\'m in! Get to the MASH ASAP! ", self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,true,true)
local text = self.gettext:GetEntry("IAMINHELO",self.locale)
self:_DisplayMessageToSAR(_heliUnit, string.format(text, self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,true,true)
self:_UpdateUnitCargoMass(_heliName)
@@ -1613,9 +1836,11 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
self:T(self.lid .. "[Pickup Debug] Helo closer than 500m: ".._lookupKeyHeli)
if self.heliCloseMessage[_lookupKeyHeli] == nil then
if self.autosmoke == true then
self:_DisplayMessageToSAR(_heliUnit, string.format("%s: %s. You\'re close now! Land or hover at the smoke.", self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,false,true)
local text = self.gettext:GetEntry("YOUARECLOSE",self.locale)
self:_DisplayMessageToSAR(_heliUnit, string.format(text, self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,false,true)
else
self:_DisplayMessageToSAR(_heliUnit, string.format("%s: %s. You\'re close now! Land in a safe place, I will go there ", self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,false,true)
local text = self.gettext:GetEntry("YOUARECLOSELONG",self.locale)
self:_DisplayMessageToSAR(_heliUnit, string.format(text, self:_GetCustomCallSign(_heliName), _pilotName), self.messageTime,false,true)
end
self.heliCloseMessage[_lookupKeyHeli] = true
end
@@ -1633,7 +1858,9 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
_time = self.landedStatus[_lookupKeyHeli]
_woundedGroup:OptionAlarmStateGreen()
self:_OrderGroupToMoveToPoint(_woundedGroup, _heliUnit:GetCoordinate())
self:_DisplayMessageToSAR(_heliUnit, "Wait till " .. _pilotName .. " gets in. \nETA " .. _time .. " more seconds.", self.messageTime, false)
local text = self.gettext:GetEntry("WAITMORE",self.locale)
text = string.format(text,_pilotName, _time)
self:_DisplayMessageToSAR(_heliUnit, text, self.messageTime, false)
else
_time = self.landedStatus[_lookupKeyHeli] - 10
self.landedStatus[_lookupKeyHeli] = _time
@@ -1643,7 +1870,8 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
if _distance < self.loadDistance + 5 or _distance <= 13 then
self:T(self.lid .. "[Pickup Debug] Pilot close enough - YES ".._lookupKeyHeli)
if self.pilotmustopendoors and (self:_IsLoadingDoorOpen(_heliName) == false) then
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me in!", self.messageTime, true, true)
local text = self.gettext:GetEntry("OPENTHEDOORIN",self.locale)
self:_DisplayMessageToSAR(_heliUnit, text, self.messageTime, true, true)
self:T(self.lid .. "[Pickup Debug] Door closed, try again next loop ".._lookupKeyHeli)
return false
else
@@ -1660,7 +1888,8 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
self:T(self.lid .. "[Pickup Debug] Helo close enough, door check ".._lookupKeyHeli)
if self.pilotmustopendoors and (self:_IsLoadingDoorOpen(_heliName) == false) then
self:T(self.lid .. "[Pickup Debug] Door closed, try again next loop ".._lookupKeyHeli)
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me in!", self.messageTime, true, true)
local text = self.gettext:GetEntry("OPENTHEDOORIN",self.locale)
self:_DisplayMessageToSAR(_heliUnit, text, self.messageTime, true, true)
return false
else
self:T(self.lid .. "[Pickup Debug] Pick up Pilot ".._lookupKeyHeli)
@@ -1701,11 +1930,14 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
self:T(self.lid .. "[Pickup Debug] Check hover timer ".._lookupKeyHeli)
if _time > 0 then
self:T(self.lid .. "[Pickup Debug] Helo hovering not long enough ".._lookupKeyHeli)
self:_DisplayMessageToSAR(_heliUnit, "Hovering above " .. _pilotName .. ". \n\nHold hover for " .. _time .. " seconds to winch them up. \n\nIf the countdown stops you\'re too far away!", self.messageTime, true)
local text = self.gettext:GetEntry("HOVERABOVE",self.locale)
text = string.format(text,_pilotName,_time)
self:_DisplayMessageToSAR(_heliUnit, text, self.messageTime, true)
else
self:T(self.lid .. "[Pickup Debug] Helo hovering long enough - door check ".._lookupKeyHeli)
if self.pilotmustopendoors and (self:_IsLoadingDoorOpen(_heliName) == false) then
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me in!", self.messageTime, true, true)
local text = self.gettext:GetEntry("OPENTHEDOORIN",self.locale)
self:_DisplayMessageToSAR(_heliUnit, text, self.messageTime, true, true)
self:T(self.lid .. "[Pickup Debug] Door closed, try again next loop ".._lookupKeyHeli)
return false
else
@@ -1718,7 +1950,8 @@ function CSAR:_CheckCloseWoundedGroup(_distance, _heliUnit, _heliName, _woundedG
_reset = false
else
self:T(self.lid .. "[Pickup Debug] Helo hovering too high ".._lookupKeyHeli)
self:_DisplayMessageToSAR(_heliUnit, "Too high to winch " .. _pilotName .. " \nReduce height and hover for 10 seconds!", self.messageTime, true,true)
local text = self.gettext:GetEntry("TOOHIGHWINCH",self.locale)
self:_DisplayMessageToSAR(_heliUnit,string.format(text,_pilotName), self.messageTime, true,true)
self:T(self.lid .. "[Pickup Debug] Hovering too high, try again next loop ".._lookupKeyHeli)
return false
end
@@ -1782,7 +2015,8 @@ function CSAR:_ScheduledSARFlight(heliname,groupname, isairport, noreschedule, I
if ( _dist < self.FARPRescueDistance or isairport ) and ((_heliUnit:InAir() == false) or (IsHeloBase == true)) then
self:T(self.lid.."[Drop off debug] Distance ok, door check")
if self.pilotmustopendoors and self:_IsLoadingDoorOpen(heliname) == false then
self:_DisplayMessageToSAR(_heliUnit, "Open the door to let me out!", self.messageTime, true, true)
local text = self.gettext:GetEntry("OPENTHEDOOROUT",self.locale)
self:_DisplayMessageToSAR(_heliUnit, text, self.messageTime, true, true)
self:T(self.lid.."[Drop off debug] Door closed, try again next loop")
else
self:T(self.lid.."[Drop off debug] Rescued!")
@@ -1815,8 +2049,9 @@ function CSAR:_RescuePilots(_heliUnit)
local PilotsSaved = self:_PilotsOnboard(_heliName)
self.inTransitGroups[_heliName] = nil
local _txt = string.format("%s: The %d pilot(s) have been taken to the\nmedical clinic. Good job!", self:_GetCustomCallSign(_heliName), PilotsSaved)
local text = self.gettext:GetEntry("OPENTHEDOOROUT",self.locale)
local _txt = string.format(text, self:_GetCustomCallSign(_heliName), PilotsSaved)
self:_DisplayMessageToSAR(_heliUnit, _txt, self.messageTime)
@@ -1863,9 +2098,11 @@ function CSAR:_DisplayMessageToSAR(_unit, _text, _time, _clear, _speak, _overrid
if coord then
self.msrs:SetCoordinate(coord)
end
_text = string.gsub(_text,"km"," kilometer")
_text = string.gsub(_text,"nm"," nautical miles")
self.SRSQueue:NewTransmission(_text,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,self.SRSVoice,volume,label,coord)
local km = self.gettext:GetEntry("KILOMETERS",self.locale)
local nm = self.gettext:GetEntry("NAUTMILES",self.locale)
_text = string.gsub(_text,"km",km)
_text = string.gsub(_text,"nm",nm)
self.SRSQueue:NewTransmission(_text,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,self.SRSVoice,volume,label,coord,nil,self.SRSSpeaker)
end
return self
end
@@ -1906,6 +2143,8 @@ function CSAR:_GetPositionOfWounded(_woundedGroup,_Unit)
-- attention this is the distance from the ASKING unit to target, not from RECCE to target!
local startcoordinate = _Unit:GetCoordinate()
_coordinatesText = _coordinate:ToStringBR(startcoordinate,settings)
local fillfor = self.gettext:GetEntry("FILLFOR",self.locale)
_coordinatesText = string.gsub(_coordinatesText,"for","")
end
end
end
@@ -1950,10 +2189,11 @@ function CSAR:_DisplayActiveSAR(_unitName)
else
distancetext = string.format("%.1fkm", _distance/1000.0)
end
local fillat = self.gettext:GetEntry("FILLAT",self.locale)
if _value.frequency == 0 or self.CreateRadioBeacons == false then--shagrat insert CASEVAC without Frequency
table.insert(_csarList, { dist = _distance, msg = string.format("%s at %s - %s ", _value.desc, _coordinatesText, distancetext) })
table.insert(_csarList, { dist = _distance, msg = string.format("%s %s %s - %s ", _value.desc, fillat, _coordinatesText, distancetext) })
else
table.insert(_csarList, { dist = _distance, msg = string.format("%s at %s - %.2f KHz ADF - %s ", _value.desc, _coordinatesText, _value.frequency / 1000, distancetext) })
table.insert(_csarList, { dist = _distance, msg = string.format("%s %s %s - %.2f KHz ADF - %s ", _value.desc, fillat, _coordinatesText, _value.frequency / 1000, distancetext) })
end
end
end
@@ -2035,7 +2275,8 @@ function CSAR:_SignalFlare(_unitName)
else
_distance = string.format("%.1fkm",_closest.distance/1000)
end
local _msg = string.format("%s - Firing signal flare at your %s o\'clock. Distance %s", self:_GetCustomCallSign(_unitName), _clockDir, _distance)
local text = self.gettext:GetEntry("FIRINGFLARE",self.locale)
local _msg = string.format(text, self:_GetCustomCallSign(_unitName), _clockDir, _distance)
self:_DisplayMessageToSAR(_heli, _msg, self.messageTime, false, true, true)
local _coord = _closest.pilot:GetCoordinate()
@@ -2048,7 +2289,8 @@ function CSAR:_SignalFlare(_unitName)
else
dtext = string.format("%.1fkm",smokedist/1000)
end
self:_DisplayMessageToSAR(_heli, string.format("No Pilots within %s",dtext), self.messageTime, false, false, true)
local text = self.gettext:GetEntry("NOPILOTSINRANGE",self.locale)
self:_DisplayMessageToSAR(_heli, string.format(text,dtext), self.messageTime, false, false, true)
end
return self
end
@@ -2066,11 +2308,14 @@ function CSAR:_DisplayToAllSAR(_message, _side, _messagetime,ToSRS,ToScreen)
self:T({_message,ToSRS=ToSRS,ToScreen=ToScreen})
if self.msrs and (ToSRS == true or ToSRS == nil) then
local voice = self.CSARVoice or MSRS.Voices.Google.Standard.en_GB_Standard_F
local speaker = self.CSARSpeaker
if self.msrs:GetProvider() == MSRS.Provider.WINDOWS then
voice = self.CSARVoiceMS or MSRS.Voices.Microsoft.Hedda
end
local kilohertz = self.gettext:GetEntry("KHZ",self.locale)
_message = string.gsub(_message,"KHz",kilohertz)
--self:F("Voice = "..voice)
self.SRSQueue:NewTransmission(_message,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,voice,volume,label,self.coordinate)
self.SRSQueue:NewTransmission(_message,duration,self.msrs,tstart,2,subgroups,subtitle,subduration,self.SRSchannel,self.SRSModulation,gender,culture,voice,volume,label,self.coordinate,nil,speaker)
end
if ToScreen == true or ToScreen == nil then
for _, _unitName in pairs(self.csarUnits) do
@@ -2103,7 +2348,8 @@ function CSAR:_ReqIRStrobe( _unitName )
else
_distance = string.format("%.1fkm",_closest.distance/1000)
end
local _msg = string.format("%s - IR Strobe active at your %s o\'clock. Distance %s", self:_GetCustomCallSign(_unitName), _clockDir, _distance)
local text = self.gettext:GetEntry("IRSTROBE",self.locale)
local _msg = string.format(text, self:_GetCustomCallSign(_unitName), _clockDir, _distance)
self:_DisplayMessageToSAR(_heli, _msg, self.messageTime, false, true, true)
_closest.pilot:NewIRMarker(true,self.IRStrobeRuntime or 300)
else
@@ -2113,7 +2359,8 @@ function CSAR:_ReqIRStrobe( _unitName )
else
_distance = string.format("%.1fkm",smokedist/1000)
end
self:_DisplayMessageToSAR(_heli, string.format("No Pilots within %s",_distance), self.messageTime, false, false, true)
local text = self.gettext:GetEntry("NOPILOTSINRANGE",self.locale)
self:_DisplayMessageToSAR(_heli, string.format(text,_distance), self.messageTime, false, false, true)
end
return self
end
@@ -2138,7 +2385,8 @@ function CSAR:_Reqsmoke( _unitName )
else
_distance = string.format("%.1fkm",_closest.distance/1000)
end
local _msg = string.format("%s - Popping smoke at your %s o\'clock. Distance %s", self:_GetCustomCallSign(_unitName), _clockDir, _distance)
local text = self.gettext:GetEntry("POPPINGSMOKE",self.locale)
local _msg = string.format(text, self:_GetCustomCallSign(_unitName), _clockDir, _distance)
self:_DisplayMessageToSAR(_heli, _msg, self.messageTime, false, true, true)
local _coord = _closest.pilot:GetCoordinate()
local color = self.smokecolor
@@ -2150,7 +2398,8 @@ function CSAR:_Reqsmoke( _unitName )
else
_distance = string.format("%.1fkm",smokedist/1000)
end
self:_DisplayMessageToSAR(_heli, string.format("No Pilots within %s",_distance), self.messageTime, false, false, true)
local text = self.gettext:GetEntry("NOPILOTSINRANGE",self.locale)
self:_DisplayMessageToSAR(_heli, string.format(text,_distance), self.messageTime, false, false, true)
end
return self
end
@@ -2174,7 +2423,8 @@ function CSAR:_ReqsmokeMash( _unitName )
else
disttext = string.format("%.1fkm",distance/1000)
end
local _msg = string.format("%s - Popping smoke at the closest rescue point: %s", self:_GetCustomCallSign(_unitName), disttext)
local text = self.gettext:GetEntry("POPPINGSMOKEMASH",self.locale)
local _msg = string.format(text, self:_GetCustomCallSign(_unitName), disttext)
self:_DisplayMessageToSAR(_heli, _msg, self.messageTime, false, true, true)
local color = self.smokecolor
coordinate:Smoke(color)
@@ -2185,7 +2435,8 @@ function CSAR:_ReqsmokeMash( _unitName )
else
_distance = string.format("%.1fkm",smokedist/1000)
end
self:_DisplayMessageToSAR(_heli, string.format("No rescue point within %s",_distance), self.messageTime, false, false, true)
local text = self.gettext:GetEntry("NORESCUEPOINTWITHIN",self.locale)
self:_DisplayMessageToSAR(_heli, string.format(text,_distance), self.messageTime, false, false, true)
end
return self
end
@@ -2263,9 +2514,10 @@ function CSAR:_CheckOnboard(_unitName)
--list onboard pilots
local _inTransit = self.inTransitGroups[_unitName]
if _inTransit == nil then
self:_DisplayMessageToSAR(_unit, "No Rescued Pilots onboard", self.messageTime, false, false, true)
local text = self.gettext:GetEntry("NOPILOTSONBOARD",self.locale)
self:_DisplayMessageToSAR(_unit, text, self.messageTime, false, false, true)
else
local _text = "Onboard - RTB to FARP/Airfield or MASH: "
local _text = self.gettext:GetEntry("BOARDED",self.locale)
for _, _onboard in pairs(self.inTransitGroups[_unitName]) do
_text = _text .. "\n" .. _onboard.desc
end
@@ -2289,8 +2541,11 @@ function CSAR:_AddMedevacMenuItem()
if _unit then
--self:T("Unitname ".._unit:GetName().." IsAlive "..tostring(_unit:IsAlive()).." IsPlayer "..tostring(_unit:IsPlayer()))
if _unit:IsAlive() and _unit:IsPlayer() then
local unitName = _unit:GetName()
_UnitList[unitName] = unitName
local _maxUnits = self.AircraftType[_unit:GetTypeName()]
if _maxUnits == nil or _maxUnits > 0 then
local unitName = _unit:GetName()
_UnitList[unitName] = unitName
end
end -- end isAlive
end -- end if _unit
end -- end for
@@ -2305,17 +2560,24 @@ function CSAR:_AddMedevacMenuItem()
local groupname = _group:GetName()
if self.addedTo[groupname] == nil then
self.addedTo[groupname] = true
local menuname = self.topmenuname or "CSAR"
local menuname = self.gettext:GetEntry("MENUTOP",self.locale)
menuname = self.topmenuname or menuname
local Menu1T = self.gettext:GetEntry("MENUACTIVE",self.locale)
local Menu2T = self.gettext:GetEntry("MENUCHECK",self.locale)
local Menu3T = self.gettext:GetEntry("MENUFLARE",self.locale)
local Menu4T = self.gettext:GetEntry("MENUSMOKE",self.locale)
local Menu5T = self.gettext:GetEntry("MENUSTROBE",self.locale)
local Menu6T = self.gettext:GetEntry("MENUMASH",self.locale)
local _rootPath = MENU_GROUP:New(_group,menuname)
local _rootMenu1 = MENU_GROUP_COMMAND:New(_group,"List Active CSAR",_rootPath, self._DisplayActiveSAR,self,_unitName)
local _rootMenu2 = MENU_GROUP_COMMAND:New(_group,"Check Onboard",_rootPath, self._CheckOnboard,self,_unitName)
local _rootMenu3 = MENU_GROUP_COMMAND:New(_group,"Request Signal Flare",_rootPath, self._SignalFlare,self,_unitName)
local _rootMenu4 = MENU_GROUP_COMMAND:New(_group,"Request Smoke",_rootPath, self._Reqsmoke,self,_unitName)
local _rootMenu1 = MENU_GROUP_COMMAND:New(_group,Menu1T,_rootPath, self._DisplayActiveSAR,self,_unitName)
local _rootMenu2 = MENU_GROUP_COMMAND:New(_group,Menu2T,_rootPath, self._CheckOnboard,self,_unitName)
local _rootMenu3 = MENU_GROUP_COMMAND:New(_group,Menu3T,_rootPath, self._SignalFlare,self,_unitName)
local _rootMenu4 = MENU_GROUP_COMMAND:New(_group,Menu4T,_rootPath, self._Reqsmoke,self,_unitName)
if self.AllowIRStrobe then
local _rootMenu5 = MENU_GROUP_COMMAND:New(_group,"Request IR Strobe",_rootPath, self._ReqIRStrobe,self,_unitName):Refresh()
local _rootMenu5 = MENU_GROUP_COMMAND:New(_group,Menu5T,_rootPath, self._ReqIRStrobe,self,_unitName):Refresh()
end
if self.EnableMenuSmokeMASH then
local _rootMenu6 = MENU_GROUP_COMMAND:New(_group,"Smoke Closest MASH",_rootPath, self._ReqsmokeMash,self,_unitName)
local _rootMenu6 = MENU_GROUP_COMMAND:New(_group,Menu6T,_rootPath, self._ReqsmokeMash,self,_unitName)
else
_rootMenu4:Refresh()
end
@@ -2580,14 +2842,22 @@ function CSAR:onafterStart(From, Event, To)
self.msrs = MSRS:New(path,channel,modulation) -- Sound.SRS#MSRS
self.msrs:SetPort(self.SRSport)
self.msrs:SetLabel("CSAR")
self.msrs:SetBackend(self.SRSBackend)
self.msrs.speed = self.SRSSpeed
self.msrs:SetCulture(self.SRSCulture)
self.msrs:SetCoalition(self.coalition)
self.msrs:SetVoice(self.SRSVoice)
self.msrs:SetGender(self.SRSGender)
if self.SRSGPathToCredentials then
if self.SRSGPathToCredentials and (not self.SRSProvider) then
self.msrs:SetProviderOptionsGoogle(self.SRSGPathToCredentials,self.SRSGPathToCredentials)
self.msrs:SetProvider(MSRS.Provider.GOOGLE)
end
if self.SRSProvider then
self.msrs:SetProvider(self.SRSProvider)
end
if self.SRSSpeaker then
self.msrs:SetSpeakerPiper(self.SRSSpeaker)
end
self.msrs:SetVolume(self.SRSVolume)
self.msrs:SetLabel("CSAR")
self.SRSQueue = MSRSQUEUE:New("CSAR") -- Sound.SRS#MSRSQUEUE
@@ -2601,7 +2871,9 @@ function CSAR:onafterStart(From, Event, To)
local filepath = self.filepath
self:__Save(interval,filepath,filename)
end
self:_InitLocalization(self.locale)
return self
end
File diff suppressed because it is too large Load Diff
+720
View File
@@ -0,0 +1,720 @@
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO CTLD_CARGO
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
do
------------------------------------------------------
--- **CTLD_CARGO** class, extends Core.Base#BASE
-- @type CTLD_CARGO
-- @field #string ClassName Class name.
-- @field #number ID ID of this cargo.
-- @field #string Name Name for menu.
-- @field #string DisplayName Display name for menu/messages.
-- @field #table Templates Table of #POSITIONABLE objects.
-- @field #string CargoType Enumerator of Type.
-- @field #boolean HasBeenMoved Flag for moving.
-- @field #boolean LoadDirectly Flag for direct loading.
-- @field #number CratesNeeded Crates needed to build.
-- @field Wrapper.Positionable#POSITIONABLE Positionable Representation of cargo in the mission.
-- @field #boolean HasBeenDropped True if dropped from heli.
-- @field #number PerCrateMass Mass in kg.
-- @field #number Stock Number of builds available, -1 for unlimited.
-- @field #string Subcategory Sub-category name.
-- @field #boolean DontShowInMenu Show this item in menu or not.
-- @field Core.Zone#ZONE Location Location (if set) where to get this cargo item.
-- @field #table ResourceMap Resource Map information table if it has been set for static cargo items.
-- @field #string StaticShape Individual shape if set.
-- @field #string StaticType Individual type if set.
-- @field #string StaticCategory Individual static category if set.
-- @field #list<#string> TypeNames Table of unit types able to pick this cargo up.
-- @field #number Stock0 Initial stock, if any given.
-- @extends Core.Base#BASE
---
-- @field #CTLD_CARGO CTLD_CARGO
CTLD_CARGO = {
ClassName = "CTLD_CARGO",
ID = 0,
Name = "none",
DisplayName = "none",
Templates = {},
CargoType = "none",
HasBeenMoved = false,
LoadDirectly = false,
CratesNeeded = 0,
Positionable = nil,
HasBeenDropped = false,
PerCrateMass = 0,
Stock = nil,
Stock0 = nil,
Mark = nil,
DontShowInMenu = false,
Location = nil,
}
--- Define cargo types.
-- @type CTLD_CARGO.Enum
-- @field #string VEHICLE
-- @field #string TROOPS
-- @field #string FOB
-- @field #string CRATE
-- @field #string REPAIR
-- @field #string ENGINEERS
-- @field #string STATIC
-- @field #string GCLOADABLE
CTLD_CARGO.Enum = {
VEHICLE = "Vehicle", -- #string vehicles
TROOPS = "Troops", -- #string troops
FOB = "FOB", -- #string FOB
CRATE = "Crate", -- #string crate
REPAIR = "Repair", -- #string repair
ENGINEERS = "Engineers", -- #string engineers
STATIC = "Static", -- #string statics
GCLOADABLE = "GC_Loadable", -- #string dynamiccargo
}
--- Function to create new CTLD_CARGO object.
-- @param #CTLD_CARGO self
-- @param #number ID ID of this #CTLD_CARGO
-- @param #string Name Name for menu.
-- @param #table Templates Table of #POSITIONABLE objects.
-- @param #CTLD_CARGO.Enum Sorte Enumerator of Type.
-- @param #boolean HasBeenMoved Flag for moving.
-- @param #boolean LoadDirectly Flag for direct loading.
-- @param #number CratesNeeded Crates needed to build.
-- @param Wrapper.Positionable#POSITIONABLE Positionable Representation of cargo in the mission.
-- @param #boolean Dropped Cargo/Troops have been unloaded from a chopper.
-- @param #number PerCrateMass Mass in kg
-- @param #number Stock Number of builds available, nil for unlimited
-- @param #string Subcategory Name of subcategory, handy if using > 10 types to load.
-- @param #boolean DontShowInMenu (Optional) Show this item in menu or not (default: false == show it).
-- @param Core.Zone#ZONE Location (Optional) Where the cargo is available (one location only).
-- @return #CTLD_CARGO self
function CTLD_CARGO:New(ID, Name, Templates, Sorte, HasBeenMoved, LoadDirectly, CratesNeeded, Positionable, Dropped, PerCrateMass, Stock, Subcategory, DontShowInMenu, Location)
-- Inherit everything from BASE class.
local self=BASE:Inherit(self, BASE:New()) -- #CTLD_CARGO
self:T({ID, Name, Templates, Sorte, HasBeenMoved, LoadDirectly, CratesNeeded, Positionable, Dropped})
self.ID = ID or math.random(100000,1000000)
self.Name = Name or "none" -- #string
self.DisplayName = Name or "none" -- #string
self.Templates = Templates or {} -- #table
self.CargoType = Sorte or "type" -- #CTLD_CARGO.Enum
self.HasBeenMoved = HasBeenMoved or false -- #boolean
self.LoadDirectly = LoadDirectly or false -- #boolean
self.CratesNeeded = CratesNeeded or 0 -- #number
self.Positionable = Positionable or nil -- Wrapper.Positionable#POSITIONABLE
self.HasBeenDropped = Dropped or false --#boolean
self.PerCrateMass = PerCrateMass or 0 -- #number
self.Stock = Stock or nil --#number
self.Stock0 = Stock or nil --#number
self.Mark = nil
self.Subcategory = Subcategory or "Other"
self.DontShowInMenu = DontShowInMenu or false
self.ResourceMap = nil
self.StaticType = "container_cargo" -- "container_cargo"
if self:IsStatic() then
self.StaticType = self.Templates
end
self.StaticShape = nil
self.TypeNames = nil
self.StaticCategory = "Cargos"
if type(Location) == "string" then
Location = ZONE:New(Location)
end
self.Location = Location
self.NoMoveToZone = false
return self
end
--- Add specific static type and shape to this CARGO.
-- @param #CTLD_CARGO self
-- @param #string TypeName
-- @param #string ShapeName
-- @return #CTLD_CARGO self
function CTLD_CARGO:SetStaticTypeAndShape(Category,TypeName,ShapeName)
self.StaticCategory = Category or "Cargos"
self.StaticType = TypeName or "container_cargo"
self.StaticShape = ShapeName
return self
end
--- Get the specific static type and shape from this CARGO if set.
-- @param #CTLD_CARGO self
-- @return #string Category
-- @return #string TypeName
-- @return #string ShapeName
function CTLD_CARGO:GetStaticTypeAndShape()
return self.StaticCategory, self.StaticType, self.StaticShape
end
--- Add specific unit types to this CARGO (restrict what types can pick this up).
-- @param #CTLD_CARGO self
-- @param #string UnitTypes Unit type name, can also be a #list<#string> table of unit type names.
-- @return #CTLD_CARGO self
function CTLD_CARGO:AddUnitTypeName(UnitTypes)
if not self.TypeNames then self.TypeNames = {} end
if type(UnitTypes) ~= "table" then UnitTypes = {UnitTypes} end
for _,_singletype in pairs(UnitTypes or {}) do
self.TypeNames[_singletype]=_singletype
end
return self
end
--- Check if a specific unit can carry this CARGO (restrict what types can pick this up).
-- @param #CTLD_CARGO self
-- @param Wrapper.Unit#UNIT Unit
-- @return #boolean Outcome
function CTLD_CARGO:UnitCanCarry(Unit)
if not Unit then return false end
if self.TypeNames == nil then return true end
local typename = Unit:GetTypeName() or "none"
if self.TypeNames[typename] then
return true
else
return false
end
end
--- Add Resource Map information table
-- @param #CTLD_CARGO self
-- @param #table ResourceMap
-- @return #CTLD_CARGO self
function CTLD_CARGO:SetStaticResourceMap(ResourceMap)
self.ResourceMap = ResourceMap
return self
end
--- Get Resource Map information table
-- @param #CTLD_CARGO self
-- @return #table ResourceMap
function CTLD_CARGO:GetStaticResourceMap()
return self.ResourceMap
end
--- Query Location.
-- @param #CTLD_CARGO self
-- @return Core.Zone#ZONE location or `nil` if not set
function CTLD_CARGO:GetLocation()
return self.Location
end
--- Query ID.
-- @param #CTLD_CARGO self
-- @return #number ID
function CTLD_CARGO:GetID()
return self.ID
end
--- Query Subcategory
-- @param #CTLD_CARGO self
-- @return #string SubCategory
function CTLD_CARGO:GetSubCat()
return self.Subcategory
end
--- Query Mass.
-- @param #CTLD_CARGO self
-- @return #number Mass in kg
function CTLD_CARGO:GetMass()
return self.PerCrateMass
end
--- Query Name.
-- @param #CTLD_CARGO self
-- @return #string Name
function CTLD_CARGO:GetName()
return self.Name
end
--- Set display name.
-- @param #CTLD_CARGO self
-- @param #string DisplayName Display label used in menus/messages (optional).
-- @return #CTLD_CARGO self
function CTLD_CARGO:SetDisplayName(DisplayName)
if type(DisplayName) == "string" and DisplayName ~= "" then
self.DisplayName = DisplayName
else
self.DisplayName = self.Name
end
return self
end
--- Query display name.
-- @param #CTLD_CARGO self
-- @return #string Display name, or Name if not set
function CTLD_CARGO:GetDisplayName()
return self.DisplayName or self.Name
end
--- Query Templates.
-- @param #CTLD_CARGO self
-- @return #table Templates
function CTLD_CARGO:GetTemplates()
return self.Templates
end
--- Query has moved.
-- @param #CTLD_CARGO self
-- @return #boolean Has moved
function CTLD_CARGO:HasMoved()
return self.HasBeenMoved
end
--- Query was dropped.
-- @param #CTLD_CARGO self
-- @param #boolean hercOnly If true, only treat Herc drops as 'dropped'.
-- @return #boolean Has been dropped.
function CTLD_CARGO:WasDropped(hercOnly)
if hercOnly then
return self.HasBeenDropped and self.IsHercDrop==true
end
return self.HasBeenDropped
end
--- Query directly loadable.
-- @param #CTLD_CARGO self
-- @return #boolean loadable
function CTLD_CARGO:CanLoadDirectly()
return self.LoadDirectly
end
--- Query number of crates or troopsize.
-- @param #CTLD_CARGO self
-- @return #number Crates or size of troops.
function CTLD_CARGO:GetCratesNeeded()
return self.CratesNeeded
end
--- Query type.
-- @param #CTLD_CARGO self
-- @return #CTLD_CARGO.Enum Type
function CTLD_CARGO:GetType()
return self.CargoType
end
--- Query type.
-- @param #CTLD_CARGO self
-- @return Wrapper.Positionable#POSITIONABLE Positionable
function CTLD_CARGO:GetPositionable()
return self.Positionable
end
--- Set HasMoved.
-- @param #CTLD_CARGO self
-- @param #boolean moved
function CTLD_CARGO:SetHasMoved(moved)
self.HasBeenMoved = moved or false
end
--- Query if cargo has been loaded.
-- @param #CTLD_CARGO self
-- @param #boolean loaded
function CTLD_CARGO:Isloaded()
if self.HasBeenMoved and not self:WasDropped() then
return true
else
return false
end
end
--- Set WasDropped.
-- @param #CTLD_CARGO self
-- @param #boolean dropped
-- @param #boolean isHercDrop set when _GetCrates is used by the herc
function CTLD_CARGO:SetWasDropped(dropped, isHercDrop)
self.HasBeenDropped = dropped or false
self.IsHercDrop = isHercDrop or false
end
--- Get Stock.
-- @param #CTLD_CARGO self
-- @return #number Stock or -1 if unlimited.
function CTLD_CARGO:GetStock()
if self.Stock then
return self.Stock
else
return -1
end
end
--- Get Stock0.
-- @param #CTLD_CARGO self
-- @return #number Stock0 or -1 if unlimited.
function CTLD_CARGO:GetStock0()
if self.Stock0 then
return self.Stock0
else
return -1
end
end
--- Get relative Stock.
-- @param #CTLD_CARGO self
-- @return #number Stock Percentage like 75, or -1 if unlimited.
function CTLD_CARGO:GetRelativeStock()
if self.Stock and self.Stock0 then
return math.floor((self.Stock/self.Stock0)*100)
else
return -1
end
end
--- Add Stock.
-- @param #CTLD_CARGO self
-- @param #number Number to add, none if nil.
-- @return #CTLD_CARGO self
function CTLD_CARGO:AddStock(Number)
if self.Stock then -- Stock nil?
local number = Number or 1
self.Stock = self.Stock + number
end
return self
end
--- Remove Stock.
-- @param #CTLD_CARGO self
-- @param #number Number to reduce, none if nil.
-- @return #CTLD_CARGO self
function CTLD_CARGO:RemoveStock(Number)
if self.Stock then -- Stock nil?
local number = Number or 1
self.Stock = self.Stock - number
if self.Stock < 0 then self.Stock = 0 end
end
return self
end
--- Set Stock.
-- @param #CTLD_CARGO self
-- @param #number Number to set, nil means unlimited.
-- @return #CTLD_CARGO self
function CTLD_CARGO:SetStock(Number)
self.Stock = Number
return self
end
--- Query crate type for REPAIR
-- @param #CTLD_CARGO self
-- @param #boolean
function CTLD_CARGO:IsRepair()
if self.CargoType == "Repair" then
return true
else
return false
end
end
--- Query crate type for STATIC
-- @param #CTLD_CARGO self
-- @return #boolean
function CTLD_CARGO:IsStatic()
if self.CargoType == "Static" then
return true
else
return false
end
end
--- Add mark
-- @param #CTLD_CARGO self
-- @return #CTLD_CARGO self
function CTLD_CARGO:AddMark(Mark)
self.Mark = Mark
return self
end
--- Get mark
-- @param #CTLD_CARGO self
-- @return #string Mark
function CTLD_CARGO:GetMark(Mark)
return self.Mark
end
--- Wipe mark
-- @param #CTLD_CARGO self
-- @return #CTLD_CARGO self
function CTLD_CARGO:WipeMark()
self.Mark = nil
return self
end
--- Get overall mass of a cargo object, i.e. crates needed x mass per crate
-- @param #CTLD_CARGO self
-- @return #number mass
function CTLD_CARGO:GetNetMass()
return self.CratesNeeded * self.PerCrateMass
end
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- END CTLD_CARGO
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
do
------------------------------------------------------
--- **CTLD_ENGINEERING** class, extends Core.Base#BASE
-- @type CTLD_ENGINEERING
-- @field #string ClassName
-- @field #string lid
-- @field #string Name
-- @field Wrapper.Group#GROUP Group
-- @field Wrapper.Unit#UNIT Unit
-- @field Wrapper.Group#GROUP HeliGroup
-- @field Wrapper.Unit#UNIT HeliUnit
-- @field #string State
-- @extends Core.Base#BASE
---
-- @field #CTLD_ENGINEERING CTLD_ENGINEERING
CTLD_ENGINEERING = {
ClassName = "CTLD_ENGINEERING",
lid = "",
Name = "none",
Group = nil,
Unit = nil,
--C_Ops = nil,
HeliGroup = nil,
HeliUnit = nil,
State = "",
}
--- CTLD_ENGINEERING class version.
-- @field #string version
CTLD_ENGINEERING.Version = "0.0.3"
--- Create a new instance.
-- @param #CTLD_ENGINEERING self
-- @param #string Name
-- @param #string GroupName Name of Engineering #GROUP object
-- @param Wrapper.Group#GROUP HeliGroup HeliGroup
-- @param Wrapper.Unit#UNIT HeliUnit HeliUnit
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:New(Name, GroupName, HeliGroup, HeliUnit)
-- Inherit everything from BASE class.
local self=BASE:Inherit(self, BASE:New()) -- #CTLD_ENGINEERING
--BASE:I({Name, GroupName})
self.Name = Name or "Engineer Squad" -- #string
self.Group = GROUP:FindByName(GroupName) -- Wrapper.Group#GROUP
self.Unit = self.Group:GetUnit(1) -- Wrapper.Unit#UNIT
self.HeliGroup = HeliGroup -- Wrapper.Group#GROUP
self.HeliUnit = HeliUnit -- Wrapper.Unit#UNIT
self.currwpt = nil -- Core.Point#COORDINATE
self.lid = string.format("%s (%s) | ",self.Name, self.Version)
-- Start State.
self.State = "Stopped"
self.marktimer = 300 -- wait this many secs before trying a crate again
self:Start()
local parent = self:GetParent(self)
return self
end
--- (Internal) Set the status
-- @param #CTLD_ENGINEERING self
-- @param #string State
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:SetStatus(State)
self.State = State
return self
end
--- (Internal) Get the status
-- @param #CTLD_ENGINEERING self
-- @return #string State
function CTLD_ENGINEERING:GetStatus()
return self.State
end
--- (Internal) Check the status
-- @param #CTLD_ENGINEERING self
-- @param #string State
-- @return #boolean Outcome
function CTLD_ENGINEERING:IsStatus(State)
return self.State == State
end
--- (Internal) Check the negative status
-- @param #CTLD_ENGINEERING self
-- @param #string State
-- @return #boolean Outcome
function CTLD_ENGINEERING:IsNotStatus(State)
return self.State ~= State
end
--- (Internal) Set start status.
-- @param #CTLD_ENGINEERING self
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:Start()
self:T(self.lid.."Start")
self:SetStatus("Running")
return self
end
--- (Internal) Set stop status.
-- @param #CTLD_ENGINEERING self
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:Stop()
self:T(self.lid.."Stop")
self:SetStatus("Stopped")
return self
end
--- (Internal) Set build status.
-- @param #CTLD_ENGINEERING self
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:Build()
self:T(self.lid.."Build")
self:SetStatus("Building")
return self
end
--- (Internal) Set done status.
-- @param #CTLD_ENGINEERING self
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:Done()
self:T(self.lid.."Done")
local grp = self.Group -- Wrapper.Group#GROUP
grp:RelocateGroundRandomInRadius(7,100,false,false,"Diamond")
self:SetStatus("Running")
return self
end
--- (Internal) Search for crates in reach.
-- @param #CTLD_ENGINEERING self
-- @param #table crates Table of found crate Ops.CTLD#CTLD_CARGO objects.
-- @param #number number Number of crates found.
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:Search(crates,number)
self:T(self.lid.."Search")
self:SetStatus("Searching")
-- find crates close by
--local COps = self.C_Ops -- Ops.CTLD#CTLD
local dist = self.distance -- #number
local group = self.Group -- Wrapper.Group#GROUP
--local crates,number = COps:_FindCratesNearby(group,nil, dist) -- #table
local ctable = {}
local ind = 0
if number > 0 then
-- get set of dropped only
for _,_cargo in pairs (crates) do
local cgotype = _cargo:GetType()
if _cargo:WasDropped() and cgotype ~= CTLD_CARGO.Enum.STATIC then
local ok = false
local chalk = _cargo:GetMark()
if chalk == nil then
ok = true
else
-- have we tried this cargo recently?
local tag = chalk.tag or "none"
local timestamp = chalk.timestamp or 0
-- enough time gone?
local gone = timer.getAbsTime() - timestamp
if gone >= self.marktimer then
ok = true
_cargo:WipeMark()
end -- end time check
end -- end chalk
if ok then
local chalk = {}
chalk.tag = "Engineers"
chalk.timestamp = timer.getAbsTime()
_cargo:AddMark(chalk)
ind = ind + 1
table.insert(ctable,ind,_cargo)
end
end -- end dropped
end -- end for
end -- end number
if ind > 0 then
local crate = ctable[1] -- Ops.CTLD#CTLD_CARGO
local static = crate:GetPositionable() -- Wrapper.Static#STATIC
local crate_pos = static:GetCoordinate() -- Core.Point#COORDINATE
local gpos = group:GetCoord() -- Core.Point#COORDINATE
-- see how far we are from the crate
local distance = self:_GetDistance(gpos,crate_pos)
self:T(string.format("%s Distance to crate: %d", self.lid, distance))
-- move there
if distance > 30 and distance ~= -1 and self:IsStatus("Searching") then
group:RouteGroundTo(crate_pos,15,"Line abreast",1)
self.currwpt = crate_pos -- Core.Point#COORDINATE
self:Move()
elseif distance <= 30 and distance ~= -1 then
-- arrived
self:Arrive()
end
else
self:T(self.lid.."No crates in reach!")
end
return self
end
--- (Internal) Move towards crates in reach.
-- @param #CTLD_ENGINEERING self
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:Move()
self:T(self.lid.."Move")
self:SetStatus("Moving")
-- check if we arrived on target
--local COps = self.C_Ops -- Ops.CTLD#CTLD
local group = self.Group -- Wrapper.Group#GROUP
local tgtpos = self.currwpt -- Core.Point#COORDINATE
local gpos = group:GetCoord() -- Core.Point#COORDINATE
-- see how far we are from the crate
local distance = self:_GetDistance(gpos,tgtpos)
self:T(string.format("%s Distance remaining: %d", self.lid, distance))
if distance <= 30 and distance ~= -1 then
-- arrived
self:Arrive()
end
return self
end
--- (Internal) Arrived at crates in reach. Stop group.
-- @param #CTLD_ENGINEERING self
-- @return #CTLD_ENGINEERING self
function CTLD_ENGINEERING:Arrive()
self:T(self.lid.."Arrive")
self:SetStatus("Arrived")
self.currwpt = nil
local Grp = self.Group -- Wrapper.Group#GROUP
Grp:RouteStop()
return self
end
--- (Internal) Return distance in meters between two coordinates.
-- @param #CTLD_ENGINEERING self
-- @param Core.Point#COORDINATE _point1 Coordinate one
-- @param Core.Point#COORDINATE _point2 Coordinate two
-- @return #number Distance in meters or -1
function CTLD_ENGINEERING:_GetDistance(_point1, _point2)
self:T(self.lid .. " _GetDistance")
if _point1 and _point2 then
local distance1 = _point1:Get2DDistance(_point2)
local distance2 = _point1:DistanceFromPointVec2(_point2)
if distance1 and type(distance1) == "number" then
return distance1
elseif distance2 and type(distance2) == "number" then
return distance2
else
self:E("*****Cannot calculate distance!")
self:E({_point1,_point2})
return -1
end
else
self:E("******Cannot calculate distance!")
self:E({_point1,_point2})
return -1
end
end
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- END CTLD_ENGINEERING
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -0,0 +1,669 @@
do
--- **Hercules Cargo AIR Drop Events** by Anubis Yinepu
-- Moose CTLD OO refactoring by Applevangelist
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO CTLD_HERCULES
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- This script will only work for the Herculus mod by Anubis, and only for **Air Dropping** cargo from the Hercules.
-- It *DOES NOT* work with the purchaseable Hercules module from ED.
-- Use the standard Moose CTLD if you want to unload on the ground.
-- Payloads carried by pylons 11, 12 and 13 need to be declared in the Herculus_Loadout.lua file
-- Except for Ammo pallets, this script will spawn whatever payload gets launched from pylons 11, 12 and 13
-- Pylons 11, 12 and 13 are moveable within the Hercules cargobay area
-- Ammo pallets can only be jettisoned from these pylons with no benefit to DCS world
-- To benefit DCS world, Ammo pallets need to be off/on loaded using DCS arming and refueling window
-- Cargo_Container_Enclosed = true: Cargo enclosed in container with parachute, need to be dropped from 100m (300ft) or more, except when parked on ground
-- Cargo_Container_Enclosed = false: Open cargo with no parachute, need to be dropped from 10m (30ft) or less
------------------------------------------------------
--- **CTLD_HERCULES** class, extends Core.Base#BASE
-- @type CTLD_HERCULES
-- @field #string ClassName
-- @field #string lid
-- @field #string Name
-- @field #string Version
-- @extends Core.Base#BASE
CTLD_HERCULES = {
ClassName = "CTLD_HERCULES",
lid = "",
Name = "",
Version = "0.0.3",
}
--- Define cargo types.
-- @type CTLD_HERCULES.Types
-- @field #table Type Name of cargo type, container (boolean) in container or not.
CTLD_HERCULES.Types = {
["ATGM M1045 HMMWV TOW Air [7183lb]"] = {['name'] = "M1045 HMMWV TOW", ['container'] = true},
["ATGM M1045 HMMWV TOW Skid [7073lb]"] = {['name'] = "M1045 HMMWV TOW", ['container'] = false},
["APC M1043 HMMWV Armament Air [7023lb]"] = {['name'] = "M1043 HMMWV Armament", ['container'] = true},
["APC M1043 HMMWV Armament Skid [6912lb]"] = {['name'] = "M1043 HMMWV Armament", ['container'] = false},
["SAM Avenger M1097 Air [7200lb]"] = {['name'] = "M1097 Avenger", ['container'] = true},
["SAM Avenger M1097 Skid [7090lb]"] = {['name'] = "M1097 Avenger", ['container'] = false},
["APC Cobra Air [10912lb]"] = {['name'] = "Cobra", ['container'] = true},
["APC Cobra Skid [10802lb]"] = {['name'] = "Cobra", ['container'] = false},
["APC M113 Air [21624lb]"] = {['name'] = "M-113", ['container'] = true},
["APC M113 Skid [21494lb]"] = {['name'] = "M-113", ['container'] = false},
["Tanker M978 HEMTT [34000lb]"] = {['name'] = "M978 HEMTT Tanker", ['container'] = false},
["HEMTT TFFT [34400lb]"] = {['name'] = "HEMTT TFFT", ['container'] = false},
["SPG M1128 Stryker MGS [33036lb]"] = {['name'] = "M1128 Stryker MGS", ['container'] = false},
["AAA Vulcan M163 Air [21666lb]"] = {['name'] = "Vulcan", ['container'] = true},
["AAA Vulcan M163 Skid [21577lb]"] = {['name'] = "Vulcan", ['container'] = false},
["APC M1126 Stryker ICV [29542lb]"] = {['name'] = "M1126 Stryker ICV", ['container'] = false},
["ATGM M1134 Stryker [30337lb]"] = {['name'] = "M1134 Stryker ATGM", ['container'] = false},
["APC LAV-25 Air [22520lb]"] = {['name'] = "LAV-25", ['container'] = true},
["APC LAV-25 Skid [22514lb]"] = {['name'] = "LAV-25", ['container'] = false},
["M1025 HMMWV Air [6160lb]"] = {['name'] = "Hummer", ['container'] = true},
["M1025 HMMWV Skid [6050lb]"] = {['name'] = "Hummer", ['container'] = false},
["IFV M2A2 Bradley [34720lb]"] = {['name'] = "M-2 Bradley", ['container'] = false},
["IFV MCV-80 [34720lb]"] = {['name'] = "MCV-80", ['container'] = false},
["IFV BMP-1 [23232lb]"] = {['name'] = "BMP-1", ['container'] = false},
["IFV BMP-2 [25168lb]"] = {['name'] = "BMP-2", ['container'] = false},
["IFV BMP-3 [32912lb]"] = {['name'] = "BMP-3", ['container'] = false},
["ARV BRDM-2 Air [12320lb]"] = {['name'] = "BRDM-2", ['container'] = true},
["ARV BRDM-2 Skid [12210lb]"] = {['name'] = "BRDM-2", ['container'] = false},
["APC BTR-80 Air [23936lb]"] = {['name'] = "BTR-80", ['container'] = true},
["APC BTR-80 Skid [23826lb]"] = {['name'] = "BTR-80", ['container'] = false},
["APC BTR-82A Air [24998lb]"] = {['name'] = "BTR-82A", ['container'] = true},
["APC BTR-82A Skid [24888lb]"] = {['name'] = "BTR-82A", ['container'] = false},
["SAM ROLAND ADS [34720lb]"] = {['name'] = "Roland Radar", ['container'] = false},
["SAM ROLAND LN [34720b]"] = {['name'] = "Roland ADS", ['container'] = false},
["SAM SA-13 STRELA [21624lb]"] = {['name'] = "Strela-10M3", ['container'] = false},
["AAA ZSU-23-4 Shilka [32912lb]"] = {['name'] = "ZSU-23-4 Shilka", ['container'] = false},
["SAM SA-19 Tunguska 2S6 [34720lb]"] = {['name'] = "2S6 Tunguska", ['container'] = false},
["Transport UAZ-469 Air [3747lb]"] = {['name'] = "UAZ-469", ['container'] = true},
["Transport UAZ-469 Skid [3630lb]"] = {['name'] = "UAZ-469", ['container'] = false},
["AAA GEPARD [34720lb]"] = {['name'] = "Gepard", ['container'] = false},
["SAM CHAPARRAL Air [21624lb]"] = {['name'] = "M48 Chaparral", ['container'] = true},
["SAM CHAPARRAL Skid [21516lb]"] = {['name'] = "M48 Chaparral", ['container'] = false},
["SAM LINEBACKER [34720lb]"] = {['name'] = "M6 Linebacker", ['container'] = false},
["Transport URAL-375 [14815lb]"] = {['name'] = "Ural-375", ['container'] = false},
["Transport M818 [16000lb]"] = {['name'] = "M 818", ['container'] = false},
["IFV MARDER [34720lb]"] = {['name'] = "Marder", ['container'] = false},
["Transport Tigr Air [15900lb]"] = {['name'] = "Tigr_233036", ['container'] = true},
["Transport Tigr Skid [15730lb]"] = {['name'] = "Tigr_233036", ['container'] = false},
["IFV TPZ FUCH [33440lb]"] = {['name'] = "TPZ", ['container'] = false},
["IFV BMD-1 Air [18040lb]"] = {['name'] = "BMD-1", ['container'] = true},
["IFV BMD-1 Skid [17930lb]"] = {['name'] = "BMD-1", ['container'] = false},
["IFV BTR-D Air [18040lb]"] = {['name'] = "BTR_D", ['container'] = true},
["IFV BTR-D Skid [17930lb]"] = {['name'] = "BTR_D", ['container'] = false},
["EWR SBORKA Air [21624lb]"] = {['name'] = "Dog Ear radar", ['container'] = true},
["EWR SBORKA Skid [21624lb]"] = {['name'] = "Dog Ear radar", ['container'] = false},
["ART 2S9 NONA Air [19140lb]"] = {['name'] = "SAU 2-C9", ['container'] = true},
["ART 2S9 NONA Skid [19030lb]"] = {['name'] = "SAU 2-C9", ['container'] = false},
["ART GVOZDIKA [34720lb]"] = {['name'] = "SAU Gvozdika", ['container'] = false},
["APC MTLB Air [26400lb]"] = {['name'] = "MTLB", ['container'] = true},
["APC MTLB Skid [26290lb]"] = {['name'] = "MTLB", ['container'] = false},
}
--- Cargo Object
-- @type CTLD_HERCULES.CargoObject
-- @field #number Cargo_Drop_Direction
-- @field #table Cargo_Contents
-- @field #string Cargo_Type_name
-- @field #boolean Container_Enclosed
-- @field #boolean ParatrooperGroupSpawn
-- @field #number Cargo_Country
-- @field #boolean offload_cargo
-- @field #boolean all_cargo_survive_to_the_ground
-- @field #boolean all_cargo_gets_destroyed
-- @field #boolean destroy_cargo_dropped_without_parachute
-- @field Core.Timer#TIMER scheduleFunctionID
--- [User] Instantiate a new object
-- @param #CTLD_HERCULES self
-- @param #string Coalition Coalition side, "red", "blue" or "neutral"
-- @param #string Alias Name of this instance
-- @param Ops.CTLD#CTLD CtldObject CTLD instance to link into
-- @return #CTLD_HERCULES self
-- @usage
-- Integrate to your CTLD instance like so, where `my_ctld` is a previously created CTLD instance:
--
-- my_ctld.enableFixedWing = false -- avoid dual loading via CTLD F10 and F8 ground crew
-- local herccargo = CTLD_HERCULES:New("blue", "Hercules Test", my_ctld)
--
-- You also need:
-- * A template called "Infantry" for 10 Paratroopers (as set via herccargo.infantrytemplate).
-- * Depending on what you are loading with the help of the ground crew, there are 42 more templates for the various vehicles that are loadable.
-- There's a **quick check output in the `dcs.log`** which tells you what's there and what not.
-- E.g.:
-- ...Checking template for APC BTR-82A Air [24998lb] (BTR-82A) ... MISSING)
-- ...Checking template for ART 2S9 NONA Skid [19030lb] (SAU 2-C9) ... MISSING)
-- ...Checking template for EWR SBORKA Air [21624lb] (Dog Ear radar) ... MISSING)
-- ...Checking template for Transport Tigr Air [15900lb] (Tigr_233036) ... OK)
--
-- Expected template names are the ones in the rounded brackets.
--
-- ### HINTS
--
-- The script works on the EVENTS.Shot trigger, which is used by the mod when you **drop cargo from the Hercules while flying**. Unloading on the ground does
-- not achieve anything here. If you just want to unload on the ground, use the normal Moose CTLD.
-- **Do not use** the **splash damage** script together with this, your cargo will just explode when reaching the ground!
--
-- ### Airdrops
--
-- There are two ways of airdropping:
-- 1) Very low and very slow (>5m and <10m AGL) - here you can drop stuff which has "Skid" at the end of the cargo name (loaded via F8 Ground Crew menu)
-- 2) Higher up and slow (>100m AGL) - here you can drop paratroopers and cargo which has "Air" at the end of the cargo name (loaded via F8 Ground Crew menu)
--
-- ### General
--
-- Use either this method to integrate the Hercules **or** the one from the "normal" CTLD. Never both!
function CTLD_HERCULES:New(Coalition, Alias, CtldObject)
-- Inherit everything from FSM class.
local self=BASE:Inherit(self, FSM:New()) -- #CTLD_HERCULES
--set Coalition
if Coalition and type(Coalition)=="string" then
if Coalition=="blue" then
self.coalition=coalition.side.BLUE
self.coalitiontxt = Coalition
elseif Coalition=="red" then
self.coalition=coalition.side.RED
self.coalitiontxt = Coalition
elseif Coalition=="neutral" then
self.coalition=coalition.side.NEUTRAL
self.coalitiontxt = Coalition
else
self:E("ERROR: Unknown coalition in CTLD!")
end
else
self.coalition = Coalition
self.coalitiontxt = string.lower(UTILS.GetCoalitionName(self.coalition))
end
-- Set alias.
if Alias then
self.alias=tostring(Alias)
else
self.alias="UNHCR"
if self.coalition then
if self.coalition==coalition.side.RED then
self.alias="Red CTLD Hercules"
elseif self.coalition==coalition.side.BLUE then
self.alias="Blue CTLD Hercules"
end
end
end
-- Set some string id for output to DCS.log file.
self.lid=string.format("%s (%s) | ", self.alias, self.coalitiontxt)
self.infantrytemplate = "Infantry" -- template for a group of 10 paratroopers
self.CTLD = CtldObject -- Ops.CTLD#CTLD
self.verbose = true
self.j = 0
self.carrierGroups = {}
self.Cargo = {}
self.ParatrooperCount = {}
self.ObjectTracker = {}
-- Set some string id for output to DCS.log file.
self.lid=string.format("%s (%s) | ", self.alias, self.coalition and UTILS.GetCoalitionName(self.coalition) or "unknown")
self:HandleEvent(EVENTS.Shot, self._HandleShot)
self:I(self.lid .. "Started")
self:CheckTemplates()
return self
end
--- [Internal] Function to check availability of templates
-- @param #CTLD_HERCULES self
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:CheckTemplates()
self:T(self.lid .. 'CheckTemplates')
-- inject Paratroopers
self.Types["Paratroopers 10"] = {
name = self.infantrytemplate,
container = false,
available = false,
}
local missing = {}
local nomissing = 0
local found = {}
local nofound = 0
-- list of groundcrew loadables
for _index,_tab in pairs (self.Types) do
local outcometxt = "MISSING"
if _DATABASE.Templates.Groups[_tab.name] then
outcometxt = "OK"
self.Types[_index].available= true
found[_tab.name] = true
else
self.Types[_index].available = false
missing[_tab.name] = true
end
if self.verbose then
self:I(string.format(self.lid .. "Checking template for %s (%s) ... %s", _index,_tab.name,outcometxt))
end
end
for _,_name in pairs(found) do
nofound = nofound + 1
end
for _,_name in pairs(missing) do
nomissing = nomissing + 1
end
self:I(string.format(self.lid .. "Template Check Summary: Found %d, Missing %d, Total %d",nofound,nomissing,nofound+nomissing))
return self
end
--- [Internal] Function to spawn a soldier group of 10 units
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP Cargo_Drop_initiator
-- @param Core.Point#COORDINATE Cargo_Drop_Position
-- @param #string Cargo_Type_name
-- @param #number CargoHeading
-- @param #number Cargo_Country
-- @param #number GroupSpacing
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:Soldier_SpawnGroup(Cargo_Drop_initiator,Cargo_Drop_Position, Cargo_Type_name, CargoHeading, Cargo_Country, GroupSpacing)
--- TODO: Rework into Moose Spawns
self:T(self.lid .. 'Soldier_SpawnGroup')
self:T(Cargo_Drop_Position)
-- create a matching #CTLD_CARGO type
local InjectTroopsType = CTLD_CARGO:New(nil,self.infantrytemplate,{self.infantrytemplate},CTLD_CARGO.Enum.TROOPS,true,true,10,nil,false,80)
-- get a #ZONE object
local position = Cargo_Drop_Position:GetVec2()
local dropzone = ZONE_RADIUS:New("Infantry " .. math.random(1,10000),position,100)
-- and go:
self.CTLD:InjectTroops(dropzone,InjectTroopsType)
return self
end
--- [Internal] Function to spawn a group
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP Cargo_Drop_initiator
-- @param Core.Point#COORDINATE Cargo_Drop_Position
-- @param #string Cargo_Type_name
-- @param #number CargoHeading
-- @param #number Cargo_Country
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:Cargo_SpawnGroup(Cargo_Drop_initiator,Cargo_Drop_Position, Cargo_Type_name, CargoHeading, Cargo_Country)
--- TODO: Rework into Moose Spawns
self:T(self.lid .. "Cargo_SpawnGroup")
self:T(Cargo_Type_name)
if Cargo_Type_name ~= 'Container red 1' then
-- create a matching #CTLD_CARGO type
local InjectVehicleType = CTLD_CARGO:New(nil,Cargo_Type_name,{Cargo_Type_name},CTLD_CARGO.Enum.VEHICLE,true,true,1,nil,false,1000)
-- get a #ZONE object
local position = Cargo_Drop_Position:GetVec2()
local dropzone = ZONE_RADIUS:New("Vehicle " .. math.random(1,10000),position,100)
-- and go:
self.CTLD:InjectVehicles(dropzone,InjectVehicleType)
end
return self
end
--- [Internal] Function to spawn static cargo
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP Cargo_Drop_initiator
-- @param Core.Point#COORDINATE Cargo_Drop_Position
-- @param #string Cargo_Type_name
-- @param #number CargoHeading
-- @param #boolean dead
-- @param #number Cargo_Country
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:Cargo_SpawnStatic(Cargo_Drop_initiator,Cargo_Drop_Position, Cargo_Type_name, CargoHeading, dead, Cargo_Country)
--- TODO: Rework into Moose Static Spawns
self:T(self.lid .. "Cargo_SpawnStatic")
self:T("Static " .. Cargo_Type_name .. " Dead " .. tostring(dead))
local position = Cargo_Drop_Position:GetVec2()
local Zone = ZONE_RADIUS:New("Cargo Static " .. math.random(1,10000),position,100)
if not dead then
local injectstatic = CTLD_CARGO:New(nil,"Cargo Static Group "..math.random(1,10000),"iso_container",CTLD_CARGO.Enum.STATIC,true,false,1,nil,true,4500,1)
self.CTLD:InjectStatics(Zone,injectstatic,true,true)
end
return self
end
--- [Internal] Function to spawn cargo by type at position
-- @param #CTLD_HERCULES self
-- @param #string Cargo_Type_name
-- @param Core.Point#COORDINATE Cargo_Drop_Position
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:Cargo_SpawnDroppedAsCargo(_name, _pos)
local theCargo = self.CTLD:_FindCratesCargoObject(_name) -- #CTLD_CARGO
if theCargo then
self.CTLD.CrateCounter = self.CTLD.CrateCounter + 1
local CCat, CType, CShape = theCargo:GetStaticTypeAndShape()
local basetype = CType or self.CTLD.basetype or "container_cargo"
CCat = CCat or "Cargos"
local theStatic = SPAWNSTATIC:NewFromType(basetype,CCat,self.cratecountry)
:InitCargoMass(theCargo.PerCrateMass)
:InitCargo(self.CTLD.enableslingload)
:InitCoordinate(_pos)
if CShape then
theStatic:InitShape(CShape)
end
theStatic:Spawn(270,_name .. "-Container-".. math.random(1,100000))
self.CTLD.Spawned_Crates[self.CTLD.CrateCounter] = theStatic
local newCargo = CTLD_CARGO:New(self.CTLD.CargoCounter, theCargo.Name, theCargo.Templates, theCargo.CargoType, true, false, theCargo.CratesNeeded, self.CTLD.Spawned_Crates[self.CTLD.CrateCounter], true, theCargo.PerCrateMass, nil, theCargo.Subcategory)
local map=theCargo:GetStaticResourceMap()
newCargo:SetStaticResourceMap(map)
table.insert(self.CTLD.Spawned_Cargo, newCargo)
newCargo:SetWasDropped(true)
newCargo:SetHasMoved(true)
end
return self
end
--- [Internal] Spawn cargo objects
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP Cargo_Drop_initiator
-- @param #number Cargo_Drop_Direction
-- @param Core.Point#COORDINATE Cargo_Content_position
-- @param #string Cargo_Type_name
-- @param #boolean Cargo_over_water
-- @param #boolean Container_Enclosed
-- @param #boolean ParatrooperGroupSpawn
-- @param #boolean offload_cargo
-- @param #boolean all_cargo_survive_to_the_ground
-- @param #boolean all_cargo_gets_destroyed
-- @param #boolean destroy_cargo_dropped_without_parachute
-- @param #number Cargo_Country
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:Cargo_SpawnObjects(Cargo_Drop_initiator,Cargo_Drop_Direction, Cargo_Content_position, Cargo_Type_name, Cargo_over_water, Container_Enclosed, ParatrooperGroupSpawn, offload_cargo, all_cargo_survive_to_the_ground, all_cargo_gets_destroyed, destroy_cargo_dropped_without_parachute, Cargo_Country)
self:T(self.lid .. 'Cargo_SpawnObjects')
local CargoHeading = self.CargoHeading
if offload_cargo == true or ParatrooperGroupSpawn == true then
if ParatrooperGroupSpawn == true then
self:Soldier_SpawnGroup(Cargo_Drop_initiator,Cargo_Content_position, Cargo_Type_name, CargoHeading, Cargo_Country, 10)
else
self:Cargo_SpawnGroup(Cargo_Drop_initiator,Cargo_Content_position, Cargo_Type_name, CargoHeading, Cargo_Country)
end
else
if all_cargo_gets_destroyed == true or Cargo_over_water == true then
else
if all_cargo_survive_to_the_ground == true then
if ParatrooperGroupSpawn == true then
self:Cargo_SpawnStatic(Cargo_Drop_initiator,Cargo_Content_position, Cargo_Type_name, CargoHeading, true, Cargo_Country)
else
self:Cargo_SpawnGroup(Cargo_Drop_initiator,Cargo_Content_position, Cargo_Type_name, CargoHeading, Cargo_Country)
end
if Container_Enclosed == true then
if ParatrooperGroupSpawn == false then
self:Cargo_SpawnStatic(Cargo_Drop_initiator,Cargo_Content_position, "Hercules_Container_Parachute_Static", CargoHeading, false, Cargo_Country)
end
end
end
if destroy_cargo_dropped_without_parachute == true then
if Container_Enclosed == true then
if ParatrooperGroupSpawn == true then
self:Soldier_SpawnGroup(Cargo_Drop_initiator,Cargo_Content_position, Cargo_Type_name, CargoHeading, Cargo_Country, 0)
else
if self.CTLD.dropAsCargoCrate then
self:Cargo_SpawnDroppedAsCargo(Cargo_Type_name, Cargo_Content_position)
else
self:Cargo_SpawnGroup(Cargo_Drop_initiator,Cargo_Content_position, Cargo_Type_name, CargoHeading, Cargo_Country)
self:Cargo_SpawnStatic(Cargo_Drop_initiator,Cargo_Content_position, "Hercules_Container_Parachute_Static", CargoHeading, false, Cargo_Country)
end
end
else
self:Cargo_SpawnStatic(Cargo_Drop_initiator,Cargo_Content_position, Cargo_Type_name, CargoHeading, true, Cargo_Country)
end
end
end
end
return self
end
--- [Internal] Function to calculate object height
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP group The group for which to calculate the height
-- @return #number height over ground
function CTLD_HERCULES:Calculate_Object_Height_AGL(group)
self:T(self.lid .. "Calculate_Object_Height_AGL")
if group.ClassName and group.ClassName == "GROUP" then
local gcoord = group:GetCoordinate()
local height = group:GetHeight()
local lheight = gcoord:GetLandHeight()
self:T(self.lid .. "Height " .. height - lheight)
return height - lheight
else
-- DCS object
if group:isExist() then
local dcsposition = group:getPosition().p
local dcsvec2 = {x = dcsposition.x, y = dcsposition.z} -- Vec2
local height = math.floor(group:getPosition().p.y - land.getHeight(dcsvec2))
self.ObjectTracker[group.id_] = dcsposition -- Vec3
self:T(self.lid .. "Height " .. height)
return height
else
return 0
end
end
end
--- [Internal] Function to check surface type
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP group The group for which to calculate the height
-- @return #number height over ground
function CTLD_HERCULES:Check_SurfaceType(object)
self:T(self.lid .. "Check_SurfaceType")
-- LAND,--1 SHALLOW_WATER,--2 WATER,--3 ROAD,--4 RUNWAY--5
if object:isExist() then
return land.getSurfaceType({x = object:getPosition().p.x, y = object:getPosition().p.z})
else
return 1
end
end
--- [Internal] Function to track cargo objects
-- @param #CTLD_HERCULES self
-- @param #CTLD_HERCULES.CargoObject cargo
-- @param Wrapper.Group#GROUP initiator
-- @return #number height over ground
function CTLD_HERCULES:Cargo_Track(cargo, initiator)
self:T(self.lid .. "Cargo_Track")
local Cargo_Drop_initiator = initiator
if cargo.Cargo_Contents ~= nil then
if self:Calculate_Object_Height_AGL(cargo.Cargo_Contents) < 10 then --pallet less than 5m above ground before spawning
if self:Check_SurfaceType(cargo.Cargo_Contents) == 2 or self:Check_SurfaceType(cargo.Cargo_Contents) == 3 then
cargo.Cargo_over_water = true--pallets gets destroyed in water
end
local dcsvec3 = self.ObjectTracker[cargo.Cargo_Contents.id_] or initiator:GetVec3() -- last known position
self:T("SPAWNPOSITION: ")
self:T({dcsvec3})
local Vec2 = {
x=dcsvec3.x,
y=dcsvec3.z,
}
local vec3 = COORDINATE:NewFromVec2(Vec2)
self.ObjectTracker[cargo.Cargo_Contents.id_] = nil
self:Cargo_SpawnObjects(Cargo_Drop_initiator,cargo.Cargo_Drop_Direction, vec3, cargo.Cargo_Type_name, cargo.Cargo_over_water, cargo.Container_Enclosed, cargo.ParatrooperGroupSpawn, cargo.offload_cargo, cargo.all_cargo_survive_to_the_ground, cargo.all_cargo_gets_destroyed, cargo.destroy_cargo_dropped_without_parachute, cargo.Cargo_Country)
if cargo.Cargo_Contents:isExist() then
cargo.Cargo_Contents:destroy()--remove pallet+parachute before hitting ground and replace with Cargo_SpawnContents
end
--timer.removeFunction(cargo.scheduleFunctionID)
cargo.scheduleFunctionID:Stop()
cargo = {}
end
end
return self
end
--- [Internal] Function to calc north correction
-- @param #CTLD_HERCULES self
-- @param Core.Point#POINT_Vec3 point Position Vec3
-- @return #number north correction
function CTLD_HERCULES:Calculate_Cargo_Drop_initiator_NorthCorrection(point)
self:T(self.lid .. "Calculate_Cargo_Drop_initiator_NorthCorrection")
if not point.z then --Vec2; convert to Vec3
point.z = point.y
point.y = 0
end
local lat, lon = coord.LOtoLL(point)
local north_posit = coord.LLtoLO(lat + 1, lon)
return math.atan2(north_posit.z - point.z, north_posit.x - point.x)
end
--- [Internal] Function to calc initiator heading
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP Cargo_Drop_initiator
-- @return #number north corrected heading
function CTLD_HERCULES:Calculate_Cargo_Drop_initiator_Heading(Cargo_Drop_initiator)
self:T(self.lid .. "Calculate_Cargo_Drop_initiator_Heading")
local Heading = Cargo_Drop_initiator:GetHeading()
Heading = Heading + self:Calculate_Cargo_Drop_initiator_NorthCorrection(Cargo_Drop_initiator:GetVec3())
if Heading < 0 then
Heading = Heading + (2 * math.pi)-- put heading in range of 0 to 2*pi
end
return Heading + 0.06 -- rad
end
--- [Internal] Function to initialize dropped cargo
-- @param #CTLD_HERCULES self
-- @param Wrapper.Group#GROUP Initiator
-- @param #table Cargo_Contents Table 'weapon' from event data
-- @param #string Cargo_Type_name Name of this cargo
-- @param #boolean Container_Enclosed Is container?
-- @param #boolean SoldierGroup Is soldier group?
-- @param #boolean ParatrooperGroupSpawnInit Is paratroopers?
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:Cargo_Initialize(Initiator, Cargo_Contents, Cargo_Type_name, Container_Enclosed, SoldierGroup, ParatrooperGroupSpawnInit)
self:T(self.lid .. "Cargo_Initialize")
local Cargo_Drop_initiator = Initiator:GetName()
if Cargo_Drop_initiator ~= nil then
if ParatrooperGroupSpawnInit == true then
self:T("Paratrooper Drop")
-- Paratroopers
if not self.ParatrooperCount[Cargo_Drop_initiator] then
self.ParatrooperCount[Cargo_Drop_initiator] = 1
else
self.ParatrooperCount[Cargo_Drop_initiator] = self.ParatrooperCount[Cargo_Drop_initiator] + 1
end
local Paratroopers = self.ParatrooperCount[Cargo_Drop_initiator]
self:T("Paratrooper Drop Number " .. self.ParatrooperCount[Cargo_Drop_initiator])
local SpawnParas = false
if math.fmod(Paratroopers,10) == 0 then
SpawnParas = true
end
self.j = self.j + 1
self.Cargo[self.j] = {}
self.Cargo[self.j].Cargo_Drop_Direction = self:Calculate_Cargo_Drop_initiator_Heading(Initiator)
self.Cargo[self.j].Cargo_Contents = Cargo_Contents
self.Cargo[self.j].Cargo_Type_name = Cargo_Type_name
self.Cargo[self.j].Container_Enclosed = Container_Enclosed
self.Cargo[self.j].ParatrooperGroupSpawn = SpawnParas
self.Cargo[self.j].Cargo_Country = Initiator:GetCountry()
if self:Calculate_Object_Height_AGL(Initiator) < 5.0 then --aircraft on ground
self.Cargo[self.j].offload_cargo = true
elseif self:Calculate_Object_Height_AGL(Initiator) < 10.0 then --aircraft less than 10m above ground
self.Cargo[self.j].all_cargo_survive_to_the_ground = true
elseif self:Calculate_Object_Height_AGL(Initiator) < 100.0 then --aircraft more than 10m but less than 100m above ground
self.Cargo[self.j].all_cargo_gets_destroyed = true
else
self.Cargo[self.j].all_cargo_gets_destroyed = false
end
local timer = TIMER:New(self.Cargo_Track,self,self.Cargo[self.j],Initiator)
self.Cargo[self.j].scheduleFunctionID = timer
timer:Start(1,1,600)
else
-- no paras
self.j = self.j + 1
self.Cargo[self.j] = {}
self.Cargo[self.j].Cargo_Drop_Direction = self:Calculate_Cargo_Drop_initiator_Heading(Initiator)
self.Cargo[self.j].Cargo_Contents = Cargo_Contents
self.Cargo[self.j].Cargo_Type_name = Cargo_Type_name
self.Cargo[self.j].Container_Enclosed = Container_Enclosed
self.Cargo[self.j].ParatrooperGroupSpawn = false
self.Cargo[self.j].Cargo_Country = Initiator:GetCountry()
if self:Calculate_Object_Height_AGL(Initiator) < 5.0 then--aircraft on ground
self.Cargo[self.j].offload_cargo = true
elseif self:Calculate_Object_Height_AGL(Initiator) < 10.0 then--aircraft less than 10m above ground
self.Cargo[self.j].all_cargo_survive_to_the_ground = true
elseif self:Calculate_Object_Height_AGL(Initiator) < 100.0 then--aircraft more than 10m but less than 100m above ground
self.Cargo[self.j].all_cargo_gets_destroyed = true
else
self.Cargo[self.j].destroy_cargo_dropped_without_parachute = true --aircraft more than 100m above ground
end
local timer = TIMER:New(self.Cargo_Track,self,self.Cargo[self.j],Initiator)
self.Cargo[self.j].scheduleFunctionID = timer
timer:Start(1,1,600)
end
end
return self
end
--- [Internal] Function to change cargotype per group (Wrench)
-- @param #CTLD_HERCULES self
-- @param #number key Carrier key id
-- @param #string cargoType Type of cargo
-- @param #number cargoNum Number of cargo objects
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:SetType(key,cargoType,cargoNum)
self:T(self.lid .. "SetType")
self.carrierGroups[key]['cargoType'] = cargoType
self.carrierGroups[key]['cargoNum'] = cargoNum
return self
end
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- EventHandlers
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- [Internal] Function to capture SHOT event
-- @param #CTLD_HERCULES self
-- @param Core.Event#EVENTDATA Cargo_Drop_Event The event data
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:_HandleShot(Cargo_Drop_Event)
self:T(self.lid .. "Shot Event ID:" .. Cargo_Drop_Event.id)
if Cargo_Drop_Event.id == EVENTS.Shot then
local GT_Name = ""
local SoldierGroup = false
local ParatrooperGroupSpawnInit = false
local GT_DisplayName = Weapon.getDesc(Cargo_Drop_Event.weapon).typeName:sub(15, -1)--Remove "weapons.bombs." from string
self:T(string.format("%sCargo_Drop_Event: %s", self.lid, Weapon.getDesc(Cargo_Drop_Event.weapon).typeName))
if (GT_DisplayName == "Squad 30 x Soldier [7950lb]") then
self:Cargo_Initialize(Cargo_Drop_Event.IniGroup, Cargo_Drop_Event.weapon, "Soldier M4 GRG", false, true, true)
end
if self.Types[GT_DisplayName] then
local GT_Name = self.Types[GT_DisplayName]['name']
local Cargo_Container_Enclosed = self.Types[GT_DisplayName]['container']
self:Cargo_Initialize(Cargo_Drop_Event.IniGroup, Cargo_Drop_Event.weapon, GT_Name, Cargo_Container_Enclosed)
end
end
return self
end
--- [Internal] Function to capture BIRTH event
-- @param #CTLD_HERCULES self
-- @param Core.Event#EVENTDATA event The event data
-- @return #CTLD_HERCULES self
function CTLD_HERCULES:_HandleBirth(event)
-- not sure what this is needed for? I think this for setting generic crates "content" setting.
self:T(self.lid .. "Birth Event ID:" .. event.id)
return self
end
end
-------------------------------------------------------------------
-- End Ops.CTLD.lua
-------------------------------------------------------------------
File diff suppressed because it is too large Load Diff
+53 -41
View File
@@ -257,6 +257,7 @@ CHIEF = {
tacview = false,
Nsuccess = 0,
Nfailure = 0,
LegionRecruitMinRange = {}
}
--- Defence condition.
@@ -332,7 +333,7 @@ CHIEF.Strategy = {
--- CHIEF class version.
-- @field #string version
CHIEF.version="0.7.0"
CHIEF.version="0.7.1"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -362,8 +363,8 @@ CHIEF.version="0.7.0"
--- Create a new CHIEF object and start the FSM.
-- @param #CHIEF self
-- @param #number Coalition Coalition side, e.g. `coaliton.side.BLUE`. Can also be passed as a string "red", "blue" or "neutral".
-- @param Core.Set#SET_GROUP AgentSet Set of agents (groups) providing intel. Default is an empty set.
-- @param #string Alias An *optional* alias how this object is called in the logs etc.
-- @param Core.Set#SET_GROUP AgentSet (Optional) Set of agents (groups) providing intel. Default is an empty set.
-- @param #string Alias (Optional) An *optional* alias how this object is called in the logs etc.
-- @return #CHIEF self
function CHIEF:New(Coalition, AgentSet, Alias)
@@ -388,6 +389,8 @@ function CHIEF:New(Coalition, AgentSet, Alias)
self:SetBorderZones()
self:SetConflictZones()
self:SetAttackZones()
self:SetCorridorZones()
self:SetRejectZones()
self:SetThreatLevelRange()
-- Init stuff.
@@ -739,8 +742,8 @@ end
--- Set a threat level range that will be engaged. Threat level is a number between 0 and 10, where 10 is a very dangerous threat.
-- Targets with threat level 0 are usually harmless.
-- @param #CHIEF self
-- @param #number ThreatLevelMin Min threat level. Default 1.
-- @param #number ThreatLevelMax Max threat level. Default 10.
-- @param #number ThreatLevelMin (Optional) Min threat level. Default 1.
-- @param #number ThreatLevelMax (Optional) Max threat level. Default 10.
-- @return #CHIEF self
function CHIEF:SetThreatLevelRange(ThreatLevelMin, ThreatLevelMax)
@@ -782,10 +785,10 @@ end
--- Create a new resource list of required assets.
-- @param #CHIEF self
-- @param #string MissionType The mission type.
-- @param #number Nmin Min number of required assets. Default 1.
-- @param #number Nmax Max number of requried assets. Default 1.
-- @param #table Attributes Generalized attribute(s). Default `nil`.
-- @param #table Properties DCS attribute(s). Default `nil`.
-- @param #number Nmin (Optional) Min number of required assets. Default 1.
-- @param #number Nmax (Optional) Max number of requried assets. Default 1.
-- @param #table Attributes (Optional) Generalized attribute(s). Default `nil`.
-- @param #table Properties (Optional) DCS attribute(s). Default `nil`.
-- @param #table Categories Group categories.
-- @return #CHIEF.Resources The newly created resource list table.
-- @return #CHIEF.Resource The resource object that was added.
@@ -802,8 +805,8 @@ end
-- @param #CHIEF self
-- @param #CHIEF.Resources Resource List of resources.
-- @param #string MissionType Mission Type.
-- @param #number Nmin Min number of required assets. Default 1.
-- @param #number Nmax Max number of requried assets. Default equal `Nmin`.
-- @param #number Nmin (Optional) Min number of required assets. Default 1.
-- @param #number Nmax (Optional) Max number of requried assets. Default equal `Nmin`.
-- @param #table Attributes Generalized attribute(s).
-- @param #table Properties DCS attribute(s). Default `nil`.
-- @param #table Categories Group categories.
@@ -845,8 +848,8 @@ end
--- Define which assets will be transported and define the number and attributes/properties of the cargo carrier assets.
-- @param #CHIEF self
-- @param #CHIEF.Resource Resource Resource table.
-- @param #number Nmin Min number of required assets. Default 1.
-- @param #number Nmax Max number of requried assets. Default is equal to `Nmin`.
-- @param #number Nmin (Optional) Min number of required assets. Default 1.
-- @param #number Nmax (Optional) Max number of requried assets. Default is equal to `Nmin`.
-- @param #table CarrierAttributes Generalized attribute(s) of the carrier assets.
-- @param #table CarrierProperties DCS attribute(s) of the carrier assets.
-- @param #table CarrierCategories Group categories of the carrier assets.
@@ -884,12 +887,12 @@ end
--- Set number of assets requested for detected targets.
-- @param #CHIEF self
-- @param #number NassetsMin Min number of assets. Should be at least 1. Default 1.
-- @param #number NassetsMax Max number of assets. Default is same as `NassetsMin`.
-- @param #number ThreatLevel Only apply this setting if the target threat level is greater or equal this number. Default 0.
-- @param #number NassetsMin (Optional) Min number of assets. Should be at least 1. Default 1.
-- @param #number NassetsMax (Optional) Max number of assets. Default is same as `NassetsMin`.
-- @param #number ThreatLevel (Optional) Only apply this setting if the target threat level is greater or equal this number. Default 0.
-- @param #string TargetCategory Only apply this setting if the target is of this category, e.g. `TARGET.Category.AIRCRAFT`.
-- @param #string MissionType Only apply this setting for this mission type, e.g. `AUFTRAG.Type.INTERCEPT`.
-- @param #string Nunits Only apply this setting if the number of enemy units is greater or equal this number.
-- @param #string Nunits (Optional) Only apply this setting if the number of enemy units is greater or equal this number. Defaults to 1.
-- @param #string Defcon Only apply this setting if this defense condition is in place.
-- @param #string Strategy Only apply this setting if this strategy is in currently. place.
-- @return #CHIEF self
@@ -1038,8 +1041,8 @@ end
--- Set limit for number of total or specific missions to be executed simultaniously.
-- @param #CHIEF self
-- @param #number Limit Number of max. mission of this type. Default 10.
-- @param #string MissionType Type of mission, e.g. `AUFTRAG.Type.BAI`. Default `"Total"` for total number of missions.
-- @param #number Limit (Optional) Number of max. mission of this type. Default 10.
-- @param #string MissionType (Optional) Type of mission, e.g. `AUFTRAG.Type.BAI`. Default `"Total"` for total number of missions.
-- @return #CHIEF self
function CHIEF:SetLimitMission(Limit, MissionType)
self.commander:SetLimitMission(Limit, MissionType)
@@ -1065,7 +1068,7 @@ end
--- Set strategy.
-- @param #CHIEF self
-- @param #string Strategy Strategy. See @{#CHIEF.strategy}, e.g. `CHIEF.Strategy.DEFENSIVE` (default).
-- @param #string Strategy (Optional) Strategy. See @{#CHIEF.strategy}, e.g. `CHIEF.Strategy.DEFENSIVE` (default).
-- @return #CHIEF self
function CHIEF:SetStrategy(Strategy)
@@ -1295,8 +1298,8 @@ end
--
-- @param #CHIEF self
-- @param Ops.OpsZone#OPSZONE OpsZone OPS zone object.
-- @param #number Priority Priority. Default 50.
-- @param #number Importance Importance. Default `#nil`.
-- @param #number Priority (Optional) Priority. Default 50.
-- @param #number Importance (Optional) Importance. Default `#nil`.
-- @param #CHIEF.Resources ResourceOccupied (Optional) Resources used then zone is occupied by the enemy.
-- @param #CHIEF.Resources ResourceEmpty (Optional) Resources used then zone is empty.
-- @return #CHIEF.StrategicZone The strategic zone.
@@ -1393,7 +1396,7 @@ end
--- Remove strategically important zone. All runing missions are cancelled.
-- @param #CHIEF self
-- @param Ops.OpsZone#OPSZONE OpsZone OPS zone object.
-- @param #number Delay Delay in seconds before the zone is removed. Default immidiately.
-- @param #number Delay (Optional) Delay in seconds before the zone is removed. Default immidiately.
-- @return #CHIEF self
function CHIEF:RemoveStrategicZone(OpsZone, Delay)
@@ -1467,10 +1470,10 @@ end
--- Add a CAP zone. Flights will engage detected targets inside this zone.
-- @param #CHIEF self
-- @param Core.Zone#ZONE Zone CAP Zone. Has to be a circular zone.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading(Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @return Ops.Airwing#AIRWING.PatrolZone The CAP zone data.
function CHIEF:AddCapZone(Zone, Altitude, Speed, Heading, Leg)
@@ -1483,10 +1486,10 @@ end
--- Add a GCI CAP.
-- @param #CHIEF self
-- @param Core.Zone#ZONE Zone Zone, where the flight orbits.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading (Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @return Ops.Airwing#AIRWING.PatrolZone The CAP zone data.
function CHIEF:AddGciCapZone(Zone, Altitude, Speed, Heading, Leg)
@@ -1510,10 +1513,10 @@ end
--- Add an AWACS zone.
-- @param #CHIEF self
-- @param Core.Zone#ZONE Zone Zone.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading (Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @return Ops.Airwing#AIRWING.PatrolZone The AWACS zone data.
function CHIEF:AddAwacsZone(Zone, Altitude, Speed, Heading, Leg)
@@ -1537,10 +1540,10 @@ end
--- Add a refuelling tanker zone.
-- @param #CHIEF self
-- @param Core.Zone#ZONE Zone Zone.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading (Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @param #number RefuelSystem Refuelling system.
-- @return Ops.Airwing#AIRWING.TankerZone The tanker zone data.
function CHIEF:AddTankerZone(Zone, Altitude, Speed, Heading, Leg, RefuelSystem)
@@ -2463,9 +2466,9 @@ function CHIEF:CheckTargetQueue()
-- Debug info.
self:T2(self.lid..string.format("Recruiting assets for mission type %s [performance=%d] of target %s", mp.MissionType, mp.Performance, target:GetName()))
local minRange = self.LegionRecruitMinRange[target.category]
-- Recruit assets.
local recruited, assets, legions=self.commander:RecruitAssetsForTarget(target, mp.MissionType, NassetsMin, NassetsMax)
local recruited, assets, legions=self.commander:RecruitAssetsForTarget(target, mp.MissionType, NassetsMin, NassetsMax, minRange)
if recruited then
@@ -3367,6 +3370,15 @@ function CHIEF:CanMission(Mission)
return self.commander and self.commander:CanMission(Mission)
end
--- Exclude legion recruitment that are below a minimum range to target based on the target category.
--- Ex. Prevent intercepts from spawning too close to the target.
-- @param #CHIEF self
-- @param #string TargetCategory The target category.
-- @param #number MinRange Minimum range in meters.
function CHIEF:AddLegionRecruitMinRange(TargetCategory, MinRange)
self.LegionRecruitMinRange[TargetCategory] = MinRange
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+16 -16
View File
@@ -109,8 +109,8 @@ _COHORTNAMES={}
--- Create a new COHORT object and start the FSM.
-- @param #COHORT self
-- @param #string TemplateGroupName Name of the template group.
-- @param #number Ngroups Number of asset groups of this Cohort. Default 3.
-- @param #string CohortName Name of the cohort.
-- @param #number Ngroups (Optional) Number of asset groups of this Cohort. Default 3.
-- @param #string CohortName (Optional) Name of the cohort. Defaults to TemplateGroupName.
-- @return #COHORT self
function COHORT:New(TemplateGroupName, Ngroups, CohortName)
@@ -357,7 +357,7 @@ end
--- Set verbosity level.
-- @param #COHORT self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #COHORT self
function COHORT:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
@@ -366,8 +366,8 @@ end
--- Set turnover and repair time. If an asset returns from a mission, it will need some time until the asset is available for further missions.
-- @param #COHORT self
-- @param #number MaintenanceTime Time in minutes it takes until a flight is combat ready again. Default is 0 min.
-- @param #number RepairTime Time in minutes it takes to repair a flight for each life point taken. Default is 0 min.
-- @param #number MaintenanceTime (Optional) Time in minutes it takes until a flight is combat ready again. Default is 0 min.
-- @param #number RepairTime (Optional) Time in minutes it takes to repair a flight for each life point taken. Default is 0 min.
-- @return #COHORT self
function COHORT:SetTurnoverTime(MaintenanceTime, RepairTime)
self.maintenancetime=MaintenanceTime and MaintenanceTime*60 or 0
@@ -377,8 +377,8 @@ end
--- Set radio frequency and modulation the cohort uses.
-- @param #COHORT self
-- @param #number Frequency Radio frequency in MHz. Default 251 MHz.
-- @param #number Modulation Radio modulation. Default 0=AM.
-- @param #number Frequency (Optional) Radio frequency in MHz. Default 251 MHz.
-- @param #number Modulation (Optional) Radio modulation. Default 0=AM.
-- @return #COHORT self
function COHORT:SetRadio(Frequency, Modulation)
self.radioFreq=Frequency or 251
@@ -388,7 +388,7 @@ end
--- Set number of units in groups.
-- @param #COHORT self
-- @param #number nunits Number of units. Default 2.
-- @param #number nunits (Optional) Number of units. Default 2.
-- @return #COHORT self
function COHORT:SetGrouping(nunits)
self.ngrouping=nunits or 2
@@ -398,7 +398,7 @@ end
--- Set mission types this cohort is able to perform.
-- @param #COHORT self
-- @param #table MissionTypes Table of mission types. Can also be passed as a #string if only one type.
-- @param #number Performance Performance describing how good this mission can be performed. Higher is better. Default 50. Max 100.
-- @param #number Performance (Optional) Performance describing how good this mission can be performed. Higher is better. Default 50. Max 100.
-- @return #COHORT self
function COHORT:AddMissionCapability(MissionTypes, Performance)
@@ -505,7 +505,7 @@ end
--- Set max mission range. Only missions in a circle of this radius around the cohort base are executed.
-- @param #COHORT self
-- @param #number Range Range in NM. Default 150 NM.
-- @param #number Range (Optional) Range in NM. Default 150 NM.
-- @return #COHORT self
function COHORT:SetMissionRange(Range)
self.engageRange=UTILS.NMToMeters(Range or 150)
@@ -628,8 +628,8 @@ end
--- Remove assets from pool. Not that assets must not be spawned or already reserved or requested.
-- @param #COHORT self
-- @param #number N Number of assets to be removed. Default 1.
-- @param #number Delay Delay in seconds before assets are removed.
-- @param #number N (Optional) Number of assets to be removed. Default 1.
-- @param #number Delay (Optional) Delay in seconds before assets are removed. Defaults to 0.
-- @return #COHORT self
function COHORT:RemoveAssets(N, Delay)
self:T2(self.lid..string.format("Remove %d assets of Cohort", N))
@@ -818,9 +818,9 @@ end
--- Add a weapon range for ARTY missions (@{Ops.Auftrag#AUFTRAG}).
-- @param #COHORT self
-- @param #number RangeMin Minimum range in nautical miles. Default 0 NM.
-- @param #number RangeMax Maximum range in nautical miles. Default 10 NM.
-- @param #number BitType Bit mask of weapon type for which the given min/max ranges apply. Default is `ENUMS.WeaponFlag.Auto`, i.e. for all weapon types.
-- @param #number RangeMin (Optional) Minimum range in nautical miles. Default 0 NM.
-- @param #number RangeMax (Optional) Maximum range in nautical miles. Default 10 NM.
-- @param #number BitType (Optional) Bit mask of weapon type for which the given min/max ranges apply. Default is `ENUMS.WeaponFlag.Auto`, i.e. for all weapon types.
-- @return #COHORT self
function COHORT:AddWeaponRange(RangeMin, RangeMax, BitType)
@@ -1474,7 +1474,7 @@ function COHORT:_CheckAmmo()
-- Descriptors.
local Desc=weapon["desc"]
-- Warhead.
local Warhead=Desc["warhead"]
+27 -26
View File
@@ -389,7 +389,7 @@ end
--- Set verbosity level.
-- @param #COMMANDER self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #COMMANDER self
function COMMANDER:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
@@ -398,8 +398,8 @@ end
--- Set limit for number of total or specific missions to be executed simultaniously.
-- @param #COMMANDER self
-- @param #number Limit Number of max. mission of this type. Default 10.
-- @param #string MissionType Type of mission, e.g. `AUFTRAG.Type.BAI`. Default `"Total"` for total number of missions.
-- @param #number Limit (Optional) Number of max. mission of this type. Default 10.
-- @param #string MissionType (Optional) Type of mission, e.g. `AUFTRAG.Type.BAI`. Default `"Total"` for total number of missions.
-- @return #COMMANDER self
function COMMANDER:SetLimitMission(Limit, MissionType)
MissionType=MissionType or "Total"
@@ -664,10 +664,10 @@ end
--- Add a CAP zone.
-- @param #COMMANDER self
-- @param Core.Zone#ZONE Zone CapZone Zone.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading (Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @return Ops.Airwing#AIRWING.PatrolZone The CAP zone data.
function COMMANDER:AddCapZone(Zone, Altitude, Speed, Heading, Leg)
@@ -690,10 +690,10 @@ end
--- Add a GCICAP zone.
-- @param #COMMANDER self
-- @param Core.Zone#ZONE Zone CapZone Zone.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading (Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @return Ops.Airwing#AIRWING.PatrolZone The CAP zone data.
function COMMANDER:AddGciCapZone(Zone, Altitude, Speed, Heading, Leg)
@@ -736,10 +736,10 @@ end
--- Add an AWACS zone.
-- @param #COMMANDER self
-- @param Core.Zone#ZONE Zone Zone.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading (Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @return Ops.Airwing#AIRWING.PatrolZone The AWACS zone data.
function COMMANDER:AddAwacsZone(Zone, Altitude, Speed, Heading, Leg)
@@ -783,10 +783,10 @@ end
--- Add a refuelling tanker zone.
-- @param #COMMANDER self
-- @param Core.Zone#ZONE Zone Zone.
-- @param #number Altitude Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg Length of race-track in NM. Default 30 NM.
-- @param #number Altitude (Optional) Orbit altitude in feet. Default is 12,000 feet.
-- @param #number Speed (Optional) Orbit speed in KIAS. Default 350 kts.
-- @param #number Heading (Optional) Heading of race-track pattern in degrees. Default 270 (East to West).
-- @param #number Leg (Optional) Length of race-track in NM. Default 30 NM.
-- @param #number RefuelSystem Refuelling system.
-- @return Ops.Airwing#AIRWING.TankerZone The tanker zone data.
function COMMANDER:AddTankerZone(Zone, Altitude, Speed, Heading, Leg, RefuelSystem)
@@ -851,10 +851,10 @@ end
-- @param #COMMANDER self
-- @param Ops.Cohort#COHORT Cohort The cohort to be relocated.
-- @param Ops.Legion#LEGION Legion The legion where the cohort is relocated to.
-- @param #number Delay Delay in seconds before relocation takes place. Default `nil`, *i.e.* ASAP.
-- @param #number NcarriersMin Min number of transport carriers in case the troops should be transported. Default `nil` for no transport.
-- @param #number Delay (Optional) Delay in seconds before relocation takes place. Default `nil`, *i.e.* ASAP.
-- @param #number NcarriersMin (Optional) Min number of transport carriers in case the troops should be transported. Default `nil` for no transport.
-- @param #number NcarriersMax Max number of transport carriers.
-- @param #table TransportLegions Legion(s) assigned for transportation. Default is all legions of the commander.
-- @param #table TransportLegions (Optional) Legion(s) assigned for transportation. Default is all legions of the commander.
-- @return #COMMANDER self
function COMMANDER:RelocateCohort(Cohort, Legion, Delay, NcarriersMin, NcarriersMax, TransportLegions)
@@ -1620,7 +1620,7 @@ end
--- Set how many missions can be assigned in a single status iteration. (eg. This is useful for persistent missions where you need to load all AUFTRAGs on mission start and then change it back to default)
--- Warning: Increasing this value will increase the number of missions started per iteration and thus may lead to performance issues if too many missions are started at once.
-- @param #COMMANDER self
-- @param #number Number of missions assigned per status iteration. Default is 1.
-- @param #number MaxMissionsAssignPerCycle (Optional) Number of missions assigned per status iteration. Default is 1.
-- @return #COMMANDER self.
function COMMANDER:SetMaxMissionsAssignPerCycle(MaxMissionsAssignPerCycle)
self.maxMissionsAssignPerCycle = MaxMissionsAssignPerCycle or 1
@@ -1914,10 +1914,11 @@ end
-- @param #string MissionType Mission Type.
-- @param #number NassetsMin Min number of required assets.
-- @param #number NassetsMax Max number of required assets.
-- @param #number (optional) RangeMin Minimum range to target. (Default is 0, which means no minimum range)
-- @return #boolean If `true` enough assets could be recruited.
-- @return #table Assets that have been recruited from all legions.
-- @return #table Legions that have recruited assets.
function COMMANDER:RecruitAssetsForTarget(Target, MissionType, NassetsMin, NassetsMax)
function COMMANDER:RecruitAssetsForTarget(Target, MissionType, NassetsMin, NassetsMax, RangeMin)
-- Cohorts.
local Cohorts=self:_GetCohorts()
@@ -1926,7 +1927,7 @@ function COMMANDER:RecruitAssetsForTarget(Target, MissionType, NassetsMin, Nasse
local TargetVec2=Target:GetVec2()
-- Recruite assets.
local recruited, assets, legions=LEGION.RecruitCohortAssets(Cohorts, MissionType, nil, NassetsMin, NassetsMax, TargetVec2)
local recruited, assets, legions=LEGION.RecruitCohortAssets(Cohorts, MissionType, nil, NassetsMin, NassetsMax, TargetVec2, nil, nil, nil , nil, nil, nil, nil, nil, nil, nil, RangeMin)
return recruited, assets, legions
@@ -2229,7 +2230,7 @@ end
--- Get assets on given mission or missions.
-- @param #COMMANDER self
-- @param #table MissionTypes Types on mission to be checked. Default all.
-- @param #table MissionTypes (Optional) Types on mission to be checked. Default all.
-- @return #table Assets on pending requests.
function COMMANDER:GetAssetsOnMission(MissionTypes)
+12 -12
View File
@@ -408,7 +408,7 @@ end
--- Set Tanker and Scouts to be invisible to enemy AI eyes
-- @param #EASYA2G self
-- @param #boolean Switch Set to true or false, by default this is set to true already
-- @param #boolean Switch (Optional) Set to true or false, by default this is set to true already
-- @return #EASYA2G self
function EASYA2G:SetTankerAndScoutsInvisible(Switch)
self:T(self.lid.."SetTankerAndScoutsInvisible")
@@ -418,7 +418,7 @@ end
--- Set default A2G Speed in knots
-- @param #EASYA2G self
-- @param #number Speed Speed defaults to 300
-- @param #number Speed (Optional) Speed defaults to 300
-- @return #EASYA2G self
function EASYA2G:SetDefaultA2GSpeed(Speed)
self:T(self.lid.."SetDefaultSpeed")
@@ -428,7 +428,7 @@ end
--- Set A2G Flight formation.
-- @param #EASYA2G self
-- @param #number Formation Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group
-- @param #number Formation (Optional) Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group
-- @return #EASYA2G self
function EASYA2G:SetA2GFormation(Formation)
self:T(self.lid.."SetA2GFormation")
@@ -438,7 +438,7 @@ end
--- Set default A2G Altitude in feet
-- @param #EASYA2G self
-- @param #number Altitude Altitude defaults to 25000
-- @param #number Altitude (Optional) Altitude defaults to 25000
-- @return #EASYA2G self
function EASYA2G:SetDefaultA2GAlt(Altitude)
self:T(self.lid.."SetDefaultAltitude")
@@ -448,7 +448,7 @@ end
--- Set default A2G lieg initial direction in degrees
-- @param #EASYA2G self
-- @param #number Direction Direction defaults to 90 (East)
-- @param #number Direction (Optional) Direction defaults to 90 (East)
-- @return #EASYA2G self
function EASYA2G:SetDefaultA2GDirection(Direction)
self:T(self.lid.."SetDefaultDirection")
@@ -458,7 +458,7 @@ end
--- Set default leg length in NM
-- @param #EASYA2G self
-- @param #number Leg Leg defaults to 5
-- @param #number Leg (Optional) Leg defaults to 5
-- @return #EASYA2G self
function EASYA2G:SetDefaultA2GLeg(Leg)
self:T(self.lid.."SetDefaultLeg")
@@ -468,7 +468,7 @@ end
--- Set default grouping, i.e. how many airplanes per A2G point
-- @param #EASYA2G self
-- @param #number Grouping Grouping defaults to 2
-- @param #number Grouping (Optional) Grouping defaults to 2
-- @return #EASYA2G self
function EASYA2G:SetDefaultA2GGrouping(Grouping)
self:T(self.lid.."SetDefaultA2GGrouping")
@@ -489,7 +489,7 @@ end
--- Set which target types A2G flights will prefer to engage, defaults to {"Ground"}
-- @param #EASYA2G self
-- @param #table types Table of comma separated #string entries, defaults to {"Ground"} (everything that is ground and is not a weapon). Useful other options are e.g. {"Armored vehicles"}, {"Tanks"},
-- @param #table types (Optional) Table of comma separated #string entries, defaults to {"Ground"} (everything that is ground and is not a weapon). Useful other options are e.g. {"Armored vehicles"}, {"Tanks"},
-- or {"APC"} or combinations like {"APC", "Tanks", "Artillery"}. See [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes).
-- @return #EASYA2G self
function EASYA2G:SetA2GEngageTargetTypes(types)
@@ -501,10 +501,10 @@ end
-- @param #EASYA2G self
-- @param #string AirbaseName Name of the Wing's airbase
-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone).
-- @param #number Altitude Defaults to 25000 feet ASL.
-- @param #number Speed Defaults to 300 knots TAS.
-- @param #number Heading Defaults to 90 degrees (East).
-- @param #number LegLength Defaults to 15 NM.
-- @param #number Altitude (Optional) Defaults to 25000 feet ASL.
-- @param #number Speed (Optional) Defaults to 300 knots TAS.
-- @param #number Heading (Optional) Defaults to 90 degrees (East).
-- @param #number LegLength (Optional) Defaults to 15 NM.
-- @return #EASYA2G self
function EASYA2G:AddHoldingPointA2G(AirbaseName,Coordinate,Altitude,Speed,Heading,LegLength)
self:T(self.lid.."AddHoldingPointA2G")--..Coordinate:ToStringLLDDM())
+121 -51
View File
@@ -21,7 +21,7 @@
--
-------------------------------------------------------------------------
-- Date: September 2023
-- Last Update: Jan 2026
-- Last Update: June 2026
-------------------------------------------------------------------------
--
--- **Ops** - Easy GCI & CAP Manager
@@ -135,6 +135,7 @@
-- local mywing = EASYGCICAP:New("Blue CAP Operations",AIRBASE.Caucasus.Kutaisi,"blue","Blue EWR")
--
-- -- Add a CAP patrol point belonging to our airbase, we'll be at 30k ft doing 400 kn, initial direction 90 degrees (East), leg 20NM
-- -- NOTE - Skip this function and do not create CAP Points if you want GCI behaviour only.
-- mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone 1"):GetCoordinate(),30000,400,90,20)
--
-- -- Add a Squadron with template "Blue Sq1 M2000c", 20 airframes, skill good, Modex starting with 102 and skin "Vendee Jeanne"
@@ -190,9 +191,10 @@
-- * @{#EASYGCICAP.SetDefaultResurrection}: Set how many seconds the AirWing stays inoperable after the AirWing STATIC HQ ist destroyed, default 900 secs.
-- * @{#EASYGCICAP.SetDefaultCAPSpeed}: Set how many knots the CAP flights should do (will be altitude corrected), default 300 kn.
-- * @{#EASYGCICAP.SetDefaultCAPAlt}: Set at which altitude (ASL) the CAP planes will fly, default 25,000 ft.
-- * @{#EASYGCICAP.SetDefaultINTERCEPTAlt}: Set at which altitude (ASL) the Intercept planes will fly, default 25,000 ft.
-- * @{#EASYGCICAP.SetDefaultCAPDirection}: Set the initial direction from the CAP point the planes will fly in degrees, default is 90°.
-- * @{#EASYGCICAP.SetDefaultCAPLeg}: Set the length of the CAP leg, default is 15 NM.
-- * @{#EASYGCICAP.SetDefaultCAPGrouping}: Set how many planes will be spawned per mission (CVAP/GCI), defaults to 2.
-- * @{#EASYGCICAP.SetDefaultCAPGrouping}: Set how many planes will be spawned per mission (CAP/GCI), defaults to 2.
-- * @{#EASYGCICAP.SetDefaultMissionRange}: Set how many NM the planes can go from the home base, defaults to 100.
-- * @{#EASYGCICAP.SetDefaultNumberAlert5Standby}: Set how many planes will be spawned on cold standby (Alert5), default 2.
-- * @{#EASYGCICAP.SetDefaultEngageRange}: Set max engage range for CAP flights if they detect intruders, defaults to 50.
@@ -286,7 +288,7 @@ EASYGCICAP = {
--- EASYGCICAP class version.
-- @field #string version
EASYGCICAP.version="0.1.34"
EASYGCICAP.version="0.1.38"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--
@@ -355,6 +357,7 @@ function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)
-- From State --> Event --> To State
self:SetStartState("Stopped")
self:AddTransition("Stopped", "Start", "Running")
self:AddTransition("Stopped", "Restart", "Running")
self:AddTransition("Running", "Stop", "Stopped")
self:AddTransition("*", "Status", "*")
@@ -392,6 +395,20 @@ function EASYGCICAP:New(Alias, AirbaseName, Coalition, EWRName)
-- @param #string Event Event.
-- @param #string To To state.
--- On Before "Restart" event. Use `myinstance:Restart()` in case you Stopped the instance before and want to restart it now.
-- @function [parent=#EASYGCICAP] OnBeforeRestart
-- @param #EASYGCICAP self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
--- On After "Restart" event. Use `myinstance:Restart()` in case you Stopped the instance before and want to restart it now.
-- @function [parent=#EASYGCICAP] OnAfterRestart
-- @param #EASYGCICAP self
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
return self
end
@@ -447,7 +464,7 @@ end
--- Set "fuel low" threshold for CAP and INTERCEPT flights.
-- @param #EASYGCICAP self
-- @param #number Percent RTB if fuel at this percent. Values: 1..100, defaults to 25.
-- @param #number Percent (Optional) RTB if fuel at this percent. Values: 1..100, defaults to 25.
-- @return #EASYGCICAP self
function EASYGCICAP:SetFuelLow(Percent)
self:T(self.lid.."SetFuelLow")
@@ -470,7 +487,7 @@ end
--- Set "fuel critical" threshold for CAP and INTERCEPT flights.
-- @param #EASYGCICAP self
-- @param #number Percent RTB if fuel at this percent. Values: 1..100, defaults to 10.
-- @param #number Percent (Optional) RTB if fuel at this percent. Values: 1..100, defaults to 10.
-- @return #EASYGCICAP self
function EASYGCICAP:SetFuelCritical(Percent)
self:T(self.lid.."SetFuelCritical")
@@ -480,7 +497,7 @@ end
--- Set CAP formation.
-- @param #EASYGCICAP self
-- @param #number Formation Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group
-- @param #number Formation (Optional) Formation to fly, defaults to ENUMS.Formation.FixedWing.FingerFour.Group
-- @return #EASYGCICAP self
function EASYGCICAP:SetCAPFormation(Formation)
self:T(self.lid.."SetCAPFormation")
@@ -514,7 +531,7 @@ end
--- Set Maximum of alive missions created by this instance to stop airplanes spamming the map
-- @param #EASYGCICAP self
-- @param #number Maxiumum Maxmimum number of parallel missions allowed. Count is Intercept-Missions + Alert5-Missions, default is 8
-- @param #number Maxiumum (Optional) Maxmimum number of parallel missions allowed. Count is Intercept-Missions + Alert5-Missions, default is 8
-- @return #EASYGCICAP self
function EASYGCICAP:SetMaxAliveMissions(Maxiumum)
self:T(self.lid.."SetMaxAliveMissions")
@@ -524,7 +541,7 @@ end
--- Add default time to resurrect Airwing building if destroyed
-- @param #EASYGCICAP self
-- @param #number Seconds Seconds, defaults to 900
-- @param #number Seconds (Optional) Seconds, defaults to 900
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultResurrection(Seconds)
self:T(self.lid.."SetDefaultResurrection")
@@ -534,7 +551,7 @@ end
--- Add default repeat attempts if an Intruder intercepts fails.
-- @param #EASYGCICAP self
-- @param #number Retries Retries, defaults to 3
-- @param #number Retries (Optional) Retries, defaults to 3
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultRepeatOnFailure(Retries)
self:T(self.lid.."SetDefaultRepeatOnFailure")
@@ -544,7 +561,7 @@ end
--- Add default take off type for the airwings.
-- @param #EASYGCICAP self
-- @param #string Takeoff Can be "hot", "cold", or "air" - default is "hot".
-- @param #string Takeoff (Optional) Can be "hot", "cold", or "air" - default is "hot".
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultTakeOffType(Takeoff)
self:T(self.lid.."SetDefaultTakeOffType")
@@ -554,7 +571,7 @@ end
--- Set default CAP Speed in knots
-- @param #EASYGCICAP self
-- @param #number Speed Speed defaults to 300
-- @param #number Speed (Optional) Speed defaults to 300
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultCAPSpeed(Speed)
self:T(self.lid.."SetDefaultSpeed")
@@ -564,7 +581,7 @@ end
--- Set default CAP Altitude in feet
-- @param #EASYGCICAP self
-- @param #number Altitude Altitude defaults to 25000
-- @param #number Altitude (Optional) Altitude defaults to 25000
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultCAPAlt(Altitude)
self:T(self.lid.."SetDefaultAltitude")
@@ -572,9 +589,20 @@ function EASYGCICAP:SetDefaultCAPAlt(Altitude)
return self
end
--- Set default INTERCEPT Altitude in feet
-- @param #EASYGCICAP self
-- @param #number Altitude (Optional) Altitude defaults to 25000
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultINTERCEPTAlt(Altitude)
self:T(self.lid.."SetDefaultINTERCEPTAlt")
self.interceptalt = Altitude or 25000
return self
end
--
--- Set default CAP lieg initial direction in degrees
-- @param #EASYGCICAP self
-- @param #number Direction Direction defaults to 90 (East)
-- @param #number Direction (Optional) Direction defaults to 90 (East)
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultCAPDirection(Direction)
self:T(self.lid.."SetDefaultDirection")
@@ -584,7 +612,7 @@ end
--- Set default leg length in NM
-- @param #EASYGCICAP self
-- @param #number Leg Leg defaults to 15
-- @param #number Leg (Optional) Leg defaults to 15
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultCAPLeg(Leg)
self:T(self.lid.."SetDefaultLeg")
@@ -594,7 +622,7 @@ end
--- Set default grouping, i.e. how many airplanes per CAP point
-- @param #EASYGCICAP self
-- @param #number Grouping Grouping defaults to 2
-- @param #number Grouping (Optional) Grouping defaults to 2
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultCAPGrouping(Grouping)
self:T(self.lid.."SetDefaultCAPGrouping")
@@ -604,7 +632,7 @@ end
--- Set default range planes can fly from their homebase in NM
-- @param #EASYGCICAP self
-- @param #number Range Range defaults to 100 NM
-- @param #number Range (Optional) Range defaults to 100 NM
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultMissionRange(Range)
self:T(self.lid.."SetDefaultMissionRange")
@@ -614,8 +642,8 @@ end
--- Set default turnover times for squadrons in minutes
-- @param #EASYGCICAP self
-- @param #number MaintenanceTime Time in minutes it takes until a flight is combat ready again. Default is 5 min.
-- @param #number RepairTime Time in minutes it takes to repair a flight for each life point taken. Default is 10 min.
-- @param #number MaintenanceTime (Optional) Time in minutes it takes until a flight is combat ready again. Default is 5 min.
-- @param #number RepairTime (Optional) Time in minutes it takes to repair a flight for each life point taken. Default is 10 min.
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultTurnoverTime(MaintenanceTime,RepairTime)
self:T(self.lid.."SetDefaultTurnoverTime")
@@ -626,7 +654,7 @@ end
--- Set default number of airframes standing by for intercept tasks (visible on the airfield)
-- @param #EASYGCICAP self
-- @param #number Airframes defaults to 2
-- @param #number Airframes (Optional) defaults to 2
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultNumberAlert5Standby(Airframes)
self:T(self.lid.."SetDefaultNumberAlert5Standby")
@@ -636,7 +664,7 @@ end
--- Set default engage range for intruders detected by CAP flights in NM.
-- @param #EASYGCICAP self
-- @param #number Range defaults to 50NM
-- @param #number Range (Optional) defaults to 50NM
-- @return #EASYGCICAP self
function EASYGCICAP:SetDefaultEngageRange(Range)
self:T(self.lid.."SetDefaultEngageRange")
@@ -689,7 +717,7 @@ end
--- Set which target types CAP flights will prefer to engage, defaults to {"Air"}
-- @param #EASYGCICAP self
-- @param #table types Table of comma separated #string entries, defaults to {"Air"} (everything that flies and is not a weapon). Useful other options are e.g. {"Bombers"}, {"Fighters"},
-- @param #table types (Optional) Table of comma separated #string entries, defaults to {"Air"} (everything that flies and is not a weapon). Useful other options are e.g. {"Bombers"}, {"Fighters"},
-- or {"Helicopters"} or combinations like {"Bombers", "Fighters", "UAVs"}. See [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes).
-- @return #EASYGCICAP self
function EASYGCICAP:SetCAPEngageTargetTypes(types)
@@ -739,6 +767,15 @@ end
function EASYGCICAP:_AddAirwing(Airbasename, Alias)
self:T(self.lid.."_AddAirwing "..Airbasename)
-- Gather Some Stats
local function counttable(tbl)
local count = 0
for _,_data in pairs(tbl) do
count = count + 1
end
return count
end
local CapFormation = self.CapFormation
local DespawnAfterLanding = self.DespawnAfterLanding
local DespawnAfterHolding = self.DespawnAfterHolding
@@ -757,7 +794,11 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
CAP_Wing:SetMarker(false)
CAP_Wing:SetAirbase(AIRBASE:FindByName(Airbasename))
CAP_Wing:SetRespawnAfterDestroyed()
CAP_Wing:SetNumberCAP(self.capgrouping)
--- #DONE avoid wings with no CAP points starting CAP anyhow; AirWing uses this to start CAP and creates points when there are none.
if counttable(self.ManagedCP) >0 then
CAP_Wing:SetNumberCAP(self.capgrouping)
end
CAP_Wing:SetCapCloseRaceTrack(true)
if self.showpatrolpointmarks then
@@ -839,16 +880,18 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
end
if self.noalert5 > 0 then
local alert
if self.ClassName == "EASYGCICAP" then
alert = AUFTRAG:NewALERT5(AUFTRAG.Type.INTERCEPT)
elseif self.ClassName == "EASYA2G" then
alert = AUFTRAG:NewALERT5(AUFTRAG.Type.BAI)
for i=1,self.noalert5 do
local alert
if self.ClassName == "EASYGCICAP" then
alert = AUFTRAG:NewALERT5(AUFTRAG.Type.INTERCEPT)
elseif self.ClassName == "EASYA2G" then
alert = AUFTRAG:NewALERT5(AUFTRAG.Type.BAI)
end
alert:SetRequiredAssets(self.capgrouping)
alert:SetRepeat(99)
CAP_Wing:AddMission(alert)
table.insert(self.ListOfAuftrag,alert)
end
alert:SetRequiredAssets(self.noalert5)
alert:SetRepeat(99)
CAP_Wing:AddMission(alert)
table.insert(self.ListOfAuftrag,alert)
end
self.wings[Airbasename] = { CAP_Wing, AIRBASE:FindByName(Airbasename):GetZone(), Airbasename }
@@ -860,10 +903,10 @@ end
-- @param #EASYGCICAP self
-- @param #string AirbaseName Name of the Wing's airbase
-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone).
-- @param #number Altitude Defaults to 25000 feet ASL.
-- @param #number Speed Defaults to 300 knots TAS.
-- @param #number Heading Defaults to 90 degrees (East).
-- @param #number LegLength Defaults to 15 NM.
-- @param #number Altitude (Optional) Defaults to 25000 feet ASL.
-- @param #number Speed (Optional) Defaults to 300 knots TAS.
-- @param #number Heading (Optional) Defaults to 90 degrees (East).
-- @param #number LegLength(Optional) Defaults to 15 NM.
-- @return #EASYGCICAP self
function EASYGCICAP:AddPatrolPointCAP(AirbaseName,Coordinate,Altitude,Speed,Heading,LegLength)
self:T(self.lid.."AddPatrolPointCAP")--..Coordinate:ToStringLLDDM())
@@ -891,10 +934,10 @@ end
-- @param #EASYGCICAP self
-- @param #string AirbaseName Name of the Wing's airbase
-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone).
-- @param #number Altitude Defaults to 25000 feet.
-- @param #number Speed Defaults to 300 knots.
-- @param #number Heading Defaults to 90 degrees (East).
-- @param #number LegLength Defaults to 15 NM.
-- @param #number Altitude (Optional) Defaults to 25000 feet.
-- @param #number Speed (Optional) Defaults to 300 knots.
-- @param #number Heading (Optional) Defaults to 90 degrees (East).
-- @param #number LegLength (Optional) Defaults to 15 NM.
-- @return #EASYGCICAP self
function EASYGCICAP:AddPatrolPointRecon(AirbaseName,Coordinate,Altitude,Speed,Heading,LegLength)
self:T(self.lid.."AddPatrolPointRecon "..Coordinate:ToStringLLDDM())
@@ -916,10 +959,10 @@ end
-- @param #EASYGCICAP self
-- @param #string AirbaseName Name of the Wing's airbase
-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone).
-- @param #number Altitude Defaults to 25000 feet.
-- @param #number Speed Defaults to 300 knots.
-- @param #number Heading Defaults to 90 degrees (East).
-- @param #number LegLength Defaults to 15 NM.
-- @param #number Altitude (Optional) Defaults to 25000 feet.
-- @param #number Speed (Optional) Defaults to 300 knots.
-- @param #number Heading (Optional) Defaults to 90 degrees (East).
-- @param #number LegLength (Optional) Defaults to 15 NM.
-- @return #EASYGCICAP self
function EASYGCICAP:AddPatrolPointTanker(AirbaseName,Coordinate,Altitude,Speed,Heading,LegLength)
self:T(self.lid.."AddPatrolPointTanker "..Coordinate:ToStringLLDDM())
@@ -941,10 +984,10 @@ end
-- @param #EASYGCICAP self
-- @param #string AirbaseName Name of the Wing's airbase
-- @param Core.Point#COORDINATE Coordinate. Can be handed as a Core.Zone#ZONE object (e.g. in case you want the point to align with a moving zone).
-- @param #number Altitude Defaults to 25000 feet.
-- @param #number Speed Defaults to 300 knots.
-- @param #number Heading Defaults to 90 degrees (East).
-- @param #number LegLength Defaults to 15 NM.
-- @param #number Altitude (Optional) Defaults to 25000 feet.
-- @param #number Speed (Optional) Defaults to 300 knots.
-- @param #number Heading (Optional) Defaults to 90 degrees (East).
-- @param #number LegLength (Optional) Defaults to 15 NM.
-- @return #EASYGCICAP self
function EASYGCICAP:AddPatrolPointAwacs(AirbaseName,Coordinate,Altitude,Speed,Heading,LegLength)
self:T(self.lid.."AddPatrolPointAwacs "..Coordinate:ToStringLLDDM())
@@ -1022,7 +1065,7 @@ function EASYGCICAP:_SetCAPPatrolPoints()
MESSAGE:New(self.lid.."You are trying to create a CAP point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog()
return
end
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING
local Coordinate = data.Coordinate
local Altitude = data.Altitude
local Speed = data.Speed
@@ -1239,10 +1282,11 @@ function EASYGCICAP:_AddSquadron(TemplateName, SquadName, AirbaseName, AirFrames
Squadron_One:SetSkill(Skill or AI.Skill.AVERAGE)
Squadron_One:SetMissionRange(self.missionrange)
local wing = self.wings[AirbaseName][1] -- Ops.Airwing#AIRWING
local wing = self.wings[AirbaseName][1] -- Ops.AirWing#AIRWING
wing:AddSquadron(Squadron_One)
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.PATROLRACETRACK, AUFTRAG.Type.ALERT5},75)
--local countsquads = UTILS.TableLength(wing.cohorts)
wing:NewPayload(TemplateName,-1,{AUFTRAG.Type.CAP, AUFTRAG.Type.GCICAP, AUFTRAG.Type.INTERCEPT, AUFTRAG.Type.PATROLRACETRACK, AUFTRAG.Type.ALERT5},100)
return self
end
@@ -1487,6 +1531,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
local overhead = self.overhead
local capspeed = self.capspeed + 100
local capalt = self.capalt
local interalt = self.interceptalt or self.capalt
local maxsize = self.maxinterceptsize
local repeatsonfailure = self.repeatsonfailure
@@ -1574,6 +1619,7 @@ function EASYGCICAP:_AssignIntercept(Cluster)
:SetRepeatOnFailure(repeats)
:SetMissionSpeed(UTILS.KnotsToAltKIAS(capspeed,capalt))
:SetMissionAltitude(capalt)
:SetEngageAltitude(interalt)
if nogozoneset:Count() > 0 then
InterceptAuftrag:AddConditionSuccess(
@@ -1797,8 +1843,32 @@ end
function EASYGCICAP:onafterStop(From,Event,To)
self:T({From,Event,To})
self.Intel:Stop()
-- self.wings[Airbasename] = { CAP_Wing, AIRBASE:FindByName(Airbasename):GetZone(), Airbasename }
for _,_wing in pairs(self.wings or {}) do
_wing:Stop()
for _,_aw in pairs(_wing) do
_wing[1]:Stop()
end
end
return self
end
--- (Internal) FSM Function onafterRestart
-- @param #EASYGCICAP self
-- @param #string From
-- @param #string Event
-- @param #string To
-- @return #EASYGCICAP self
function EASYGCICAP:onafterRestart(From,Event,To)
self:T({From,Event,To})
if self:Is("Stopped") then
self.Intel:Start()
-- self.wings[Airbasename] = { CAP_Wing, AIRBASE:FindByName(Airbasename):GetZone(), Airbasename }
for _,_wing in pairs(self.wings or {}) do
for _,_aw in pairs(_wing) do
_wing[1]:Restart()
end
end
end
self:__Status(5)
return self
end
+62 -49
View File
@@ -359,13 +359,14 @@ FLIGHTCONTROL.version="0.7.7"
--- Create a new FLIGHTCONTROL class object for an associated airbase.
-- @param #FLIGHTCONTROL self
-- @param #string AirbaseName Name of the airbase.
-- @param #number Frequency Radio frequency in MHz. Default 143.00 MHz. Can also be given as a `#table` of multiple frequencies.
-- @param #number Modulation Radio modulation: 0=AM (default), 1=FM. See `radio.modulation.AM` and `radio.modulation.FM` enumerators. Can also be given as a `#table` of multiple modulations.
-- @param #string PathToSRS Path to the directory, where SRS is located.
-- @param #number Port Port of SRS Server, defaults to 5002
-- @param #string GoogleKey Path to the Google JSON-Key.
-- @param #number Frequency (Optional) Radio frequency in MHz. Default 143.00 MHz. Can also be given as a `#table` of multiple frequencies.
-- @param #number Modulation (Optional) Radio modulation: 0=AM (default), 1=FM. See `radio.modulation.AM` and `radio.modulation.FM` enumerators. Can also be given as a `#table` of multiple modulations.
-- @param #string PathToSRS (Optional) Path to the directory, where SRS is located.
-- @param #number Port (Optional) Port of SRS Server, defaults to 5002
-- @param #string GoogleKey (Optional) Path to the Google JSON-Key.
-- @param #string Provider (Optional) TTS Provider to be used.
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port, GoogleKey)
function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port, GoogleKey,Provider)
-- Inherit everything from FSM class.
local self=BASE:Inherit(self, FSM:New()) -- #FLIGHTCONTROL
@@ -436,6 +437,9 @@ function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port,
if GoogleKey then
self.msrsTower:SetProviderOptionsGoogle(GoogleKey,GoogleKey)
self.msrsTower:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
self.msrsTower:SetProvider(Provider)
end
self.msrsTower:SetCoordinate(self:GetCoordinate())
self:SetSRSTower()
@@ -446,6 +450,9 @@ function FLIGHTCONTROL:New(AirbaseName, Frequency, Modulation, PathToSRS, Port,
if GoogleKey then
self.msrsPilot:SetProviderOptionsGoogle(GoogleKey,GoogleKey)
self.msrsPilot:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
self.msrsPilot:SetProvider(Provider)
end
self.msrsTower:SetCoordinate(self:GetCoordinate())
self:SetSRSPilot()
@@ -570,7 +577,7 @@ end
--- Set verbosity level.
-- @param #FLIGHTCONTROL self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
@@ -620,8 +627,8 @@ end
--- Set the tower frequency.
-- @param #FLIGHTCONTROL self
-- @param #number Frequency Frequency in MHz. Default 305 MHz.
-- @param #number Modulation Modulation `radio.modulation.AM`=0, `radio.modulation.FM`=1. Default `radio.modulation.AM`.
-- @param #number Frequency (Optional) Frequency in MHz. Default 305 MHz.
-- @param #number Modulation (Optional) Modulation `radio.modulation.AM`=0, `radio.modulation.FM`=1. Default `radio.modulation.AM`.
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetFrequency(Frequency, Modulation)
@@ -643,7 +650,7 @@ end
--- Set the SRS server port.
-- @param #FLIGHTCONTROL self
-- @param #number Port Port to be used. Defaults to 5002.
-- @param #number Port (Optional) Port to be used. Defaults to 5002.
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetSRSPort(Port)
self.Port = Port or 5002
@@ -653,15 +660,16 @@ end
--- Set SRS options for a given MSRS object.
-- @param #FLIGHTCONTROL self
-- @param Sound.SRS#MSRS msrs Moose SRS object.
-- @param #string Gender Gender: "male" or "female" (default).
-- @param #string Culture Culture, e.g. "en-GB" (default).
-- @param #string Gender (Optional) Gender: "male" or "female" (default).
-- @param #string Culture (Optional) Culture, e.g. "en-GB" (default).
-- @param #string Voice Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Volume Volume. Default 1.0.
-- @param #number Volume (Optional) Volume. Default 1.0.
-- @param #string Label Name under which SRS transmits.
-- @param #string PathToGoogleCredentials Path to google credentials json file.
-- @param #number Port Server port for SRS
-- @param #string PathToGoogleCredentials (Optional) Path to google credentials json file.
-- @param #number Port (Optional) Server port for SRS. Defaults to 5002.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:_SetSRSOptions(msrs, Gender, Culture, Voice, Volume, Label, PathToGoogleCredentials, Port)
function FLIGHTCONTROL:_SetSRSOptions(msrs, Gender, Culture, Voice, Volume, Label, PathToGoogleCredentials, Port, Speaker)
-- Defaults:
Gender=Gender or "female"
@@ -672,6 +680,9 @@ function FLIGHTCONTROL:_SetSRSOptions(msrs, Gender, Culture, Voice, Volume, Labe
msrs:SetGender(Gender)
msrs:SetCulture(Culture)
msrs:SetVoice(Voice)
if Speaker then
msrs:SetSpeakerPiper(Speaker)
end
msrs:SetVolume(Volume)
msrs:SetLabel(Label)
msrs:SetCoalition(self:GetCoalition())
@@ -683,16 +694,17 @@ end
--- Set SRS options for tower voice.
-- @param #FLIGHTCONTROL self
-- @param #string Gender Gender: "male" or "female" (default).
-- @param #string Culture Culture, e.g. "en-GB" (default).
-- @param #string Gender (Optional) Gender: "male" or "female" (default).
-- @param #string Culture (Optional) Culture, e.g. "en-GB" (default).
-- @param #string Voice Specific voice. Overrides `Gender` and `Culture`. See [Google Voices](https://cloud.google.com/text-to-speech/docs/voices).
-- @param #number Volume Volume. Default 1.0.
-- @param #string Label Name under which SRS transmits. Default `self.alias`.
-- @param #number Volume (Optional) Volume. Default 1.0.
-- @param #string Label (Optional) Name under which SRS transmits. Default `self.alias`.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetSRSTower(Gender, Culture, Voice, Volume, Label)
function FLIGHTCONTROL:SetSRSTower(Gender, Culture, Voice, Volume, Label, Speaker)
if self.msrsTower then
self:_SetSRSOptions(self.msrsTower, Gender or "female", Culture or "en-GB", Voice, Volume, Label or self.alias)
self:_SetSRSOptions(self.msrsTower, Gender or "female", Culture or "en-GB", Voice, Volume, Label or self.alias,nil,nil,Speaker)
end
return self
@@ -700,16 +712,17 @@ end
--- Set SRS options for pilot voice.
-- @param #FLIGHTCONTROL self
-- @param #string Gender Gender: "male" (default) or "female".
-- @param #string Culture Culture, e.g. "en-US" (default).
-- @param #string Gender (Optional) Gender: "male" (default) or "female".
-- @param #string Culture (Optional) Culture, e.g. "en-US" (default).
-- @param #string Voice Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Volume Volume. Default 1.0.
-- @param #string Label Name under which SRS transmits. Default "Pilot".
-- @param #number Volume (Optional) Volume. Default 1.0.
-- @param #string Label (Optional) Name under which SRS transmits. Default "Pilot".
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetSRSPilot(Gender, Culture, Voice, Volume, Label)
function FLIGHTCONTROL:SetSRSPilot(Gender, Culture, Voice, Volume, Label, Speaker)
if self.msrsPilot then
self:_SetSRSOptions(self.msrsPilot, Gender or "male", Culture or "en-US", Voice, Volume, Label or "Pilot")
self:_SetSRSOptions(self.msrsPilot, Gender or "male", Culture or "en-US", Voice, Volume, Label or "Pilot",nil,nil,Speaker)
end
return self
@@ -726,8 +739,8 @@ end
-- in cases where simultaneous takeoffs and landings are unproblematic. Note that only because there are multiple runways, it does not mean the AI uses them.
--
-- @param #FLIGHTCONTROL self
-- @param #number Nlanding Max number of aircraft landing simultaneously. Default 2.
-- @param #number Ntakeoff Allowed number of aircraft taking off for groups to get landing clearance. Default 0.
-- @param #number Nlanding (Optional) Max number of aircraft landing simultaneously. Default 2.
-- @param #number Ntakeoff (Optional) Allowed number of aircraft taking off for groups to get landing clearance. Default 0.
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetLimitLanding(Nlanding, Ntakeoff)
@@ -740,7 +753,7 @@ end
--- Set time interval between landing clearance of groups.
-- @param #FLIGHTCONTROL self
-- @param #number dt Time interval in seconds. Default 180 sec (3 min).
-- @param #number dt (Optional) Time interval in seconds. Default 180 sec (3 min).
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetLandingInterval(dt)
@@ -763,9 +776,9 @@ end
-- NOTE that human players are *not* restricted as they should behave better (hopefully) than the AI.
--
-- @param #FLIGHTCONTROL self
-- @param #number Ntaxi Max number of groups allowed to taxi. Default 2.
-- @param #number Ntaxi (Optional) Max number of groups allowed to taxi. Default 2.
-- @param #boolean IncludeInbound If `true`, the above
-- @param #number Nlanding Max number of landing flights. Default 0.
-- @param #number Nlanding (Optional) Max number of landing flights. Default 0.
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetLimitTaxi(Ntaxi, IncludeInbound, Nlanding)
@@ -783,10 +796,10 @@ end
-- @param #FLIGHTCONTROL self
-- @param Core.Zone#ZONE ArrivalZone Zone where planes arrive.
-- @param #number Heading Heading in degrees.
-- @param #number Length Length in nautical miles. Default 15 NM.
-- @param #number FlightlevelMin Min flight level. Default 5.
-- @param #number FlightlevelMax Max flight level. Default 15.
-- @param #number Prio Priority. Lower is higher. Default 50.
-- @param #number Length (Optional) Length in nautical miles. Default 15 NM.
-- @param #number FlightlevelMin (Optional) Min flight level. Default 5.
-- @param #number FlightlevelMax (Optional) Max flight level. Default 15.
-- @param #number Prio (Optional) Priority. Lower is higher. Default 50.
-- @return #FLIGHTCONTROL.HoldingPattern Holding pattern table.
function FLIGHTCONTROL:AddHoldingPattern(ArrivalZone, Heading, Length, FlightlevelMin, FlightlevelMax, Prio)
@@ -946,7 +959,7 @@ end
-- Note that this is the time, the DCS engine uses not something we can control on a user level or we could get via scripting.
-- You need to input the value. On the DCS forum it was stated that this is currently one hour. Hence this is the default value.
-- @param #FLIGHTCONTROL self
-- @param #number RepairTime Time in seconds until the runway is repaired. Default 3600sec (one hour).
-- @param #number RepairTime (Optional) Time in seconds until the runway is repaired. Default 3600sec (one hour).
-- @return #FLIGHTCONTROL self
function FLIGHTCONTROL:SetRunwayRepairtime(RepairTime)
self.runwayrepairtime=RepairTime or 3600
@@ -2020,7 +2033,7 @@ end
-- @param #FLIGHTCONTROL self
-- @param #string Status Return only flights in this flightcontrol status, e.g. `FLIGHTCONTROL.Status.XXX`.
-- @param #string GroupStatus Return only flights in this FSM status, e.g. `OPSGROUP.GroupStatus.TAXIING`.
-- @param #boolean AI If `true` only AI flights are returned. If `false`, only flights with clients are returned. If `nil` (default), all flights are returned.
-- @param #boolean AI (Optional) If `true` only AI flights are returned. If `false`, only flights with clients are returned. If `nil` (default), all flights are returned.
-- @return #table Table of flights.
function FLIGHTCONTROL:GetFlights(Status, GroupStatus, AI)
@@ -2054,7 +2067,7 @@ end
-- @param #FLIGHTCONTROL self
-- @param #string Status Return only flights in this status.
-- @param #string GroupStatus Count only flights in this FSM status, e.g. `OPSGROUP.GroupStatus.TAXIING`.
-- @param #boolean AI If `true` only AI flights are counted. If `false`, only flights with clients are counted. If `nil` (default), all flights are counted.
-- @param #boolean AI (Optional) If `true` only AI flights are counted. If `false`, only flights with clients are counted. If `nil` (default), all flights are counted.
-- @return #number Number of flights.
function FLIGHTCONTROL:CountFlights(Status, GroupStatus, AI)
@@ -2101,7 +2114,7 @@ end
--- Get the name of the active runway.
-- @param #FLIGHTCONTROL self
-- @param #boolean Takeoff If true, return takeoff runway name. Default is landing.
-- @param #boolean Takeoff (Optional) If true, return takeoff runway name. Default is landing.
-- @return #string Runway text, e.g. "31L" or "09".
function FLIGHTCONTROL:GetActiveRunwayText(Takeoff)
@@ -2243,7 +2256,7 @@ end
--- Set parking spot to RESERVED and update F10 marker.
-- @param #FLIGHTCONTROL self
-- @param Wrapper.Airbase#AIRBASE.ParkingSpot spot The parking spot data table.
-- @param #string unitname Name of the unit occupying the spot. Default "unknown".
-- @param #string unitname (Optional) Name of the unit occupying the spot. Default "unknown".
function FLIGHTCONTROL:SetParkingReserved(spot, unitname)
-- Get spot.
@@ -2263,7 +2276,7 @@ end
--- Set parking spot to OCCUPIED and update F10 marker.
-- @param #FLIGHTCONTROL self
-- @param Wrapper.Airbase#AIRBASE.ParkingSpot spot The parking spot data table.
-- @param #string unitname Name of the unit occupying the spot. Default "unknown".
-- @param #string unitname (Optional) Name of the unit occupying the spot. Default "unknown".
function FLIGHTCONTROL:SetParkingOccupied(spot, unitname)
-- Get spot.
@@ -4351,7 +4364,7 @@ end
-- @param #FLIGHTCONTROL self
-- @param #string Text The text to transmit.
-- @param Ops.FlightGroup#FLIGHTGROUP Flight The flight.
-- @param #number Delay Delay in seconds before the text is transmitted. Default 0 sec.
-- @param #number Delay (Optional) Delay in seconds before the text is transmitted. Default 0 sec.
function FLIGHTCONTROL:TransmissionTower(Text, Flight, Delay)
if self.radioOnlyIfPlayers==true and self.Nplayers==0 then
@@ -4387,7 +4400,7 @@ end
-- @param #FLIGHTCONTROL self
-- @param #string Text The text to transmit.
-- @param Ops.FlightGroup#FLIGHTGROUP Flight The flight.
-- @param #number Delay Delay in seconds before the text is transmitted. Default 0 sec.
-- @param #number Delay (Optional) Delay in seconds before the text is transmitted. Default 0 sec.
function FLIGHTCONTROL:TransmissionPilot(Text, Flight, Delay)
if self.radioOnlyIfPlayers==true and self.Nplayers==0 then
@@ -4445,9 +4458,9 @@ end
-- @param #FLIGHTCONTROL self
-- @param #string Text The text to transmit.
-- @param Ops.FlightGroup#FLIGHTGROUP Flight The flight.
-- @param #number Duration Duration in seconds. Default 5.
-- @param #number Duration (Optional) Duration in seconds. Default 5.
-- @param #boolean Clear Clear screen.
-- @param #number Delay Delay in seconds before the text is transmitted. Default 0 sec.
-- @param #number Delay (Optional) Delay in seconds before the text is transmitted. Default 0 sec.
function FLIGHTCONTROL:TextMessageToFlight(Text, Flight, Duration, Clear, Delay)
if Delay and Delay>0 then
@@ -4591,8 +4604,8 @@ end
--- [User] Set callsign options for TTS output. See @{Wrapper.Group#GROUP.GetCustomCallSign}() on how to set customized callsigns.
-- @param #FLIGHTCONTROL self
-- @param #boolean ShortCallsign If true, only call out the major flight number. Default = `true`.
-- @param #boolean Keepnumber If true, keep the **customized callsign** in the #GROUP name for players as-is, no amendments or numbers. Default = `true`.
-- @param #boolean ShortCallsign (Optional) If true, only call out the major flight number. Default = `true`.
-- @param #boolean Keepnumber (Optional) If true, keep the **customized callsign** in the #GROUP name for players as-is, no amendments or numbers. Default = `true`.
-- @param #table CallsignTranslations (optional) Table to translate between DCS standard callsigns and bespoke ones. Does not apply if using customized
-- callsigns from playername or group name.
-- @return #FLIGHTCONTROL self
+43 -41
View File
@@ -217,7 +217,7 @@ FLIGHTGROUP.Players={}
--- FLIGHTGROUP class version.
-- @field #string version
FLIGHTGROUP.version="1.0.3"
FLIGHTGROUP.version="1.0.4"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -837,7 +837,7 @@ end
--- Set if group is ready for taxi/takeoff if controlled by a `FLIGHTCONTROL`.
-- @param #FLIGHTGROUP self
-- @param #boolean ReadyTO If `true`, flight is ready for takeoff.
-- @param #number Delay Delay in seconds before value is set. Default 0 sec.
-- @param #number Delay (Optional) Delay in seconds before value is set. Default 0 sec.
-- @return #FLIGHTGROUP self
function FLIGHTGROUP:SetReadyForTakeoff(ReadyTO, Delay)
if Delay and Delay>0 then
@@ -922,7 +922,7 @@ end
--- Set low fuel threshold. Triggers event "FuelLow" and calls event function "OnAfterFuelLow".
-- @param #FLIGHTGROUP self
-- @param #number threshold Fuel threshold in percent. Default 25 %.
-- @param #number threshold (Optional) Fuel threshold in percent. Default 25 %.
-- @return #FLIGHTGROUP self
function FLIGHTGROUP:SetFuelLowThreshold(threshold)
self.fuellowthresh=threshold or 25
@@ -983,7 +983,7 @@ end
--- Set fuel critical threshold. Triggers event "FuelCritical" and event function "OnAfterFuelCritical".
-- @param #FLIGHTGROUP self
-- @param #number threshold Fuel threshold in percent. Default 10 %.
-- @param #number threshold (Optional) Fuel threshold in percent. Default 10 %.
-- @return #FLIGHTGROUP self
function FLIGHTGROUP:SetFuelCriticalThreshold(threshold)
self.fuelcriticalthresh=threshold or 10
@@ -1354,8 +1354,10 @@ function FLIGHTGROUP:Status()
-- If mission, check if DCS task needs to be updated.
if mission and mission.updateDCSTask then
local mtype=mission:GetType()
-- Orbit missions might need updates.
if (mission:GetType()==AUFTRAG.Type.ORBIT or mission:GetType()==AUFTRAG.Type.RECOVERYTANKER or mission:GetType()==AUFTRAG.Type.CAP) and mission.orbitVec2 then
if (mtype==AUFTRAG.Type.ORBIT or mtype==AUFTRAG.Type.RECOVERYTANKER or mtype==AUFTRAG.Type.CAP or mtype==AUFTRAG.Type.AWACS) and mission.orbitVec2 then
-- Get 2D vector of orbit target.
local vec2=mission:GetTargetVec2()
@@ -2629,8 +2631,8 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #number n Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
-- @param #number n (Optional) Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N(Optional) Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
-- @return #boolean Transision allowed?
function FLIGHTGROUP:onbeforeUpdateRoute(From, Event, To, n, N)
@@ -2752,8 +2754,8 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #number n Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
-- @param #number n (Optional) Next waypoint index. Default is the one coming after that one that has been passed last.
-- @param #number N (Optional) Waypoint Max waypoint index to be included in the route. Default is the final waypoint.
function FLIGHTGROUP:onafterUpdateRoute(From, Event, To, n, N)
-- Update route from this waypoint number onwards.
@@ -2782,7 +2784,7 @@ function FLIGHTGROUP:onafterUpdateRoute(From, Event, To, n, N)
-- Set current waypoint or we get problem that the _PassingWaypoint function is triggered too early, i.e. right now and not when passing the next WP.
local current=self:GetCoordinate():WaypointAir(COORDINATE.WaypointAltType.BARO, waypointType, waypointAction, speed, true, nil, {}, "Current")
table.insert(wp, current)
-- Add remaining waypoints to route.
for i=n, N do
table.insert(wp, self.waypoints[i])
@@ -3100,9 +3102,9 @@ end
-- @param #string Event Event.
-- @param #string To To state.
-- @param Wrapper.Airbase#AIRBASE airbase The airbase to hold at.
-- @param #number SpeedTo Speed used for traveling from current position to holding point in knots. Default 75% of max speed.
-- @param #number SpeedHold Holding speed in knots. Default 250 kts.
-- @param #number SpeedLand Landing speed in knots. Default 170 kts.
-- @param #number SpeedTo (Optional) Speed used for traveling from current position to holding point in knots. Default 75% of max speed.
-- @param #number SpeedHold (Optional) Holding speed in knots. Default 250 kts.
-- @param #number SpeedLand (Optional) Landing speed in knots. Default 170 kts.
function FLIGHTGROUP:onafterRTB(From, Event, To, airbase, SpeedTo, SpeedHold, SpeedLand)
-- Debug info.
@@ -3195,9 +3197,9 @@ end
--- Land at an airbase.
-- @param #FLIGHTGROUP self
-- @param Wrapper.Airbase#AIRBASE airbase Airbase where the group shall land.
-- @param #number SpeedTo Speed used for travelling from current position to holding point in knots.
-- @param #number SpeedHold Holding speed in knots.
-- @param #number SpeedLand Landing speed in knots. Default 170 kts.
-- @param #number (Optional) SpeedTo Speed used for travelling from current position to holding point in knots. Defaults to speedCruise.
-- @param #number (Optional) SpeedHold Holding speed in knots. Defaults to 250kts.
-- @param #number (Optional) SpeedLand Landing speed in knots. Default 170 kts.
function FLIGHTGROUP:_LandAtAirbase(airbase, SpeedTo, SpeedHold, SpeedLand)
-- Set current airbase.
@@ -3381,9 +3383,9 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #number Duration Duration how long the group will be waiting in seconds. Default `nil` (=forever).
-- @param #number Altitude Altitude in feet. Default 10,000 ft for airplanes and 1,000 feet for helos.
-- @param #number Speed Speed in knots. Default 250 kts for airplanes and 20 kts for helos.
-- @param #number Duration (Optional) Duration how long the group will be waiting in seconds. Default `nil` (=forever).
-- @param #number Altitude (Optional) Altitude in feet. Default 10,000 ft for airplanes and 1,000 feet for helos.
-- @param #number Speed (Optional) Speed in knots. Default 250 kts for airplanes and 20 kts for helos.
function FLIGHTGROUP:onbeforeWait(From, Event, To, Duration, Altitude, Speed)
local allowed=true
@@ -3417,9 +3419,9 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #number Duration Duration how long the group will be waiting in seconds. Default `nil` (=forever).
-- @param #number Altitude Altitude in feet. Default 10,000 ft for airplanes and 1,000 feet for helos.
-- @param #number Speed Speed in knots. Default 250 kts for airplanes and 20 kts for helos.
-- @param #number Duration (Optional) Duration how long the group will be waiting in seconds. Default `nil` (=forever).
-- @param #number Altitude (Optional) Altitude in feet. Default 10,000 ft for airplanes and 1,000 feet for helos.
-- @param #number Speed (Optional) Speed in knots. Default 250 kts for airplanes and 20 kts for helos.
function FLIGHTGROUP:onafterWait(From, Event, To, Duration, Altitude, Speed)
-- Group will orbit at its current position.
@@ -3696,8 +3698,8 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Core.Point#COORDINATE Coordinate The coordinate where to land. Default is current position.
-- @param #number Duration The duration in seconds to remain on ground. Default 600 sec (10 min).
-- @param Core.Point#COORDINATE (Optional) Coordinate The coordinate where to land. Default is current position.
-- @param #number Duration (Optional) The duration in seconds to remain on ground. Default 600 sec (10 min).
function FLIGHTGROUP:onbeforeLandAt(From, Event, To, Coordinate, Duration)
return self.isHelo
end
@@ -3707,8 +3709,8 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param Core.Point#COORDINATE Coordinate The coordinate where to land. Default is current position.
-- @param #number Duration The duration in seconds to remain on ground. Default `nil` = forever.
-- @param Core.Point#COORDINATE (Optional) Coordinate The coordinate where to land. Default is current position.
-- @param #number Duration (Optional) The duration in seconds to remain on ground. Default `nil` = forever.
function FLIGHTGROUP:onafterLandAt(From, Event, To, Coordinate, Duration)
-- Duration.
@@ -3879,8 +3881,8 @@ end
--- Initialize group parameters. Also initializes waypoints if self.waypoints is nil.
-- @param #FLIGHTGROUP self
-- @param #table Template Template used to init the group. Default is `self.template`.
-- @param #number Delay Delay in seconds before group is initialized. Default `nil`, *i.e.* instantaneous.
-- @param #table Template (Optional) Template used to init the group. Default is `self.template`.
-- @param #number Delay (Optional) Delay in seconds before group is initialized. Default `nil`, *i.e.* instantaneous.
-- @return #FLIGHTGROUP self
function FLIGHTGROUP:_InitGroup(Template, Delay)
@@ -4040,7 +4042,7 @@ end
--- Find the nearest friendly airbase (same or neutral coalition).
-- @param #FLIGHTGROUP self
-- @param #number Radius Search radius in NM. Default 50 NM.
-- @param #number Radius (Optional) Search radius in NM. Default 50 NM.
-- @return Wrapper.Airbase#AIRBASE Closest tanker group #nil.
function FLIGHTGROUP:FindNearestAirbase(Radius)
@@ -4075,7 +4077,7 @@ end
--- Find the nearest tanker.
-- @param #FLIGHTGROUP self
-- @param #number Radius Search radius in NM. Default 50 NM.
-- @param #number Radius (Optional) Search radius in NM. Default 50 NM.
-- @return Wrapper.Group#GROUP Closest tanker group or `nil` if no tanker is in the given radius.
function FLIGHTGROUP:FindNearestTanker(Radius)
@@ -4226,7 +4228,7 @@ end
--- Check if the final waypoint is in the air.
-- @param #FLIGHTGROUP self
-- @param #table wp Waypoint. Default final waypoint.
-- @param #table wp (Optional) Waypoint. Default final waypoint.
-- @return #boolean If `true` final waypoint is a turning or flyover but not a landing type waypoint.
function FLIGHTGROUP:IsLandingAir(wp)
@@ -4247,7 +4249,7 @@ end
--- Check if the final waypoint is at an airbase.
-- @param #FLIGHTGROUP self
-- @param #table wp Waypoint. Default final waypoint.
-- @param #table wp (Optional) Waypoint. Default final waypoint.
-- @return #boolean If `true`, final waypoint is a landing waypoint at an airbase.
function FLIGHTGROUP:IsLandingAirbase(wp)
@@ -4270,10 +4272,10 @@ end
--- Add an AIR waypoint to the flight plan.
-- @param #FLIGHTGROUP self
-- @param Core.Point#COORDINATE Coordinate The coordinate of the waypoint. Use COORDINATE:SetAltitude(altitude) to define the altitude.
-- @param #number Speed Speed in knots. Default is cruise speed.
-- @param #number AfterWaypointWithID Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #number Altitude Altitude in feet. Default is y-component of Coordinate. Note that these altitudes are wrt to sea level (barometric altitude).
-- @param #boolean Updateroute If true or nil, call UpdateRoute. If false, no call.
-- @param #number Speed (Optional) Speed in knots. Default is cruise speed.
-- @param #number AfterWaypointWithID (Optional) Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #number Altitude (Optional) Altitude in feet. Default is y-component of Coordinate. Note that these altitudes are wrt to sea level (barometric altitude).
-- @param #boolean Updateroute (Optional) If true or nil, call UpdateRoute. If false, no call.
-- @return Ops.OpsGroup#OPSGROUP.Waypoint Waypoint table.
function FLIGHTGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Altitude, Updateroute)
@@ -4323,10 +4325,10 @@ end
--- Add an LANDING waypoint to the flight plan.
-- @param #FLIGHTGROUP self
-- @param Wrapper.Airbase#AIRBASE Airbase The airbase where the group should land.
-- @param #number Speed Speed in knots. Default 350 kts.
-- @param #number AfterWaypointWithID Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #number Altitude Altitude in feet. Default is y-component of Coordinate. Note that these altitudes are wrt to sea level (barometric altitude).
-- @param #boolean Updateroute If true or nil, call UpdateRoute. If false, no call.
-- @param #number Speed (Optional) Speed in knots. Default 350 kts.
-- @param #number AfterWaypointWithID (Optional) Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #number Altitude (Optional) Altitude in feet. Default is y-component of Coordinate. Note that these altitudes are wrt to sea level (barometric altitude).
-- @param #boolean Updateroute (Optional) If true or nil, call UpdateRoute. If false, no call.
-- @return Ops.OpsGroup#OPSGROUP.Waypoint Waypoint table.
function FLIGHTGROUP:AddWaypointLanding(Airbase, Speed, AfterWaypointWithID, Altitude, Updateroute)
@@ -4541,7 +4543,7 @@ end
--- Returns the parking spot of the element.
-- @param #FLIGHTGROUP self
-- @param Ops.OpsGroup#OPSGROUP.Element element Element of the flight group.
-- @param #number maxdist Distance threshold in meters. Default 5 m.
-- @param #number maxdist (Optional) Distance threshold in meters. Default 5 m.
-- @param Wrapper.Airbase#AIRBASE airbase (Optional) The airbase to check for parking. Default is closest airbase to the element.
-- @return Wrapper.Airbase#AIRBASE.ParkingSpot Parking spot or nil if no spot is within distance threshold.
function FLIGHTGROUP:GetParkingSpot(element, maxdist, airbase)
+1 -1
View File
@@ -56,7 +56,7 @@ FLOTILLA.version="0.1.0"
--- Create a new FLOTILLA object and start the FSM.
-- @param #FLOTILLA self
-- @param #string TemplateGroupName Name of the template group.
-- @param #number Ngroups Number of asset groups of this flotilla. Default 3.
-- @param #number Ngroups (Optional) Number of asset groups of this flotilla. Default 3.
-- @param #string FlotillaName Name of the flotilla. Must be **unique**!
-- @return #FLOTILLA self
function FLOTILLA:New(TemplateGroupName, Ngroups, FlotillaName)
+411 -19
View File
@@ -111,6 +111,12 @@ INTEL = {
DetectAccoustic = false,
DetectAccousticRadius = 1000,
DetectAccousticUnitTypes = {Unit.Category.HELICOPTER},
DopplerRadar = false,
DopplerMinAltAGL = 500,
DopplerNotchSin = math.sin(math.rad(15)),
DopplerMinSpeedMps = 50,
DopplerRCS = true,
DopplerRadarRangeM = 200 * 1000,
}
--- Detected item info.
@@ -171,6 +177,161 @@ INTEL.Ctype={
-- @field #string version
INTEL.version="0.3.10"
---
-- ══════════════════════════════════════════════════════════════════
-- INTEL Doppler radar extension
--
-- Models four phenomena of a 1970/80s pulse-Doppler ground radar
-- (representative types: Soviet P-18 Spoon Rest, P-37 Bar Lock,
-- P-80 Back Net / NATO AN/TPS-43 / Hughes AN/TPS-70):
--
-- A) GROUND CLUTTER (AGL threshold)
-- Low-flying targets blend into terrain returns. Below DopplerMinAltAGL
-- detection probability drops linearly to 0 at 0 m AGL.
--
-- B) VELOCITY NOTCH (beam aspect)
-- The MTI (Moving Target Indicator) filter suppresses returns with
-- near-zero Doppler shift. Targets flying perpendicular to the radar
-- beam (radial-velocity fraction < sin(NotchHalfDeg)) are rejected.
-- Classic P-18/P-37 notch was ≈ ±1218° around 90° aspect.
--
-- C) MINIMUM SPEED GATE
-- Very slow targets (taxiing aircraft, hovering) cannot be separated
-- from ground clutter by their Doppler shift alone.
--
-- D) RADAR CROSS SECTION (RCS)
-- Larger targets are detectable at longer ranges. The radar range
-- equation gives R_max ∝ σ^0.25, so detection range is scaled by
-- (σ / σ_ref)^0.25 relative to a reference aircraft (default: 5 m²).
-- RCS also varies with aspect: nose-on ≈ 15% of side-on value.
-- Known DCS aircraft values are stored in INTEL.RCS_Table; unknowns
-- fall back to a category default (fighter/bomber/helicopter).
-- Values are approximate averages from public IISS/Jane's data.
-- ══════════════════════════════════════════════════════════════════
--
-- ── RCS lookup table (nominal side-on RCS in m²) ─────────────────
-- Frontal (nose-on / tail-on) RCS is modelled as 15% of these values
-- via aspect interpolation in _GetAspectRCS().
-- Sources: public declassified estimates, Jane's, IISS assessments.
--- @field INTEL.RCS_Table
INTEL.RCS_Table = {
-- ── US / NATO fixed-wing ──────────────────────────────────────
["A-10C"] = 8.0, -- large, flat surfaces, no LO shaping
["A-10C_2"] = 8.0,
["F-14A-135-GR"] = 6.0, -- variable-sweep; larger than F-16
["F-14B"] = 6.0,
["F-15C"] = 5.0,
["F-15E"] = 5.0, -- CFTs add modest signature
["F-15ESE"] = 5.0,
["F-16A"] = 1.2,
["F-16C bl.50"] = 1.2,
["F-16C bl.52d"] = 1.2,
["F/A-18C"] = 1.5,
["FA-18C_hornet"] = 1.5,
["F/A-18C_hornet"] = 1.5,
["F/A-18F"] = 2.0, -- slightly larger two-seater
["F-117A"] = 0.003, -- faceted LO design
["F-22A"] = 0.0001,-- VLO
["F-35A"] = 0.001, -- VLO, approx
["B-52H"] = 100.0, -- very large, many flat reflectors
["B-1B"] = 0.75, -- blended-wing LO shaping
["B-2A"] = 0.001, -- VLO flying wing
["AV8BNA"] = 2.0,
["Harrier"] = 2.0,
["A-4E-C"] = 3.0,
["Tornado_IDS"] = 5.0,
["Tornado_GR4"] = 5.0,
["F-111F"] = 5.0,
["F-4E"] = 6.0, -- large, blunt nose
["F-5E"] = 1.0, -- small fighter
["F-5E-3"] = 1.0,
["Mirage-F1CE"] = 2.5,
["Mirage-F1EE"] = 2.5,
["M-2000C"] = 2.0,
["M-2000-5"] = 2.0,
["C-17A"] = 50.0,
["C-130"] = 40.0,
["KC-130"] = 40.0,
["KC-135"] = 50.0,
["IL-76MD"] = 45.0,
["E-3A"] = 50.0, -- plus large rotodome
-- ── Soviet / Russian fixed-wing ──────────────────────────────
["MiG-15bis"] = 4.0,
["MiG-19P"] = 3.5,
["MiG-21Bis"] = 2.5, -- small delta
["MiG-23MLD"] = 7.0, -- variable-sweep, large intakes
["MiG-25PD"] = 14.0, -- very large, all-metal, Mach-3 design
["MiG-25RBT"] = 14.0,
["MiG-29A"] = 5.0,
["MiG-29S"] = 5.0,
["MiG-29G"] = 5.0,
["MiG-29K"] = 4.0,
["MiG-31"] = 14.0, -- similar to MiG-25
["Su-7B"] = 6.0,
["Su-17M4"] = 7.0, -- variable-sweep
["Su-24M"] = 6.0,
["Su-24MR"] = 6.0,
["Su-25"] = 10.0,
["Su-25T"] = 10.0,
["Su-25TM"] = 10.0,
["Su-27"] = 15.0,
["Su-30"] = 15.0,
["Su-33"] = 15.0, -- wing fold + canards
["Su-34"] = 10.0, -- some reduction vs Su-27
["Su-57"] = 0.01, -- PAK-FA LO shaping
["Tu-22M3"] = 20.0,
["Tu-95MS"] = 80.0,
["Tu-142"] = 80.0,
["Tu-160"] = 12.0, -- blended wing reduces vs Tu-95
["An-26B"] = 30.0,
["An-30M"] = 30.0,
["IL-78M"] = 45.0,
["A-50"] = 50.0, -- plus rotodome
-- ── Helicopters ──────────────────────────────────────────────
["Mi-8MT"] = 5.0,
["Mi-8MSB"] = 5.0,
["Mi-8MSB-V"] = 5.0,
["Mi-8AMTSh"] = 5.0,
["Mi-24V"] = 3.5,
["Mi-24P"] = 3.5,
["Mi-28N"] = 2.5,
["Ka-50"] = 2.0,
["Ka-52"] = 2.0,
["AH-64D"] = 3.5,
["AH-64D_BLK_II"] = 3.5,
["UH-1H"] = 3.0,
["UH-60L"] = 3.0,
["CH-47D"] = 8.0, -- large tandem-rotor
["OH-58D"] = 0.8, -- small scout
["SA342M"] = 0.8,
["SA342L"] = 0.8,
}
---
-- Category-based defaults for aircraft types not in the table.
-- Keyed by DCS Group.Category integer.
--- @type INTEL.RCS_CategoryDefault
-- @field #number Group.Category.AIRPLANE RCS Airplane (fightrt) fallback == 5
-- @field #number Group.Category.HELICOPTER RCS Helo fallback == 2.5
INTEL.RCS_CategoryDefault = {
[Group.Category.AIRPLANE] = 5.0, -- generic fighter-sized
[Group.Category.HELICOPTER] = 2.5, -- generic helicopter
}
---
-- Reference RCS (m²) for range scaling. Detection range in Set
-- is the range at which this reference aircraft is reliably detected.
-- @field INTEL.RCS_Reference
INTEL.RCS_Reference = 5.0 -- m²
---
-- Nose-on/tail-on RCS as a fraction of the side-on value.
-- Public estimates for conventional (non-LO) aircraft: ~0.100.20.
-- @field INTEL.RCS_NoseOnFraction
INTEL.RCS_NoseOnFraction = 0.15
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- ToDo list
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -278,6 +439,7 @@ function INTEL:New(DetectionSet, Coalition, Alias)
self:SetRejectZones()
self:SetCorridorZones()
self:SetConflictZones()
self.DopplerRadar = false
------------------------
--- Pseudo Functions ---
@@ -411,8 +573,8 @@ end
--- Set to accept accoustic detection.
-- @param #INTEL self
-- @param #number Radius Radius in which we can "hear" units. Defaults to 1000 meters.
-- @param #table UnitCategories Set what Unit Categories we can "hear". Defaults to `{Unit.Category.GROUND_UNIT,Unit.Category.HELICOPTER}`
-- @param #number Radius (Optional) Radius in which we can "hear" units. Defaults to 1000 meters.
-- @param #table UnitCategories(Optional) Set what Unit Categories we can "hear". Defaults to `{Unit.Category.GROUND_UNIT,Unit.Category.HELICOPTER}`
-- @return #INTEL self
function INTEL:SetAccousticDetectionOn(Radius,UnitCategories)
self.DetectAccoustic = true
@@ -572,7 +734,7 @@ end
-- Previously known contacts that are not detected any more, are "lost" after this time.
-- This avoids fast oscillations between a contact being detected and undetected.
-- @param #INTEL self
-- @param #number TimeInterval Time interval in seconds. Default is 120 sec.
-- @param #number TimeInterval (Optional) Time interval in seconds. Default is 120 sec.
-- @return #INTEL self
function INTEL:SetForgetTime(TimeInterval)
return self
@@ -607,10 +769,10 @@ end
--- Method to make the radar detection less accurate, e.g. for WWII scenarios.
-- @param #INTEL self
-- @param #number minheight Minimum flight height to be detected, in meters AGL (above ground)
-- @param #number thresheight Threshold to escape the radar if flying below minheight, defaults to 90 (90% escape chance)
-- @param #number thresblur Threshold to be detected by the radar overall, defaults to 85 (85% chance to be found)
-- @param #number closing Closing-in in km - the limit of km from which on it becomes increasingly difficult to escape radar detection if flying towards the radar position. Should be about 1/3 of the radar detection radius in kilometers, defaults to 20.
-- @param #number minheight (Optional) Minimum flight height to be detected, in meters AGL (above ground). Defaults to 250m.
-- @param #number thresheight (Optional) Threshold to escape the radar if flying below minheight, defaults to 90 (90% escape chance)
-- @param #number thresblur (Optional) Threshold to be detected by the radar overall, defaults to 85 (85% chance to be found)
-- @param #number closing (Optional) Closing-in in km - the limit of km from which on it becomes increasingly difficult to escape radar detection if flying towards the radar position. Should be about 1/3 of the radar detection radius in kilometers, defaults to 20.
-- @return #INTEL self
function INTEL:SetRadarBlur(minheight,thresheight,thresblur,closing)
self.RadarBlur = true
@@ -737,7 +899,7 @@ end
--- Change radius of the Clusters.
-- @param #INTEL self
-- @param #number radius The radius of the clusters in kilometers. Default 15 km.
-- @param #number radius (Optional) The radius of the clusters in kilometers. Default 15 km.
-- @return #INTEL self
function INTEL:SetClusterRadius(radius)
self.clusterradius = (radius or 15)*1000
@@ -921,8 +1083,11 @@ function INTEL:UpdateIntel()
local recce=_recce --Wrapper.Unit#UNIT
-- Get detected units.
self:GetDetectedUnits(recce, DetectedUnits, RecceDetecting, self.DetectVisual, self.DetectOptical, self.DetectRadar, self.DetectIRST, self.DetectRWR, self.DetectDLINK)
if self.DopplerRadar == true then
self:GetDetectedUnitsDoppler(recce, DetectedUnits, RecceDetecting, self.DetectVisual, self.DetectOptical, self.DetectRadar, self.DetectIRST, self.DetectRWR, self.DetectDLINK)
else
self:GetDetectedUnits(recce, DetectedUnits, RecceDetecting, self.DetectVisual, self.DetectOptical, self.DetectRadar, self.DetectIRST, self.DetectRWR, self.DetectDLINK)
end
end
if self.DetectAccoustic then
@@ -1105,6 +1270,15 @@ function INTEL:_UpdateContact(Contact)
else
Contact.maneuvering = false
end
local typename = Contact.group:GetTypeName()
local base_rcs = INTEL.RCS_Table[typename]
if not base_rcs then
-- Fallback: category default
local cat = Contact.group:GetCategory()
base_rcs = (cat and INTEL.RCS_CategoryDefault[cat]) or INTEL.RCS_Reference
end
Contact.rcs = base_rcs
end
end
@@ -1445,7 +1619,7 @@ end
-- @param #INTEL self
-- @param Wrapper.Positionable#POSITIONABLE Positionable Group or static object.
-- @param #string RecceName Name of the recce group that detected this object.
-- @param #number Tdetected Abs. mission time in seconds, when the object is detected. Default now.
-- @param #number Tdetected (Optional) Abs. mission time in seconds, when the object is detected. Default now.
-- @return #INTEL self
function INTEL:KnowObject(Positionable, RecceName, Tdetected)
@@ -2016,7 +2190,7 @@ end
--- Calculate cluster future position after given seconds.
-- @param #INTEL self
-- @param #INTEL.Cluster cluster The cluster of contacts.
-- @param #number seconds Time interval in seconds. Default is `self.prediction`.
-- @param #number seconds (Optional) Time interval in seconds. Default is `self.prediction`.
-- @return Core.Point#COORDINATE Calculated future position of the cluster.
function INTEL:CalcClusterFuturePosition(cluster, seconds)
@@ -2258,7 +2432,7 @@ end
--- Get the coordinate of a cluster.
-- @param #INTEL self
-- @param #INTEL.Cluster Cluster The cluster.
-- @param #boolean Update If `true`, update the coordinate. Default is to just return the last stored position.
-- @param #boolean Update (Optional) If `true`, update the coordinate. Default is to just return the last stored position.
-- @return Core.Point#COORDINATE The coordinate of this cluster.
function INTEL:GetClusterCoordinate(Cluster, Update)
@@ -2309,8 +2483,8 @@ end
--- Check if the coordindate of the cluster changed.
-- @param #INTEL self
-- @param #INTEL.Cluster Cluster The cluster.
-- @param #number Threshold in meters. Default 100 m.
-- @param Core.Point#COORDINATE Coordinate Reference coordinate. Default is the last known coordinate of the cluster.
-- @param #number (Optional) Threshold in meters. Default 100 m.
-- @param Core.Point#COORDINATE Coordinate (Optional) Reference coordinate. Default is the last known coordinate of the cluster.
-- @return #boolean If `true`, the coordinate changed by more than the given threshold.
function INTEL:_CheckClusterCoordinateChanged(Cluster, Coordinate, Threshold)
@@ -2445,12 +2619,230 @@ function INTEL:GetHighestThreatContact(Cluster)
return rcontact
end
--- Enable 70/80s era pulse-Doppler ground-clutter simulation.
-- Only affects contacts detected via radar (DetectRadar=true paths).
-- Has no effect on visual, optical, IRST, RWR or datalink detections.
-- @param #INTEL self
-- @param #number MinAltAGL Min AGL altitude in metres for reliable detection.
-- Below this the detection probability drops linearly.
-- Default 500 m (≈ clutter floor for P-18 / P-37).
-- @param #number NotchHalfDeg Half-width of the velocity notch in degrees.
-- Targets with radial-velocity fraction < sin(NotchHalf)
-- are suppressed. Default 15° (≈ P-18 / Bar Lock spec).
-- @param #number MinSpeedMps Minimum speed in m/s that the MTI filter can track.
-- Default 50 m/s (≈ 100 kt).
-- @param #number RadarRangeKm Nominal detection range in km for the reference aircraft
-- (RCS_Reference, default 5 m²). Used only for RCS range
-- scaling; has no effect when DopplerRCS is false.
-- Default 200 km (≈ P-37 instrumented range vs fighter).
-- @param #boolean RCS If false, disable RCS range scaling (keep AC only).
-- Default true.
-- @return #INTEL self
function INTEL:SetDopplerRadar(MinAltAGL, NotchHalfDeg, MinSpeedMps, RadarRangeKm, RCS)
self:T(self.lid .. "SetDopplerRadar")
self.DopplerRadar = true
self.DopplerMinAltAGL = MinAltAGL or 500
self.DopplerNotchSin = math.sin(math.rad(NotchHalfDeg or 15))
self.DopplerMinSpeedMps = MinSpeedMps or 50
self.DopplerRCS = (RCS ~= false) -- default true
self.DopplerRadarRangeM = (RadarRangeKm or 200) * 1000
return self
end
--- Disable Doppler radar simulation.
-- @param #INTEL self
-- @return #INTEL self
function INTEL:SetDopplerRadarOff()
self:T(self.lid .. "SetDopplerRadarOff")
self.DopplerRadar = false
return self
end
--- Override the per-type RCS value for a DCS unit type name.
-- Useful for modded aircraft or mission-specific tweaks.
-- @param #INTEL self
-- @param #string TypeName DCS unit type name (e.g. "MiG-29A")
-- @param #number RCS_m2 Side-on RCS in m²
-- @return #INTEL self
function INTEL:SetTypeRCS(TypeName, RCS_m2)
self:T(self.lid .. "SetTypeRCS")
INTEL.RCS_Table[TypeName] = RCS_m2
return self
end
--- (Internal) Compute the aspect-weighted RCS for a target unit as seen
-- from a given radar position.
--
-- The model blends the side-on (maximum) and nose/tail-on (minimum) RCS
-- using the geometry of the target's velocity relative to the radar line:
--
-- σ_eff = σ_base × ( f_nose + (1 f_nose) × sin²(aspect_from_radial) )
--
-- where aspect_from_radial is 0° when the target flies toward/away from
-- the radar (nose-on) and 90° when the target crosses the beam (side-on).
--
-- @param #INTEL self
-- @param Wrapper.Unit#UNIT TargetUnit
-- @param #table rpos Radar position as Vec3 {x,y,z}
-- @param #number spd Target speed in m/s (pre-computed for efficiency)
-- @param DCS#Vec3 tvel Target velocity vector (pre-computed)
-- @return #number Effective RCS in m²
function INTEL:_GetAspectRCS(TargetUnit, rpos, spd, tvel)
self:T(self.lid .. "_GetAspectRCS")
-- Look up base (side-on) RCS
local typename = TargetUnit:GetTypeName()
local base_rcs = INTEL.RCS_Table[typename]
if not base_rcs then
-- Fallback: category default
local cat = TargetUnit:GetGroup() and TargetUnit:GetGroup():GetCategory()
base_rcs = (cat and INTEL.RCS_CategoryDefault[cat]) or INTEL.RCS_Reference
end
-- Aspect-dependent factor
if spd < 1 then return base_rcs end
local tpos = TargetUnit:GetVec3()
local dx = rpos.x - tpos.x -- vector target → radar (horizontal)
local dz = rpos.z - tpos.z
local d = math.sqrt(dx * dx + dz * dz)
if d < 1 then return base_rcs end
-- cos of angle between target velocity and target→radar line
-- = 1: nose/tail directly toward radar; = 0: pure crossing (beam)
local cos_a = (tvel.x * dx + tvel.z * dz) / (spd * d)
-- sin²(aspect_from_radial) = 1 cos² ; gives 0 nose-on, 1 beam-on
local sin2_a = 1.0 - cos_a * cos_a
local f = INTEL.RCS_NoseOnFraction
return base_rcs * (f + (1.0 - f) * sin2_a)
end
--- (Internal) Check whether a target unit would be detected by a 70/80s
-- pulse-Doppler radar located at the given radar unit position.
-- @param #INTEL self
-- @param Wrapper.Unit#UNIT TargetUnit
-- @param Wrapper.Unit#UNIT RadarUnit
-- @return #boolean true = detected
-- @return #string rejection reason: "speed" | "clutter" | "notch" | "rcs"
function INTEL:_CheckDopplerDetection(TargetUnit, RadarUnit)
self:T(self.lid .. "_CheckDopplerDetection")
-- Pre-compute common geometry (shared by notch + RCS checks)
local spd = TargetUnit:GetVelocityMPS()
local rpos = RadarUnit:GetVec3()
local tpos = TargetUnit:GetVec3()
local tvel = TargetUnit:GetVelocityVec3()
local dx = tpos.x - rpos.x
local dz = tpos.z - rpos.z
local slant = math.sqrt(dx * dx + dz * dz) -- 2-D slant range in metres
-- ── A. Minimum speed gate ──────────────────────────────────
if spd < self.DopplerMinSpeedMps then
return false, "speed"
end
-- ── B. AGL ground-clutter rejection ───────────────────────
local agl = TargetUnit:GetAltitude(true) -- metres AGL
if agl < self.DopplerMinAltAGL then
-- P(detect) rises linearly from 0 at deck to 1 at DopplerMinAltAGL
if math.random() > (agl / self.DopplerMinAltAGL) then
return false, "clutter"
end
end
-- ── C. Velocity notch ─────────────────────────────────────
if slant > 1 then
local nx = dx / slant
local nz = dz / slant
local vr = tvel.x * nx + tvel.z * nz -- radial velocity (m/s)
local vr_frac = math.abs(vr) / math.max(spd, 1)
if vr_frac < self.DopplerNotchSin then
return false, "notch"
end
end
-- ── D. RCS-based range scaling ─────────────────────────────
-- R_max ∝ σ^0.25 (from the radar range equation).
-- Effective detection range = DopplerRadarRangeM × (σ_eff / σ_ref)^0.25
-- Beyond that range: target not detected (hard cutoff at 100%; soft fade
-- starts at 80% of R_max to smooth the transition).
if self.DopplerRCS == true and slant > 1 then
local sigma = self:_GetAspectRCS(TargetUnit, rpos, spd, tvel)
-- (σ/σ_ref)^0.25 — clamp to avoid log of 0 for VLO aircraft
local scale = (sigma / INTEL.RCS_Reference) ^ 0.25
local R_max = self.DopplerRadarRangeM * scale
if slant > R_max then
return false, "rcs"
end
-- Soft fade zone: linear probability drop from 1 at 80% R_max to 0 at R_max
local fade_start = R_max * 0.80
if slant > fade_start then
local p = (R_max - slant) / (R_max - fade_start) -- 1→0
if math.random() > p then
return false, "rcs"
end
end
end
return true
end
---(Internal) Return the detected target groups of the controllable as a table.
-- We wrap the original function so the Doppler post-filter is transparent:
-- the existing RadarBlur / RadarAcceptRange logic is unchanged, and the
-- Doppler check runs once after all units have been collected.
-- The optional parameters specify the detection methods that can be applied.
-- If no detection method is given, the detection will use all the available methods by default.
-- @param #INTEL self
-- @param Wrapper.Unit#UNIT Unit The unit detecting.
-- @param #table DetectedUnits Table of detected units to be filled.
-- @param #table RecceDetecting Table of recce per unit to be filled.
-- @param #boolean DetectVisual (Optional) If *false*, do not include visually detected targets.
-- @param #boolean DetectOptical (Optional) If *false*, do not include optically detected targets.
-- @param #boolean DetectRadar (Optional) If *false*, do not include targets detected by radar.
-- @param #boolean DetectIRST (Optional) If *false*, do not include targets detected by IRST.
-- @param #boolean DetectRWR (Optional) If *false*, do not include targets detected by RWR.
-- @param #boolean DetectDLINK (Optional) If *false*, do not include targets detected by data link.
function INTEL:GetDetectedUnitsDoppler(Unit, DetectedUnits, RecceDetecting,DetectVisual, DetectOptical, DetectRadar,DetectIRST, DetectRWR, DetectDLINK)
self:T(self.lid .. "GetDetectedUnitsDoppler")
-- Run the original detection
self:GetDetectedUnits(Unit,DetectedUnits,RecceDetecting,DetectVisual,DetectOptical,DetectRadar,DetectIRST,DetectRWR,DetectDLINK)
-- Apply Doppler post-filter only when radar channel is active
if self.DopplerRadar == false then return end
if DetectRadar == false then return end
local remove = {}
for name, unit in pairs(DetectedUnits) do
-- Only filter live UNIT objects (not STATICs) that are airborne
if unit:IsInstanceOf("UNIT") and unit:IsAir() then
local ok, reason = self:_CheckDopplerDetection(unit, Unit)
if not ok then
table.insert(remove, name)
--if self.verbose and self.verbose >= 2 then
self:T(string.format("%sDoppler: suppressed %s [%s] by %s",self.lid, name, reason, Unit:GetName()))
--end
end
end
end
for _, name in ipairs(remove) do
DetectedUnits[name] = nil
RecceDetecting[name] = nil
end
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
-- Start INTEL_DLINK
-- TODO Start INTEL_DLINK
----------------------------------------------------------------------------------------------
--- **Ops_DLink** - Support for Office of Military Intelligence.
@@ -2641,11 +3033,11 @@ end
--- Function to set how long INTEL DLINK remembers contacts.
-- @param #INTEL_DLINK self
-- @param #number seconds Remember this many seconds. Defaults to 180.
-- @param #number seconds (Optional) Remember this many seconds. Defaults to 120.
-- @return #INTEL_DLINK self
function INTEL_DLINK:SetDLinkCacheTime(seconds)
self.cachetime = math.abs(seconds or 120)
self:I(self.lid.."Caching for "..self.cachetime.." seconds.")
self:T(self.lid.."Caching for "..self.cachetime.." seconds.")
return self
end
@@ -2735,7 +3127,7 @@ end
function INTEL_DLINK:onafterStop(From, Event, To)
self:T({From, Event, To})
local text = string.format("Version %s stopped.", self.version)
self:I(self.lid .. text)
self:T(self.lid .. text)
return self
end
+21 -17
View File
@@ -316,7 +316,7 @@ end
--- Set verbosity level.
-- @param #LEGION self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #LEGION self
function LEGION:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
@@ -468,10 +468,10 @@ end
-- @param #LEGION self
-- @param Ops.Cohort#COHORT Cohort The cohort to be relocated.
-- @param Ops.Legion#LEGION Legion The legion where the cohort is relocated to.
-- @param #number Delay Delay in seconds before relocation takes place. Default `nil`, *i.e.* ASAP.
-- @param #number NcarriersMin Min number of transport carriers in case the troops should be transported. Default `nil` for no transport.
-- @param #number Delay (Optional) Delay in seconds before relocation takes place. Default `nil`, *i.e.* ASAP.
-- @param #number NcarriersMin (Optional) Min number of transport carriers in case the troops should be transported. Default `nil` for no transport.
-- @param #number NcarriersMax Max number of transport carriers.
-- @param #table TransportLegions Legion(s) assigned for transportation. Default is that transport assets can only be recruited from this legion.
-- @param #table TransportLegions (Optional) Legion(s) assigned for transportation. Default is that transport assets can only be recruited from this legion.
-- @return #LEGION self
function LEGION:RelocateCohort(Cohort, Legion, Delay, NcarriersMin, NcarriersMax, TransportLegions)
@@ -1927,7 +1927,7 @@ end
--- Check if an asset is currently on a mission (STARTED or EXECUTING).
-- @param #LEGION self
-- @param Functional.Warehouse#WAREHOUSE.Assetitem asset The asset.
-- @param #table MissionTypes Types on mission to be checked. Default all.
-- @param #table MissionTypes (Optional) Types on mission to be checked. Default all.
-- @return #boolean If true, asset has at least one mission of that type in the queue.
function LEGION:IsAssetOnMission(asset, MissionTypes)
@@ -1980,7 +1980,7 @@ end
--- Count payloads in stock.
-- @param #LEGION self
-- @param #table MissionTypes Types on mission to be checked. Default *all* possible types `AUFTRAG.Type`.
-- @param #table MissionTypes (Optional) Types on mission to be checked. Default *all* possible types `AUFTRAG.Type`.
-- @param #table UnitTypes Types of units.
-- @param #table Payloads Specific payloads to be counted only.
-- @return #number Count of available payloads in stock.
@@ -2056,7 +2056,7 @@ end
--- Count missions in mission queue.
-- @param #LEGION self
-- @param #table MissionTypes Types on mission to be checked. Default *all* possible types `AUFTRAG.Type`.
-- @param #table MissionTypes (Optional) Types on mission to be checked. Default *all* possible types `AUFTRAG.Type`.
-- @param #boolean OnlyRunning If `true`, only count running missions.
-- @return #number Number of missions that are not over yet.
function LEGION:CountMissionsInQueue(MissionTypes, OnlyRunning)
@@ -2171,8 +2171,8 @@ end
--- Count assets on mission.
-- @param #LEGION self
-- @param #table MissionTypes Types on mission to be checked. Default all.
-- @param Ops.Cohort#COHORT Cohort Only count assets of this cohort. Default count assets of all cohorts.
-- @param #table MissionTypes (Optional) Types on mission to be checked. Default all.
-- @param Ops.Cohort#COHORT Cohort (Optional) Only count assets of this cohort. Default count assets of all cohorts.
-- @return #number Number of pending and queued assets.
-- @return #number Number of pending assets.
-- @return #number Number of queued assets.
@@ -2215,7 +2215,7 @@ end
--- Get assets on mission.
-- @param #LEGION self
-- @param #table MissionTypes Types on mission to be checked. Default all.
-- @param #table MissionTypes (Optional) Types on mission to be checked. Default all.
-- @return #table Assets on pending requests.
function LEGION:GetAssetsOnMission(MissionTypes)
@@ -2248,7 +2248,7 @@ end
--- Get the unit types of this legion. These are the unit types of all assigned cohorts.
-- @param #LEGION self
-- @param #boolean onlyactive Count only the active ones.
-- @param #table cohorts Table of cohorts. Default all.
-- @param #table cohorts (Optional) Table of cohorts. Default all.
-- @return #table Table of unit types.
function LEGION:GetAircraftTypes(onlyactive, cohorts)
@@ -2577,8 +2577,11 @@ end
-- @param #number RefuelSystem Refueling system (boom or probe).
-- @param #number CargoWeight Cargo weight [kg]. This checks the cargo bay of the cohort assets and ensures that it is large enough to carry the given cargo weight.
-- @param #number MaxWeight Max weight [kg]. This checks whether the cohort asset group is not too heavy.
-- @param RangeMin Min range in meters. (Default is 0, i.e. no minimum range.)
-- @return #boolean Returns `true` if given cohort can meet all requirements.
function LEGION._CohortCan(Cohort, MissionType, Categories, Attributes, Properties, WeaponTypes, TargetVec2, RangeMax, RefuelSystem, CargoWeight, MaxWeight)
function LEGION._CohortCan(Cohort, MissionType, Categories, Attributes, Properties, WeaponTypes, TargetVec2, RangeMax, RefuelSystem, CargoWeight, MaxWeight, RangeMin)
RangeMin = RangeMin or -1
--- Function to check category.
local function CheckCategory(_cohort)
@@ -2656,8 +2659,8 @@ function LEGION._CohortCan(Cohort, MissionType, Categories, Attributes, Properti
-- Is in range?
local Rmax=cohort:GetMissionRange(WeaponTypes)
local RangeMax = RangeMax or 0
local InRange=(RangeMax and math.max(RangeMax, Rmax) or Rmax) >= TargetDistance
local InRange=(RangeMax and math.max(RangeMax, Rmax) or Rmax) >= TargetDistance and TargetDistance > RangeMin
--env.info(string.format("Range TargetDist=%.1f Rmax=%.1f RangeMax=%.1f InRange=%s", TargetDistance, Rmax, RangeMax, tostring(InRange)))
return InRange
@@ -2789,7 +2792,7 @@ end
--- Recruit assets from Cohorts for the given parameters. **NOTE** that we set the `asset.isReserved=true` flag so it cannot be recruited by anyone else.
-- @param #table Cohorts Cohorts included.
-- @param #string MissionTypeRecruit Mission type for recruiting the cohort assets.
-- @param #string MissionTypeOpt Mission type for which the assets are optimized. Default is the same as `MissionTypeRecruit`.
-- @param #string MissionTypeOpt (Optional) Mission type for which the assets are optimized. Default is the same as `MissionTypeRecruit`.
-- @param #number NreqMin Minimum number of required assets.
-- @param #number NreqMax Maximum number of required assets.
-- @param DCS#Vec2 TargetVec2 Target position as 2D vector.
@@ -2803,10 +2806,11 @@ end
-- @param #table Attributes Group attributes. See `GROUP.Attribute.`
-- @param #table Properties DCS attributes.
-- @param #table WeaponTypes Bit of weapon types.
-- @param #number RangeMin Min range in meters. (Default is 0, i.e. no minimum range.)
-- @return #boolean If `true` enough assets could be recruited.
-- @return #table Recruited assets. **NOTE** that we set the `asset.isReserved=true` flag so it cant be recruited by anyone else.
-- @return #table Legions of recruited assets.
function LEGION.RecruitCohortAssets(Cohorts, MissionTypeRecruit, MissionTypeOpt, NreqMin, NreqMax, TargetVec2, Payloads, RangeMax, RefuelSystem, CargoWeight, TotalWeight, MaxWeight, Categories, Attributes, Properties, WeaponTypes)
function LEGION.RecruitCohortAssets(Cohorts, MissionTypeRecruit, MissionTypeOpt, NreqMin, NreqMax, TargetVec2, Payloads, RangeMax, RefuelSystem, CargoWeight, TotalWeight, MaxWeight, Categories, Attributes, Properties, WeaponTypes, RangeMin)
-- The recruited assets.
local Assets={}
@@ -2824,7 +2828,7 @@ function LEGION.RecruitCohortAssets(Cohorts, MissionTypeRecruit, MissionTypeOpt,
local cohort=_cohort --Ops.Cohort#COHORT
-- Check if cohort can do the mission.
local can=LEGION._CohortCan(cohort, MissionTypeRecruit, Categories, Attributes, Properties, WeaponTypes, TargetVec2, RangeMax, RefuelSystem, CargoWeight, MaxWeight)
local can=LEGION._CohortCan(cohort, MissionTypeRecruit, Categories, Attributes, Properties, WeaponTypes, TargetVec2, RangeMax, RefuelSystem, CargoWeight, MaxWeight, RangeMin)
--env.info(string.format("RecruitCohortAssets %s Cohort=%s can=%s", MissionTypeRecruit, cohort:GetName(), tostring(can)))
+34 -34
View File
@@ -434,7 +434,7 @@ end
--- Enable/disable pathfinding.
-- @param #NAVYGROUP self
-- @param #boolean Switch If true, enable pathfinding.
-- @param #number CorridorWidth Corridor with in meters. Default 400 m.
-- @param #number CorridorWidth (Optional) Corridor with in meters. Default 400 m.
-- @return #NAVYGROUP self
function NAVYGROUP:SetPathfinding(Switch, CorridorWidth)
self.pathfindingOn=Switch
@@ -444,7 +444,7 @@ end
--- Enable pathfinding.
-- @param #NAVYGROUP self
-- @param #number CorridorWidth Corridor with in meters. Default 400 m.
-- @param #number CorridorWidth (Optional) Corridor with in meters. Default 400 m.
-- @return #NAVYGROUP self
function NAVYGROUP:SetPathfindingOn(CorridorWidth)
self:SetPathfinding(true, CorridorWidth)
@@ -476,9 +476,9 @@ end
-- @param #NAVYGROUP self
-- @param Core.Point#COORDINATE Coordinate Coordinate of the target.
-- @param #string Clock Time when to start the attack.
-- @param #number Radius Radius in meters. Default 100 m.
-- @param #number Nshots Number of shots to fire. Default 3.
-- @param #number WeaponType Type of weapon. Default auto.
-- @param #number Radius (Optional) Radius in meters. Default 100 m.
-- @param #number Nshots (Optional) Number of shots to fire. Default 3.
-- @param #number WeaponType (Optional) Type of weapon. Default auto.
-- @param #number Prio Priority of the task.
-- @return Ops.OpsGroup#OPSGROUP.Task The task data.
function NAVYGROUP:AddTaskFireAtPoint(Coordinate, Clock, Radius, Nshots, WeaponType, Prio)
@@ -493,12 +493,12 @@ end
--- Add a *waypoint* task.
-- @param #NAVYGROUP self
-- @param Core.Point#COORDINATE Coordinate Coordinate of the target.
-- @param Ops.OpsGroup#OPSGROUP.Waypoint Waypoint Where the task is executed. Default is next waypoint.
-- @param #number Radius Radius in meters. Default 100 m.
-- @param #number Nshots Number of shots to fire. Default 3.
-- @param #number WeaponType Type of weapon. Default auto.
-- @param #number Prio Priority of the task.
-- @param #number Duration Duration in seconds after which the task is cancelled. Default *never*.
-- @param Ops.OpsGroup#OPSGROUP.Waypoint (Optional) Waypoint Where the task is executed. Default is next waypoint.
-- @param #number Radius (Optional) Radius in meters. Default 100 m.
-- @param #number Nshots (Optional) Number of shots to fire. Default 3.
-- @param #number WeaponType (Optional) Type of weapon. Default auto.
-- @param #number Prio (Optional) Priority of the task. Defaults to 50.
-- @param #number Duration (Optional) Duration in seconds after which the task is cancelled. Default *never*.
-- @return Ops.OpsGroup#OPSGROUP.Task The task table.
function NAVYGROUP:AddTaskWaypointFireAtPoint(Coordinate, Waypoint, Radius, Nshots, WeaponType, Prio, Duration)
@@ -515,10 +515,10 @@ end
--- Add a *scheduled* task.
-- @param #NAVYGROUP self
-- @param Wrapper.Group#GROUP TargetGroup Target group.
-- @param #number WeaponExpend How much weapons does are used.
-- @param #number WeaponType Type of weapon. Default auto.
-- @param #string Clock Time when to start the attack.
-- @param #number Prio Priority of the task.
-- @param #number WeaponExpend (Optional) How much weapons does are used.
-- @param #number WeaponType (Optional) Type of weapon. Default auto.
-- @param #string Clock (Optional) Time when to start the attack.
-- @param #number Prio (Optional) Priority of the task. Defaults to 50.
-- @return Ops.OpsGroup#OPSGROUP.Task The task data.
function NAVYGROUP:AddTaskAttackGroup(TargetGroup, WeaponExpend, WeaponType, Clock, Prio)
@@ -531,11 +531,11 @@ end
--- Create a turn into wind window. Note that this is not executed as it not added to the queue.
-- @param #NAVYGROUP self
-- @param #string starttime Start time, e.g. "8:00" for eight o'clock. Default now.
-- @param #string stoptime Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.
-- @param #number speed Speed in knots during turn into wind leg.
-- @param #boolean uturn If true (or nil), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.
-- @param #number offset Offset angle in degrees, e.g. to account for an angled runway. Default 0 deg.
-- @param #string starttime (Optional) Start time, e.g. "8:00" for eight o'clock. Default now.
-- @param #string stoptime (Optional) Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.
-- @param #number speed (Optional) Speed in knots during turn into wind leg. Defaults to 20.
-- @param #boolean uturn (Optional) If true (or nil), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.
-- @param #number offset (Optional) Offset angle in degrees, e.g. to account for an angled runway. Default 0 deg.
-- @return #NAVYGROUP.IntoWind Recovery window.
function NAVYGROUP:_CreateTurnIntoWind(starttime, stoptime, speed, uturn, offset)
@@ -598,11 +598,11 @@ end
--- Add a time window, where the groups steams into the wind.
-- @param #NAVYGROUP self
-- @param #string starttime Start time, e.g. "8:00" for eight o'clock. Default now.
-- @param #string stoptime Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.
-- @param #number speed Wind speed on deck in knots during turn into wind leg. Default 20 knots.
-- @param #boolean uturn If `true` (or `nil`), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.
-- @param #number offset Offset angle clock-wise in degrees, *e.g.* to account for an angled runway. Default 0 deg. Use around -9.1° for US carriers.
-- @param #string starttime (Optional) Start time, e.g. "8:00" for eight o'clock. Default now.
-- @param #string stoptime (Optional) Stop time, e.g. "9:00" for nine o'clock. Default 90 minutes after start time.
-- @param #number speed (Optional) Wind speed on deck in knots during turn into wind leg. Default 20 knots.
-- @param #boolean uturn (Optional) If `true` (or `nil`), carrier wil perform a U-turn and go back to where it came from before resuming its route to the next waypoint. If false, it will go directly to the next waypoint.
-- @param #number offset (Optional) Offset angle clock-wise in degrees, *e.g.* to account for an angled runway. Default 0 deg. Use around -9.1° for US carriers.
-- @return #NAVYGROUP.IntoWind Turn into window data table.
function NAVYGROUP:AddTurnIntoWind(starttime, stoptime, speed, uturn, offset)
@@ -644,7 +644,7 @@ end
--- Extend duration of turn into wind.
-- @param #NAVYGROUP self
-- @param #number Duration Duration in seconds. Default 300 sec.
-- @param #number Duration (Optional) Duration in seconds. Default 300 sec.
-- @param #NAVYGROUP.IntoWind TurnIntoWind (Optional) Turn into window data table. If not given, the currently open one is used (if there is any).
-- @return #NAVYGROUP self
function NAVYGROUP:ExtendTurnIntoWind(Duration, TurnIntoWind)
@@ -1832,10 +1832,10 @@ end
--- Add an a waypoint to the route.
-- @param #NAVYGROUP self
-- @param Core.Point#COORDINATE Coordinate The coordinate of the waypoint. Use `COORDINATE:SetAltitude()` to define the altitude.
-- @param #number Speed Speed in knots. Default is default cruise speed or 70% of max speed.
-- @param #number AfterWaypointWithID Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #number Depth Depth at waypoint in feet. Only for submarines.
-- @param #boolean Updateroute If true or nil, call UpdateRoute. If false, no call.
-- @param #number Speed (Optional) Speed in knots. Default is default cruise speed or 70% of max speed.
-- @param #number AfterWaypointWithID (Optional) Insert waypoint after waypoint given ID. Default is to insert as last waypoint.
-- @param #number Depth (Optional) Depth at waypoint in feet. Only for submarines.
-- @param #boolean Updateroute (Optional) If true or nil, call UpdateRoute. If false, no call.
-- @return Ops.OpsGroup#OPSGROUP.Waypoint Waypoint table.
function NAVYGROUP:AddWaypoint(Coordinate, Speed, AfterWaypointWithID, Depth, Updateroute)
@@ -1875,8 +1875,8 @@ end
--- Initialize group parameters. Also initializes waypoints if self.waypoints is nil.
-- @param #NAVYGROUP self
-- @param #table Template Template used to init the group. Default is `self.template`.
-- @param #number Delay Delay in seconds before group is initialized. Default `nil`, *i.e.* instantaneous.
-- @param #table Template (Optional) Template used to init the group. Default is `self.template`.
-- @param #number Delay (Optional) Delay in seconds before group is initialized. Default `nil`, *i.e.* instantaneous.
-- @return #NAVYGROUP self
function NAVYGROUP:_InitGroup(Template, Delay)
@@ -1981,7 +1981,7 @@ end
--- Check for possible collisions between two coordinates.
-- @param #NAVYGROUP self
-- @param #number DistanceMax Max distance in meters ahead to check. Default 5000.
-- @param #number DistanceMax (Optional) Max distance in meters ahead to check. Default 5000.
-- @param #number dx
-- @return #number Free distance in meters.
function NAVYGROUP:_CheckFreePath(DistanceMax, dx)
@@ -2167,7 +2167,7 @@ end
--- Get wind direction and speed at current position.
-- @param #NAVYGROUP self
-- @param #number Altitude Altitude in meters above main sea level at which the wind is calculated. Default 18 meters.
-- @param #number Altitude (Optional) Altitude in meters above main sea level at which the wind is calculated. Default 18 meters.
-- @return #number Direction the wind is blowing **from** in degrees.
-- @return #number Wind speed in m/s.
function NAVYGROUP:GetWind(Altitude)
+12 -12
View File
@@ -145,7 +145,7 @@ OPERATION.version="0.2.0"
--- Create a new generic OPERATION object.
-- @param #OPERATION self
-- @param #string Name Name of the operation. Be creative! Default "Operation-01" where the last number is a running number.
-- @param #string Name (Optional) Name of the operation. Be creative! Default "Operation-01" where the last number is a running number.
-- @return #OPERATION self
function OPERATION:New(Name)
@@ -349,7 +349,7 @@ end
--- Set verbosity level.
-- @param #OPERATION self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #OPERATION self
function OPERATION:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
@@ -358,7 +358,7 @@ end
--- Set start and stop time of the operation.
-- @param #OPERATION self
-- @param #string ClockStart Time the mission is started, e.g. "05:00" for 5 am. If specified as a #number, it will be relative (in seconds) to the current mission time. Default is 5 seconds after mission was added.
-- @param #string ClockStart (Optional) Time the mission is started, e.g. "05:00" for 5 am. If specified as a #number, it will be relative (in seconds) to the current mission time. Default is 5 seconds after mission was added.
-- @param #string ClockStop (Optional) Time the mission is stopped, e.g. "13:00" for 1 pm. If mission could not be started at that time, it will be removed from the queue. If specified as a #number it will be relative (in seconds) to the current mission time.
-- @return #OPERATION self
function OPERATION:SetTime(ClockStart, ClockStop)
@@ -415,9 +415,9 @@ end
--- Add a new phase to the operation. This is added add the end of all previously added phases (if any).
-- @param #OPERATION self
-- @param #string Name Name of the phase. Default "Phase-01" where the last number is a running number.
-- @param #OPERATION.Branch Branch The branch to which this phase is added. Default is the master branch.
-- @param #number Duration Duration in seconds how long the phase will last. Default `nil`=forever.
-- @param #string Name (Optional) Name of the phase. Default "Phase-01" where the last number is a running number.
-- @param #OPERATION.Branch Branch (Optional) The branch to which this phase is added. Default is the master branch.
-- @param #number Duration (Optional) Duration in seconds how long the phase will last. Default `nil`=forever.
-- @return #OPERATION.Phase Phase table object.
function OPERATION:AddPhase(Name, Branch, Duration)
@@ -445,7 +445,7 @@ end
---Insert a new phase after an already defined phase of the operation.
-- @param #OPERATION self
-- @param #OPERATION.Phase PhaseAfter The phase after which the new phase is inserted.
-- @param #string Name Name of the phase. Default "Phase-01" where the last number is a running number.
-- @param #string Name (Optional) Name of the phase. Default "Phase-01" where the last number is a running number.
-- @return #OPERATION.Phase Phase table object.
function OPERATION:InsertPhaseAfter(PhaseAfter, Name)
@@ -472,7 +472,7 @@ end
--- Get a phase by its name.
-- @param #OPERATION self
-- @param #string Name Name of the phase. Default "Phase-01" where the last number is a running number.
-- @param #string Name (Optional) Name of the phase. Default "Phase-01" where the last number is a running number.
-- @return #OPERATION.Phase Phase table object or nil if phase could not be found.
function OPERATION:GetPhaseByName(Name)
@@ -610,7 +610,7 @@ end
--- Get name of a phase.
-- @param #OPERATION self
-- @param #OPERATION.Phase Phase The phase of which the name is returned. Default is the currently active phase.
-- @param #OPERATION.Phase Phase (Optional) The phase of which the name is returned. Default is the currently active phase.
-- @return #string The name of the phase or "None" if no phase is given or active.
function OPERATION:GetPhaseName(Phase)
@@ -752,7 +752,7 @@ end
--- Get name of the branch.
-- @param #OPERATION self
-- @param #OPERATION.Branch Branch The branch of which the name is requested. Default is the currently active or master branch.
-- @param #OPERATION.Branch (Optional) Branch The branch of which the name is requested. Default is the currently active or master branch.
-- @return #string Name Name or "None"
function OPERATION:GetBranchName(Branch)
Branch=Branch or self:GetBranchActive()
@@ -1336,7 +1336,7 @@ end
--- Create a new phase object.
-- @param #OPERATION self
-- @param #string Name Name of the phase. Default "Phase-01" where the last number is a running number.
-- @param #string Name (Optional) Name of the phase. Default "Phase-01" where the last number is a running number.
-- @return #OPERATION.Phase Phase table object.
function OPERATION:_CreatePhase(Name)
@@ -1356,7 +1356,7 @@ end
--- Create a new branch object.
-- @param #OPERATION self
-- @param #string Name Name of the phase. Default "Phase-01" where the last number is a running number.
-- @param #string Name (Optional) Name of the phase. Default "Phase-01" where the last number is a running number.
-- @return #OPERATION.Branch Branch table object.
function OPERATION:_CreateBranch(Name)
+215 -141
View File
@@ -514,7 +514,7 @@ OPSGROUP.CargoStatus={
--- OpsGroup version.
-- @field #string version
OPSGROUP.version="1.0.4"
OPSGROUP.version="1.0.6"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -1016,7 +1016,7 @@ end
--- Set verbosity level.
-- @param #OPSGROUP self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #OPSGROUP self
function OPSGROUP:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
@@ -1068,7 +1068,7 @@ end
--- Set default cruise altitude.
-- @param #OPSGROUP self
-- @param #number Altitude Altitude in feet. Default is 10,000 ft for airplanes and 1,500 feet for helicopters.
-- @param #number Altitude (Optional) Altitude in feet. Default is 10,000 ft for airplanes and 1,500 feet for helicopters.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultAltitude(Altitude)
if Altitude then
@@ -1097,7 +1097,7 @@ end
--- Set current altitude.
-- @param #OPSGROUP self
-- @param #number Altitude Altitude in feet. Default is 10,000 ft for airplanes and 1,500 feet for helicopters.
-- @param #number Altitude (Optional) Altitude in feet. Default is 10,000 ft for airplanes and 1,500 feet for helicopters.
-- @param #boolean Keep If `true` the group will maintain that speed on passing waypoints. If `nil` or `false` the group will return to the speed as defined by their route.
-- @return #OPSGROUP self
function OPSGROUP:SetAltitude(Altitude, Keep, RadarAlt)
@@ -1147,7 +1147,7 @@ end
--- Set current speed.
-- @param #OPSGROUP self
-- @param #number Speed Speed in knots. Default is 70% of max speed.
-- @param #number Speed (Optional) Speed in knots. Default is 70% of max speed.
-- @param #boolean Keep If `true` the group will maintain that speed on passing waypoints. If `nil` or `false` the group will return to the speed as defined by their route.
-- @param #boolean AltCorrected If `true`, use altitude corrected indicated air speed.
-- @return #OPSGROUP self
@@ -1176,7 +1176,7 @@ end
--- Set detection on or off.
-- If detection is on, detected targets of the group will be evaluated and FSM events triggered.
-- @param #OPSGROUP self
-- @param #boolean Switch If `true`, detection is on. If `false` or `nil`, detection is off. Default is off.
-- @param #boolean Switch (Optional) If `true`, detection is on. If `false` or `nil`, detection is off. Default is off.
-- @return #OPSGROUP self
function OPSGROUP:SetDetection(Switch)
self:T(self.lid..string.format("Detection is %s", tostring(Switch)))
@@ -1335,7 +1335,7 @@ end
-- @param Core.Point#COORDINATE TargetCoord Coordinate of the target.
-- @param #number WeaponBitType Weapon type.
-- @param Core.Point#COORDINATE RefCoord Reference coordinate.
-- @param #table SurfaceTypes Valid surfaces types of the coordinate. Default any (nil).
-- @param #table SurfaceTypes (Optional) Valid surfaces types of the coordinate. Default any (nil).
-- @return Core.Point#COORDINATE Coordinate in weapon range
function OPSGROUP:GetCoordinateInRange(TargetCoord, WeaponBitType, RefCoord, SurfaceTypes)
@@ -1411,10 +1411,10 @@ end
--- Set LASER parameters.
-- @param #OPSGROUP self
-- @param #number Code Laser code. Default 1688.
-- @param #boolean CheckLOS Check if lasing unit has line of sight to target coordinate. Default is `true`.
-- @param #number Code (Optional) Laser code. Default 1688.
-- @param #boolean CheckLOS (Optional) Check if lasing unit has line of sight to target coordinate. Default is `true`.
-- @param #boolean IROff If true, then dont switch on the additional IR pointer.
-- @param #number UpdateTime Time interval in seconds the beam gets up for moving targets. Default every 0.5 sec.
-- @param #number UpdateTime (Optional) Time interval in seconds the beam gets up for moving targets. Default every 0.5 sec.
-- @return #OPSGROUP self
function OPSGROUP:SetLaser(Code, CheckLOS, IROff, UpdateTime)
self.spot.Code=Code or 1688
@@ -1473,10 +1473,10 @@ end
--- Add a weapon range for ARTY auftrag.
-- @param #OPSGROUP self
-- @param #number RangeMin Minimum range in nautical miles. Default 0 NM.
-- @param #number RangeMax Maximum range in nautical miles. Default 10 NM.
-- @param #number BitType Bit mask of weapon type for which the given min/max ranges apply. Default is `ENUMS.WeaponFlag.Auto`, i.e. for all weapon types.
-- @param #function ConversionToMeters Function that converts input units of ranges to meters. Defaul `UTILS.NMToMeters`.
-- @param #number RangeMin (Optional) Minimum range in nautical miles. Default 0 NM.
-- @param #number RangeMax (Optional) Maximum range in nautical miles. Default 10 NM.
-- @param #number BitType (Optional) Bit mask of weapon type for which the given min/max ranges apply. Default is `ENUMS.WeaponFlag.Auto`, i.e. for all weapon types.
-- @param #function ConversionToMeters (Optional) Function that converts input units of ranges to meters. Defaul `UTILS.NMToMeters`.
-- @return #OPSGROUP self
function OPSGROUP:AddWeaponRange(RangeMin, RangeMax, BitType, ConversionToMeters)
@@ -1536,8 +1536,8 @@ end
--- Get highest detected threat. Detection must be turned on. The threat level is a number between 0 and 10, where 0 is the lowest, e.g. unarmed units.
-- @param #OPSGROUP self
-- @param #number ThreatLevelMin Only consider threats with level greater or equal to this number. Default 1 (so unarmed units wont be considered).
-- @param #number ThreatLevelMax Only consider threats with level smaller or queal to this number. Default 10.
-- @param #number ThreatLevelMin (Optional) Only consider threats with level greater or equal to this number. Default 1 (so unarmed units wont be considered).
-- @param #number ThreatLevelMax (Optional) Only consider threats with level smaller or queal to this number. Default 10.
-- @return Wrapper.Unit#UNIT Highest threat unit detected by the group or `nil` if no threat is currently detected.
-- @return #number Threat level.
function OPSGROUP:GetThreat(ThreatLevelMin, ThreatLevelMax)
@@ -1593,10 +1593,10 @@ end
--- Enable to automatically engage detected targets.
-- @param #OPSGROUP self
-- @param #number RangeMax Max range in NM. Only detected targets within this radius from the group will be engaged. Default is 25 NM.
-- @param #table TargetTypes Types of target attributes that will be engaged. See [DCS enum attributes](https://wiki.hoggitworld.com/view/DCS_enum_attributes). Default "All".
-- @param Core.Set#SET_ZONE EngageZoneSet Set of zones in which targets are engaged. Default is anywhere.
-- @param Core.Set#SET_ZONE NoEngageZoneSet Set of zones in which targets are *not* engaged. Default is nowhere.
-- @param #number RangeMax (Optional) Max range in NM. Only detected targets within this radius from the group will be engaged. Default is 25 NM.
-- @param #table TargetTypes (Optional) Types of target attributes that will be engaged. See [DCS enum attributes](https://wiki.hoggitworld.com/view/DCS_enum_attributes). Default "All".
-- @param Core.Set#SET_ZONE EngageZoneSet (Optional) Set of zones in which targets are engaged. Default is anywhere.
-- @param Core.Set#SET_ZONE NoEngageZoneSet (Optional) Set of zones in which targets are *not* engaged. Default is nowhere.
-- @return #OPSGROUP self
function OPSGROUP:SetEngageDetectedOn(RangeMax, TargetTypes, EngageZoneSet, NoEngageZoneSet)
@@ -1783,7 +1783,7 @@ end
--- Get MOOSE UNIT object.
-- @param #OPSGROUP self
-- @param #number UnitNumber Number of the unit in the group. Default first unit.
-- @param #number UnitNumber (Optional) Number of the unit in the group. Default first unit.
-- @return Wrapper.Unit#UNIT The MOOSE UNIT object.
function OPSGROUP:GetUnit(UnitNumber)
@@ -1799,7 +1799,7 @@ end
--- Get DCS GROUP object.
-- @param #OPSGROUP self
-- @param #number UnitNumber Number of the unit in the group. Default first unit.
-- @param #number UnitNumber (Optional) Number of the unit in the group. Default first unit.
-- @return DCS#Unit DCS group object.
function OPSGROUP:GetDCSUnit(UnitNumber)
@@ -2059,8 +2059,8 @@ end
--- Despawn a unit of the group. A "Remove Unit" event is generated by default.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit
-- @param #number Delay Delay in seconds before the group will be despawned. Default immediately.
-- @param #boolean NoEventRemoveUnit If true, no event "Remove Unit" is generated.
-- @param #number Delay (Optional) Delay in seconds before the group will be despawned. Default immediately.
-- @param #boolean NoEventRemoveUnit (Optional) If true, no event "Remove Unit" is generated.
-- @return #OPSGROUP self
function OPSGROUP:DespawnUnit(UnitName, Delay, NoEventRemoveUnit)
@@ -2096,8 +2096,8 @@ end
--- Despawn an element/unit of the group.
-- @param #OPSGROUP self
-- @param #OPSGROUP.Element Element The element that will be despawned.
-- @param #number Delay Delay in seconds before the element will be despawned. Default immediately.
-- @param #boolean NoEventRemoveUnit If true, no event "Remove Unit" is generated.
-- @param #number Delay (Optional) Delay in seconds before the element will be despawned. Default immediately.
-- @param #boolean NoEventRemoveUnit (Optional) If true, no event "Remove Unit" is generated.
-- @return #OPSGROUP self
function OPSGROUP:DespawnElement(Element, Delay, NoEventRemoveUnit)
@@ -2133,7 +2133,7 @@ end
-- If no `Remove Unit` event should be generated, the second optional parameter needs to be set to `true`.
-- If this group belongs to an AIRWING, BRIGADE or FLEET, it will be added to the warehouse stock if the `NoEventRemoveUnit` parameter is `false` or `nil`.
-- @param #OPSGROUP self
-- @param #number Delay Delay in seconds before the group will be despawned. Default immediately.
-- @param #number Delay (Optional) Delay in seconds before the group will be despawned. Default immediately.
-- @param #boolean NoEventRemoveUnit If `true`, **no** event "Remove Unit" is generated.
-- @return #OPSGROUP self
function OPSGROUP:Despawn(Delay, NoEventRemoveUnit)
@@ -2176,7 +2176,7 @@ end
--- Return group back to the legion it belongs to.
-- Group is despawned and added back to the stock.
-- @param #OPSGROUP self
-- @param #number Delay Delay in seconds before the group will be despawned. Default immediately
-- @param #number Delay (Optional) Delay in seconds before the group will be despawned. Default immediately
-- @return #OPSGROUP self
function OPSGROUP:ReturnToLegion(Delay)
@@ -2200,7 +2200,7 @@ end
--- Destroy a unit of the group. A *Unit Lost* for aircraft or *Dead* event for ground/naval units is generated.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit which should be destroyed.
-- @param #number Delay Delay in seconds before the group will be destroyed. Default immediately.
-- @param #number Delay (Optional) Delay in seconds before the group will be destroyed. Default immediately.
-- @return #OPSGROUP self
function OPSGROUP:DestroyUnit(UnitName, Delay)
@@ -2232,7 +2232,7 @@ end
--- Destroy group. The whole group is despawned and a *Unit Lost* for aircraft or *Dead* event for ground/naval units is generated for all current units.
-- @param #OPSGROUP self
-- @param #number Delay Delay in seconds before the group will be destroyed. Default immediately.
-- @param #number Delay (Optional) Delay in seconds before the group will be destroyed. Default immediately.
-- @return #OPSGROUP self
function OPSGROUP:Destroy(Delay)
@@ -2316,9 +2316,9 @@ end
--- Self destruction of group. An explosion is created at the position of each element.
-- @param #OPSGROUP self
-- @param #number Delay Delay in seconds. Default now.
-- @param #number Delay (Optional) Delay in seconds. Default now.
-- @param #number ExplosionPower (Optional) Explosion power in kg TNT. Default 100 kg.
-- @param #string ElementName Name of the element that should be destroyed. Default is all elements.
-- @param #string ElementName (Optional) Name of the element that should be destroyed. Default is all elements.
-- @return #OPSGROUP self
function OPSGROUP:SelfDestruction(Delay, ExplosionPower, ElementName)
@@ -2348,15 +2348,17 @@ end
--- Use SRS Simple-Text-To-Speech for transmissions.
-- @param #OPSGROUP self
-- @param #string PathToSRS Path to SRS directory.
-- @param #string Gender Gender: "male" or "female" (default).
-- @param #string Culture Culture, e.g. "en-GB" (default).
-- @param #string Voice Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Port SRS port. Default 5002.
-- @param #string PathToGoogleKey Full path to the google credentials JSON file, e.g. `"C:\Users\myUsername\Downloads\key.json"`.
-- @param #string Label Label of the SRS comms for the SRS Radio overlay. Defaults to "ROBOT". No spaces allowed!
-- @param #number Volume Volume to be set, 0.0 = silent, 1.0 = loudest. Defaults to 1.0
-- @param #string Gender (Optional) Gender: "male" or "female" (default).
-- @param #string Culture (Optional) Culture, e.g. "en-GB" (default).
-- @param #string Voice (Optional) Specific voice. Overrides `Gender` and `Culture`.
-- @param #number Port (Optional) SRS port. Default 5002.
-- @param #string PathToGoogleKey (Optional) Full path to the google credentials JSON file, e.g. `"C:\Users\myUsername\Downloads\key.json"`.
-- @param #string Label (Optional) Label of the SRS comms for the SRS Radio overlay. Defaults to "ROBOT". No spaces allowed!
-- @param #number Volume (Optional) Volume to be set, 0.0 = silent, 1.0 = loudest. Defaults to 1.0
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #OPSGROUP self
function OPSGROUP:SetSRS(PathToSRS, Gender, Culture, Voice, Port, PathToGoogleKey, Label, Volume)
function OPSGROUP:SetSRS(PathToSRS, Gender, Culture, Voice, Port, PathToGoogleKey, Label, Volume,Provider,Speaker)
self.useSRS=true
local path = PathToSRS or MSRS.path
local port = Port or MSRS.port
@@ -2364,12 +2366,18 @@ function OPSGROUP:SetSRS(PathToSRS, Gender, Culture, Voice, Port, PathToGoogleKe
self.msrs:SetGender(Gender)
self.msrs:SetCulture(Culture)
self.msrs:SetVoice(Voice)
if Speaker then
self.msrs:SetSpeakerPiper(Speaker)
end
self.msrs:SetPort(port)
self.msrs:SetLabel(Label)
if PathToGoogleKey then
self.msrs:SetProviderOptionsGoogle(PathToGoogleKey,PathToGoogleKey)
self.msrs:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
self.msrs:SetProvider(Provider)
end
self.msrs:SetCoalition(self:GetCoalition())
self.msrs:SetVolume(Volume)
return self
@@ -2379,8 +2387,8 @@ end
-- @param #OPSGROUP self
-- @param #string Text Text of transmission.
-- @param #number Delay Delay in seconds before the transmission is started.
-- @param #boolean SayCallsign If `true`, the callsign is prepended to the given text. Default `false`.
-- @param #number Frequency Override sender frequency, helpful when you need multiple radios from the same sender. Default is the frequency set for the OpsGroup.
-- @param #boolean SayCallsign (Optional) If `true`, the callsign is prepended to the given text. Default `false`.
-- @param #number Frequency (Optional) Override sender frequency, helpful when you need multiple radios from the same sender. Default is the frequency set for the OpsGroup.
-- @return #OPSGROUP self
function OPSGROUP:RadioTransmission(Text, Delay, SayCallsign, Frequency)
@@ -2421,8 +2429,8 @@ end
--- Set that this carrier is an all aspect loader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierLoaderAllAspect(Length, Width)
self.carrierLoader.type="front"
@@ -2433,8 +2441,8 @@ end
--- Set that this carrier is a front loader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierLoaderFront(Length, Width)
self.carrierLoader.type="front"
@@ -2445,8 +2453,8 @@ end
--- Set that this carrier is a back loader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierLoaderBack(Length, Width)
self.carrierLoader.type="back"
@@ -2457,8 +2465,8 @@ end
--- Set that this carrier is a starboard (right side) loader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierLoaderStarboard(Length, Width)
self.carrierLoader.type="right"
@@ -2469,8 +2477,8 @@ end
--- Set that this carrier is a port (left side) loader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierLoaderPort(Length, Width)
self.carrierLoader.type="left"
@@ -2482,8 +2490,8 @@ end
--- Set that this carrier is an all aspect unloader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierUnloaderAllAspect(Length, Width)
self.carrierUnloader.type="front"
@@ -2494,8 +2502,8 @@ end
--- Set that this carrier is a front unloader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierUnloaderFront(Length, Width)
self.carrierUnloader.type="front"
@@ -2506,8 +2514,8 @@ end
--- Set that this carrier is a back unloader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierUnloaderBack(Length, Width)
self.carrierUnloader.type="back"
@@ -2518,8 +2526,8 @@ end
--- Set that this carrier is a starboard (right side) unloader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierUnloaderStarboard(Length, Width)
self.carrierUnloader.type="right"
@@ -2530,8 +2538,8 @@ end
--- Set that this carrier is a port (left side) unloader.
-- @param #OPSGROUP self
-- @param #number Length Length of loading zone in meters. Default 50 m.
-- @param #number Width Width of loading zone in meters. Default 20 m.
-- @param #number Length (Optional) Length of loading zone in meters. Default 50 m.
-- @param #number Width (Optional) Width of loading zone in meters. Default 20 m.
-- @return #OPSGROUP self
function OPSGROUP:SetCarrierUnloaderPort(Length, Width)
self.carrierUnloader.type="left"
@@ -3076,7 +3084,7 @@ end
--- Mark waypoints on F10 map.
-- @param #OPSGROUP self
-- @param #number Duration Duration in seconds how long the waypoints are displayed before they are automatically removed. Default is that they are never removed.
-- @param #number Duration (Optional) Duration in seconds how long the waypoints are displayed before they are automatically removed. Default is that they are never removed.
-- @return #OPSGROUP self
function OPSGROUP:MarkWaypoints(Duration)
@@ -3106,7 +3114,7 @@ end
--- Remove waypoints markers on the F10 map.
-- @param #OPSGROUP self
-- @param #number Delay Delay in seconds before the markers are removed. Default is immediately.
-- @param #number Delay (Optional) Delay in seconds before the markers are removed. Default is immediately.
-- @return #OPSGROUP self
function OPSGROUP:RemoveWaypointMarkers(Delay)
@@ -3196,8 +3204,8 @@ end
--- Get next waypoint index.
-- @param #OPSGROUP self
-- @param #boolean cyclic If `true`, return first waypoint if last waypoint was reached. Default is patrol ad infinitum value set.
-- @param #number i Waypoint index from which the next index is returned. Default is the last waypoint passed.
-- @param #boolean cyclic (Optional) If `true`, return first waypoint if last waypoint was reached. Default is patrol ad infinitum value set.
-- @param #number i (Optional) Waypoint index from which the next index is returned. Default is the last waypoint passed.
-- @return #number Next waypoint index.
function OPSGROUP:GetWaypointIndexNext(cyclic, i)
@@ -3232,7 +3240,7 @@ end
--- Get waypoint index after waypoint with given ID. So if the waypoint has index 3 it will return 4.
-- @param #OPSGROUP self
-- @param #number uid Unique ID of the waypoint. Default is new waypoint index after the last current one.
-- @param #number uid (Optional) Unique ID of the waypoint. Default is new waypoint index after the last current one.
-- @return #number Index after waypoint with given ID.
function OPSGROUP:GetWaypointIndexAfterID(uid)
@@ -3369,7 +3377,7 @@ end
--- Get distance to waypoint.
-- @param #OPSGROUP self
-- @param #number indx Waypoint index. Default is the next waypoint.
-- @param #number indx (Optional) Waypoint index. Default is the next waypoint.
-- @return #number Distance in meters.
function OPSGROUP:GetDistanceToWaypoint(indx)
local dist=0
@@ -3394,7 +3402,7 @@ end
--- Get time to waypoint based on current velocity.
-- @param #OPSGROUP self
-- @param #number indx Waypoint index. Default is the next waypoint.
-- @param #number indx (Optional) Waypoint index. Default is the next waypoint.
-- @return #number Time in seconds. If velocity is 0
function OPSGROUP:GetTimeToWaypoint(indx)
@@ -3847,10 +3855,10 @@ end
--- Add a *scheduled* task.
-- @param #OPSGROUP self
-- @param #table task DCS task table structure.
-- @param #string clock Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.
-- @param #string clock (Optional) Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.
-- @param #string description Brief text describing the task, e.g. "Attack SAM".
-- @param #number prio Priority of the task.
-- @param #number duration Duration before task is cancelled in seconds counted after task started. Default never.
-- @param #number prio (Optional) Priority of the task. Default is 50.
-- @param #number duration (Optional) Duration before task is cancelled in seconds counted after task started. Default never.
-- @return #OPSGROUP.Task The task structure.
function OPSGROUP:AddTask(task, clock, description, prio, duration)
@@ -3869,10 +3877,10 @@ end
--- Create a *scheduled* task.
-- @param #OPSGROUP self
-- @param #table task DCS task table structure.
-- @param #string clock Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.
-- @param #string clock (Optional) Mission time when task is executed. Default in 5 seconds. If argument passed as #number, it defines a relative delay in seconds.
-- @param #string description Brief text describing the task, e.g. "Attack SAM".
-- @param #number prio Priority of the task.
-- @param #number duration Duration before task is cancelled in seconds counted after task started. Default never.
-- @param #number prio (Optional) Priority of the task. Default is 50.
-- @param #number duration (Optional) Duration before task is cancelled in seconds counted after task started. Default never.
-- @return #OPSGROUP.Task The task structure.
function OPSGROUP:NewTaskScheduled(task, clock, description, prio, duration)
@@ -3909,10 +3917,10 @@ end
--- Add a *waypoint* task.
-- @param #OPSGROUP self
-- @param #table task DCS task table structure.
-- @param #OPSGROUP.Waypoint Waypoint where the task is executed. Default is the at *next* waypoint.
-- @param #OPSGROUP.Waypoint Waypoint (Optional) where the task is executed. Default is the at *next* waypoint.
-- @param #string description Brief text describing the task, e.g. "Attack SAM".
-- @param #number prio Priority of the task. Number between 1 and 100. Default is 50.
-- @param #number duration Duration before task is cancelled in seconds counted after task started. Default never.
-- @param #number prio (Optional) Priority of the task. Number between 1 and 100. Default is 50.
-- @param #number duration(Optional) Duration before task is cancelled in seconds counted after task started. Default never.
-- @return #OPSGROUP.Task The task structure.
function OPSGROUP:AddTaskWaypoint(task, Waypoint, description, prio, duration)
@@ -4767,7 +4775,7 @@ function OPSGROUP:_UpdateTask(Task, Mission)
local tvec2=UTILS.Vec2Translate(vec2, distance, heading)
-- Debug info.
self:T(self.lid..string.format("Barrage: Shots=%s, Altitude=%d m, Angle=%d°, heading=%03d°, distance=%d m", tostring(param.shots), Altitude, Alpha, heading, distance))
self:T(self.lid..string.format("Barrage: Shots=%s, Altitude=%d m, Angle=%d°, heading=%03d°, distance=%d m", tostring(param.shots), Altitude, Alpha, heading, distance))
-- Set fire at point task.
DCSTask=CONTROLLABLE.TaskFireAtPoint(nil, tvec2, param.radius, param.shots, param.weaponType, Altitude)
@@ -4842,8 +4850,8 @@ end
-- @param #OPSGROUP self
-- @param DCS#Task DCSTask The DCS task.
-- @param Ops.OpsGroup#OPSGROUP.Task Task
-- @param #boolean SetTask Set task instead of pushing it.
-- @param #number Delay Delay in seconds. Default nil.
-- @param #boolean SetTask (Optional) Set task instead of pushing it. Default is to push it.
-- @param #number Delay (Optional) Delay in seconds. Default nil.
function OPSGROUP:_SandwitchDCSTask(DCSTask, Task, SetTask, Delay)
if Delay and Delay>0 then
@@ -4896,7 +4904,7 @@ end
-- @param #string From From state.
-- @param #string Event Event.
-- @param #string To To state.
-- @param #OPSGROUP.Task Task The task to cancel. Default is the current task (if any).
-- @param #OPSGROUP.Task Task (Optional) The task to cancel. Default is the current task (if any).
function OPSGROUP:onafterTaskCancel(From, Event, To, Task)
-- Get current task.
@@ -5100,7 +5108,7 @@ function OPSGROUP:onafterTaskDone(From, Event, To, Task)
if Task.description=="Task_Land_At" then
self:T(self.lid.."Taske DONE Task_Land_At ==> Wait")
self:Cruise()
-- After the land task, we set the helo to wait. This is because of an issue that the passing waypoint function is triggered immidiately if we do not do this!
self:Wait(20, 100)
else
self:T(self.lid.."Task Done but NO mission found ==> _CheckGroupDone in 1 sec")
@@ -5946,6 +5954,9 @@ function OPSGROUP:RouteToMission(mission, delay)
-- Debug info.
self:T(self.lid..string.format("Route To Mission"))
-- Delay in seconds before cruise or updateroute is called.
local delayGo=-1
-- Catch dead or stopped groups.
if self:IsDead() or self:IsStopped() then
@@ -6150,7 +6161,65 @@ function OPSGROUP:RouteToMission(mission, delay)
end
end
elseif mission.type==AUFTRAG.Type.FREIGHTTRANSPORT then
---
-- FREIGHTTRANSPORT
---
local destination=mission.DCStask.params.destination
local cargo=mission.DCStask.params.cargo
-- Set the waypoint coordinate directly above the airbase.
-- The only way to ensure the cargo is delivered there, because when the task is executed, the cargo is delivered to the closest airbase.
-- Hopefully, ED will change the behaviour of this task but at the moment, it is what it is.
waypointcoord=destination:GetCoordinate()
-- Get additional parameters
mission.DCStask.params.destination=destination --Wrapper.Airbase#AIRBASE
mission.DCStask.params.cargo=cargo --Core.Set#SET_STATIC
-- Get transport unit
local unit=self.group:GetFirstUnit()
local unitIdTransport=unit:GetID()
local vec2=unit:GetVec2()
-- Create tasks to load/transport statics cargos
local tasks={}
for StaticName, StaticObject in pairs(cargo:GetSet()) do
local static=StaticObject --Wrapper.Static#STATIC
-- Task to transport cargo.
local TaskCargoTransportation={
id = "CargoTransportationPlane",
params = {
x=vec2.x,
y=vec2.y,
unitIdTransport=unitIdTransport,
groupId=static:GetID(),
unitId=static:GetID(),
}
}
table.insert(tasks, TaskCargoTransportation)
end
-- If we have multiple tasks, we create a combo task
local TaskCargo=nil
if #tasks==1 then
TaskCargo=tasks[1]
else
TaskCargo=CONTROLLABLE.TaskCombo(nil, tasks)
end
-- We set the task to load the cargo into the aircraft.
-- We must be careful when calling updateroute because there the task is overwritten.
-- We also clear present "UpdateRoute" FSM events
self:_ClearFSMEvent( "UpdateRoute" )
delayGo=-50 --30 sec was not enough for CH-47 to load more than one cargo item
self.group:SetTask(TaskCargo)
elseif mission.type==AUFTRAG.Type.ARTY then
---
@@ -6309,7 +6378,7 @@ function OPSGROUP:RouteToMission(mission, delay)
elseif self:IsNavygroup() then
self:Cruise(SpeedToMission)
elseif self:IsFlightgroup() then
self:UpdateRoute()
self:__UpdateRoute(delayGo)
end
end
@@ -7711,8 +7780,8 @@ end
--- Teleport the group to a different location.
-- @param #OPSGROUP self
-- @param Core.Point#COORDINATE Coordinate Coordinate where the group is teleported to.
-- @param #number Delay Delay in seconds before respawn happens. Default 0.
-- @param #boolean NoPauseMission If `true`, dont pause a running mission.
-- @param #number Delay (Optional) Delay in seconds before respawn happens. Default 0.
-- @param #boolean NoPauseMission (Optional) If `true`, dont pause a running mission.
-- @return #OPSGROUP self
function OPSGROUP:Teleport(Coordinate, Delay, NoPauseMission)
@@ -7800,9 +7869,9 @@ end
--- Respawn the group.
-- @param #OPSGROUP self
-- @param #number Delay Delay in seconds before respawn happens. Default 0.
-- @param DCS#Template Template (optional) The template of the Group retrieved with GROUP:GetTemplate(). If the template is not provided, the template will be retrieved of the group itself.
-- @param #boolean Reset Reset waypoints and reinit group if `true`.
-- @param #number Delay (Optional) Delay in seconds before respawn happens. Default 0.
-- @param DCS#Template Template (Optional) The template of the Group retrieved with GROUP:GetTemplate(). If the template is not provided, the template will be retrieved of the group itself.
-- @param #boolean Reset (Optional) Reset waypoints and reinit group if `true`.
-- @return #OPSGROUP self
function OPSGROUP:_Respawn(Delay, Template, Reset)
@@ -7895,8 +7964,8 @@ end
--- Spawn group from a given template.
-- @param #OPSGROUP self
-- @param #number Delay Delay in seconds before respawn happens. Default 0.
-- @param DCS#Template Template (optional) The template of the Group retrieved with GROUP:GetTemplate(). If the template is not provided, the template will be retrieved of the group itself.
-- @param #number Delay (Optional) Delay in seconds before respawn happens. Default 0.
-- @param DCS#Template Template (Optional) The template of the Group retrieved with GROUP:GetTemplate(). If the template is not provided, the template will be retrieved of the group itself.
-- @return #OPSGROUP self
function OPSGROUP:_Spawn(Delay, Template)
if Delay and Delay>0 then
@@ -8331,7 +8400,8 @@ function OPSGROUP:_CheckCargoTransport()
end
-- Boarding finished ==> Transport cargo.
if gotcargo and self.cargoTransport:_CheckRequiredCargos(self.cargoTZC, self) and not boarding then
local required=self.cargoTransport:_CheckRequiredCargos(self.cargoTZC, self)
if gotcargo and required and not boarding then
self:T(self.lid.."Boarding/loading finished ==> Loaded")
self.Tloading=nil
self:LoadingDone()
@@ -8898,8 +8968,8 @@ end
--- Get total weight of the group including cargo. Optionally, the total weight of a specific unit can be requested.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @param #string UnitName (Optional) Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved (Optional) If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @return #number Total weight in kg.
function OPSGROUP:GetWeightTotal(UnitName, IncludeReserved)
@@ -8934,8 +9004,8 @@ end
--- Get free cargo bay weight.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @param #string UnitName (Optional) Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved (Optional) If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @return #number Free cargo bay in kg.
function OPSGROUP:GetFreeCargobay(UnitName, IncludeReserved)
@@ -8956,8 +9026,8 @@ end
--- Get relative free cargo bay in percent.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @param #string UnitName (Optional) Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved (Optional) If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @return #number Free cargo bay in percent.
function OPSGROUP:GetFreeCargobayRelative(UnitName, IncludeReserved)
@@ -8972,8 +9042,8 @@ end
--- Get relative used (loaded) cargo bay in percent.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @param #string UnitName (Optional) Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved (Optional) If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @return #number Used cargo bay in percent.
function OPSGROUP:GetUsedCargobayRelative(UnitName, IncludeReserved)
local free=self:GetFreeCargobayRelative(UnitName, IncludeReserved)
@@ -9013,8 +9083,8 @@ end
--- Get weight of the internal cargo the group is carriing right now.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @param #string UnitName (Optional) Name of the unit. Default is of the whole group.
-- @param #boolean IncludeReserved (Optional) If `false`, cargo weight that is only *reserved* is **not** counted. By default (`true` or `nil`), the reserved cargo is included.
-- @return #number Cargo weight in kg.
function OPSGROUP:GetWeightCargo(UnitName, IncludeReserved)
@@ -9063,7 +9133,7 @@ end
--- Get max weight of the internal cargo the group can carry. Optionally, the max cargo weight of a specific unit can be requested.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit. Default is of the whole group.
-- @param #string UnitName (Optional) Name of the unit. Default is of the whole group.
-- @return #number Max cargo weight in kg. This does **not** include any cargo loaded or reserved currently.
function OPSGROUP:GetWeightCargoMax(UnitName)
@@ -9101,7 +9171,7 @@ end
--- Add weight to the internal cargo of an element of the group.
-- @param #OPSGROUP self
-- @param #string UnitName Name of the unit. Default is of the whole group.
-- @param #string UnitName (Optional) Name of the unit. Default is of the whole group.
-- @param #number Weight Cargo weight to be added in kg.
function OPSGROUP:AddWeightCargo(UnitName, Weight)
@@ -9967,6 +10037,10 @@ function OPSGROUP:onafterTransport(From, Event, To)
self:T(self.lid.."ERROR: No current task but landed at?!")
end
end
if self:IsWaiting() then
self:__Cruise(-10)
end
elseif self:IsArmygroup() then
@@ -11463,7 +11537,7 @@ end
--- Initialize Mission Editor waypoints.
-- @param #OPSGROUP self
-- @param #OPSGROUP.Waypoint waypoint Waypoint data.
-- @param #number wpnumber Waypoint index/number. Default is as last waypoint.
-- @param #number wpnumber (Optional) Waypoint index/number. Default is as last waypoint.
function OPSGROUP:_AddWaypoint(waypoint, wpnumber)
-- Index.
@@ -11933,7 +12007,7 @@ end
--- Set the default ROE for the group. This is the ROE state gets when the group is spawned or to which it defaults back after a mission.
-- @param #OPSGROUP self
-- @param #number roe ROE of group. Default is `ENUMS.ROE.ReturnFire`.
-- @param #number roe (Optional) ROE of group. Default is `ENUMS.ROE.ReturnFire`.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultROE(roe)
self.optionDefault.ROE=roe or ENUMS.ROE.ReturnFire
@@ -11942,7 +12016,7 @@ end
--- Set current ROE for the group.
-- @param #OPSGROUP self
-- @param #string roe ROE of group. Default is value set in `SetDefaultROE` (usually `ENUMS.ROE.ReturnFire`).
-- @param #string roe (Optional) ROE of group. Default is value set in `SetDefaultROE` (usually `ENUMS.ROE.ReturnFire`).
-- @return #OPSGROUP self
function OPSGROUP:SwitchROE(roe)
@@ -11995,7 +12069,7 @@ end
--- Set the default ROT for the group. This is the ROT state gets when the group is spawned or to which it defaults back after a mission.
-- @param #OPSGROUP self
-- @param #number rot ROT of group. Default is `ENUMS.ROT.PassiveDefense`.
-- @param #number rot (Optional) ROT of group. Default is `ENUMS.ROT.PassiveDefense`.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultROT(rot)
self.optionDefault.ROT=rot or ENUMS.ROT.PassiveDefense
@@ -12004,7 +12078,7 @@ end
--- Set ROT for the group.
-- @param #OPSGROUP self
-- @param #string rot ROT of group. Default is value set in `:SetDefaultROT` (usually `ENUMS.ROT.PassiveDefense`).
-- @param #string rot (Optional) ROT of group. Default is value set in `:SetDefaultROT` (usually `ENUMS.ROT.PassiveDefense`).
-- @return #OPSGROUP self
function OPSGROUP:SwitchROT(rot)
@@ -12044,7 +12118,7 @@ end
--- Set the default Alarm State for the group. This is the state gets when the group is spawned or to which it defaults back after a mission.
-- @param #OPSGROUP self
-- @param #number alarmstate Alarm state of group. Default is `AI.Option.Ground.val.ALARM_STATE.AUTO` (0).
-- @param #number alarmstate (Optional) Alarm state of group. Default is `AI.Option.Ground.val.ALARM_STATE.AUTO` (0).
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultAlarmstate(alarmstate)
self.optionDefault.Alarm=alarmstate or 0
@@ -12058,7 +12132,7 @@ end
-- * 2 = "Red"
--
-- @param #OPSGROUP self
-- @param #number alarmstate Alarm state of group. Default is 0="Auto".
-- @param #number alarmstate (Optional) Alarm state of group. Default is 0="Auto".
-- @return #OPSGROUP self
function OPSGROUP:SwitchAlarmstate(alarmstate)
@@ -12105,7 +12179,7 @@ end
--- Set the default EPLRS for the group.
-- @param #OPSGROUP self
-- @param #boolean OnOffSwitch If `true`, EPLRS is on by default. If `false` default EPLRS setting is off. If `nil`, default is on if group has EPLRS and off if it does not have a datalink.
-- @param #boolean OnOffSwitch (Optional) If `true`, EPLRS is on by default. If `false` default EPLRS setting is off. If `nil`, default is on if group has EPLRS and off if it does not have a datalink.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultEPLRS(OnOffSwitch)
@@ -12160,7 +12234,7 @@ end
--- Set the default emission state for the group.
-- @param #OPSGROUP self
-- @param #boolean OnOffSwitch If `true`, EPLRS is on by default. If `false` default EPLRS setting is off. If `nil`, default is on if group has EPLRS and off if it does not have a datalink.
-- @param #boolean OnOffSwitch (Optional) If `true`, EPLRS is on by default. If `false` default EPLRS setting is off. If `nil`, default is on if group has EPLRS and off if it does not have a datalink.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultEmission(OnOffSwitch)
@@ -12215,7 +12289,7 @@ end
--- Set the default invisible for the group.
-- @param #OPSGROUP self
-- @param #boolean OnOffSwitch If `true`, group is ivisible by default.
-- @param #boolean OnOffSwitch (Optional) If `true`, group is ivisible by default.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultInvisible(OnOffSwitch)
@@ -12264,7 +12338,7 @@ end
--- Set the default immortal for the group.
-- @param #OPSGROUP self
-- @param #boolean OnOffSwitch If `true`, group is immortal by default.
-- @param #boolean OnOffSwitch (Optional) If `true`, group is immortal by default.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultImmortal(OnOffSwitch)
@@ -12316,11 +12390,11 @@ end
--- Set default TACAN parameters.
-- @param #OPSGROUP self
-- @param #number Channel TACAN channel. Default is 74.
-- @param #string Morse Morse code. Default "XXX".
-- @param #number Channel (Optional) TACAN channel. Default is 74.
-- @param #string Morse(Optional) Morse code. Default "XXX".
-- @param #string UnitName Name of the unit acting as beacon.
-- @param #string Band TACAN mode. Default is "X" for ground and "Y" for airborne units.
-- @param #boolean OffSwitch If true, TACAN is off by default.
-- @param #string Band (Optional) TACAN mode. Default is "X" for ground and "Y" for airborne units.
-- @param #boolean OffSwitch (Optional) If true, TACAN is off by default.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultTACAN(Channel, Morse, UnitName, Band, OffSwitch)
@@ -12349,7 +12423,7 @@ end
--- Activate/switch TACAN beacon settings.
-- @param #OPSGROUP self
-- @param #OPSGROUP.Beacon Tacan TACAN data table. Default is the default TACAN settings.
-- @param #OPSGROUP.Beacon Tacan (Optional) TACAN data table. Default is the default TACAN settings.
-- @return #OPSGROUP self
function OPSGROUP:_SwitchTACAN(Tacan)
@@ -12372,9 +12446,9 @@ end
--- Activate/switch TACAN beacon settings.
-- @param #OPSGROUP self
-- @param #number Channel TACAN Channel.
-- @param #string Morse TACAN morse code. Default is the value set in @{#OPSGROUP.SetDefaultTACAN} or if not set "XXX".
-- @param #string UnitName Name of the unit in the group which should activate the TACAN beacon. Can also be given as #number to specify the unit number. Default is the first unit of the group.
-- @param #string Band TACAN channel mode "X" or "Y". Default is "Y" for aircraft and "X" for ground and naval groups.
-- @param #string Morse (Optional) TACAN morse code. Default is the value set in @{#OPSGROUP.SetDefaultTACAN} or if not set "XXX".
-- @param #string UnitName (Optional) Name of the unit in the group which should activate the TACAN beacon. Can also be given as #number to specify the unit number. Default is the first unit of the group.
-- @param #string Band (Optional) TACAN channel mode "X" or "Y". Default is "Y" for aircraft and "X" for ground and naval groups.
-- @return #OPSGROUP self
function OPSGROUP:SwitchTACAN(Channel, Morse, UnitName, Band)
@@ -12481,10 +12555,10 @@ end
--- Set default ICLS parameters.
-- @param #OPSGROUP self
-- @param #number Channel ICLS channel. Default is 1.
-- @param #string Morse Morse code. Default "XXX".
-- @param #number Channel (Optional) ICLS channel. Default is 1.
-- @param #string Morse (Optional) Morse code. Default "XXX".
-- @param #string UnitName Name of the unit acting as beacon.
-- @param #boolean OffSwitch If true, TACAN is off by default.
-- @param #boolean OffSwitch (Optional) If true, TACAN is off by default.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultICLS(Channel, Morse, UnitName, OffSwitch)
@@ -12527,9 +12601,9 @@ end
--- Activate/switch ICLS beacon settings.
-- @param #OPSGROUP self
-- @param #number Channel ICLS Channel. Default is what is set in `SetDefaultICLS()` so usually channel 1.
-- @param #string Morse ICLS morse code. Default is what is set in `SetDefaultICLS()` so usually "XXX".
-- @param #string UnitName Name of the unit in the group which should activate the ICLS beacon. Can also be given as #number to specify the unit number. Default is the first unit of the group.
-- @param #number Channel (Optional) ICLS Channel. Default is what is set in `SetDefaultICLS()` so usually channel 1.
-- @param #string Morse (Optional) ICLS morse code. Default is what is set in `SetDefaultICLS()` so usually "XXX".
-- @param #string UnitName (Optional) Name of the unit in the group which should activate the ICLS beacon. Can also be given as #number to specify the unit number. Default is the first unit of the group.
-- @return #OPSGROUP self
function OPSGROUP:SwitchICLS(Channel, Morse, UnitName)
@@ -12603,9 +12677,9 @@ end
--- Set default Radio frequency and modulation.
-- @param #OPSGROUP self
-- @param #number Frequency Radio frequency in MHz. Default 251 MHz.
-- @param #number Modulation Radio modulation. Default `radio.modulation.AM`.
-- @param #boolean OffSwitch If true, radio is OFF by default.
-- @param #number Frequency (Optional) Radio frequency in MHz. Default 251 MHz.
-- @param #number Modulation (Optional) Radio modulation. Default `radio.modulation.AM`.
-- @param #boolean OffSwitch (Optional) If true, radio is OFF by default.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultRadio(Frequency, Modulation, OffSwitch)
@@ -12632,8 +12706,8 @@ end
--- Turn radio on or switch frequency/modulation.
-- @param #OPSGROUP self
-- @param #number Frequency Radio frequency in MHz. Default is value set in `SetDefaultRadio` (usually 251 MHz).
-- @param #number Modulation Radio modulation. Default is value set in `SetDefaultRadio` (usually `radio.modulation.AM`).
-- @param #number Frequency (Optional) Radio frequency in MHz. Default is value set in `SetDefaultRadio` (usually 251 MHz).
-- @param #number Modulation (Optional) Radio modulation. Default is value set in `SetDefaultRadio` (usually `radio.modulation.AM`).
-- @return #OPSGROUP self
function OPSGROUP:SwitchRadio(Frequency, Modulation)
@@ -12712,7 +12786,7 @@ end
--- Switch to a specific formation.
-- @param #OPSGROUP self
-- @param #number Formation New formation the group will fly in. Default is the setting of `SetDefaultFormation()`.
-- @param #number Formation (Optional) New formation the group will fly in. Default is the setting of `SetDefaultFormation()`.
-- @return #OPSGROUP self
function OPSGROUP:SwitchFormation(Formation)
@@ -12749,7 +12823,7 @@ end
--- Set default callsign.
-- @param #OPSGROUP self
-- @param #number CallsignName Callsign name.
-- @param #number CallsignNumber Callsign number. Default 1.
-- @param #number CallsignNumber (Optional) Callsign number. Default 1.
-- @return #OPSGROUP self
function OPSGROUP:SetDefaultCallsign(CallsignName, CallsignNumber)
@@ -13474,7 +13548,7 @@ end
--- Get the number of shells a unit or group currently has. For a group the ammo count of all units is summed up.
-- @param #OPSGROUP self
-- @param Wrapper.Unit#UNIT unit The unit object.
-- @param #boolean display Display ammo table as message to all. Default false.
-- @param #boolean display (Optional) Display ammo table as message to all. Default false.
-- @return #OPSGROUP.Ammo Ammo data.
function OPSGROUP:GetAmmoUnit(unit, display)
@@ -13909,7 +13983,7 @@ end
--- Set the template of the group.
-- @param #OPSGROUP self
-- @param #table Template Template to set. Default is from the GROUP.
-- @param #table Template (Optional) Template to set. Default is from the GROUP.
-- @return #OPSGROUP self
function OPSGROUP:_SetTemplate(Template)
@@ -13946,8 +14020,8 @@ end
--- Clear waypoints.
-- @param #OPSGROUP self
-- @param #number IndexMin Clear waypoints up to this min WP index. Default 1.
-- @param #number IndexMax Clear waypoints up to this max WP index. Default `#self.waypoints`.
-- @param #number IndexMin (Optional) Clear waypoints up to this min WP index. Default 1.
-- @param #number IndexMax (Optional) Clear waypoints up to this max WP index. Default `#self.waypoints`.
function OPSGROUP:ClearWaypoints(IndexMin, IndexMax)
IndexMin=IndexMin or 1
+18 -16
View File
@@ -244,7 +244,7 @@ _OPSTRANSPORTID=0
--- Army Group version.
-- @field #string version
OPSTRANSPORT.version="0.8.0"
OPSTRANSPORT.version="0.9.0"
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- TODO list
@@ -566,7 +566,7 @@ end
-- @param #OPSTRANSPORT self
-- @param Core.Set#SET_GROUP GroupSet Set of groups to be transported. Can also be passed as a single GROUP or OPSGROUP object.
-- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo Transport zone combo.
-- @param #boolean DisembarkActivation If `true`, cargo group is activated when disembarked. If `false`, cargo groups are late activated when disembarked. Default `nil` (usually activated).
-- @param #boolean DisembarkActivation (Optional) If `true`, cargo group is activated when disembarked. If `false`, cargo groups are late activated when disembarked. Default `nil` (usually activated).
-- @param Core.Zone#ZONE DisembarkZone Zone where the groups disembark to.
-- @param Core.Set#SET_OPSGROUP DisembarkCarriers Carrier groups where the cargo directly disembarks to.
-- @return #OPSTRANSPORT self
@@ -644,8 +644,8 @@ end
-- @param Wrapper.Storage#STORAGE StorageTo Storage warehouse to which the cargo is delivered.
-- @param #string CargoType Type of cargo, *e.g.* `"weapons.bombs.Mk_84"` or liquid type as #number.
-- @param #number CargoAmount Amount of cargo. Liquids in kg.
-- @param #number CargoWeight Weight of a single cargo item in kg. Default 1 kg.
-- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo Transport zone combo if other than default.
-- @param #number CargoWeight (Optional) Weight of a single cargo item in kg. Default 1 kg.
-- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo (Optional) Transport zone combo if other than default.
-- @return #OPSTRANSPORT self
function OPSTRANSPORT:AddCargoStorage(StorageFrom, StorageTo, CargoType, CargoAmount, CargoWeight, TransportZoneCombo)
@@ -1052,8 +1052,8 @@ end
--- Set number of required carrier groups for an OPSTRANSPORT assignment. Only used if transport is assigned at **LEGION** or higher level.
-- @param #OPSTRANSPORT self
-- @param #number NcarriersMin Number of carriers *at least* required. Default 1.
-- @param #number NcarriersMax Number of carriers *at most* used for transportation. Default is same as `NcarriersMin`.
-- @param #number NcarriersMin (Optional) Number of carriers *at least* required. Default 1.
-- @param #number NcarriersMax (Optional) Number of carriers *at most* used for transportation. Default is same as `NcarriersMin`.
-- @return #OPSTRANSPORT self
function OPSTRANSPORT:SetRequiredCarriers(NcarriersMin, NcarriersMax)
@@ -1258,7 +1258,7 @@ end
--- Set transport start and stop time.
-- @param #OPSTRANSPORT self
-- @param #string ClockStart Time the transport is started, e.g. "05:00" for 5 am. If specified as a #number, it will be relative (in seconds) to the current mission time. Default is 5 seconds after mission was added.
-- @param #string ClockStart (Optional) Time the transport is started, e.g. "05:00" for 5 am. If specified as a #number, it will be relative (in seconds) to the current mission time. Default is 5 seconds after mission was added.
-- @param #string ClockStop (Optional) Time the transport is stopped, e.g. "13:00" for 1 pm. If mission could not be started at that time, it will be removed from the queue. If specified as a #number it will be relative (in seconds) to the current mission time.
-- @return #OPSTRANSPORT self
function OPSTRANSPORT:SetTime(ClockStart, ClockStop)
@@ -1294,9 +1294,9 @@ end
--- Set mission priority and (optional) urgency. Urgent missions can cancel other running missions.
-- @param #OPSTRANSPORT self
-- @param #number Prio Priority 1=high, 100=low. Default 50.
-- @param #number Importance Number 1-10. If missions with lower value are in the queue, these have to be finished first. Default is `nil`.
-- @param #boolean Urgent If *true*, another running mission might be cancelled if it has a lower priority.
-- @param #number Prio (Optional) Priority 1=high, 100=low. Default 50.
-- @param #number Importance (Optional) Number 1-10. If missions with lower value are in the queue, these have to be finished first. Default is `nil`.
-- @param #boolean Urgent (Optional) If *true*, another running mission might be cancelled if it has a lower priority.
-- @return #OPSTRANSPORT self
function OPSTRANSPORT:SetPriority(Prio, Importance, Urgent)
self.prio=Prio or 50
@@ -1307,7 +1307,7 @@ end
--- Set verbosity.
-- @param #OPSTRANSPORT self
-- @param #number Verbosity Be more verbose. Default 0
-- @param #number Verbosity (Optional) Be more verbose. Default 0
-- @return #OPSTRANSPORT self
function OPSTRANSPORT:SetVerbosity(Verbosity)
self.verbose=Verbosity or 0
@@ -1345,8 +1345,8 @@ end
-- path.
-- @param #OPSTRANSPORT self
-- @param Wrapper.Group#GROUP PathGroup A (late activated) GROUP defining a transport path by their waypoints.
-- @param #number Radius Randomization radius in meters. Default 0 m.
-- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo Transport Zone combo.
-- @param #number Radius (Optional) Randomization radius in meters. Default 0 m.
-- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo (Optional) Transport Zone combo.
-- @return #OPSTRANSPORT self
function OPSTRANSPORT:AddPathTransport(PathGroup, Reversed, Radius, TransportZoneCombo)
@@ -1731,7 +1731,7 @@ end
--- Check if all cargo was delivered (or is dead).
-- @param #OPSTRANSPORT self
-- @param #number Nmin Number of groups that must be actually delivered (and are not dead). Default 0.
-- @param #number Nmin (Optional) Number of groups that must be actually delivered (and are not dead). Default 0.
-- @return #boolean If true, all possible cargo was delivered.
function OPSTRANSPORT:IsDelivered(Nmin)
local is=self:is(OPSTRANSPORT.Status.DELIVERED)
@@ -2127,7 +2127,9 @@ function OPSTRANSPORT:_CheckRequiredCargos(TransportZoneCombo, CarrierGroup)
requiredCargos={}
for _,_cargo in pairs(TransportZoneCombo.Cargos) do
local cargo=_cargo --Ops.OpsGroup#OPSGROUP.CargoGroup
table.insert(requiredCargos, cargo.opsgroup)
if not cargo.delivered then
table.insert(requiredCargos, cargo.opsgroup)
end
end
end
@@ -2296,7 +2298,7 @@ end
-- @param Wrapper.Storage#STORAGE StorageTo Storage to.
-- @param #string CargoType Type of cargo.
-- @param #number CargoAmount Total amount of cargo that should be transported. Liquids in kg.
-- @param #number CargoWeight Weight of a single cargo item in kg. Default 1 kg.
-- @param #number CargoWeight (Optional) Weight of a single cargo item in kg. Default 1 kg.
-- @param #OPSTRANSPORT.TransportZoneCombo TransportZoneCombo Transport zone combo.
-- @return Ops.OpsGroup#OPSGROUP.CargoGroup Cargo group data.
function OPSTRANSPORT:_CreateCargoStorage(StorageFrom, StorageTo, CargoType, CargoAmount, CargoWeight, TransportZoneCombo)
+7 -7
View File
@@ -121,7 +121,7 @@ OPSZONE.version="0.6.2"
--- Create a new OPSZONE class object.
-- @param #OPSZONE self
-- @param Core.Zone#ZONE Zone The zone. Can be passed as ZONE\_RADIUS, ZONE_POLYGON, ZONE\_AIRBASE or simply as the name of the airbase.
-- @param #number CoalitionOwner Initial owner of the coaliton. Default `coalition.side.NEUTRAL`.
-- @param #number CoalitionOwner (Optional) Initial owner of the coaliton. Default `coalition.side.NEUTRAL`.
-- @return #OPSZONE self
-- @usage
-- myopszone = OPSZONE:New(ZONE:FindByName("OpsZoneOne"), coalition.side.RED) -- base zone from the mission editor
@@ -385,7 +385,7 @@ end
--- Set verbosity level.
-- @param #OPSZONE self
-- @param #number VerbosityLevel Level of output (higher=more). Default 0.
-- @param #number VerbosityLevel (Optional) Level of output (higher=more). Default 0.
-- @return #OPSZONE self
function OPSZONE:SetVerbosity(VerbosityLevel)
self.verbose=VerbosityLevel or 0
@@ -400,7 +400,7 @@ end
-- Which units can capture zones can be further refined by `:SetUnitCategories()`.
--
-- @param #OPSZONE self
-- @param #table Categories Object categories. Default is `{Object.Category.UNIT, Object.Category.STATIC}`.
-- @param #table Categories (Optional) Object categories. Default is `{Object.Category.UNIT, Object.Category.STATIC}`.
-- @return #OPSZONE self
function OPSZONE:SetObjectCategories(Categories)
@@ -417,7 +417,7 @@ end
--- Set categories of units that can capture or hold the zone. See [DCS Class Unit](https://wiki.hoggitworld.com/view/DCS_Class_Unit).
-- @param #OPSZONE self
-- @param #table Categories Table of unit categories. Default `{Unit.Category.GROUND_UNIT}`.
-- @param #table Categories (Optional) Table of unit categories. Default `{Unit.Category.GROUND_UNIT}`.
-- @return #OPSZONE self
function OPSZONE:SetUnitCategories(Categories)
@@ -435,7 +435,7 @@ end
--- Set threat level threshold that the offending units must have to capture a zone.
-- The reason why you might want to set this is that unarmed units (*e.g.* fuel trucks) should not be able to capture a zone as they do not pose a threat.
-- @param #OPSZONE self
-- @param #number Threatlevel Threat level threshold. Default 0.
-- @param #number Threatlevel (Optional) Threat level threshold. Default 0.
-- @return #OPSZONE self
function OPSZONE:SetCaptureThreatlevel(Threatlevel)
@@ -446,7 +446,7 @@ end
--- Set how many units must be present in a zone to capture it. By default, one unit is enough.
-- @param #OPSZONE self
-- @param #number Nunits Number of units. Default 1.
-- @param #number Nunits (Optional) Number of units. Default 1.
-- @return #OPSZONE self
function OPSZONE:SetCaptureNunits(Nunits)
@@ -460,7 +460,7 @@ end
--- Set time how long an attacking coalition must have troops inside a zone before it captures the zone.
-- @param #OPSZONE self
-- @param #number Tcapture Time in seconds. Default 0.
-- @param #number Tcapture (Optional) Time in seconds. Default 0.
-- @return #OPSZONE self
function OPSZONE:SetCaptureTime(Tcapture)
+1 -1
View File
@@ -55,7 +55,7 @@ PLATOON.version="0.1.0"
--- Create a new PLATOON object and start the FSM.
-- @param #PLATOON self
-- @param #string TemplateGroupName Name of the template group.
-- @param #number Ngroups Number of asset groups of this platoon. Default 3.
-- @param #number Ngroups (Optional) Number of asset groups of this platoon. Default 3.
-- @param #string PlatoonName Name of the platoon. Must be **unique**!
-- @return #PLATOON self
function PLATOON:New(TemplateGroupName, Ngroups, PlatoonName)
+13 -5
View File
@@ -1542,9 +1542,9 @@ end
--- [User] Set SRS TTS details - see @{Sound.SRS} for details
-- @param #PLAYERRECCE self
-- @param #number Frequency Frequency to be used. Can also be given as a table of multiple frequencies, e.g. 271 or {127,251}. There needs to be exactly the same number of modulations!
-- @param #number Modulation Modulation to be used. Can also be given as a table of multiple modulations, e.g. radio.modulation.AM or {radio.modulation.FM,radio.modulation.AM}. There needs to be exactly the same number of frequencies!
-- @param #string PathToSRS Defaults to "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
-- @param #number Frequency (Optional) Frequency to be used. Can also be given as a table of multiple frequencies, e.g. 271 or {127,251}. There needs to be exactly the same number of modulations!
-- @param #number Modulation (Optional) Modulation to be used. Can also be given as a table of multiple modulations, e.g. radio.modulation.AM or {radio.modulation.FM,radio.modulation.AM}. There needs to be exactly the same number of frequencies!
-- @param #string PathToSRS (Optional) Defaults to "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
-- @param #string Gender (Optional) Defaults to "male"
-- @param #string Culture (Optional) Defaults to "en-US"
-- @param #number Port (Optional) Defaults to 5002
@@ -1552,9 +1552,11 @@ end
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest)
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS
-- @param #string Backend (optional) Backend to be used, can be MSRS.Backend.SRSEXE or MSRS.Backend.GRPC
-- @param #string Backend (optional) Backend to be used, can be MSRS.Backend.SRSEXE or MSRS.Backend.GRPC etc
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #PLAYERRECCE self
function PLAYERRECCE:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,Backend)
function PLAYERRECCE:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,Backend,Provider,Speaker)
self:T(self.lid.."SetSRS")
self.PathToSRS = PathToSRS or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio" --
self.Gender = Gender or MSRS.gender or "male" --
@@ -1582,6 +1584,9 @@ function PLAYERRECCE:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,V
if self.PathToGoogleKey then
self.SRS:SetProviderOptionsGoogle(self.PathToGoogleKey,self.PathToGoogleKey)
self.SRS:SetProvider(MSRS.Provider.GOOGLE)
end
if Provider then
self.SRS:SetProvider(Provider)
end
-- Pre-configured Google?
if (not PathToGoogleKey) and self.SRS:GetProvider() == MSRS.Provider.GOOGLE then
@@ -1589,6 +1594,9 @@ function PLAYERRECCE:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,V
self.Voice = Voice or MSRS.poptions.gcloud.voice
end
self.SRS:SetVoice(self.Voice)
if Speaker then
self.SRS:SetSpeakerPiper(Speaker)
end
self.SRSQueue = MSRSQUEUE:New(self.MenuName or self.Name)
self.SRSQueue:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers)
return self
+44 -36
View File
@@ -115,9 +115,9 @@ PLAYERTASK.version="0.1.31"
-- @param #PLAYERTASK self
-- @param Ops.Auftrag#AUFTRAG.Type Type Type of this task
-- @param Ops.Target#TARGET Target Target for this task
-- @param #boolean Repeat Repeat this task if true (default = false)
-- @param #number Times Repeat on failure this many times if Repeat is true (default = 1)
-- @param #string TTSType TTS friendly task type name
-- @param #boolean Repeat (Optional) Repeat this task if true (default = false)
-- @param #number Times (Optional) Repeat on failure this many times if Repeat is true (default = 1)
-- @param #string TTSType (Optional) TTS friendly task type name. Defaultsto "close air support".
-- @return #PLAYERTASK self
function PLAYERTASK:New(Type, Target, Repeat, Times, TTSType)
@@ -272,8 +272,8 @@ end
--- Constructor that automatically determines the task type based on the target.
-- @param #PLAYERTASK self
-- @param Ops.Target#TARGET Target Target for this task
-- @param #boolean Repeat Repeat this task if true (default = false)
-- @param #number Times Repeat on failure this many times if Repeat is true (default = 1)
-- @param #boolean Repeat (Optional) Repeat this task if true (default = false)
-- @param #number Times (Optional) Repeat on failure this many times if Repeat is true (default = 1)
-- @param #string TTSType TTS friendly task type name
-- @return #PLAYERTASK self
function PLAYERTASK:NewFromTarget(Target, Repeat, Times, TTSType)
@@ -486,7 +486,7 @@ end
--- [USER] Set if a task can have a smoke marker.
-- @param #PLAYERTASK self
-- @param #boolean OnOff If true (default) it can be smoke, false if not.
-- @param #boolean OnOff (Optional) If true (default) it can be smoke, false if not.
-- @return #PLAYERTASK self
function PLAYERTASK:SetCanSmoke(OnOff)
self:T(self.lid.."AddSSetCanSmokeubType")
@@ -496,7 +496,7 @@ end
--- [USER] Set if a task can show threat details.
-- @param #PLAYERTASK self
-- @param #boolean OnOff If true (default) it can be shown, false if not.
-- @param #boolean OnOff (Optional) If true (default) it can be shown, false if not.
-- @return #PLAYERTASK self
function PLAYERTASK:SetShowThreatDetails(OnOff)
self:T(self.lid.."SetShowThreatDetails")
@@ -686,7 +686,7 @@ end
--- [USER] Adds a time limit for the task to be completed.
-- @param #PLAYERTASK self
-- @param #number TimeLimit Time limit in seconds for the task to be completed. (Default 0 = no time limit)
-- @param #number TimeLimit (Optional) Time limit in seconds for the task to be completed. (Default 0 = no time limit)
-- @return #PLAYERTASK self
-- @usage
-- local mytask = PLAYERTASK:New(AUFTRAG.Type.RECON, ZONE:New("WF Zone"), true, 50, "Deep Earth")
@@ -892,7 +892,7 @@ end
--- [User] Smoke Target
-- @param #PLAYERTASK self
-- @param #number Color, defaults to SMOKECOLOR.Red
-- @param #number Color (Optional) Color, defaults to SMOKECOLOR.Red
-- @return #PLAYERTASK self
function PLAYERTASK:SmokeTarget(Color)
self:T(self.lid.."SmokeTarget")
@@ -911,7 +911,7 @@ end
--- [User] Flare Target
-- @param #PLAYERTASK self
-- @param #number Color, defaults to FLARECOLOR.Red
-- @param #number Color (Optional) Color, defaults to FLARECOLOR.Red
-- @return #PLAYERTASK self
function PLAYERTASK:FlareTarget(Color)
self:T(self.lid.."SmokeTarget")
@@ -927,8 +927,8 @@ end
--- [User] Illuminate Target Area
-- @param #PLAYERTASK self
-- @param #number Power Power of illumination bomb in Candela. Default 1000 cd.
-- @param #number Height Height above target used to release the bomb, default 150m.
-- @param #number Power (Optional) Power of illumination bomb in Candela. Default 1000 cd.
-- @param #number Height (Optional) Height above target used to release the bomb, default 150m.
-- @return #PLAYERTASK self
function PLAYERTASK:IlluminateTarget(Power,Height)
self:T(self.lid.."IlluminateTarget")
@@ -2021,9 +2021,9 @@ PLAYERTASKCONTROLLER.version="0.1.73"
--- Create and run a new TASKCONTROLLER instance.
-- @param #PLAYERTASKCONTROLLER self
-- @param #string Name Name of this controller
-- @param #number Coalition of this controller, e.g. coalition.side.BLUE
-- @param #string Type Type of the tasks controlled, defaults to PLAYERTASKCONTROLLER.Type.A2G
-- @param #string ClientFilter (optional) Additional prefix filter for the SET_CLIENT. Can be handed as @{Core.Set#SET_CLIENT} also.
-- @param #number Coalition (Optional) Coalition of this controller. Defaults to coalition.side.BLUE
-- @param #string Type (Optional) Type of the tasks controlled, defaults to PLAYERTASKCONTROLLER.Type.A2G
-- @param #string ClientFilter (Optional) Additional prefix filter for the SET_CLIENT. Can be handed as @{Core.Set#SET_CLIENT} also.
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:New(Name, Coalition, Type, ClientFilter)
@@ -2317,7 +2317,7 @@ end
--- [User] Set flash directions option for player (player based info)
-- @param #PLAYERTASKCONTROLLER self
-- @param #boolean OnOff Set to `true` to switch on and `false` to switch off. Default is OFF.
-- @param #boolean OnOff (Optional) Set to `true` to switch on and `false` to switch off. Default is OFF.
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SetAllowFlashDirection(OnOff)
self:T(self.lid.."SetAllowFlashDirection")
@@ -2327,7 +2327,7 @@ end
--- [User] Set to show a menu entry to retrieve the radio frequencies used.
-- @param #PLAYERTASKCONTROLLER self
-- @param #boolean OnOff Set to `true` to switch on and `false` to switch off. Default is OFF.
-- @param #boolean OnOff (Optional) Set to `true` to switch on and `false` to switch off. Default is OFF.
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SetShowRadioInfoMenu(OnOff)
self:T(self.lid.."SetAllowRadioInfoMenu")
@@ -2436,8 +2436,8 @@ end
--- [User] Set repetition options for tasks.
-- @param #PLAYERTASKCONTROLLER self
-- @param #boolean OnOff Set to `true` to switch on and `false` to switch off (defaults to true)
-- @param #number Repeats Number of repeats (defaults to 5)
-- @param #boolean OnOff (Optional) Set to `true` to switch on and `false` to switch off (defaults to true)
-- @param #number Repeats (Optional) Number of repeats (defaults to 5)
-- @return #PLAYERTASKCONTROLLER self
-- @usage `taskmanager:SetTaskRepetition(true, 5)`
function PLAYERTASKCONTROLLER:SetTaskRepetition(OnOff, Repeats)
@@ -2454,7 +2454,7 @@ end
--- [User] Set how long the briefing is shown on screen.
-- @param #PLAYERTASKCONTROLLER self
-- @param #number Seconds Duration in seconds. Defaults to 30 seconds.
-- @param #number Seconds (Optional) Duration in seconds. Defaults to 30 seconds.
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SetBriefingDuration(Seconds)
self:T(self.lid.."SetBriefingDuration")
@@ -2484,7 +2484,7 @@ end
-- @param #PLAYERTASKCONTROLLER self
-- @param Ops.FlightGroup#FLIGHTGROUP FlightGroup The FlightGroup (e.g. drone) to be used for lasing (one unit in one group only).
-- Can optionally be handed as Ops.ArmyGroup#ARMYGROUP - **Note** might not find an LOS spot or get lost on the way. Cannot island-hop.
-- @param #number LaserCode The lasercode to be used. Defaults to 1688.
-- @param #number LaserCode (Optional) The lasercode to be used. Defaults to 1688.
-- @param Core.Point#COORDINATE HoldingPoint (Optional) Point where the drone should initially circle. If not set, defaults to BullsEye of the coalition.
-- @param #number Alt (Optional) Altitude in feet. Only applies if using a FLIGHTGROUP object! Defaults to 10000.
-- @param #number Speed (Optional) Speed in knots. Only applies if using a FLIGHTGROUP object! Defaults to 120.
@@ -2567,7 +2567,7 @@ end
-- @param #PLAYERTASKCONTROLLER self
-- @param Ops.FlightGroup#FLIGHTGROUP FlightGroup The FlightGroup (e.g. drone) to be used for lasing (one unit in one group only).
-- Can optionally be handed as Ops.ArmyGroup#ARMYGROUP - **Note** might not find an LOS spot or get lost on the way. Cannot island-hop.
-- @param #number LaserCode The lasercode to be used. Defaults to 1688.
-- @param #number LaserCode (Optional) The lasercode to be used. Defaults to 1688.
-- @param Core.Point#COORDINATE HoldingPoint (Optional) Point where the drone should initially circle. If not set, defaults to BullsEye of the coalition.
-- @param #number Alt (Optional) Altitude in feet. Only applies if using a FLIGHTGROUP object! Defaults to 10000.
-- @param #number Speed (Optional) Speed in knots. Only applies if using a FLIGHTGROUP object! Defaults to 120.
@@ -2704,8 +2704,8 @@ end
-- @param #PLAYERTASKCONTROLLER self
-- @param #boolean InfoMenu If `true` this option will allow to show the Task Info-Menu also when a player has an active task.
-- Since the menu isn't refreshed if a player holds an active task, the info in there might be stale.
-- @param #number ItemLimit Number of items per task type to show, default 5.
-- @param #number HoldTime Minimum number of seconds between menu refreshes (called every 30 secs) if a player has **no active task**.
-- @param #number ItemLimit (Optional) Number of items per task type to show, default 5.
-- @param #number HoldTime (Optional) Minimum number of seconds between menu refreshes (called every 30 secs) if a player has **no active task**.
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SetMenuOptions(InfoMenu,ItemLimit,HoldTime)
self:T(self.lid.."SetMenuOptions")
@@ -2840,7 +2840,7 @@ end
--- [User] Set target radius. Determines the zone radius to distinguish CAS from BAI tasks and to find enemies if the TARGET object is a COORDINATE.
-- @param #PLAYERTASKCONTROLLER self
-- @param #number Radius Radius to use in meters. Defaults to 500 meters.
-- @param #number Radius (Optional) Radius to use in meters. Defaults to 500 meters.
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SetTargetRadius(Radius)
self:T(self.lid.."SetTargetRadius")
@@ -2851,7 +2851,7 @@ end
--- [User] Set the cluster radius if you want to use target clusters rather than single group detection.
-- Note that for a controller type A2A target clustering is on by default. Also remember that the diameter of the resulting zone is double the radius.
-- @param #PLAYERTASKCONTROLLER self
-- @param #number Radius Target cluster radius in kilometers. Default is 0.5km.
-- @param #number Radius (Optional) Target cluster radius in kilometers. Default is 0.5km.
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SetClusterRadius(Radius)
self:T(self.lid.."SetClusterRadius")
@@ -2873,7 +2873,7 @@ end
--- [User] Switch usage of target names for menu entries on or off
-- @param #PLAYERTASKCONTROLLER self
-- @param #boolean OnOff If true, set to on (default), if nil or false, set to off
-- @param #boolean OnOff (Optional) If true, set to on (default), if nil or false, set to off
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SwitchUseGroupNames(OnOff)
self:T(self.lid.."SwitchUseGroupNames")
@@ -2887,7 +2887,7 @@ end
--- [User] Switch showing additional magnetic angles
-- @param #PLAYERTASKCONTROLLER self
-- @param #boolean OnOff If true, set to on (default), if nil or false, set to off
-- @param #boolean OnOff (Optional) If true, set to on (default), if nil or false, set to off
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SwitchMagenticAngles(OnOff)
self:T(self.lid.."SwitchMagenticAngles")
@@ -3782,7 +3782,7 @@ end
--- Calculate group future position after given seconds.
-- @param #PLAYERTASKCONTROLLER self
-- @param Wrapper.Group#GROUP group The group to calculate for.
-- @param #number seconds Time interval in seconds. Default is `self.prediction`.
-- @param #number seconds (Optional) Time interval in seconds. Default is `self.prediction`.
-- @return Core.Point#COORDINATE Calculated future position of the cluster.
function PLAYERTASKCONTROLLER:_CalcGroupFuturePosition(group, seconds)
@@ -4898,9 +4898,9 @@ end
--- [User] Set SRS TTS details - see @{Sound.SRS} for details.`SetSRS()` will try to use as many attributes configured with @{Sound.SRS#MSRS.LoadConfigFile}() as possible.
-- @param #PLAYERTASKCONTROLLER self
-- @param #number Frequency Frequency to be used. Can also be given as a table of multiple frequencies, e.g. 271 or {127,251}. There needs to be exactly the same number of modulations!
-- @param #number Modulation Modulation to be used. Can also be given as a table of multiple modulations, e.g. radio.modulation.AM or {radio.modulation.FM,radio.modulation.AM}. There needs to be exactly the same number of frequencies!
-- @param #string PathToSRS Defaults to "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
-- @param #number Frequency (Optional) Frequency to be used. Can also be given as a table of multiple frequencies, e.g. 271 or {127,251}. There needs to be exactly the same number of modulations!
-- @param #number Modulation (Optional) Modulation to be used. Can also be given as a table of multiple modulations, e.g. radio.modulation.AM or {radio.modulation.FM,radio.modulation.AM}. There needs to be exactly the same number of frequencies!
-- @param #string PathToSRS (Optional) Defaults to "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio"
-- @param #string Gender (Optional) Defaults to "male"
-- @param #string Culture (Optional) Defaults to "en-US"
-- @param #number Port (Optional) Defaults to 5002
@@ -4908,11 +4908,13 @@ end
-- Note that this must be installed on your windows system. Can also be Google voice types, if you are using Google TTS.
-- @param #number Volume (Optional) Volume - between 0.0 (silent) and 1.0 (loudest)
-- @param #string PathToGoogleKey (Optional) Path to your google key if you want to use google TTS; if you use a config file for MSRS, hand in nil here.
-- @param #string AccessKey (Optional) Your Google API access key. This is necessary if DCS-gRPC is used as backend; if you use a config file for MSRS, hand in nil here.
-- @param Core.Point#COORDINATE Coordinate Coordinate from which the controller radio is sending
-- @param #string Backend (Optional) MSRS Backend to be used, can be MSRS.Backend.SRSEXE or MSRS.Backend.GRPC; if you use a config file for MSRS, hand in nil here.
-- @param #string AccessKey (Optional) Your Google API access key. This is necessary if DCS-gRPC is used as backend; if you use a config file for MSRS, you can hand in nil here.
-- @param Core.Point#COORDINATE Coordinate (Optional) Coordinate from which the controller radio is sending
-- @param #string Backend (Optional) MSRS Backend to be used, can be MSRS.Backend.SRSEXE or MSRS.Backend.GRPC; if you use a config file for MSRS, you can hand in nil here.
-- @param #string Provider (Optional) TTS Provider to be used.
-- @param #string Speaker (Optional) Use a specific speaker for a voice if Piper is used as provider (only Hound-TTS backend).
-- @return #PLAYERTASKCONTROLLER self
function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,AccessKey,Coordinate,Backend)
function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Culture,Port,Voice,Volume,PathToGoogleKey,AccessKey,Coordinate,Backend,Provider,Speaker)
self:T(self.lid.."SetSRS")
self.PathToSRS = PathToSRS or MSRS.path or "C:\\Program Files\\DCS-SimpleRadio-Standalone\\ExternalAudio" --
self.Gender = Gender or MSRS.gender or "male" --
@@ -4946,10 +4948,16 @@ function PLAYERTASKCONTROLLER:SetSRS(Frequency,Modulation,PathToSRS,Gender,Cultu
self.Voice = Voice or MSRS.poptions.gcloud.voice
self.AccessKey = AccessKey or MSRS.poptions.gcloud.key
end
if Provider then
self.SRS:SetProvider(Provider)
end
if Coordinate then
self.SRS:SetCoordinate(Coordinate)
end
self.SRS:SetVoice(self.Voice)
if Speaker then
self.SRS:SetSpeakerPiper(Speaker)
end
self.SRSQueue = MSRSQUEUE:New(self.MenuName or self.Name)
self.SRSQueue:SetTransmitOnlyWithPlayers(self.TransmitOnlyWithPlayers)
return self
+15 -15
View File
@@ -564,7 +564,7 @@ end
--- Set the speed the tanker flys in its orbit pattern.
-- @param #RECOVERYTANKER self
-- @param #number speed True air speed (TAS) in knots. Default 274 knots, which results in ~250 KIAS.
-- @param #number speed (Optional) True air speed (TAS) in knots. Default 274 knots, which results in ~250 KIAS.
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetSpeed(speed)
self.speed=UTILS.KnotsToMps(speed or 274)
@@ -573,7 +573,7 @@ end
--- Set orbit pattern altitude of the tanker.
-- @param #RECOVERYTANKER self
-- @param #number altitude Tanker altitude in feet. Default 6000 ft.
-- @param #number altitude (Optional) Tanker altitude in feet. Default 6000 ft.
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetAltitude(altitude)
self.altitude=UTILS.FeetToMeters(altitude or 6000)
@@ -582,8 +582,8 @@ end
--- Set race-track distances.
-- @param #RECOVERYTANKER self
-- @param #number distbow Distance [NM] in front of the carrier. Default 10 NM.
-- @param #number diststern Distance [NM] behind the carrier. Default 4 NM.
-- @param #number distbow (Optional) Distance [NM] in front of the carrier. Default 10 NM.
-- @param #number diststern (Optional) Distance [NM] behind the carrier. Default 4 NM.
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetRacetrackDistances(distbow, diststern)
self.distBow=UTILS.NMToMeters(distbow or 10)
@@ -593,7 +593,7 @@ end
--- Set minimum pattern update interval. After a pattern update this time interval has to pass before the next update is allowed.
-- @param #RECOVERYTANKER self
-- @param #number interval Min interval in minutes. Default is 10 minutes.
-- @param #number interval(Optional) Min interval in minutes. Default is 10 minutes.
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetPatternUpdateInterval(interval)
self.dTupdate=(interval or 10)*60
@@ -602,7 +602,7 @@ end
--- Set pattern update distance threshold. Tanker will update its pattern when the carrier changes its position by more than this distance.
-- @param #RECOVERYTANKER self
-- @param #number distancechange Distance threshold in NM. Default 5 NM (=9.62 km).
-- @param #number distancechange (Optional) Distance threshold in NM. Default 5 NM (=9.62 km).
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetPatternUpdateDistance(distancechange)
self.Dupdate=UTILS.NMToMeters(distancechange or 5)
@@ -611,7 +611,7 @@ end
--- Set pattern update heading threshold. Tanker will update its pattern when the carrier changes its heading by more than this value.
-- @param #RECOVERYTANKER self
-- @param #number headingchange Heading threshold in degrees. Default 5 degrees.
-- @param #number headingchange (Optional) Heading threshold in degrees. Default 5 degrees.
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetPatternUpdateHeading(headingchange)
self.Hupdate=headingchange or 5
@@ -620,7 +620,7 @@ end
--- Set low fuel state of tanker. When fuel is below this threshold, the tanker will RTB or be respawned if takeoff type is in air.
-- @param #RECOVERYTANKER self
-- @param #number fuelthreshold Low fuel threshold in percent. Default 10 % of max fuel.
-- @param #number fuelthreshold (Optional) Low fuel threshold in percent. Default 10 % of max fuel.
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetLowFuelThreshold(fuelthreshold)
self.lowfuel=fuelthreshold or 10
@@ -794,9 +794,9 @@ end
--- Set TACAN channel of tanker. Note that mode is automatically set to "Y" for AA TACAN since only that works.
-- @param #RECOVERYTANKER self
-- @param #number channel TACAN channel. Default 1.
-- @param #string morse TACAN morse code identifier. Three letters. Default "TKR".
-- @param #string mode TACAN mode, which can be either "Y" (default) or "X".
-- @param #number channel (Optional) TACAN channel. Default 1.
-- @param #string morse (Optional) TACAN morse code identifier. Three letters. Default "TKR".
-- @param #string mode (Optional) TACAN mode, which can be either "Y" (default) or "X".
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetTACAN(channel, morse, mode)
self.TACANchannel=channel or 1
@@ -808,8 +808,8 @@ end
--- Set radio frequency and optionally modulation of the tanker.
-- @param #RECOVERYTANKER self
-- @param #number frequency Radio frequency in MHz. Default 251 MHz.
-- @param #string modulation Radio modulation, either "AM" or "FM". Default "AM".
-- @param #number frequency (Optional) Radio frequency in MHz. Default 251 MHz.
-- @param #string modulation (Optional) Radio modulation, either "AM" or "FM". Default "AM".
-- @return #RECOVERYTANKER self
function RECOVERYTANKER:SetRadio(frequency, modulation)
self.RadioFreq=frequency or 251
@@ -1537,8 +1537,8 @@ end
--- Init waypoint after spawn. Tanker is first guided to a position astern the carrier and starts its racetrack pattern from there.
-- @param #RECOVERYTANKER self
-- @param #number dist Distance [NM] of initial waypoint astern carrier. Default 8 NM.
-- @param #number delay Delay before routing in seconds. Default 1 second.
-- @param #number dist (Optional) Distance [NM] of initial waypoint astern carrier. Default 8 NM.
-- @param #number delay (Optional) Delay before routing in seconds. Default 1 second.
function RECOVERYTANKER:_InitRoute(dist, delay)
-- Defaults.
+9 -9
View File
@@ -455,7 +455,7 @@ end
--- Set low fuel state of helo. When fuel is below this threshold, the helo will RTB or be respawned if takeoff type is in air.
-- @param #RESCUEHELO self
-- @param #number threshold Low fuel threshold in percent. Default 5%.
-- @param #number threshold (Optional) Low fuel threshold in percent. Default 5%.
-- @return #RESCUEHELO self
function RESCUEHELO:SetLowFuelThreshold(threshold)
self.lowfuel=threshold or 5
@@ -480,7 +480,7 @@ end
--- Set rescue zone radius. Crashed or ejected units inside this radius of the carrier will be rescued if possible.
-- @param #RESCUEHELO self
-- @param #number radius Radius of rescue zone in nautical miles. Default is 15 NM.
-- @param #number radius (Optional) Radius of rescue zone in nautical miles. Default is 15 NM.
-- @return #RESCUEHELO self
function RESCUEHELO:SetRescueZone(radius)
radius=UTILS.NMToMeters(radius or 15)
@@ -490,7 +490,7 @@ end
--- Set rescue hover speed.
-- @param #RESCUEHELO self
-- @param #number speed Speed in knots. Default 5 kts.
-- @param #number speed (Optional) Speed in knots. Default 5 kts.
-- @return #RESCUEHELO self
function RESCUEHELO:SetRescueHoverSpeed(speed)
self.rescuespeed=UTILS.KnotsToMps(speed or 5)
@@ -499,7 +499,7 @@ end
--- Set rescue duration. This is the time it takes to rescue a pilot at the crash site.
-- @param #RESCUEHELO self
-- @param #number duration Duration in minutes. Default 5 min.
-- @param #number duration (Optional) Duration in minutes. Default 5 min.
-- @return #RESCUEHELO self
function RESCUEHELO:SetRescueDuration(duration)
self.rescueduration=(duration or 5)*60
@@ -541,7 +541,7 @@ end
--- Set takeoff type.
-- @param #RESCUEHELO self
-- @param #number takeofftype Takeoff type. Default SPAWN.Takeoff.Hot.
-- @param #number takeofftype (Optional) Takeoff type. Default SPAWN.Takeoff.Hot.
-- @return #RESCUEHELO self
function RESCUEHELO:SetTakeoff(takeofftype)
self.takeoff=takeofftype or SPAWN.Takeoff.Hot
@@ -574,7 +574,7 @@ end
--- Set altitude of helo.
-- @param #RESCUEHELO self
-- @param #number alt Altitude in meters. Default 70 m.
-- @param #number alt (Optional) Altitude in meters. Default 70 m.
-- @return #RESCUEHELO self
function RESCUEHELO:SetAltitude(alt)
self.altitude=alt or 70
@@ -583,7 +583,7 @@ end
--- Set offset parallel to orientation of carrier.
-- @param #RESCUEHELO self
-- @param #number distance Offset distance in meters. Default 200 m (~660 ft).
-- @param #number distance (Optional) Offset distance in meters. Default 200 m (~660 ft).
-- @return #RESCUEHELO self
function RESCUEHELO:SetOffsetX(distance)
self.offsetX=distance or 200
@@ -592,7 +592,7 @@ end
--- Set offset perpendicular to orientation to carrier.
-- @param #RESCUEHELO self
-- @param #number distance Offset distance in meters. Default 240 m (~780 ft).
-- @param #number distance (Optional) Offset distance in meters. Default 240 m (~780 ft).
-- @return #RESCUEHELO self
function RESCUEHELO:SetOffsetZ(distance)
self.offsetZ=distance or 240
@@ -650,7 +650,7 @@ end
--- Set follow time update interval.
-- @param #RESCUEHELO self
-- @param #number dt Time interval in seconds. Default 1.0 sec.
-- @param #number dt (Optional) Time interval in seconds. Default 1.0 sec.
-- @return #RESCUEHELO self
function RESCUEHELO:SetFollowTimeInterval(dt)
self.dtFollow=dt or 1.0
+6 -6
View File
@@ -92,7 +92,7 @@ SQUADRON.version="0.8.1"
--- Create a new SQUADRON object and start the FSM.
-- @param #SQUADRON self
-- @param #string TemplateGroupName Name of the template group.
-- @param #number Ngroups Number of asset groups of this squadron. Default 3.
-- @param #number Ngroups (Optional) Number of asset groups of this squadron. Default 3.
-- @param #string SquadronName Name of the squadron, e.g. "VFA-37". Must be **unique**!
-- @return #SQUADRON self
function SQUADRON:New(TemplateGroupName, Ngroups, SquadronName)
@@ -125,7 +125,7 @@ end
--- Set number of units in groups.
-- @param #SQUADRON self
-- @param #number nunits Number of units. Must be >=1 and <=4. Default 2.
-- @param #number nunits (Optional) Number of units. Must be >=1 and <=4. Default 2.
-- @return #SQUADRON self
function SQUADRON:SetGrouping(nunits)
self.ngrouping=nunits or 2
@@ -150,7 +150,7 @@ end
--- Set takeoff type. All assets of this squadron will be spawned with cold (default) or hot engines.
-- Spawning on runways is not supported.
-- @param #SQUADRON self
-- @param #string TakeoffType Take off type: "Cold" (default) or "Hot" with engines on or "Air" for spawning in air.
-- @param #string TakeoffType (Optional) Take off type: "Cold" (default) or "Hot" with engines on or "Air" for spawning in air.
-- @return #SQUADRON self
function SQUADRON:SetTakeoffType(TakeoffType)
TakeoffType=TakeoffType or "Cold"
@@ -193,7 +193,7 @@ end
--- Set despawn after landing. Aircraft will be despawned after the landing event.
-- Can help to avoid DCS AI taxiing issues.
-- @param #SQUADRON self
-- @param #boolean Switch If `true` (default), activate despawn after landing.
-- @param #boolean Switch (Optional) If `true` (default), activate despawn after landing.
-- @return #SQUADRON self
function SQUADRON:SetDespawnAfterLanding(Switch)
if Switch then
@@ -207,7 +207,7 @@ end
--- Set despawn after holding. Aircraft will be despawned when they arrive at their holding position at the airbase.
-- Can help to avoid DCS AI taxiing issues.
-- @param #SQUADRON self
-- @param #boolean Switch If `true` (default), activate despawn after holding.
-- @param #boolean Switch (Optional) If `true` (default), activate despawn after holding.
-- @return #SQUADRON self
function SQUADRON:SetDespawnAfterHolding(Switch)
if Switch then
@@ -221,7 +221,7 @@ end
--- Set low fuel threshold.
-- @param #SQUADRON self
-- @param #number LowFuel Low fuel threshold in percent. Default 25.
-- @param #number LowFuel (Optional) Low fuel threshold in percent. Default 25.
-- @return #SQUADRON self
function SQUADRON:SetFuelLowThreshold(LowFuel)
self.fuellow=LowFuel or 25
File diff suppressed because it is too large Load Diff
+5 -5
View File
@@ -400,7 +400,7 @@ end
--- Set priority of the target.
-- @param #TARGET self
-- @param #number Priority Priority of the target. Default 50.
-- @param #number Priority (Optional) Priority of the target. Default 50.
-- @return #TARGET self
function TARGET:SetPriority(Priority)
self.prio=Priority or 50
@@ -409,7 +409,7 @@ end
--- Set importance of the target.
-- @param #TARGET self
-- @param #number Importance Importance of the target. Default `nil`.
-- @param #number Importance (Optional) Importance of the target. Default `nil`.
-- @return #TARGET self
function TARGET:SetImportance(Importance)
self.importance=Importance
@@ -508,10 +508,10 @@ end
--- Add mission type and number of required assets to resource.
-- @param #TARGET self
-- @param #string MissionType Mission Type.
-- @param #number Nmin Min number of required assets.
-- @param #number Nmax Max number of requried assets.
-- @param #number Nmin (Optional) Min number of required assets. Default is 1.
-- @param #number Nmax (Optional) Max number of requried assets. Default is 1.
-- @param #table Attributes Generalized attribute(s).
-- @param #table Properties DCS attribute(s). Default `nil`.
-- @param #table Properties (Optional) DCS attribute(s). Default `nil`.
-- @return #TARGET.Resource The resource table.
function TARGET:AddResource(MissionType, Nmin, Nmax, Attributes, Properties)
+19 -17
View File
@@ -170,7 +170,7 @@ end
--- Set radio power. Note that this only applies if no relay unit is used.
-- @param #RADIOQUEUE self
-- @param #number power Radio power in Watts. Default 100 W.
-- @param #number power (Optional) Radio power in Watts. Default 100 W.
-- @return #RADIOQUEUE self The RADIOQUEUE object.
function RADIOQUEUE:SetRadioPower(power)
self.power=power or 100
@@ -179,8 +179,8 @@ end
--- Set SRS.
-- @param #RADIOQUEUE self
-- @param #string PathToSRS Path to SRS.
-- @param #number Port SRS port. Default 5002.
-- @param #string PathToSRS (Optional) Path to SRS.
-- @param #number Port (Optional) SRS port. Default 5002.
-- @return #RADIOQUEUE self The RADIOQUEUE object.
function RADIOQUEUE:SetSRS(PathToSRS, Port)
local path = PathToSRS or MSRS.path
@@ -195,9 +195,9 @@ end
-- @param #number digit The digit 0-9.
-- @param #string filename The name of the sound file.
-- @param #number duration The duration of the sound file in seconds.
-- @param #string path The directory within the miz file where the sound is located. Default "l10n/DEFAULT/".
-- @param #string path (Optional) The directory within the miz file where the sound is located. Default "l10n/DEFAULT/".
-- @param #string subtitle Subtitle of the transmission.
-- @param #number subduration Duration [sec] of the subtitle being displayed. Default 5 sec.
-- @param #number subduration (Optional) Duration [sec] of the subtitle being displayed. Default 5 sec.
-- @return #RADIOQUEUE self The RADIOQUEUE object.
function RADIOQUEUE:SetDigit(digit, filename, duration, path, subtitle, subduration)
@@ -245,11 +245,11 @@ end
-- @param #RADIOQUEUE self
-- @param #string filename Name of the sound file. Usually an ogg or wav file type.
-- @param #number duration Duration in seconds the file lasts.
-- @param #number path Directory path inside the miz file where the sound file is located. Default "l10n/DEFAULT/".
-- @param #number tstart Start time (abs) seconds. Default now.
-- @param #number interval Interval in seconds after the last transmission finished.
-- @param #number path (Optional) Directory path inside the miz file where the sound file is located. Default "l10n/DEFAULT/".
-- @param #number tstart (Optional) Start time (abs) seconds. Default now.
-- @param #number interval (Optional) Interval in seconds after the last transmission finished. Defaults to 0.
-- @param #string subtitle Subtitle of the transmission.
-- @param #number subduration Duration [sec] of the subtitle being displayed. Default 5 sec.
-- @param #number subduration (Optional) Duration [sec] of the subtitle being displayed. Default 5 sec.
-- @return #RADIOQUEUE.Transmission Radio transmission table.
function RADIOQUEUE:NewTransmission(filename, duration, path, tstart, interval, subtitle, subduration)
@@ -295,8 +295,8 @@ end
--- Add a SOUNDFILE to the radio queue.
-- @param #RADIOQUEUE self
-- @param Sound.SoundOutput#SOUNDFILE soundfile Sound file object to be added.
-- @param #number tstart Start time (abs) seconds. Default now.
-- @param #number interval Interval in seconds after the last transmission finished.
-- @param #number tstart (Optional) Start time (abs) seconds. Default now.
-- @param #number interval (Optional) Interval in seconds after the last transmission finished. Defaults to 0.
-- @return #RADIOQUEUE self
function RADIOQUEUE:AddSoundFile(soundfile, tstart, interval)
--env.info(string.format("FF add soundfile: name=%s%s", soundfile:GetPath(), soundfile:GetFileName()))
@@ -308,8 +308,8 @@ end
--- Add a SOUNDTEXT to the radio queue.
-- @param #RADIOQUEUE self
-- @param Sound.SoundOutput#SOUNDTEXT soundtext Text-to-speech text.
-- @param #number tstart Start time (abs) seconds. Default now.
-- @param #number interval Interval in seconds after the last transmission finished.
-- @param #number tstart (Optional) Start time (abs) seconds. Default now.
-- @param #number interval (Optional) Interval in seconds after the last transmission finished. Defaults to 0.
-- @return #RADIOQUEUE self
function RADIOQUEUE:AddSoundText(soundtext, tstart, interval)
@@ -361,7 +361,6 @@ end
-- @param #RADIOQUEUE self
-- @param #RADIOQUEUE.Transmission transmission The transmission.
function RADIOQUEUE:Broadcast(transmission)
self:T("Broadcast")
if ((transmission.soundfile and transmission.soundfile.useSRS) or transmission.soundtext) and self.msrs then
self:_BroadcastSRS(transmission)
@@ -377,6 +376,9 @@ function RADIOQUEUE:Broadcast(transmission)
if sender then
-- Broadcasting from aircraft. Only players tuned in to the right frequency will see the message.
self:T(self.lid..string.format("Broadcasting from aircraft %s | sender init: %s", sender:GetName(),tostring(self.senderinit)))
self:T(self.lid..string.format("Broadcasting from aircraft %s", sender:GetName()))
@@ -421,7 +423,7 @@ function RADIOQUEUE:Broadcast(transmission)
-- Debug message.
if self.Debugmode then
local text=string.format("file=%s, freq=%.2f MHz, duration=%.2f sec, subtitle=%s", filename, self.frequency/1000000, transmission.duration, transmission.subtitle or "")
MESSAGE:New(text, 2, "RADIOQUEUE "..self.alias):ToAll()
MESSAGE:New(text, 2, "RADIOQUEUE "..self.alias):ToAll():ToLog()
end
else
@@ -453,7 +455,7 @@ function RADIOQUEUE:Broadcast(transmission)
-- Debug message.
if self.Debugmode then
local text=string.format("file=%s, freq=%.2f MHz, duration=%.2f sec, subtitle=%s", filename, self.frequency/1000000, transmission.duration, transmission.subtitle or "")
MESSAGE:New(string.format(text, filename, transmission.duration, transmission.subtitle or ""), 5, "RADIOQUEUE "..self.alias):ToAll()
MESSAGE:New(string.format(text, filename, transmission.duration, transmission.subtitle or ""), 5, "RADIOQUEUE "..self.alias):ToAll():ToLog()
end
else
self:E("ERROR: Could not get vec3 to determine transmission origin! Did you specify a sender and is it still alive?")
@@ -486,7 +488,7 @@ end
--- Check radio queue for transmissions to be broadcasted.
-- @param #RADIOQUEUE self
function RADIOQUEUE:_CheckRadioQueue()
self:T("_CheckRadioQueue")
-- Check if queue is empty.
if #self.queue==0 then
-- Queue is now empty. Nothing to else to do.
File diff suppressed because it is too large Load Diff
+41 -16
View File
@@ -24,7 +24,7 @@
do -- Sound Base
-- @type SOUNDBASE
--- @type SOUNDBASE
-- @field #string ClassName Name of the class.
-- @extends Core.Base#BASE
@@ -61,7 +61,7 @@ do -- Sound Base
-- * (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min
--
-- @param #string Text The text string to analyze.
-- @param #number Speed Speed factor. Default 1.
-- @param #number Speed (Optional) Speed factor. Default 1.
-- @param #boolean isGoogle If true, google text-to-speech is used.
function SOUNDBASE:GetSpeechTime(length,speed,isGoogle)
@@ -100,7 +100,7 @@ end
do -- Sound File
-- @type SOUNDFILE
--- @type SOUNDFILE
-- @field #string ClassName Name of the class
-- @field #string filename Name of the flag.
-- @field #string path Directory path, where the sound file is located. This includes the final slash "/".
@@ -158,9 +158,9 @@ do -- Sound File
--- Constructor to create a new SOUNDFILE object.
-- @param #SOUNDFILE self
-- @param #string FileName The name of the sound file, e.g. "Hello World.ogg".
-- @param #string Path The path of the directory, where the sound file is located. Default is "l10n/DEFAULT/" within the miz file.
-- @param #number Duration Duration in seconds, how long it takes to play the sound file. Default is 3 seconds.
-- @param #boolean UseSrs Set if SRS should be used to play this file. Default is false.
-- @param #string Path (Optional) The path of the directory, where the sound file is located. Default is "l10n/DEFAULT/" within the miz file.
-- @param #number Duration (Optional) Duration in seconds, how long it takes to play the sound file. Default is 3 seconds.
-- @param #boolean UseSrs (Optional) Set if SRS should be used to play this file. Default is false.
-- @return #SOUNDFILE self
function SOUNDFILE:New(FileName, Path, Duration, UseSrs)
@@ -187,7 +187,7 @@ do -- Sound File
--- Set path, where the sound file is located.
-- @param #SOUNDFILE self
-- @param #string Path Path to the directory, where the sound file is located. In case this is nil, it defaults to the DCS mission temp directory.
-- @param #string Path (Optional) Path to the directory, where the sound file is located. In case this is nil, it defaults to the DCS mission temp directory.
-- @return #SOUNDFILE self
function SOUNDFILE:SetPath(Path)
self:F( {Path} )
@@ -228,7 +228,7 @@ do -- Sound File
--- Set sound file name. This must be a .ogg or .mp3 file!
-- @param #SOUNDFILE self
-- @param #string FileName Name of the file. Default is "Hello World.mp3".
-- @param #string FileName (Optional) Name of the file. Default is "Hello World.mp3".
-- @return #SOUNDFILE self
function SOUNDFILE:SetFileName(FileName)
--TODO: check that sound file is really .ogg or .mp3
@@ -246,7 +246,7 @@ do -- Sound File
--- Set duration how long it takes to play the sound file.
-- @param #SOUNDFILE self
-- @param #string Duration Duration in seconds. Default 3 seconds.
-- @param #string Duration (Optional) Duration in seconds. Default 3 seconds.
-- @return #SOUNDFILE self
function SOUNDFILE:SetDuration(Duration)
if Duration and type(Duration)=="string" then
@@ -291,7 +291,8 @@ do -- Sound File
end
do -- Text-To-Speech
---
-- @type SOUNDTEXT
-- @field #string ClassName Name of the class
-- @field #string text Text to speak.
@@ -299,6 +300,8 @@ do -- Text-To-Speech
-- @field #string gender Gender: "male", "female".
-- @field #string culture Culture, e.g. "en-GB".
-- @field #string voice Specific voice to use. Overrules `gender` and `culture` settings.
-- @field #number speed Specific speed to be used.
-- @field #string speaker (PIPER/HOUND only) sub-voice speaker to be used.
-- @extends Core.Base#BASE
@@ -351,7 +354,7 @@ do -- Text-To-Speech
--- Constructor to create a new SOUNDTEXT object.
-- @param #SOUNDTEXT self
-- @param #string Text The text to speak.
-- @param #number Duration Duration in seconds, how long it takes to play the text. Default is 3 seconds.
-- @param #number Duration (Optional) Duration in seconds, how long it takes to play the text. Default is 3 seconds.
-- @return #SOUNDTEXT self
function SOUNDTEXT:New(Text, Duration)
@@ -362,7 +365,7 @@ do -- Text-To-Speech
self:SetDuration(Duration or MSRS.getSpeechTime(Text))
--self:SetGender()
--self:SetCulture()
self:SetSpeed()
-- Debug info:
self:T(string.format("New SOUNDTEXT: text=%s, duration=%.1f sec", self.text, self.duration))
@@ -371,7 +374,7 @@ do -- Text-To-Speech
--- Set text.
-- @param #SOUNDTEXT self
-- @param #string Text Text to speak. Default "Hello World!".
-- @param #string Text (Optional) Text to speak. Default "Hello World!".
-- @return #SOUNDTEXT self
function SOUNDTEXT:SetText(Text)
@@ -382,7 +385,7 @@ do -- Text-To-Speech
--- Set duration, how long it takes to speak the text.
-- @param #SOUNDTEXT self
-- @param #number Duration Duration in seconds. Default 3 seconds.
-- @param #number Duration (Optional) Duration in seconds. Default 3 seconds.
-- @return #SOUNDTEXT self
function SOUNDTEXT:SetDuration(Duration)
@@ -393,7 +396,7 @@ do -- Text-To-Speech
--- Set gender.
-- @param #SOUNDTEXT self
-- @param #string Gender Gender: "male" or "female" (default).
-- @param #string Gender (Optional) Gender: "male" or "female" (default).
-- @return #SOUNDTEXT self
function SOUNDTEXT:SetGender(Gender)
@@ -404,7 +407,7 @@ do -- Text-To-Speech
--- Set TTS culture - local for the voice.
-- @param #SOUNDTEXT self
-- @param #string Culture TTS culture. Default "en-GB".
-- @param #string Culture (Optional) TTS culture. Default "en-GB".
-- @return #SOUNDTEXT self
function SOUNDTEXT:SetCulture(Culture)
@@ -425,4 +428,26 @@ do -- Text-To-Speech
return self
end
--- Set to use a specific speed.
-- @param #SOUNDTEXT self
-- @param #number Speed
-- @return #SOUNDTEXT self
function SOUNDTEXT:SetSpeed(Speed)
self.speed = Speed or 1.0
return self
end
--- Set to use a specific speaker (PIPER sub-voice).
-- @param #SOUNDTEXT self
-- @param #string Speaker
-- @return #SOUNDTEXT self
function SOUNDTEXT:SetSpeaker(Speaker)
self.speaker = Speaker
return self
end
end
+365 -13
View File
@@ -131,14 +131,24 @@ ENUMS.WeaponFlag={
Cannons = 805306368, -- GUN_POD + BuiltInCannon
--- Torpedo
Torpedo = 4294967296,
--- Decoy
Decoys = 8589934592,
--- Shell
SmokeShell = 17179869184,
IlluminationShell = 34359738368,
MarkerShell = 51539607552,
MarkerWeapon = 51539620864,
SubmunitionDispenserShell = 68719476736,
ConventionalShell = 206963736576,
---
-- Even More Genral
Auto = 3221225470, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons)
AutoDCS = 1073741822, -- Something if often see
AnyAG = 2956984318, -- Any Air-To-Ground Weapon
AnyAA = 264241152, -- Any Air-To-Air Weapon
AnyUnguided = 2952822768, -- Any Unguided Weapon
AnyGuided = 268402702, -- Any Guided Weapon
Auto = 265214230526, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons + Torpedos)
AutoDCS = 1073741822, -- Something if often see
AnyAG = 2956984318, -- Any Air-To-Ground Weapon
AnyAA = 264241152, -- Any Air-To-Air Weapon
AnyUnguided = 2952822768, -- Any Unguided Weapon
AnyGuided = 268402702, -- Any Guided Weapon
AnyShell = 258503344128, -- Any Shell
}
--- Weapon types by category. See the [Weapon Flag](https://wiki.hoggitworld.com/view/DCS_enum_weapon_flag) enumerator on hoggit wiki.
@@ -220,11 +230,11 @@ ENUMS.WeaponType.Torpedo={
}
ENUMS.WeaponType.Any={
-- General combinations
Weapon = 3221225470, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons)
AG = 2956984318, -- Any Air-To-Ground Weapon
AA = 264241152, -- Any Air-To-Air Weapon
Unguided = 2952822768, -- Any Unguided Weapon
Guided = 268402702, -- Any Guided Weapon
Weapon = 265214230526, -- Any Weapon (AnyBomb + AnyRocket + AnyMissile + Cannons + Torpedos)
AG = 2956984318, -- Any Air-To-Ground Weapon
AA = 264241152, -- Any Air-To-Air Weapon
Unguided = 2952822768, -- Any Unguided Weapon
Guided = 268402702, -- Any Guided Weapon
}
@@ -513,7 +523,7 @@ ENUMS.ReportingName =
Tornado = "Tornado",
-- Transport / Bomber / Others
Atlas = "A400",
Lancer = "B1-B",
Lancer = "B-1B",
Stratofortress = "B-52H",
Herc = "C-130",
Hercules = "C-130J-30",
@@ -558,7 +568,7 @@ ENUMS.ReportingName =
Apache = "AH-64",
Chinook = "CH-47",
Sea_Stallion = "CH-53",
Kiowa = "OH-58",
Kiowa = "OH58D",
Seahawk = "SH-60",
Blackhawk = "UH-60",
Sea_King = "S-61",
@@ -1798,6 +1808,298 @@ ENUMS.Storage.weapons.missiles.Igla_S = 'weapons.missiles.Igla_S'
ENUMS.Storage.weapons.gunmounts.AKAN_NO_TRC = 'weapons.gunmounts.{AKAN_NO_TRC}'
ENUMS.Storage.weapons.gunmounts.AKAN = 'weapons.gunmounts.{AKAN}'
ENUMS.Storage.weapons.shells.M882_9x19 = 'weapons.shells.9x19_m882'
ENUMS.Storage.weapons.droptanks.fuel_tank_370gal = "weapons.droptanks.fuel_tank_370gal"
ENUMS.Storage.weapons.droptanks.fuel_tank_300gal = "weapons.droptanks.fuel_tank_300gal"
-- NEW
ENUMS.Storage.weapons.adapters.HB_F_4E_ORD_LAU_77 = 'weapons.adapters.HB_F-4E_ORD_LAU_77'
ENUMS.Storage.weapons.adapters.hb_a_6e_lau7_adu299 = 'weapons.adapters.hb_a-6e_lau7_adu299'
ENUMS.Storage.weapons.adapters.CHAP_AIM92LN = 'weapons.adapters.CHAP_AIM92LN'
ENUMS.Storage.weapons.adapters.CHAP_HOT3LN = 'weapons.adapters.CHAP_HOT3LN'
ENUMS.Storage.weapons.adapters.CHAP_FZ225 = 'weapons.adapters.CHAP_FZ225'
ENUMS.Storage.weapons.bombs.AH6_SMOKE_BLUE = 'weapons.bombs.AH6_SMOKE_BLUE'
ENUMS.Storage.weapons.bombs.AH6_SMOKE_GREEN = 'weapons.bombs.AH6_SMOKE_GREEN'
ENUMS.Storage.weapons.bombs.AH6_SMOKE_RED = 'weapons.bombs.AH6_SMOKE_RED'
ENUMS.Storage.weapons.bombs.AH6_SMOKE_YELLOW = 'weapons.bombs.AH6_SMOKE_YELLOW'
ENUMS.Storage.weapons.bombs.AO_25SL = 'weapons.bombs.AO_25SL'
ENUMS.Storage.weapons.missiles.HB_AGM_78 = 'weapons.missiles.HB_AGM_78'
ENUMS.Storage.weapons.missiles.V_1 = 'weapons.missiles.V-1'
ENUMS.Storage.weapons.shells.Oerlikon_20mm_HE = 'weapons.shells.Oerlikon_20mm_HE'
ENUMS.Storage.weapons.shells.RM_15cm_HE = 'weapons.shells.RM_15cm_HE'
ENUMS.Storage.weapons.shells.HE_T_MkII_40mm = 'weapons.shells.HE_T_MkII_40mm'
ENUMS.Storage.weapons.shells.APCBC = 'weapons.shells.APCBC'
ENUMS.Storage.weapons.shells.Sprgr_43_L71 = 'weapons.shells.Sprgr_43_L71'
ENUMS.Storage.weapons.shells.Mk_20_HE_shell = 'weapons.shells.Mk_20_HE_shell'
ENUMS.Storage.weapons.shells.Pzgr_39_42 = 'weapons.shells.Pzgr_39/42'
ENUMS.Storage.weapons.shells.M1_37mm_37AP_T = 'weapons.shells.M1_37mm_37AP-T'
ENUMS.Storage.weapons.shells.Sprgr_38 = 'weapons.shells.Sprgr_38'
ENUMS.Storage.weapons.shells.Sprgr_39 = 'weapons.shells.Sprgr_39'
ENUMS.Storage.weapons.shells.Pzgr_39_43 = 'weapons.shells.Pzgr_39/43'
ENUMS.Storage.weapons.shells.Pzgr_39_5cm = 'weapons.shells.Pzgr_39_5cm'
ENUMS.Storage.weapons.shells.AP_2A20_115mm = 'weapons.shells.2A20_115mm_AP'
ENUMS.Storage.weapons.shells.AP_T_MkI_40mm = 'weapons.shells.AP_T_MkI_40mm'
ENUMS.Storage.weapons.shells.AP_37x263 = 'weapons.shells.37x263_AP'
ENUMS.Storage.weapons.shells.AP_20x138B = 'weapons.shells.20x138B_AP'
ENUMS.Storage.weapons.shells.Besa7_92x57T = 'weapons.shells.Besa7_92x57T'
ENUMS.Storage.weapons.shells.Sprgr_34_L70 = 'weapons.shells.Sprgr_34_L70'
ENUMS.Storage.weapons.shells.QF94_AA_HE = 'weapons.shells.QF94_AA_HE'
ENUMS.Storage.weapons.shells.AH_6762x51mm_M62 = 'weapons.shells.AH-6 7.62x51mm M62'
ENUMS.Storage.weapons.shells.AH_6762x51mm_M80 = 'weapons.shells.AH-6 7.62x51mm M80'
ENUMS.Storage.weapons.shells.AH_6_762x51mm_M61 = 'weapons.shells.AH-6 7.62x51mm M61'
ENUMS.Storage.weapons.shells.leFH18_105HE = 'weapons.shells.leFH18_105HE'
ENUMS.Storage.weapons.shells.M63_37HE = 'weapons.shells.M63_37HE'
ENUMS.Storage.weapons.shells.QF95_206R_fixed = 'weapons.shells.QF95_206R_fixed'
ENUMS.Storage.weapons.shells.UBR_365_85AP = 'weapons.shells.UBR_365_85AP'
ENUMS.Storage.weapons.shells.M101 = 'weapons.shells.M101'
ENUMS.Storage.weapons.shells.HE_M1_Shell = 'weapons.shells.HE_M1_Shell'
ENUMS.Storage.weapons.shells.UO_365K_85HE = 'weapons.shells.UO_365K_85HE'
ENUMS.Storage.weapons.shells.Flak41_Sprgr_39 = 'weapons.shells.Flak41_Sprgr_39'
ENUMS.Storage.weapons.shells.M1_37mm_HE_T = 'weapons.shells.M1_37mm_HE-T'
ENUMS.Storage.weapons.shells.QF17_HE = 'weapons.shells.QF17_HE'
ENUMS.Storage.weapons.shells.Pzgr_39 = 'weapons.shells.Pzgr_39'
ENUMS.Storage.weapons.shells.Besa7_92x57 = 'weapons.shells.Besa7_92x57'
ENUMS.Storage.weapons.shells.I_Gr_33 = 'weapons.shells.I_Gr_33'
ENUMS.Storage.weapons.shells.M62_APC = 'weapons.shells.M62_APC'
ENUMS.Storage.weapons.shells.Mk_12_HE_shell = 'weapons.shells.Mk_12_HE_shell'
ENUMS.Storage.weapons.shells.M51_37AP = 'weapons.shells.M51_37AP'
ENUMS.Storage.weapons.shells.M42A1_HE = 'weapons.shells.M42A1_HE'
ENUMS.Storage.weapons.shells.HE_20x138B = 'weapons.shells.20x138B_HE'
ENUMS.Storage.weapons.shells.HE_37x263 = 'weapons.shells.37x263_HE'
ENUMS.Storage.weapons.shells.HE_2A20_115mm = 'weapons.shells.2A20_115mm_HE'
ENUMS.Storage.weapons.shells.AP_20x99R = 'weapons.shells.20x99R_AP'
ENUMS.Storage.weapons.shells.IranFAC_DShK_API_T = 'weapons.shells.IranFAC_DShK_API_T'
ENUMS.Storage.weapons.shells.IranFAC_DShK_API = 'weapons.shells.IranFAC_DShK_API'
ENUMS.Storage.weapons.shells.HE_T_20x99R = 'weapons.shells.20x99R_HE_T'
ENUMS.Storage.weapons.gunmounts.B17_TailTurret_M2_L = 'weapons.gunmounts.B17_TailTurret_M2_L'
ENUMS.Storage.weapons.gunmounts.AH6_M134L = 'weapons.gunmounts.{AH6_M134L}'
ENUMS.Storage.weapons.gunmounts.B17_Left_Nose_M2 = 'weapons.gunmounts.B17_Left_Nose_M2'
ENUMS.Storage.weapons.gunmounts.Ju88_Turret_Top_Right_MG_81 = 'weapons.gunmounts.Ju88_Turret_Top_Right_MG_81'
ENUMS.Storage.weapons.gunmounts.Ju88_Turret_Bottom_MG_81_L = 'weapons.gunmounts.Ju88_Turret_Bottom_MG_81_L'
ENUMS.Storage.weapons.gunmounts.B17_ChinTurret_M2_R = 'weapons.gunmounts.B17_ChinTurret_M2_R'
ENUMS.Storage.weapons.gunmounts.B17_Waist_Right_M2 = 'weapons.gunmounts.B17_Waist_Right_M2'
ENUMS.Storage.weapons.gunmounts.AH_6_Door_Gun = 'weapons.gunmounts.AH-6_Door_Gun'
ENUMS.Storage.weapons.gunmounts.B17_BallTurret_M2_L = 'weapons.gunmounts.B17_BallTurret_M2_L'
ENUMS.Storage.weapons.gunmounts.B17_BallTurret_M2_R = 'weapons.gunmounts.B17_BallTurret_M2_R'
ENUMS.Storage.weapons.gunmounts.B17_TopTurret_M2_R = 'weapons.gunmounts.B17_TopTurret_M2_R'
ENUMS.Storage.weapons.gunmounts.B17_Right_Nose_M2 = 'weapons.gunmounts.B17_Right_Nose_M2'
ENUMS.Storage.weapons.gunmounts.Ju88_Turret_Bottom_MG_81_R = 'weapons.gunmounts.Ju88_Turret_Bottom_MG_81_R'
ENUMS.Storage.weapons.gunmounts.B17_TopTurret_M2_L = 'weapons.gunmounts.B17_TopTurret_M2_L'
ENUMS.Storage.weapons.gunmounts.B17_Waist_Left_M2 = 'weapons.gunmounts.B17_Waist_Left_M2'
ENUMS.Storage.weapons.gunmounts.Ju88_Turret_ahead_MG_81 = 'weapons.gunmounts.Ju88_Turret_ahead_MG_81'
ENUMS.Storage.weapons.gunmounts.AH6_M134R = 'weapons.gunmounts.{AH6_M134R}'
ENUMS.Storage.weapons.gunmounts.Ju88_Turret_Top_Left_MG_81 = 'weapons.gunmounts.Ju88_Turret_Top_Left_MG_81'
ENUMS.Storage.weapons.gunmounts.B17_TailTurret_M2_R = 'weapons.gunmounts.B17_TailTurret_M2_R'
ENUMS.Storage.weapons.gunmounts.AKAN_NO_TRC = 'weapons.gunmounts.AKAN_NO_TRC'
ENUMS.Storage.weapons.gunmounts.AKAN = 'weapons.gunmounts.AKAN'
ENUMS.Storage.weapons.gunmounts.B17_ChinTurret_M2_L = 'weapons.gunmounts.B17_ChinTurret_M2_L'
ENUMS.Storage.weapons.gunmounts.AKAN = 'weapons.gunmounts.AKAN'
ENUMS.Storage.weapons.gunmounts.AKAN_NO_TRC = 'weapons.gunmounts.AKAN_NO_TRC'
ENUMS.Storage.weapons.gunmounts.AH_6_Door = 'weapons.gunmounts.{AH-6_Door}'
ENUMS.Storage.weapons.gunmounts.AH_6_FN_HMP400 = 'weapons.gunmounts.{AH-6_FN_HMP400}'
ENUMS.Storage.weapons.gunmounts.AH_6_M134L = 'weapons.gunmounts.AH-6_M134L'
ENUMS.Storage.weapons.gunmounts.AH_6_M134R = 'weapons.gunmounts.AH-6_M134R'
ENUMS.Storage.weapons.gunmounts.AH_6_HMP400 = 'weapons.gunmounts.AH-6_HMP400'
ENUMS.Storage.weapons.gunmounts.AKAN_NO_TRC = 'weapons.gunmounts.{AKAN_NO_TRC}'
ENUMS.Storage.weapons.gunmounts.AKAN = 'weapons.gunmounts.{AKAN}'
ENUMS.Storage.weapons.gunmounts.CHAP_HMP400LC = 'weapons.gunmounts.{CHAP_HMP400LC}'
ENUMS.Storage.weapons.gunmounts.HMP400LC = 'weapons.gunmounts.HMP400LC'
ENUMS.Storage.weapons.gunmounts.SHVAK_GUN = 'weapons.gunmounts.SHVAK_GUN'
ENUMS.Storage.weapons.droptanks.PTB_800 = 'weapons.droptanks.PTB-800'
ENUMS.Storage.weapons.droptanks.PTB_275 = 'weapons.droptanks.PTB-275'
ENUMS.Storage.weapons.droptanks.HB_A6E_AERO1D_EMPTY = 'weapons.droptanks.HB_A6E_AERO1D_EMPTY'
ENUMS.Storage.weapons.droptanks.Drop_tank_75gal = 'weapons.droptanks.Drop tank 75gal'
ENUMS.Storage.weapons.droptanks.S_3_PTB = 'weapons.droptanks.S-3-PTB'
ENUMS.Storage.weapons.droptanks.PTB_3000 = 'weapons.droptanks.PTB-3000'
ENUMS.Storage.weapons.droptanks.HB_A6E_D704 = 'weapons.droptanks.HB_A6E_D704'
ENUMS.Storage.weapons.droptanks.PTB_1150_29 = 'weapons.droptanks.PTB-1150-29'
ENUMS.Storage.weapons.droptanks.f_18c_ptb = 'weapons.droptanks.f-18c-ptb'
ENUMS.Storage.weapons.droptanks.F4_BAK_L = 'weapons.droptanks.F4-BAK-L'
ENUMS.Storage.weapons.droptanks.HB_A6E_AERO1D = 'weapons.droptanks.HB_A6E_AERO1D'
ENUMS.Storage.weapons.droptanks.IAFS_ComboPak_100 = 'weapons.droptanks.{IAFS_ComboPak_100}'
ENUMS.Storage.weapons.droptanks.PTB_2000 = 'weapons.droptanks.PTB-2000'
ENUMS.Storage.weapons.droptanks.M2000_PTB = 'weapons.droptanks.M2000-PTB'
ENUMS.Storage.weapons.droptanks.PTB_150 = 'weapons.droptanks.PTB-150'
ENUMS.Storage.weapons.droptanks.PTB_1150 = 'weapons.droptanks.PTB-1150'
ENUMS.Storage.weapons.droptanks.fuel_tank_300gal = 'weapons.droptanks.fuel_tank_300gal'
ENUMS.Storage.weapons.droptanks.MIG_25_PTB = 'weapons.droptanks.MIG-25-PTB'
ENUMS.Storage.weapons.droptanks.PTB_1500 = 'weapons.droptanks.PTB-1500'
ENUMS.Storage.weapons.droptanks.MIG_23_PTB = 'weapons.droptanks.MIG-23-PTB'
ENUMS.Storage.weapons.droptanks.FT600 = 'weapons.droptanks.FT600'
ENUMS.Storage.weapons.droptanks.F15_PTB = 'weapons.droptanks.F15-PTB'
ENUMS.Storage.weapons.droptanks.ah6_auxtank = 'weapons.droptanks.ah6_auxtank'
ENUMS.Storage.weapons.droptanks.T_PTB = 'weapons.droptanks.T-PTB'
ENUMS.Storage.weapons.droptanks.fuel_tank_370gal = 'weapons.droptanks.fuel_tank_370gal'
ENUMS.Storage.weapons.droptanks.F4_BAK_C = 'weapons.droptanks.F4-BAK-C'
ENUMS.Storage.weapons.droptanks.F16_PTB_N2 = 'weapons.droptanks.F-16-PTB-N2'
ENUMS.Storage.weapons.droptanks.PTB_800 = 'weapons.droptanks.PTB-800'
ENUMS.Storage.weapons.droptanks.PTB_275 = 'weapons.droptanks.PTB-275'
ENUMS.Storage.weapons.droptanks.T_PTB = 'weapons.droptanks.T-PTB'
ENUMS.Storage.weapons.droptanks.F16_PTB_N2 = 'weapons.droptanks.F-16-PTB-N2'
ENUMS.Storage.weapons.droptanks.F4_BAK_C = 'weapons.droptanks.F4-BAK-C'
ENUMS.Storage.weapons.droptanks.PTB_1150_29 = 'weapons.droptanks.PTB-1150-29'
ENUMS.Storage.weapons.droptanks.PTB_1150 = 'weapons.droptanks.PTB-1150'
ENUMS.Storage.weapons.droptanks.fuel_tank_300gal = 'weapons.droptanks.fuel_tank_300gal'
ENUMS.Storage.weapons.droptanks.MIG_25_PTB = 'weapons.droptanks.MIG-25-PTB'
ENUMS.Storage.weapons.droptanks.PTB_1500 = 'weapons.droptanks.PTB-1500'
ENUMS.Storage.weapons.droptanks.FT600 = 'weapons.droptanks.FT600'
ENUMS.Storage.weapons.droptanks.Drop_tank_75gal = 'weapons.droptanks.Drop tank 75gal'
ENUMS.Storage.weapons.droptanks.F15_PTB = 'weapons.droptanks.F15-PTB'
ENUMS.Storage.weapons.droptanks.M2000_PTB = 'weapons.droptanks.M2000-PTB'
ENUMS.Storage.weapons.droptanks.PTB_150 = 'weapons.droptanks.PTB-150'
ENUMS.Storage.weapons.droptanks.F4_BAK_L = 'weapons.droptanks.F4-BAK-L'
ENUMS.Storage.weapons.droptanks.PTB_3000 = 'weapons.droptanks.PTB-3000'
ENUMS.Storage.weapons.droptanks.PTB_2000 = 'weapons.droptanks.PTB-2000'
ENUMS.Storage.weapons.droptanks.S_3_PTB = 'weapons.droptanks.S-3-PTB'
ENUMS.Storage.weapons.droptanks.fuel_tank_370gal = 'weapons.droptanks.fuel_tank_370gal'
ENUMS.Storage.weapons.droptanks.MIG_23_PTB = 'weapons.droptanks.MIG-23-PTB'
ENUMS.Storage.weapons.droptanks.f_18c_ptb = 'weapons.droptanks.f-18c-ptb'
ENUMS.Storage.weapons.droptanks.CHAP_TigerUHT_fueltank = 'weapons.droptanks.CHAP_TigerUHT_fueltank'
ENUMS.Storage.weapons.containers.FN_HMP400_100 = 'weapons.containers.{FN_HMP400_100}'
ENUMS.Storage.weapons.containers.AN_M3 = 'weapons.containers.{AN-M3}'
ENUMS.Storage.weapons.containers.OH58D_M3P_L500 = 'weapons.containers.OH58D_M3P_L500'
ENUMS.Storage.weapons.containers.GIAT_M621_HE = 'weapons.containers.{GIAT_M621_HE}'
ENUMS.Storage.weapons.containers.KORD_12_7_MI24_L = 'weapons.containers.KORD_12_7_MI24_L'
ENUMS.Storage.weapons.containers.CH47_STBD_M240H = 'weapons.containers.{CH47_STBD_M240H}'
ENUMS.Storage.weapons.containers.CH47_AFT_M60D = 'weapons.containers.{CH47_AFT_M60D}'
ENUMS.Storage.weapons.containers.UPK_23_250_MiG_21 = 'weapons.containers.{UPK-23-250 MiG-21}'
ENUMS.Storage.weapons.containers.CH47_STBD_M134D = 'weapons.containers.{CH47_STBD_M134D}'
ENUMS.Storage.weapons.containers.GAU_12_Equalizer = 'weapons.containers.{GAU_12_Equalizer}'
ENUMS.Storage.weapons.containers.PKT_7_62 = 'weapons.containers.PKT_7_62'
ENUMS.Storage.weapons.containers.CH47_AFT_M240H = 'weapons.containers.{CH47_AFT_M240H}'
ENUMS.Storage.weapons.containers.GIAT_M621_SAPHEI = 'weapons.containers.{GIAT_M621_SAPHEI}'
ENUMS.Storage.weapons.containers.ADEN_GUNPOD = 'weapons.containers.{ADEN_GUNPOD}'
ENUMS.Storage.weapons.containers.GAU_12_Equalizer_HE = 'weapons.containers.{GAU_12_Equalizer_HE}'
ENUMS.Storage.weapons.containers.M60_SIDE_L = 'weapons.containers.M60_SIDE_L'
ENUMS.Storage.weapons.containers.KORD_12_7_MI24_R = 'weapons.containers.KORD_12_7_MI24_R'
ENUMS.Storage.weapons.containers.GIAT_M621_APHE = 'weapons.containers.{GIAT_M621_APHE}'
ENUMS.Storage.weapons.containers.MB339_ANM3_L = 'weapons.containers.{MB339_ANM3_L}'
ENUMS.Storage.weapons.containers.FN_HMP400 = 'weapons.containers.{FN_HMP400}'
ENUMS.Storage.weapons.containers.AH_6_Door = 'weapons.containers.{AH-6_Door}'
ENUMS.Storage.weapons.containers.MB339_DEFA553_L = 'weapons.containers.{MB339_DEFA553_L}'
ENUMS.Storage.weapons.containers.MB339_ANM3_R = 'weapons.containers.{MB339_ANM3_R}'
ENUMS.Storage.weapons.containers.PK_3 = 'weapons.containers.{PK-3}'
ENUMS.Storage.weapons.containers.GUV_VOG = 'weapons.containers.GUV_VOG'
ENUMS.Storage.weapons.containers.SA342_M134_SIDE_R = 'weapons.containers.{SA342_M134_SIDE_R}'
ENUMS.Storage.weapons.containers.OH58D_M3P_L100 = 'weapons.containers.OH58D_M3P_L100'
ENUMS.Storage.weapons.containers.MXU_648 = 'weapons.containers.MXU-648'
ENUMS.Storage.weapons.containers.OH58D_M3P_L400 = 'weapons.containers.OH58D_M3P_L400'
ENUMS.Storage.weapons.containers.FN_HMP400_200 = 'weapons.containers.{FN_HMP400_200}'
ENUMS.Storage.weapons.containers.GIAT_M621_HE = 'weapons.containers.{GIAT_M621_HE}'
ENUMS.Storage.weapons.containers.M134_L = 'weapons.containers.M134_L'
ENUMS.Storage.weapons.containers.OH58D_M3P_L200 = 'weapons.containers.OH58D_M3P_L200'
ENUMS.Storage.weapons.containers.GIAT_M621_AP = 'weapons.containers.{GIAT_M621_AP}'
ENUMS.Storage.weapons.containers.CH47_STBD_M134D = 'weapons.containers.{CH47_STBD_M134D}'
ENUMS.Storage.weapons.containers.PKT_7_62 = 'weapons.containers.PKT_7_62'
ENUMS.Storage.weapons.containers.OH58D_M3P_L300 = 'weapons.containers.OH58D_M3P_L300'
ENUMS.Storage.weapons.containers.GIAT_M621_SAPHEI = 'weapons.containers.{GIAT_M621_SAPHEI}'
ENUMS.Storage.weapons.containers.M60_SIDE_L = 'weapons.containers.M60_SIDE_L'
ENUMS.Storage.weapons.containers.CH47_PORT_M134D = 'weapons.containers.{CH47_PORT_M134D}'
ENUMS.Storage.weapons.containers.CH47_PORT_M60D = 'weapons.containers.{CH47_PORT_M60D}'
ENUMS.Storage.weapons.containers.ADEN_GUNPOD = 'weapons.containers.{ADEN_GUNPOD}'
ENUMS.Storage.weapons.containers.C_101_DEFA553 = 'weapons.containers.{C-101-DEFA553}'
ENUMS.Storage.weapons.containers.MB339_ANM3_R = 'weapons.containers.{MB339_ANM3_R}'
ENUMS.Storage.weapons.containers.CH47_AFT_M60D = 'weapons.containers.{CH47_AFT_M60D}'
ENUMS.Storage.weapons.containers.KORD_12_7 = 'weapons.containers.KORD_12_7'
ENUMS.Storage.weapons.containers.GIAT_M621_HEAP = 'weapons.containers.{GIAT_M621_HEAP}'
ENUMS.Storage.weapons.containers.CH47_AFT_M3M = 'weapons.containers.{CH47_AFT_M3M}'
ENUMS.Storage.weapons.containers.GUV_YakB_GSHP = 'weapons.containers.GUV_YakB_GSHP'
ENUMS.Storage.weapons.containers.R_73U = 'weapons.containers.R-73U'
ENUMS.Storage.weapons.containers.GUV_VOG = 'weapons.containers.GUV_VOG'
ENUMS.Storage.weapons.containers.KORD_12_7_MI24_L = 'weapons.containers.KORD_12_7_MI24_L'
ENUMS.Storage.weapons.containers.OH58D_M3P_L100 = 'weapons.containers.OH58D_M3P_L100'
ENUMS.Storage.weapons.containers.OH58D_M3P_L400 = 'weapons.containers.OH58D_M3P_L400'
ENUMS.Storage.weapons.containers.CH47_STBD_M240H = 'weapons.containers.{CH47_STBD_M240H}'
ENUMS.Storage.weapons.containers.CH47_PORT_M240H = 'weapons.containers.{CH47_PORT_M240H}'
ENUMS.Storage.weapons.containers.CC420_GUN_POD = 'weapons.containers.{CC420_GUN_POD}'
ENUMS.Storage.weapons.containers.FN_HMP400_100 = 'weapons.containers.{FN_HMP400_100}'
ENUMS.Storage.weapons.containers.MB339_ANM3_L = 'weapons.containers.{MB339_ANM3_L}'
ENUMS.Storage.weapons.containers.MB339_DEFA553_R = 'weapons.containers.{MB339_DEFA553_R}'
ENUMS.Storage.weapons.containers.GAU_12_Equalizer_HE = 'weapons.containers.{GAU_12_Equalizer_HE}'
ENUMS.Storage.weapons.containers.OH58D_M3P_L500 = 'weapons.containers.OH58D_M3P_L500'
ENUMS.Storage.weapons.containers.SUU_23_POD = 'weapons.containers.{SUU_23_POD}'
ENUMS.Storage.weapons.containers.PK_3 = 'weapons.containers.{PK-3}'
ENUMS.Storage.weapons.containers.AKAN = 'weapons.containers.{AKAN}'
ENUMS.Storage.weapons.containers.CH47_STBD_M60D = 'weapons.containers.{CH47_STBD_M60D}'
ENUMS.Storage.weapons.containers.SA342_M134_SIDE_R = 'weapons.containers.{SA342_M134_SIDE_R}'
ENUMS.Storage.weapons.containers.M60_SIDE_R = 'weapons.containers.M60_SIDE_R'
ENUMS.Storage.weapons.containers.GAU_12_Equalizer_AP = 'weapons.containers.{GAU_12_Equalizer_AP}'
ENUMS.Storage.weapons.containers.GAU_12_Equalizer = 'weapons.containers.{GAU_12_Equalizer}'
ENUMS.Storage.weapons.containers.KORD_12_7_MI24_R = 'weapons.containers.KORD_12_7_MI24_R'
ENUMS.Storage.weapons.containers.M134_SIDE_R = 'weapons.containers.M134_SIDE_R'
ENUMS.Storage.weapons.containers.AKAN_NO_TRC = 'weapons.containers.{AKAN_NO_TRC}'
ENUMS.Storage.weapons.containers.oh_58_brauning = 'weapons.containers.oh-58-brauning'
ENUMS.Storage.weapons.containers.MXU_648 = 'weapons.containers.MXU-648'
ENUMS.Storage.weapons.containers.M134_R = 'weapons.containers.M134_R'
ENUMS.Storage.weapons.containers.AN_M3 = 'weapons.containers.{AN-M3}'
ENUMS.Storage.weapons.containers.GIAT_M621_APHE = 'weapons.containers.{GIAT_M621_APHE}'
ENUMS.Storage.weapons.containers.AIM_9S = 'weapons.containers.AIM-9S'
ENUMS.Storage.weapons.containers.CH47_AFT_M240H = 'weapons.containers.{CH47_AFT_M240H}'
ENUMS.Storage.weapons.containers.FN_HMP400 = 'weapons.containers.{FN_HMP400}'
ENUMS.Storage.weapons.containers.M134_SIDE_L = 'weapons.containers.M134_SIDE_L'
ENUMS.Storage.weapons.containers.MB339_DEFA553_L = 'weapons.containers.{MB339_DEFA553_L}'
ENUMS.Storage.weapons.containers.MISC_1 = 'weapons.containers.{05544F1A-C39C-466b-BC37-5BD1D52E57BB}'
ENUMS.Storage.weapons.containers.MISC_2 = 'weapons.containers.{E92CBFE5-C153-11d8-9897-000476191836}'
ENUMS.Storage.weapons.containers.hvar_SmokeGenerator = 'weapons.containers.hvar_SmokeGenerator'
ENUMS.Storage.weapons.containers.INV_SMOKE_RED = 'weapons.containers.{INV-SMOKE-RED}'
ENUMS.Storage.weapons.containers.INV_SMOKE_YELLOW = 'weapons.containers.{INV-SMOKE-YELLOW}'
ENUMS.Storage.weapons.containers.INV_SMOKE_BLUE = 'weapons.containers.{INV-SMOKE-BLUE}'
ENUMS.Storage.weapons.containers.INV_SMOKE_GREEN = 'weapons.containers.{INV-SMOKE-GREEN}'
ENUMS.Storage.weapons.containers.INV_SMOKE_WHITE = 'weapons.containers.{INV-SMOKE-WHITE}'
ENUMS.Storage.weapons.containers.INV_SMOKE_ORANGE = 'weapons.containers.{INV-SMOKE-ORANGE}'
ENUMS.Storage.weapons.containers.GAU_12_Equalizer_AP = 'weapons.containers.{GAU_12_Equalizer_AP}'
ENUMS.Storage.weapons.containers.AH_6_Gunners = 'weapons.containers.{AH-6_Gunners}'
ENUMS.Storage.weapons.containers.AH_6_FN_HMP400 = 'weapons.containers.{AH-6_FN_HMP400}'
ENUMS.Storage.weapons.containers.R_73U = 'weapons.containers.R-73U'
ENUMS.Storage.weapons.containers.M60_SIDE_R = 'weapons.containers.M60_SIDE_R'
ENUMS.Storage.weapons.containers.CH47_AFT_M3M = 'weapons.containers.{CH47_AFT_M3M}'
ENUMS.Storage.weapons.containers.GUV_YakB_GSHP = 'weapons.containers.GUV_YakB_GSHP'
ENUMS.Storage.weapons.containers.RKL609_L = 'weapons.containers.{RKL609_L}'
ENUMS.Storage.weapons.containers.CH47_PORT_M134D = 'weapons.containers.{CH47_PORT_M134D}'
ENUMS.Storage.weapons.containers.CH47_PORT_M60D = 'weapons.containers.{CH47_PORT_M60D}'
ENUMS.Storage.weapons.containers.RKL609_R = 'weapons.containers.{RKL609_R}'
ENUMS.Storage.weapons.containers.C_101_DEFA553 = 'weapons.containers.{C-101-DEFA553}'
ENUMS.Storage.weapons.containers.AH6_M134L = 'weapons.containers.{AH6_M134L}'
ENUMS.Storage.weapons.containers.KORD_12_7 = 'weapons.containers.KORD_12_7'
ENUMS.Storage.weapons.containers.C130_M18_Sidearm = 'weapons.containers.{C130-M18-Sidearm}'
ENUMS.Storage.weapons.containers.GIAT_M621_HEAP = 'weapons.containers.{GIAT_M621_HEAP}'
ENUMS.Storage.weapons.containers.BRU_42_LS = 'weapons.containers.BRU-42_LS'
ENUMS.Storage.weapons.containers.CH47_STBD_M60D = 'weapons.containers.{CH47_STBD_M60D}'
ENUMS.Storage.weapons.containers.SUU_23_POD = 'weapons.containers.{SUU_23_POD}'
ENUMS.Storage.weapons.containers.M134_SIDE_R = 'weapons.containers.M134_SIDE_R'
ENUMS.Storage.weapons.containers.AKAN_NO_TRC = 'weapons.containers.{AKAN_NO_TRC}'
ENUMS.Storage.weapons.containers.oh_58_brauning = 'weapons.containers.oh-58-brauning'
ENUMS.Storage.weapons.containers.AH_6_DOORS = 'weapons.containers.{AH-6_DOORS}'
ENUMS.Storage.weapons.containers.CC420_GUN_POD = 'weapons.containers.{CC420_GUN_POD}'
ENUMS.Storage.weapons.containers.CH47_PORT_M240H = 'weapons.containers.{CH47_PORT_M240H}'
ENUMS.Storage.weapons.containers.MB339_DEFA553_R = 'weapons.containers.{MB339_DEFA553_R}'
ENUMS.Storage.weapons.containers.AIM_9S = 'weapons.containers.AIM-9S'
ENUMS.Storage.weapons.containers.hvar_SmokeGenerator = 'weapons.containers.hvar_SmokeGenerator'
ENUMS.Storage.weapons.containers.M134_L = 'weapons.containers.M134_L'
ENUMS.Storage.weapons.containers.AKAN = 'weapons.containers.{AKAN}'
ENUMS.Storage.weapons.containers.C130_Cargo_Bay_M4 = 'weapons.containers.{C130-Cargo-Bay-M4}'
ENUMS.Storage.weapons.containers.M134_SIDE_L = 'weapons.containers.M134_SIDE_L'
ENUMS.Storage.weapons.containers.FN_HMP400_200 = 'weapons.containers.{FN_HMP400_200}'
ENUMS.Storage.weapons.containers.OH58D_M3P_L200 = 'weapons.containers.OH58D_M3P_L200'
ENUMS.Storage.weapons.containers.GIAT_M621_AP = 'weapons.containers.{GIAT_M621_AP}'
ENUMS.Storage.weapons.containers.M134_R = 'weapons.containers.M134_R'
ENUMS.Storage.weapons.containers.OH58D_M3P_L300 = 'weapons.containers.OH58D_M3P_L300'
ENUMS.Storage.weapons.containers.AH6_M134R = 'weapons.containers.{AH6_M134R}'
ENUMS.Storage.weapons.containers.CHAP_HMP400LC = 'weapons.containers.{CHAP_HMP400LC}'
ENUMS.Storage.weapons.missiles.C701_AShM = 'weapons.missiles.C701 AShM'
ENUMS.Storage.weapons.missiles.IGLA_9M39 = 'weapons.missiles.9M39_IGLA'
ENUMS.Storage.weapons.missiles.CHAP_AIM92 = 'weapons.missiles.CHAP_AIM92'
ENUMS.Storage.weapons.missiles.AM39 = 'weapons.missiles.AM39'
ENUMS.Storage.weapons.missiles.Shahed136_LM = 'weapons.missiles.Shahed136_LM'
ENUMS.Storage.weapons.torpedoes.G7A_T1 = 'weapons.torpedoes.G7A_T1'
-- UH-60L Mod
ENUMS.Storage.weapons.gunmounts.UH60LGAU19 = 'weapons.gunmounts.UH-60L GAU-19'
@@ -1814,6 +2116,56 @@ ENUMS.Storage.weapons.gunmounts.UH60L_M60_GUNNER = 'weapons.gunmounts.{UH60L_M60
ENUMS.Storage.weapons.gunmounts.UH60L_M2_GUNNER = 'weapons.gunmounts.{UH60L_M2_GUNNER}'
ENUMS.Storage.weapons.gunmounts.UH60_M230_LEFT = 'weapons.gunmounts.{UH60_M230_LEFT}'
ENUMS.Storage.weapons.gunmounts.UH60_M230_RIGHT = 'weapons.gunmounts.{UH60_M230_RIGHT}'
ENUMS.Storage.weapons.containers.UH60_M134_RIGHT = 'weapons.containers.{UH60_M134_RIGHT}'
ENUMS.Storage.weapons.containers.UH60_M134_LEFT = 'weapons.containers.{UH60_M134_LEFT}'
ENUMS.Storage.weapons.containers.UH60_M230_LEFT = 'weapons.containers.{UH60_M230_LEFT}'
ENUMS.Storage.weapons.containers.UH60L_M134_GUNNER = 'weapons.containers.{UH60L_M134_GUNNER}'
ENUMS.Storage.weapons.containers.UH60_GAU19_LEFT = 'weapons.containers.{UH60_GAU19_LEFT}'
ENUMS.Storage.weapons.containers.UH60L_M60_GUNNER = 'weapons.containers.{UH60L_M60_GUNNER}'
ENUMS.Storage.weapons.containers.UH60_GAU19_RIGHT = 'weapons.containers.{UH60_GAU19_RIGHT}'
ENUMS.Storage.weapons.containers.UH60_M230_RIGHT = 'weapons.containers.{UH60_M230_RIGHT}'
ENUMS.Storage.weapons.containers.UH60L_M2_GUNNER = 'weapons.containers.{UH60L_M2_GUNNER}'
ENUMS.Storage.weapons.adapters.GD_F100_SUU_13 = 'weapons.adapters.GD_F100_SUU-13'
ENUMS.Storage.weapons.containers.GPU_5_POD = 'weapons.containers.{GPU_5_POD}'
ENUMS.Storage.weapons.bombs.BOLT_117 = 'weapons.bombs.BOLT-117'
ENUMS.Storage.weapons.shells.F100_M39_20_TP_T = 'weapons.shells.F100_M39_20_TP_T'
ENUMS.Storage.weapons.gunmounts.M_39_F_100 = 'weapons.gunmounts.M-39 F-100'
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_275_L = 'weapons.droptanks.GD_F100_TANK_275_L'
ENUMS.Storage.weapons.bombs.BLU_4B_R_GROUP_R = 'weapons.bombs.BLU-4B_R_GROUP_R'
ENUMS.Storage.weapons.containers.F100_CAMERA_P2 = 'weapons.containers.F100_CAMERA_P2'
ENUMS.Storage.weapons.containers.HB_ORD_SUU_7 = 'weapons.containers.HB_ORD_SUU_7'
ENUMS.Storage.weapons.adapters.SidewinderPylon = 'weapons.adapters.SidewinderPylon'
ENUMS.Storage.weapons.adapters.apu_470 = 'weapons.adapters.apu_470'
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_335_R = 'weapons.droptanks.GD_F100_TANK_335_R'
ENUMS.Storage.weapons.bombs.BLU_3B_R_GROUP_R = 'weapons.bombs.BLU-3B_R_GROUP_R'
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_335_L = 'weapons.droptanks.GD_F100_TANK_335_L'
ENUMS.Storage.weapons.adapters.mbdz_u2t = 'weapons.adapters.mbdz_u2t'
ENUMS.Storage.weapons.containers.ZellRocket = 'weapons.containers.ZellRocket'
ENUMS.Storage.weapons.containers.apu_73 = 'weapons.containers.apu-73'
ENUMS.Storage.weapons.gunmounts.GAU_13 = 'weapons.gunmounts.GAU-13'
ENUMS.Storage.weapons.shells.F100_M39_20_TP = 'weapons.shells.F100_M39_20_TP'
ENUMS.Storage.weapons.shells.F100_M39_20_API = 'weapons.shells.F100_M39_20_API'
ENUMS.Storage.weapons.adapters.bdz_umk2b = 'weapons.adapters.bdz_umk2b'
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_450 = 'weapons.droptanks.GD_F100_TANK_450'
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_275_R = 'weapons.droptanks.GD_F100_TANK_275_R'
ENUMS.Storage.weapons.bombs.BLU_18_B_GROUP = 'weapons.bombs.BLU-18/B_GROUP'
ENUMS.Storage.weapons.containers.ZELL_Booster = 'weapons.containers.ZELL Booster'
ENUMS.Storage.weapons.adapters.apu_60 = 'weapons.adapters.apu_60'
ENUMS.Storage.weapons.gunmounts.GPU_5_POD = 'weapons.gunmounts.{GPU_5_POD}'
ENUMS.Storage.weapons.containers.F100_CAMERA_KA71A = 'weapons.containers.F100_CAMERA_KA71A'
ENUMS.Storage.weapons.bombs.BLU_3_R_GROUP_R = 'weapons.bombs.BLU-3_R_GROUP_R'
ENUMS.Storage.weapons.shells.F100_M39_20_HEI = 'weapons.shells.F100_M39_20_HEI'
ENUMS.Storage.weapons.droptanks.GD_F100_TANK_200 = 'weapons.droptanks.GD_F100_TANK_200'
ENUMS.Storage.weapons.adapters.apu_73 = 'weapons.adapters.apu-73'
ENUMS.Storage.weapons.gunmounts.AKAN_NO_TRC = 'weapons.gunmounts.AKAN_NO_TRC'
ENUMS.Storage.weapons.gunmounts.AKAN = 'weapons.gunmounts.AKAN'
ENUMS.Storage.weapons.shells.F100_M39_20_HEI_T = 'weapons.shells.F100_M39_20_HEI_T'
ENUMS.Storage.weapons.shells.F100_M39_20_API_T = 'weapons.shells.F100_M39_20_API_T'
ENUMS.Storage.weapons.containers.GD_F100_STRIKE_CAMERA = 'weapons.containers.GD_F100_STRIKE_CAMERA'
ENUMS.Storage.weapons.bombs.BLU_49_B = 'weapons.bombs.BLU-49/B'
ENUMS.Storage.weapons.containers.GD_F100_SUU_13 = 'weapons.containers.GD_F100_SUU-13'
---
-- @type ENUMS.FARPType
@@ -126,8 +126,8 @@ PROFILER = {
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--- Start profiler.
-- @param #number Delay Delay in seconds before profiler is stated. Default is immediately.
-- @param #number Duration Duration in (game) seconds before the profiler is stopped. Default is when mission ends.
-- @param #number Delay (Optional) Delay in seconds before profiler is stated. Default is immediately.
-- @param #number Duration (Optional) Duration in (game) seconds before the profiler is stopped. Default is when mission ends.
function PROFILER.Start( Delay, Duration )
-- Check if os, io and lfs are available.
+7 -7
View File
@@ -77,8 +77,8 @@ SOCKET.version="0.3.0"
--- Create a new SOCKET object.
-- @param #SOCKET self
-- @param #number Port UDP port. Default `10042`.
-- @param #string Host Host. Default `"127.0.0.1"`.
-- @param #number Port (Optional) UDP port. Default `10042`.
-- @param #string Host (Optional) Host. Default `"127.0.0.1"`.
-- @return #SOCKET self
function SOCKET:New(Port, Host)
@@ -103,7 +103,7 @@ end
--- Set port.
-- @param #SOCKET self
-- @param #number Port Port. Default 10042.
-- @param #number Port (Optional) Port. Default 10042.
-- @return #SOCKET self
function SOCKET:SetPort(Port)
self.port=Port or 10042
@@ -111,7 +111,7 @@ end
--- Set host.
-- @param #SOCKET self
-- @param #string Host Host. Default `"127.0.0.1"`.
-- @param #string Host (Optional) Host. Default `"127.0.0.1"`.
-- @return #SOCKET self
function SOCKET:SetHost(Host)
self.host=Host or "127.0.0.1"
@@ -159,11 +159,11 @@ end
--- Send a text-to-speech message.
-- @param #SOCKET self
-- @param #string Text The text message to speek.
-- @param #number Provider The TTS provider: 0=Microsoft (default), 1=Google.
-- @param #number Provider (Optional) The TTS provider: 0=Microsoft (default), 1=Google.
-- @param #string Voice The specific voice to use, e.g. `"Microsoft David Desktop"` or "`en-US-Standard-A`". If not set, the service will choose a voice based on the other parameters such as culture and gender.
-- @param #string Culture The Culture or language code, *e.g.* `"en-US"`.
-- @param #string Gender The Gender, *i.e.* "male", "female". Default "female".
-- @param #number Volume The volume. Microsoft: [0,100] default 50, Google: [-96, 10] default 0.
-- @param #string Gender (Optional) The Gender, *i.e.* "male", "female". Default "female".
-- @param #number Volume (Optional) The volume. Microsoft: [0,100] default 50, Google: [-96, 10] default 0.
-- @return #SOCKET self
function SOCKET:SendTextToSpeech(Text, Provider, Voice, Culture, Gender, Volume)
+136 -96
View File
@@ -522,43 +522,77 @@ function UTILS.TableLength(T)
end
--- Print a table to log in a nice format
-- @param #table table The table to print
-- @param #number indent Number of indents
-- @param #table t The table to print
-- @param #number indent (Optional) Number of indents. Defaults to 0.
-- @param #boolean noprint Don't log but return text
-- @param #number maxDepth (Optional) Only cycle this deep, defaults to 5.
-- @param #table seen (Optional)
-- @return #string text Text created on the fly of the log output
function UTILS.PrintTableToLog(table, indent, noprint)
local text = "\n"
if not table or type(table) ~= "table" then
function UTILS.PrintTableToLog(t, indent, noprint, maxDepth, seen)
maxDepth = maxDepth or 5
indent = indent or 0
seen = seen or {}
if not t or type(t) ~= "table" then
env.warning("No table passed!")
return nil
end
if not indent then indent = 0 end
for k, v in pairs(table) do
if string.find(k," ") then k='"'..k..'"'end
if type(v) == "table" and UTILS.TableLength(v) > 0 then
-- Max depth guard
if indent > maxDepth then
local msg = string.rep(" ", indent) .. "<max depth reached>\n"
if not noprint then env.info(msg) end
return msg
end
-- Cycle / repeated reference guard
if seen[t] then
local msg = string.rep(" ", indent) .. "<cycle>\n"
if not noprint then env.info(msg) end
return msg
end
seen[t] = true
local text = "\n"
for k, v in pairs(t) do
local key = k
if type(key) == "string" and key:find(" ", 1, true) then
key = '"' .. key .. '"'
else
key = tostring(key)
end
if type(v) == "table" and next(v) ~= nil then
if not noprint then
env.info(string.rep(" ", indent) .. tostring(k) .. " = {")
env.info(string.rep(" ", indent) .. key .. " = {")
end
text = text ..string.rep(" ", indent) .. tostring(k) .. " = {\n"
text = text .. tostring(UTILS.PrintTableToLog(v, indent + 1), noprint).."\n"
text = text .. string.rep(" ", indent) .. key .. " = {\n"
text = text .. UTILS.PrintTableToLog(v, indent + 1, noprint, maxDepth, seen)
text = text .. string.rep(" ", indent) .. "},\n"
if not noprint then
env.info(string.rep(" ", indent) .. "},")
end
text = text .. string.rep(" ", indent) .. "},\n"
elseif type(v) == "function" then
-- skip functions (optional: log "<function>")
else
local value
if tostring(v) == "true" or tostring(v) == "false" or tonumber(v) ~= nil then
value=v
if type(v) == "boolean" or type(v) == "number" then
value = tostring(v)
else
value = '"'..tostring(v)..'"'
value = '"' .. tostring(v) .. '"'
end
if not noprint then
env.info(string.rep(" ", indent) .. tostring(k) .. " = " .. tostring(value)..",\n")
env.info(string.rep(" ", indent) .. key .. " = " .. value .. ",")
end
text = text .. string.rep(" ", indent) .. tostring(k) .. " = " .. tostring(value)..",\n"
text = text .. string.rep(" ", indent) .. key .. " = " .. value .. ",\n"
end
end
return text
end
@@ -1339,7 +1373,7 @@ function UTILS.ClockToSeconds(clock)
end
--- Display clock and mission time on screen as a message to all.
-- @param #number duration Duration in seconds how long the time is displayed. Default is 5 seconds.
-- @param #number duration (Optional) Duration in seconds how long the time is displayed. Default is 5 seconds.
function UTILS.DisplayMissionTime(duration)
duration=duration or 5
local Tnow=timer.getAbsTime()
@@ -1353,7 +1387,7 @@ end
--- Replace illegal characters [<>|/?*:\\] in a string.
-- @param #string Text Input text.
-- @param #string ReplaceBy Replace illegal characters by this character or string. Default underscore "_".
-- @param #string ReplaceBy (Optional) Replace illegal characters by this character or string. Default underscore "_".
-- @return #string The input text with illegal chars replaced.
function UTILS.ReplaceIllegalCharacters(Text, ReplaceBy)
ReplaceBy=ReplaceBy or "_"
@@ -2227,7 +2261,7 @@ function UTILS.GetSunRiseAndSet(DayOfYear, Latitude, Longitude, Rising, Tlocal)
-- @param #number Latitude Latitude.
-- @param #number Longitude Longitude.
-- @param #boolean Rising If true, calc sun rise, or sun set otherwise.
-- @param #number Tlocal Local time offset in hours. E.g. +4 for a location which has GMT+4. Default 0.
-- @param #number Tlocal (Optional) Local time offset in hours. E.g. +4 for a location which has GMT+4. Default 0.
-- @return #number Sun rise in seconds of the day.
function UTILS.GetSunrise(Day, Month, Year, Latitude, Longitude, Tlocal)
@@ -2243,7 +2277,7 @@ end
-- @param #number Latitude Latitude.
-- @param #number Longitude Longitude.
-- @param #boolean Rising If true, calc sun rise, or sun set otherwise.
-- @param #number Tlocal Local time offset in hours. E.g. +4 for a location which has GMT+4. Default 0.
-- @param #number Tlocal (Optional) Local time offset in hours. E.g. +4 for a location which has GMT+4. Default 0.
-- @return #number Sun rise in seconds of the day.
function UTILS.GetSunset(Day, Month, Year, Latitude, Longitude, Tlocal)
@@ -2344,6 +2378,11 @@ function UTILS.IsLoadingDoorOpen( unit_name )
BASE:T(unit_name .. " front door(s) are open or doors removed")
return true
end
if type_name == "Ka-50_3" and unit:getDrawArgumentValue(38) == 1 then
BASE:T(unit_name .. " cockpit door is open")
return true
end
if type_name=="C-130J-30" and (unit:getDrawArgumentValue(86)==1)then
BASE:T(unit_name.." rear doors are open")
@@ -2921,12 +2960,12 @@ end
-- @param #boolean Reduce If false, existing loaded groups will not be reduced to fit the saved number.
-- @param #boolean Structured (Optional, needs Reduce = true) If true, and the data has been saved as structure before, remove the correct unit types as per the saved list.
-- @param #boolean Cinematic (Optional, needs Structured = true) If true, place a fire/smoke effect on the dead static position.
-- @param #number Effect (Optional for Cinematic) What effect to use. Defaults to a random effect. Smoke presets are: 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 for Cinematic) What smoke density to use, can be 0 to 1. Defaults to 0.5.
-- @param #boolean Resurrection If true, dead units can be restored on load. Defaults to false.
-- @param #number ResurrectPercentage Use this percentage of probability to resurrect a unit. [0..100], defaults to 25.
-- @param #number Healmin If set, life points of a resurrected unit will be randomly restored to min this percentage. [0..100], defaults to 25.
-- @param #number Healmax If set, life points of a resurrected unit will be randomly restored to max this percentage. [0..100], defaults to 75.
-- @param #number Effect (Optional) (Optional for Cinematic) What effect to use. Defaults to a random effect. Smoke presets are: 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) (Optional for Cinematic) What smoke density to use, can be 0 to 1. Defaults to 0.5.
-- @param #boolean Resurrection (Optional) If true, dead units can be restored on load. Defaults to false.
-- @param #number ResurrectPercentage (Optional) Use this percentage of probability to resurrect a unit. [0..100], defaults to 25.
-- @param #number Healmin (Optional) If set, life points of a resurrected unit will be randomly restored to min this percentage. [0..100], defaults to 25.
-- @param #number Healmax (Optional) If set, life points of a resurrected unit will be randomly restored to max this percentage. [0..100], defaults to 75.
-- @return #table Table of data objects (tables) containing groupname, coordinate and group object. Returns nil when file cannot be read.
-- @return #table When using Cinematic: table of names of smoke and fire objects, so they can be extinguished with `COORDINATE.StopBigSmokeAndFire( name )`
function UTILS.LoadStationaryListOfGroups(Path,Filename,Reduce,Structured,Cinematic,Effect,Density,Resurrection,ResurrectPercentage,Healmin,Healmax)
@@ -3049,8 +3088,8 @@ end
-- @param #boolean Spawn If set to false, do not re-spawn the groups loaded in location and reduce to size.
-- @param #boolean Structured (Optional, needs Spawn=true)If true, and the data has been saved as structure before, remove the correct unit types as per the saved list.
-- @param #boolean Cinematic (Optional, needs Structured=true) If true, place a fire/smoke effect on the dead static position.
-- @param #number Effect (Optional for Cinematic) What effect to use. Defaults to a random effect. Smoke presets are: 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 for Cinematic) What smoke density to use, can be 0 to 1. Defaults to 0.5.
-- @param #number Effect (Optional) (Optional for Cinematic) What effect to use. Defaults to a random effect. Smoke presets are: 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) (Optional for Cinematic) What smoke density to use, can be 0 to 1. Defaults to 0.5.
-- @return Core.Set#SET_GROUP Set of GROUP objects.
-- Returns nil when file cannot be read. Returns a table of data entries if Spawn is false: `{ groupname=groupname, size=size, coordinate=coordinate, template=template }`
-- @return #table When using Cinematic: table of names of smoke and fire objects, so they can be extinguished with `COORDINATE.StopBigSmokeAndFire( name )`
@@ -3235,8 +3274,8 @@ end
-- @param #boolean Reduce If false, do not destroy the units with size=0.
-- @param #boolean Dead (Optional, needs Reduce = true) If Dead is true, re-spawn the dead object as dead and do not just delete it.
-- @param #boolean Cinematic (Optional, needs Dead = true) If true, place a fire/smoke effect on the dead static position.
-- @param #number Effect (Optional for Cinematic) What effect to use. Defaults to a random effect. Smoke presets are: 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 for Cinematic) What smoke density to use, can be 0 to 1. Defaults to 0.5.
-- @param #number Effect (Optional) (Optional for Cinematic) What effect to use. Defaults to a random effect. Smoke presets are: 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) (Optional for Cinematic) What smoke density to use, can be 0 to 1. Defaults to 0.5.
-- @return #table Table of data objects (tables) containing staticname, size (0=dead else 1), coordinate and the static object. Dead objects will have coordinate points `{x=0,y=0,z=0}`
-- @return #table When using Cinematic: table of names of smoke and fire objects, so they can be extinguished with `COORDINATE.StopBigSmokeAndFire( name )`
-- Returns nil when file cannot be read.
@@ -3405,13 +3444,13 @@ end
--- Helper function to plot a racetrack on the F10 Map - curtesy of Buur.
-- @param Core.Point#COORDINATE Coordinate
-- @param #number Altitude Altitude in feet
-- @param #number Speed Speed in knots
-- @param #number Heading Heading in degrees
-- @param #number Leg Leg in NM
-- @param #number Coalition Coalition side, e.g. coaltion.side.RED or coaltion.side.BLUE
-- @param #table Color Color of the line in RGB, e.g. {1,0,0} for red
-- @param #number Alpha Transparency factor, between 0.1 and 1
-- @param #number LineType Line type to be used, line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #number Speed (Optional) Speed in knots. Defaults to 350.
-- @param #number Heading (Optional) Heading in degrees. Defaults to 270.
-- @param #number Leg (Optional) Leg in NM. Defaults to 10nm.
-- @param #number Coalition (Optional) Coalition side, e.g. coaltion.side.RED or coaltion.side.BLUE. Defaults to -1.
-- @param #table Color (Optional) Color of the line in RGB, e.g. {1,0,0} for red, Defaults to {1,0,0}.
-- @param #number Alpha (Optional) Transparency factor, between 0.1 and 1. Defaults to 1.
-- @param #number LineType (Optional) Line type to be used, line type: 0=No line, 1=Solid, 2=Dashed, 3=Dotted, 4=Dot dash, 5=Long dash, 6=Two dash. Default 1=Solid.
-- @param #boolean ReadOnly
function UTILS.PlotRacetrack(Coordinate, Altitude, Speed, Heading, Leg, Coalition, Color, Alpha, LineType, ReadOnly)
local fix_coordinate = Coordinate
@@ -4112,9 +4151,10 @@ end
--- Get a NATO abbreviated MGRS text for SRS use, optionally with prosody slow tag
-- @param #string Text The input string, e.g. "MGRS 4Q FJ 12345 67890"
-- @param #boolean Slow Optional - add slow tags
-- @param #boolean Slow Optional - add slow tags, if the backend is not Hound
-- @param #string Backend The TTS Backend used
-- @return #string Output for (Slow) spelling in SRS TTS e.g. "MGRS;<prosody rate="slow">4;Quebec;Foxtrot;Juliett;1;2;3;4;5;6;7;8;niner;zero;</prosody>"
function UTILS.MGRSStringToSRSFriendly(Text,Slow)
function UTILS.MGRSStringToSRSFriendly(Text,Slow,Backend)
local Text = string.gsub(Text,"MGRS ","")
Text = string.gsub(Text,"%s+","")
Text = string.gsub(Text,"([%a%d])","%1;") -- "0;5;1;"
@@ -4146,7 +4186,7 @@ function UTILS.MGRSStringToSRSFriendly(Text,Slow)
Text = string.gsub(Text,"Z","Zulu")
Text = string.gsub(Text,"0","zero")
Text = string.gsub(Text,"9","niner")
if Slow then
if Slow and Backend ~= nil and Backend ~= MSRS.Backend.HOUND then
Text = '<prosody rate="slow">'..Text..'</prosody>'
end
Text = "MGRS;"..Text
@@ -4213,7 +4253,7 @@ function UTILS.ReadCSV(filename)
end
--- Seed the LCG random number generator.
-- @param #number seed Seed value. Default is a random number using math.random()
-- @param #number seed (Optional) Seed value. Default is a random number using math.random()
function UTILS.LCGRandomSeed(seed)
UTILS.lcg = {
seed = seed or math.random(1, 2^32 - 1),
@@ -4227,7 +4267,7 @@ end
-- @return #number Random number between 0 and 1.
function UTILS.LCGRandom()
if UTILS.lcg == nil then
UTILS.LCGRandomSeed()
UTILS.LCGRandomSeed(timer.getTime())
end
UTILS.lcg.seed = (UTILS.lcg.a * UTILS.lcg.seed + UTILS.lcg.c) % UTILS.lcg.m
return UTILS.lcg.seed / UTILS.lcg.m
@@ -4277,24 +4317,24 @@ end
-- References: [DCS Forum Topic](https://forum.dcs.world/topic/282989-farp-equipment-to-run-it)
-- @param #string Name Name of this FARP installation. Must be unique.
-- @param Core.Point#COORDINATE Coordinate Where to spawn the FARP.
-- @param #string FARPType Type of FARP, can be one of the known types ENUMS.FARPType.FARP, ENUMS.FARPType.INVISIBLE, ENUMS.FARPType.HELIPADSINGLE, ENUMS.FARPType.PADSINGLE. Defaults to ENUMS.FARPType.FARP.
-- @param #number Coalition Coalition of this FARP, i.e. coalition.side.BLUE or coalition.side.RED, defaults to coalition.side.BLUE.
-- @param #number Country Country of this FARP, defaults to country.id.USA (blue) or country.id.RUSSIA (red).
-- @param #number CallSign Callsign of the FARP ATC, defaults to CALLSIGN.FARP.Berlin.
-- @param #number Frequency Frequency of the FARP ATC Radio, defaults to 127.5 (MHz).
-- @param #number Modulation Modulation of the FARP ATC Radio, defaults to radio.modulation.AM.
-- @param #string FARPType (Optional) Type of FARP, can be one of the known types ENUMS.FARPType.FARP, ENUMS.FARPType.INVISIBLE, ENUMS.FARPType.HELIPADSINGLE, ENUMS.FARPType.PADSINGLE. Defaults to ENUMS.FARPType.FARP.
-- @param #number Coalition (Optional) Coalition of this FARP, i.e. coalition.side.BLUE or coalition.side.RED, defaults to coalition.side.BLUE.
-- @param #number Country (Optional) Country of this FARP, defaults to country.id.USA (blue) or country.id.RUSSIA (red).
-- @param #number CallSign (Optional) Callsign of the FARP ATC, defaults to CALLSIGN.FARP.Berlin.
-- @param #number Frequency (Optional) Frequency of the FARP ATC Radio, defaults to 127.5 (MHz).
-- @param #number Modulation (Optional) Modulation of the FARP ATC Radio, defaults to radio.modulation.AM.
-- @param #number ADF ADF Beacon (FM) Frequency in KHz, e.g. 428. If not nil, creates an VHF/FM ADF Beacon for this FARP. Requires a sound called "beacon.ogg" to be in the mission (trigger "sound to" ...)
-- @param #number SpawnRadius Radius of the FARP, i.e. where the FARP objects will be placed in meters, not more than 150m away. Defaults to 100.
-- @param #number SpawnRadius (Optional) Radius of the FARP, i.e. where the FARP objects will be placed in meters, not more than 150m away. Defaults to 100.
-- @param #string VehicleTemplate, template name for additional vehicles. Can be nil for no additional vehicles.
-- @param #number Liquids Tons of fuel to be added initially to the FARP. Defaults to 10 (tons). Set to 0 for no fill.
-- @param #number Equipment Number of equipment items per known item to be added initially to the FARP. Defaults to 10 (items). Set to 0 for no fill.
-- @param #number Liquids (Optional) Tons of fuel to be added initially to the FARP. Defaults to 10 (tons). Set to 0 for no fill.
-- @param #number Equipment(Optional) Number of equipment items per known item to be added initially to the FARP. Defaults to 10 (items). Set to 0 for no fill.
-- @param #number Airframes Number of helicopter airframes per known type in Ops.CSAR#CSAR.AircraftType to be added initially to the FARP. Set to 0 for no airframes.
-- @param #string F10Text Text to display on F10 map if given. Handy to post things like the ADF beacon Frequency, Callsign and ATC Frequency.
-- @param #boolean DynamicSpawns If true, allow Dynamic Spawns from this FARP.
-- @param #boolean HotStart If true and DynamicSpawns is true, allow hot starts for Dynamic Spawns from this FARP.
-- @param #number NumberPads If given, spawn this number of pads.
-- @param #number SpacingX For NumberPads > 1, space this many meters horizontally. Defaults to 100.
-- @param #number SpacingY For NumberPads > 1, space this many meters vertically. Defaults to 100.
-- @param #number SpacingX (Optional) For NumberPads > 1, space this many meters horizontally. Defaults to 100.
-- @param #number SpacingY (Optional) For NumberPads > 1, space this many meters vertically. Defaults to 100.
-- @return #list<Wrapper.Static#STATIC> Table of spawned objects and vehicle object (if given).
-- @return #string ADFBeaconName Name of the ADF beacon, to be able to remove/stop it later.
-- @return #number MarkerID ID of the F10 Text, to be able to remove it later.
@@ -4479,9 +4519,9 @@ end
-- @param #number ADF (Optional) ADF Frequency in kHz (Kilohertz), if given activate an ADF Beacon at the location of the MASH.
-- @param #string Livery (Optional) The livery of the static CH-47, defaults to dark green.
-- @param #boolean DeployHelo (Optional) If true, deploy the helicopter static.
-- @param #number MASHRadio MASH Radio Frequency, defaults to 127.5.
-- @param #number MASHRadioModulation MASH Radio Modulation, defaults to radio.modulation.AM.
-- @param #number MASHCallsign Defaults to CALLSIGN.FARP.Berlin.
-- @param #number MASHRadio (Optional) MASH Radio Frequency, defaults to 127.5.
-- @param #number MASHRadioModulation (Optional) MASH Radio Modulation, defaults to radio.modulation.AM.
-- @param #number MASHCallsign (Optional) Defaults to CALLSIGN.FARP.Berlin.
-- @param #table Templates (Optional) You can hand in your own template table of numbered(!) entries. Each entry consist of a relative(!) x,y position and data of a
-- static, shape_name is optional. Also, livery_id is optional, but is applied to the helicopter static only.
-- @return #table Table of Wrapper.Static#STATIC objects that were spawned.
@@ -4825,13 +4865,13 @@ end
--- Show a picture on the screen to all
-- @param #string FileName File name of the picture
-- @param #number Duration Duration in seconds, defaults to 10
-- @param #boolean ClearView If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right
-- @param #number VerticalAlign Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom
-- @param #number Size Size of the picture in percent, defaults to 100
-- @param #number SizeUnits Size units, 0 for % of original picture size, and 1 for % of window size
-- @param #number Duration (Optional) Duration in seconds, defaults to 10
-- @param #boolean ClearView (Optional) If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay (Optional) Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign (Optional) Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right. Defaults to 1.
-- @param #number VerticalAlign (Optional) Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom. Defaults to 1.
-- @param #number Size (Optional) Size of the picture in percent, defaults to 100
-- @param #number SizeUnits (Optional) Size units, 0 for % of original picture size, and 1 for % of window size. Defaults to 0.
function UTILS.ShowPictureToAll(FilePath, Duration, ClearView, StartDelay, HorizontalAlign, VerticalAlign, Size, SizeUnits)
ClearView = ClearView or false
StartDelay = StartDelay or 0
@@ -4848,13 +4888,13 @@ end
--- Show a picture on the screen to Coalition
-- @param #number Coalition Coalition ID, can be coalition.side.BLUE, coalition.side.RED or coalition.side.NEUTRAL
-- @param #string FileName File name of the picture
-- @param #number Duration Duration in seconds, defaults to 10
-- @param #boolean ClearView If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right
-- @param #number VerticalAlign Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom
-- @param #number Size Size of the picture in percent, defaults to 100
-- @param #number SizeUnits Size units, 0 for % of original picture size, and 1 for % of window size
-- @param #number Duration (Optional) Duration in seconds, defaults to 10
-- @param #boolean ClearView (Optional) If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay (Optional) Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign (Optional) Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right. Defaults to 1.
-- @param #number VerticalAlign (Optional) Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom. Defaults to 1.
-- @param #number Size (Optional) Size of the picture in percent, defaults to 100
-- @param #number SizeUnits (Optional) Size units, 0 for % of original picture size, and 1 for % of window size. Defaults to 0.
function UTILS.ShowPictureToCoalition(Coalition, FilePath, Duration, ClearView, StartDelay, HorizontalAlign, VerticalAlign, Size, SizeUnits)
ClearView = ClearView or false
StartDelay = StartDelay or 0
@@ -4873,13 +4913,13 @@ end
--- Show a picture on the screen to Country
-- @param #number Country Country ID, can be country.id.USA, country.id.RUSSIA, etc.
-- @param #string FileName File name of the picture
-- @param #number Duration Duration in seconds, defaults to 10
-- @param #boolean ClearView If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right
-- @param #number VerticalAlign Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom
-- @param #number Size Size of the picture in percent, defaults to 100
-- @param #number SizeUnits Size units, 0 for % of original picture size, and 1 for % of window size
-- @param #number Duration (Optional) Duration in seconds, defaults to 10
-- @param #boolean ClearView (Optional) If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay (Optional) Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign (Optional) Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right. Defaults to 1.
-- @param #number VerticalAlign (Optional) Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom. Defaults to 1.
-- @param #number Size(Optional) Size of the picture in percent, defaults to 100
-- @param #number SizeUnits (Optional) Size units, 0 for % of original picture size, and 1 for % of window size. Defaults to 0.
function UTILS.ShowPictureToCountry(Country, FilePath, Duration, ClearView, StartDelay, HorizontalAlign, VerticalAlign, Size, SizeUnits)
ClearView = ClearView or false
StartDelay = StartDelay or 0
@@ -4896,13 +4936,13 @@ end
--- Show a picture on the screen to Group
-- @param Wrapper.Group#GROUP Group Group to show the picture to
-- @param #string FileName File name of the picture
-- @param #number Duration Duration in seconds, defaults to 10
-- @param #boolean ClearView If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right
-- @param #number VerticalAlign Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom
-- @param #number Size Size of the picture in percent, defaults to 100
-- @param #number SizeUnits Size units, 0 for % of original picture size, and 1 for % of window size
-- @param #number Duration (Optional) Duration in seconds, defaults to 10
-- @param #boolean ClearView (Optional) If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay (Optional) Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign (Optional) Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right. Defaults to 1.
-- @param #number VerticalAlign (Optional) Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom. Defaults to 1.
-- @param #number Size (Optional) Size of the picture in percent, defaults to 100
-- @param #number SizeUnits (Optional) Size units, 0 for % of original picture size, and 1 for % of window size. Defaults to 0.
function UTILS.ShowPictureToGroup(Group, FilePath, Duration, ClearView, StartDelay, HorizontalAlign, VerticalAlign, Size, SizeUnits)
ClearView = ClearView or false
StartDelay = StartDelay or 0
@@ -4919,13 +4959,13 @@ end
--- Show a picture on the screen to Unit
-- @param Wrapper.Unit#UNIT Unit Unit to show the picture to
-- @param #string FileName File name of the picture
-- @param #number Duration Duration in seconds, defaults to 10
-- @param #boolean ClearView If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right
-- @param #number VerticalAlign Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom
-- @param #number Size Size of the picture in percent, defaults to 100
-- @param #number SizeUnits Size units, 0 for % of original picture size, and 1 for % of window size
-- @param #number Duration (Optional) Duration in seconds, defaults to 10
-- @param #boolean ClearView (Optional) If true, clears the view before showing the picture, defaults to false
-- @param #number StartDelay (Optional) Delay in seconds before showing the picture, defaults to 0
-- @param #number HorizontalAlign (Optional) Horizontal alignment of the picture, 0: Left, 1: Center, 2: Right. Defaults to 1.
-- @param #number VerticalAlign (Optional) Vertical alignment of the picture, 0: Top, 1: Center, 2: Bottom. Defaults to 1.
-- @param #number Size (Optional) Size of the picture in percent, defaults to 100
-- @param #number SizeUnits (Optional) Size units, 0 for % of original picture size, and 1 for % of window size. Defaults to 0.
function UTILS.ShowPictureToUnit(Unit, FilePath, Duration, ClearView, StartDelay, HorizontalAlign, VerticalAlign, Size, SizeUnits)
ClearView = ClearView or false
StartDelay = StartDelay or 0
@@ -4947,8 +4987,8 @@ end
--- Set the mission briefing for a coalition.
-- @param #number Coalition Briefing coalition ID, can be coalition.side.BLUE, coalition.side.RED or coalition.side.NEUTRAL
-- @param #string Text Briefing text, can contain newlines, will be converted formatted properly for DCS
-- @param #string Picture Picture file path, can be a file in the DEFAULT folder inside the .miz
-- @param #string Text Briefing text, can contain newlines, will be converted formatted properly for DCS.
-- @param #string Picture (Optional) Picture file path, can be a file in the DEFAULT folder inside the .miz. Defaults to "".
function UTILS.SetMissionBriefing(Coalition, Text, Picture)
Text = Text or ""
Text = Text:gsub("\n", "\\n")
@@ -5521,7 +5561,7 @@ end
function UTILS.CalculateInterceptBearing(A1, V1, A2, V2_speed)
local function berechne_bearing(richtung)
local bearing = math.deg(math.atan2(richtung.x, richtung.y))
local bearing = math.deg(math.atan2(richtung.x, richtung.z))
if bearing < 0 then
bearing = bearing + 360
end
+405 -85
View File
@@ -23,6 +23,7 @@
-- @field #boolean isAirdrome Airbase is an airdrome.
-- @field #boolean isHelipad Airbase is a helipad.
-- @field #boolean isShip Airbase is a ship.
-- @field #boolean isZell Airbase is a ZELL Booster.
-- @field #table parking Parking spot data.
-- @field #table parkingByID Parking spot data table with ID as key.
-- @field #table parkingWhitelist List of parking spot terminal IDs considered for spawning.
@@ -458,115 +459,420 @@ AIRBASE.TheChannel = {
--- Airbases of the Syria map
--
-- * `AIRBASE.Syria.Abu_al_Duhur` Abu al-Duhur
-- * `AIRBASE.Syria.Adana_Sakirpasa` Adana Sakirpasa
-- * `AIRBASE.Syria.Akrotiri` Akrotiri
-- * `AIRBASE.Syria.Al_Qusayr` Al Qusayr
-- * `AIRBASE.Syria.Al_Dumayr` Al-Dumayr
-- * `AIRBASE.Syria.Aleppo` Aleppo
-- * `AIRBASE.Syria.An_Nasiriyah` An Nasiriyah
-- * `AIRBASE.Syria.At_Tanf` At Tanf
-- * `AIRBASE.Syria.Bassel_Al_Assad` Bassel Al-Assad
-- * `AIRBASE.Syria.Beirut_Rafic_Hariri` Beirut-Rafic Hariri
-- * `AIRBASE.Syria.Ben_Gurion` Ben Gurion
-- * `AIRBASE.Syria.Damascus` Damascus
-- * `AIRBASE.Syria.Deir_ez_Zor` Deir ez-Zor
-- * `AIRBASE.Syria.Ercan` Ercan
-- * `AIRBASE.Syria.Eyn_Shemer` Eyn Shemer
-- * `AIRBASE.Syria.Gaziantep` Gaziantep
-- * `AIRBASE.Syria.Gazipasa` Gazipasa
-- * `AIRBASE.Syria.Gecitkale` Gecitkale
-- * `AIRBASE.Syria.H` H
-- * `AIRBASE.Syria.H3` H3
-- * `AIRBASE.Syria.H3_Northwest` H3 Northwest
-- * `AIRBASE.Syria.H3_Southwest` H3 Southwest
-- * `AIRBASE.Syria.H4` H4
-- * `AIRBASE.Syria.Haifa` Haifa
-- * `AIRBASE.Syria.Hama` Hama
-- * `AIRBASE.Syria.Hatay` Hatay
-- * `AIRBASE.Syria.Hatzor` Hatzor
-- * `AIRBASE.Syria.Herzliya` Herzliya
-- * `AIRBASE.Syria.Incirlik` Incirlik
-- * `AIRBASE.Syria.Jirah` Jirah
-- * `AIRBASE.Syria.Khalkhalah` Khalkhalah
-- * `AIRBASE.Syria.Kharab_Ishk` Kharab Ishk
-- * `AIRBASE.Syria.King_Abdullah_II` King Abdullah II
-- * `AIRBASE.Syria.King_Hussein_Air_College` King Hussein Air College
-- * `AIRBASE.Syria.Kingsfield` Kingsfield
-- * `AIRBASE.Syria.Kiryat_Shmona` Kiryat Shmona
-- * `AIRBASE.Syria.Kuweires` Kuweires
-- * `AIRBASE.Syria.Lakatamia` Lakatamia
-- * `AIRBASE.Syria.Larnaca` Larnaca
-- * `AIRBASE.Syria.Marj_Ruhayyil` Marj Ruhayyil
-- * `AIRBASE.Syria.Marj_as_Sultan_North` Marj as Sultan North
-- * `AIRBASE.Syria.Marj_as_Sultan_South` Marj as Sultan South
-- * `AIRBASE.Syria.Marka` Marka
-- * `AIRBASE.Syria.Megiddo` Megiddo
-- * `AIRBASE.Syria.Mezzeh` Mezzeh
-- * `AIRBASE.Syria.Minakh` Minakh
-- * `AIRBASE.Syria.Muwaffaq_Salti` Muwaffaq Salti
-- * `AIRBASE.Syria.Naqoura` Naqoura
-- * `AIRBASE.Syria.Nicosia` Nicosia
-- * `AIRBASE.Syria.Palmachim` Palmachim
-- * `AIRBASE.Syria.Palmyra` Palmyra
-- * `AIRBASE.Syria.Paphos` Paphos
-- * `AIRBASE.Syria.Pinarbashi` Pinarbashi
-- * `AIRBASE.Syria.Prince_Hassan` Prince Hassan
-- * `AIRBASE.Syria.Qabr_as_Sitt` Qabr as Sitt
-- * `AIRBASE.Syria.Ramat_David` Ramat David
-- * `AIRBASE.Syria.Rayak` Rayak
-- * `AIRBASE.Syria.Rene_Mouawad` Rene Mouawad
-- * `AIRBASE.Syria.Rosh_Pina` Rosh Pina
-- * `AIRBASE.Syria.Ruwayshid` Ruwayshid
-- * `AIRBASE.Syria.Sanliurfa` Sanliurfa
-- * `AIRBASE.Syria.Sayqal` Sayqal
-- * `AIRBASE.Syria.Shayrat` Shayrat
-- * `AIRBASE.Syria.Tabqa` Tabqa
-- * `AIRBASE.Syria.Taftanaz` Taftanaz
-- * `AIRBASE.Syria.Tal_Siman` Tal Siman
-- * `AIRBASE.Syria.Tel_Nof` Tel Nof
-- * `AIRBASE.Syria.Tha_lah` Tha'lah
-- * `AIRBASE.Syria.Tiyas` Tiyas
-- * `AIRBASE.Syria.Wujah_Al_Hajar` Wujah Al Hajar
-- * AIRBASE.Syria.Abu_al_Duhur
-- * AIRBASE.Syria.Adana_Sakirpasa
-- * AIRBASE.Syria.Adiyaman
-- * AIRBASE.Syria.Akrotiri
-- * AIRBASE.Syria.Al_Dumayr
-- * AIRBASE.Syria.Al_Qusayr
-- * AIRBASE.Syria.Aleppo
-- * AIRBASE.Syria.An_Nasiriyah
-- * AIRBASE.Syria.At_Tanf
-- * AIRBASE.Syria.Bassel_Al_Assad
-- * AIRBASE.Syria.Beirut_Rafic_Hariri
-- * AIRBASE.Syria.Ben_Gurion
-- * AIRBASE.Syria.Chukurova
-- * AIRBASE.Syria.Damascus
-- * AIRBASE.Syria.Deir_ez_Zor
-- * AIRBASE.Syria.Diyarbakir
-- * AIRBASE.Syria.Ercan
-- * AIRBASE.Syria.Eyn_Shemer
-- * AIRBASE.Syria.Gaziantep
-- * AIRBASE.Syria.Gazipasa
-- * AIRBASE.Syria.Gecitkale
-- * AIRBASE.Syria.Gulechoba
-- * AIRBASE.Syria.H3
-- * AIRBASE.Syria.H3_Northwest
-- * AIRBASE.Syria.H3_Southwest
-- * AIRBASE.Syria.H4
-- * AIRBASE.Syria.H4_Emergency
-- * AIRBASE.Syria.HC01
-- * AIRBASE.Syria.HC02
-- * AIRBASE.Syria.HC03
-- * AIRBASE.Syria.HC04
-- * AIRBASE.Syria.HC05
-- * AIRBASE.Syria.HC06
-- * AIRBASE.Syria.HI01
-- * AIRBASE.Syria.HI02
-- * AIRBASE.Syria.HI03
-- * AIRBASE.Syria.HI05
-- * AIRBASE.Syria.HI06
-- * AIRBASE.Syria.HI07
-- * AIRBASE.Syria.HI08
-- * AIRBASE.Syria.HI09
-- * AIRBASE.Syria.HI11
-- * AIRBASE.Syria.HI12
-- * AIRBASE.Syria.HI13
-- * AIRBASE.Syria.HI14
-- * AIRBASE.Syria.HI15
-- * AIRBASE.Syria.HI16
-- * AIRBASE.Syria.HI17
-- * AIRBASE.Syria.HI18
-- * AIRBASE.Syria.HI20
-- * AIRBASE.Syria.HI21
-- * AIRBASE.Syria.HI22
-- * AIRBASE.Syria.HI23
-- * AIRBASE.Syria.HI24
-- * AIRBASE.Syria.HI25
-- * AIRBASE.Syria.HI26
-- * AIRBASE.Syria.HJ01
-- * AIRBASE.Syria.HJ02
-- * AIRBASE.Syria.HJ03
-- * AIRBASE.Syria.HJ04
-- * AIRBASE.Syria.HL01
-- * AIRBASE.Syria.HL02
-- * AIRBASE.Syria.HL03
-- * AIRBASE.Syria.HL04
-- * AIRBASE.Syria.HL05
-- * AIRBASE.Syria.HL06
-- * AIRBASE.Syria.HL07
-- * AIRBASE.Syria.HL08
-- * AIRBASE.Syria.HL09
-- * AIRBASE.Syria.HL10
-- * AIRBASE.Syria.HL11
-- * AIRBASE.Syria.HL12
-- * AIRBASE.Syria.HL13
-- * AIRBASE.Syria.HMed00
-- * AIRBASE.Syria.HMed01
-- * AIRBASE.Syria.HMed02
-- * AIRBASE.Syria.HMed03
-- * AIRBASE.Syria.HMed04
-- * AIRBASE.Syria.HMed05
-- * AIRBASE.Syria.HMed06
-- * AIRBASE.Syria.HMed07
-- * AIRBASE.Syria.HMed08
-- * AIRBASE.Syria.HMed09
-- * AIRBASE.Syria.HMed10
-- * AIRBASE.Syria.HMed11
-- * AIRBASE.Syria.HMed12
-- * AIRBASE.Syria.HMed13
-- * AIRBASE.Syria.HMed14
-- * AIRBASE.Syria.HMed15
-- * AIRBASE.Syria.HMed16
-- * AIRBASE.Syria.HMed17
-- * AIRBASE.Syria.HMed18
-- * AIRBASE.Syria.HMed19
-- * AIRBASE.Syria.HMed20
-- * AIRBASE.Syria.HMed21
-- * AIRBASE.Syria.HMed22
-- * AIRBASE.Syria.HMed23
-- * AIRBASE.Syria.HMed24
-- * AIRBASE.Syria.HMed25
-- * AIRBASE.Syria.HMed26
-- * AIRBASE.Syria.HMed27
-- * AIRBASE.Syria.HMed28
-- * AIRBASE.Syria.HMed29
-- * AIRBASE.Syria.HMed30
-- * AIRBASE.Syria.HOil01
-- * AIRBASE.Syria.HOil02
-- * AIRBASE.Syria.HOil03
-- * AIRBASE.Syria.HOil04
-- * AIRBASE.Syria.HOil05
-- * AIRBASE.Syria.HOil06
-- * AIRBASE.Syria.HS02
-- * AIRBASE.Syria.HS03
-- * AIRBASE.Syria.HS04
-- * AIRBASE.Syria.HS05
-- * AIRBASE.Syria.HS06
-- * AIRBASE.Syria.HS07
-- * AIRBASE.Syria.HS08
-- * AIRBASE.Syria.HS09
-- * AIRBASE.Syria.HS10
-- * AIRBASE.Syria.HS11
-- * AIRBASE.Syria.HS12
-- * AIRBASE.Syria.HS13
-- * AIRBASE.Syria.HS14
-- * AIRBASE.Syria.HS15
-- * AIRBASE.Syria.HS16
-- * AIRBASE.Syria.HS17
-- * AIRBASE.Syria.HS18
-- * AIRBASE.Syria.HS19
-- * AIRBASE.Syria.HS20
-- * AIRBASE.Syria.HS21
-- * AIRBASE.Syria.HS22
-- * AIRBASE.Syria.HS23
-- * AIRBASE.Syria.HS24
-- * AIRBASE.Syria.HS25
-- * AIRBASE.Syria.HS26
-- * AIRBASE.Syria.HS27
-- * AIRBASE.Syria.HS28
-- * AIRBASE.Syria.HS29
-- * AIRBASE.Syria.HS30
-- * AIRBASE.Syria.HS31
-- * AIRBASE.Syria.HS32
-- * AIRBASE.Syria.HS33
-- * AIRBASE.Syria.HS34
-- * AIRBASE.Syria.HS35
-- * AIRBASE.Syria.HS36
-- * AIRBASE.Syria.HS37
-- * AIRBASE.Syria.HS38
-- * AIRBASE.Syria.HS39
-- * AIRBASE.Syria.HS40
-- * AIRBASE.Syria.HS41
-- * AIRBASE.Syria.HS42
-- * AIRBASE.Syria.HStad01
-- * AIRBASE.Syria.HStad02
-- * AIRBASE.Syria.HStad03
-- * AIRBASE.Syria.HStad04
-- * AIRBASE.Syria.HStad05
-- * AIRBASE.Syria.HStad06
-- * AIRBASE.Syria.HT01
-- * AIRBASE.Syria.HT02
-- * AIRBASE.Syria.H_med_orig_01
-- * AIRBASE.Syria.H_med_orig_02
-- * AIRBASE.Syria.H_med_orig_03
-- * AIRBASE.Syria.H_med_orig_04
-- * AIRBASE.Syria.H_med_orig_05
-- * AIRBASE.Syria.H_med_orig_06
-- * AIRBASE.Syria.H_med_orig_07
-- * AIRBASE.Syria.H_med_orig_08
-- * AIRBASE.Syria.H_med_orig_09
-- * AIRBASE.Syria.Haifa
-- * AIRBASE.Syria.Hama
-- * AIRBASE.Syria.Hatay
-- * AIRBASE.Syria.Hatzerim
-- * AIRBASE.Syria.Hatzor
-- * AIRBASE.Syria.Herzliya
-- * AIRBASE.Syria.Incirlik
-- * AIRBASE.Syria.Jirah
-- * AIRBASE.Syria.Kahramanmaras
-- * AIRBASE.Syria.Kedem
-- * AIRBASE.Syria.Khalkhalah
-- * AIRBASE.Syria.Kharab_Ishk
-- * AIRBASE.Syria.King_Abdullah_II
-- * AIRBASE.Syria.King_Hussein_Air_College
-- * AIRBASE.Syria.Kingsfield
-- * AIRBASE.Syria.Kiryat_Shmona
-- * AIRBASE.Syria.Konya
-- * AIRBASE.Syria.Kuweires
-- * AIRBASE.Syria.Lakatamia
-- * AIRBASE.Syria.Larnaca
-- * AIRBASE.Syria.Marj_Ruhayyil
-- * AIRBASE.Syria.Marj_as_Sultan_North
-- * AIRBASE.Syria.Marj_as_Sultan_South
-- * AIRBASE.Syria.Marka
-- * AIRBASE.Syria.Megiddo
-- * AIRBASE.Syria.Mezzeh
-- * AIRBASE.Syria.Minakh
-- * AIRBASE.Syria.Muwaffaq_Salti
-- * AIRBASE.Syria.Naqoura
-- * AIRBASE.Syria.Nevatim
-- * AIRBASE.Syria.Nicosia
-- * AIRBASE.Syria.Palmachim
-- * AIRBASE.Syria.Palmyra
-- * AIRBASE.Syria.Paphos
-- * AIRBASE.Syria.Pinarbashi
-- * AIRBASE.Syria.Prince_Hassan
-- * AIRBASE.Syria.Qabr_as_Sitt
-- * AIRBASE.Syria.Ramat_David
-- * AIRBASE.Syria.Rayak
-- * AIRBASE.Syria.Rene_Mouawad
-- * AIRBASE.Syria.Rosh_Pina
-- * AIRBASE.Syria.Ruwayshid
-- * AIRBASE.Syria.Sanliurfa
-- * AIRBASE.Syria.Sanliurfa_Heliport
-- * AIRBASE.Syria.Sayqal
-- * AIRBASE.Syria.Shayrat
-- * AIRBASE.Syria.T2
-- * AIRBASE.Syria.T3
-- * AIRBASE.Syria.Tabqa
-- * AIRBASE.Syria.Taftanaz
-- * AIRBASE.Syria.Tal_Siman
-- * AIRBASE.Syria.Tel_Nof
-- * AIRBASE.Syria.Teyman
-- * AIRBASE.Syria.Tha_lah
-- * AIRBASE.Syria.Tiyas
-- * AIRBASE.Syria.Wujah_Al_Hajar
-- * AIRBASE.Syria.Zarqa
--
-- @field Syria
AIRBASE.Syria = {
["Abu_al_Duhur"] = "Abu al-Duhur",
["Adana_Sakirpasa"] = "Adana Sakirpasa",
["Adiyaman"] = "Adiyaman",
["Akrotiri"] = "Akrotiri",
["Al_Qusayr"] = "Al Qusayr",
["Al_Dumayr"] = "Al-Dumayr",
["Al_Qusayr"] = "Al Qusayr",
["Aleppo"] = "Aleppo",
["An_Nasiriyah"] = "An Nasiriyah",
["At_Tanf"] = "At Tanf",
["Bassel_Al_Assad"] = "Bassel Al-Assad",
["Beirut_Rafic_Hariri"] = "Beirut-Rafic Hariri",
["Ben_Gurion"] = "Ben Gurion",
["Chukurova"] = "Chukurova",
["Damascus"] = "Damascus",
["Deir_ez_Zor"] = "Deir ez-Zor",
["Diyarbakir"] = "Diyarbakir",
["Ercan"] = "Ercan",
["Eyn_Shemer"] = "Eyn Shemer",
["Gaziantep"] = "Gaziantep",
["Gazipasa"] = "Gazipasa",
["Gecitkale"] = "Gecitkale",
["H"] = "H",
["Gulechoba"] = "Gulechoba",
["H3"] = "H3",
["H3_Northwest"] = "H3 Northwest",
["H3_Southwest"] = "H3 Southwest",
["H4"] = "H4",
["H4_Emergency"] = "H4 Emergency",
["HC01"] = "HC01",
["HC02"] = "HC02",
["HC03"] = "HC03",
["HC04"] = "HC04",
["HC05"] = "HC05",
["HC06"] = "HC06",
["HI01"] = "HI01",
["HI02"] = "HI02",
["HI03"] = "HI03",
["HI05"] = "HI05",
["HI06"] = "HI06",
["HI07"] = "HI07",
["HI08"] = "HI08",
["HI09"] = "HI09",
["HI11"] = "HI11",
["HI12"] = "HI12",
["HI13"] = "HI13",
["HI14"] = "HI14",
["HI15"] = "HI15",
["HI16"] = "HI16",
["HI17"] = "HI17",
["HI18"] = "HI18",
["HI20"] = "HI20",
["HI21"] = "HI21",
["HI22"] = "HI22",
["HI23"] = "HI23",
["HI24"] = "HI24",
["HI25"] = "HI25",
["HI26"] = "HI26",
["HJ01"] = "HJ01",
["HJ02"] = "HJ02",
["HJ03"] = "HJ03",
["HJ04"] = "HJ04",
["HL01"] = "HL01",
["HL02"] = "HL02",
["HL03"] = "HL03",
["HL04"] = "HL04",
["HL05"] = "HL05",
["HL06"] = "HL06",
["HL07"] = "HL07",
["HL08"] = "HL08",
["HL09"] = "HL09",
["HL10"] = "HL10",
["HL11"] = "HL11",
["HL12"] = "HL12",
["HL13"] = "HL13",
["HMed00"] = "HMed00",
["HMed01"] = "HMed01",
["HMed02"] = "HMed02",
["HMed03"] = "HMed03",
["HMed04"] = "HMed04",
["HMed05"] = "HMed05",
["HMed06"] = "HMed06",
["HMed07"] = "HMed07",
["HMed08"] = "HMed08",
["HMed09"] = "HMed09",
["HMed10"] = "HMed10",
["HMed11"] = "HMed11",
["HMed12"] = "HMed12",
["HMed13"] = "HMed13",
["HMed14"] = "HMed14",
["HMed15"] = "HMed15",
["HMed16"] = "HMed16",
["HMed17"] = "HMed17",
["HMed18"] = "HMed18",
["HMed19"] = "HMed19",
["HMed20"] = "HMed20",
["HMed21"] = "HMed21",
["HMed22"] = "HMed22",
["HMed23"] = "HMed23",
["HMed24"] = "HMed24",
["HMed25"] = "HMed25",
["HMed26"] = "HMed26",
["HMed27"] = "HMed27",
["HMed28"] = "HMed28",
["HMed29"] = "HMed29",
["HMed30"] = "HMed30",
["HOil01"] = "HOil01",
["HOil02"] = "HOil02",
["HOil03"] = "HOil03",
["HOil04"] = "HOil04",
["HOil05"] = "HOil05",
["HOil06"] = "HOil06",
["HS02"] = "HS02",
["HS03"] = "HS03",
["HS04"] = "HS04",
["HS05"] = "HS05",
["HS06"] = "HS06",
["HS07"] = "HS07",
["HS08"] = "HS08",
["HS09"] = "HS09",
["HS10"] = "HS10",
["HS11"] = "HS11",
["HS12"] = "HS12",
["HS13"] = "HS13",
["HS14"] = "HS14",
["HS15"] = "HS15",
["HS16"] = "HS16",
["HS17"] = "HS17",
["HS18"] = "HS18",
["HS19"] = "HS19",
["HS20"] = "HS20",
["HS21"] = "HS21",
["HS22"] = "HS22",
["HS23"] = "HS23",
["HS24"] = "HS24",
["HS25"] = "HS25",
["HS26"] = "HS26",
["HS27"] = "HS27",
["HS28"] = "HS28",
["HS29"] = "HS29",
["HS30"] = "HS30",
["HS31"] = "HS31",
["HS32"] = "HS32",
["HS33"] = "HS33",
["HS34"] = "HS34",
["HS35"] = "HS35",
["HS36"] = "HS36",
["HS37"] = "HS37",
["HS38"] = "HS38",
["HS39"] = "HS39",
["HS40"] = "HS40",
["HS41"] = "HS41",
["HS42"] = "HS42",
["HStad01"] = "HStad01",
["HStad02"] = "HStad02",
["HStad03"] = "HStad03",
["HStad04"] = "HStad04",
["HStad05"] = "HStad05",
["HStad06"] = "HStad06",
["HT01"] = "HT01",
["HT02"] = "HT02",
["H_med_orig_01"] = "H_med_orig_01",
["H_med_orig_02"] = "H_med_orig_02",
["H_med_orig_03"] = "H_med_orig_03",
["H_med_orig_04"] = "H_med_orig_04",
["H_med_orig_05"] = "H_med_orig_05",
["H_med_orig_06"] = "H_med_orig_06",
["H_med_orig_07"] = "H_med_orig_07",
["H_med_orig_08"] = "H_med_orig_08",
["H_med_orig_09"] = "H_med_orig_09",
["Haifa"] = "Haifa",
["Hama"] = "Hama",
["Hatay"] = "Hatay",
["Hatzerim"] = "Hatzerim",
["Hatzor"] = "Hatzor",
["Herzliya"] = "Herzliya",
["Incirlik"] = "Incirlik",
["Jirah"] = "Jirah",
["Kahramanmaras"] = "Kahramanmaras",
["Kedem"] = "Kedem",
["Khalkhalah"] = "Khalkhalah",
["Kharab_Ishk"] = "Kharab Ishk",
["King_Abdullah_II"] = "King Abdullah II",
["King_Hussein_Air_College"] = "King Hussein Air College",
["Kingsfield"] = "Kingsfield",
["Kiryat_Shmona"] = "Kiryat Shmona",
["Konya"] = "Konya",
["Kuweires"] = "Kuweires",
["Lakatamia"] = "Lakatamia",
["Larnaca"] = "Larnaca",
@@ -579,6 +885,7 @@ AIRBASE.Syria = {
["Minakh"] = "Minakh",
["Muwaffaq_Salti"] = "Muwaffaq Salti",
["Naqoura"] = "Naqoura",
["Nevatim"] = "Nevatim",
["Nicosia"] = "Nicosia",
["Palmachim"] = "Palmachim",
["Palmyra"] = "Palmyra",
@@ -592,21 +899,26 @@ AIRBASE.Syria = {
["Rosh_Pina"] = "Rosh Pina",
["Ruwayshid"] = "Ruwayshid",
["Sanliurfa"] = "Sanliurfa",
["Sanliurfa_Heliport"] = "Sanliurfa Heliport",
["Sayqal"] = "Sayqal",
["Shayrat"] = "Shayrat",
["T2"] = "T2",
["T3"] = "T3",
["Tabqa"] = "Tabqa",
["Taftanaz"] = "Taftanaz",
["Tal_Siman"] = "Tal Siman",
["Tel_Nof"] = "Tel Nof",
["Teyman"] = "Teyman",
["Tha_lah"] = "Tha'lah",
["Tiyas"] = "Tiyas",
["Wujah_Al_Hajar"] = "Wujah Al Hajar",
["Zarqa"] = "Zarqa",
}
--- Airbases of the Mariana Islands map
--
-- * `AIRBASE.MarianaIslands.Andersen_AFB` Andersen AFB
-- * `AIRBASE.MarianaIslands.Antonio_B._Won_Pat_Intl` Antonio B. Won Pat Intl
-- * `AIRBASE.MarianaIslands.Antonio_B_Won_Pat_Intl` Antonio B. Won Pat Intl
-- * `AIRBASE.MarianaIslands.North_West_Field` North West Field
-- * `AIRBASE.MarianaIslands.Olf_Orote` Olf Orote
-- * `AIRBASE.MarianaIslands.Pagan_Airstrip` Pagan Airstrip
@@ -617,7 +929,7 @@ AIRBASE.Syria = {
-- @field MarianaIslands
AIRBASE.MarianaIslands = {
["Andersen_AFB"] = "Andersen AFB",
["Antonio_B._Won_Pat_Intl"] = "Antonio B. Won Pat Intl",
["Antonio_B_Won_Pat_Intl"] = "Antonio B. Won Pat Intl",
["North_West_Field"] = "North West Field",
["Olf_Orote"] = "Olf Orote",
["Pagan_Airstrip"] = "Pagan Airstrip",
@@ -1673,6 +1985,7 @@ elseif self.category==Airbase.Category.SHIP then
self.category=Airbase.Category.HELIPAD
_DATABASE:AddStatic(AirbaseName)
end
if self:GetTypeName() == "Zell" then self.isZell = true end
else
self:E("ERROR: Unknown airbase category!")
end
@@ -2122,6 +2435,13 @@ function AIRBASE:IsShip()
return self.isShip
end
--- Check if airbase is a ZELL booster.
-- @param #AIRBASE self
-- @return #boolean If true, airbase is a ZELL booster.
function AIRBASE:IsZell()
return self.isZell
end
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
-- Parking
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
@@ -2164,7 +2484,7 @@ end
--- Get number of parking spots at an airbase. Optionally, a specific terminal type can be requested.
-- @param #AIRBASE self
-- @param #AIRBASE.TerminalType termtype Terminal type of which the number of spots is counted. Default all spots but spawn points on runway.
-- @param #AIRBASE.TerminalType termtype (Optional) Terminal type of which the number of spots is counted. Default all spots but spawn points on runway.
-- @return #number Number of parking spots at this airbase.
function AIRBASE:GetParkingSpotsNumber(termtype)
@@ -2184,7 +2504,7 @@ end
--- Get number of free parking spots at an airbase.
-- @param #AIRBASE self
-- @param #AIRBASE.TerminalType termtype Terminal type.
-- @param #boolean allowTOAC If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
-- @param #boolean allowTOAC (Optional) If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
-- @return #number Number of free parking spots at this airbase.
function AIRBASE:GetFreeParkingSpotsNumber(termtype, allowTOAC)
@@ -2207,7 +2527,7 @@ end
--- Get the coordinates of free parking spots at an airbase.
-- @param #AIRBASE self
-- @param #AIRBASE.TerminalType termtype Terminal type.
-- @param #boolean allowTOAC If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
-- @param #boolean allowTOAC (Optional) If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
-- @return #table Table of coordinates of the free parking spots.
function AIRBASE:GetFreeParkingSpotsCoordinates(termtype, allowTOAC)
@@ -2434,7 +2754,7 @@ end
--- Get a table containing the coordinates, terminal index and terminal type of free parking spots at an airbase.
-- @param #AIRBASE self
-- @param #AIRBASE.TerminalType termtype Terminal type.
-- @param #boolean allowTOAC If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
-- @param #boolean allowTOAC (Optional) If true, spots are considered free even though TO_AC is true. Default is off which is saver to avoid spawning aircraft on top of each other. Option might be enabled for FARPS and ships.
-- @return #table Table free parking spots. Table has the elements ".Coordinate, ".TerminalID", ".TerminalType", ".TOAC", ".Free", ".TerminalID0", ".DistToRwy".
function AIRBASE:GetFreeParkingSpotsTable(termtype, allowTOAC)
@@ -2486,7 +2806,7 @@ end
--- Place markers of parking spots on the F10 map.
-- @param #AIRBASE self
-- @param #AIRBASE.TerminalType termtype Terminal type for which marks should be placed.
-- @param #boolean mark If false, do not place markers but only give output to DCS.log file. Default true.
-- @param #boolean mark (Optional) If false, do not place markers but only give output to DCS.log file. Default true.
function AIRBASE:MarkParkingSpots(termtype, mark)
-- Default is true.
@@ -3266,7 +3586,7 @@ end
--- Set the active runway for landing and takeoff.
-- @param #AIRBASE self
-- @param #string Name Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
-- @param #boolean PreferLeft If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
-- @param #boolean PreferLeft (Optional) If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
function AIRBASE:SetActiveRunway(Name, PreferLeft)
self:SetActiveRunwayTakeoff(Name, PreferLeft)
@@ -3278,7 +3598,7 @@ end
--- Set the active runway for landing.
-- @param #AIRBASE self
-- @param #string Name Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
-- @param #boolean PreferLeft If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
-- @param #boolean PreferLeft (Optional) If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
-- @return #AIRBASE.Runway The active runway for landing.
function AIRBASE:SetActiveRunwayLanding(Name, PreferLeft)
@@ -3326,7 +3646,7 @@ end
--- Set the active runway for takeoff.
-- @param #AIRBASE self
-- @param #string Name Name of the runway, e.g. "31" or "02L" or "90R". If not given, the runway is determined from the wind direction.
-- @param #boolean PreferLeft If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
-- @param #boolean PreferLeft (Optional) If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
-- @return #AIRBASE.Runway The active runway for landing.
function AIRBASE:SetActiveRunwayTakeoff(Name, PreferLeft)
@@ -3351,7 +3671,7 @@ end
--- Get the runway where aircraft would be taking of or landing into the direction of the wind.
-- NOTE that this requires the wind to be non-zero as set in the mission editor.
-- @param #AIRBASE self
-- @param #boolean PreferLeft If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
-- @param #boolean PreferLeft (Optional) If `true`, perfer the left runway. If `false`, prefer the right runway. If `nil` (default), do not care about left or right.
-- @return #AIRBASE.Runway Active runway data table.
function AIRBASE:GetRunwayIntoWind(PreferLeft)
@@ -3407,7 +3727,7 @@ end
--- Get name of a given runway, e.g. "31L".
-- @param #AIRBASE self
-- @param #AIRBASE.Runway Runway The runway. Default is the active runway.
-- @param #AIRBASE.Runway Runway (Optional) The runway. Default is the active runway.
-- @param #boolean LongLeftRight If `true`, return "Left" or "Right" instead of "L" or "R".
-- @return #string Name of the runway or "XX" if it could not be found.
function AIRBASE:GetRunwayName(Runway, LongLeftRight)
@@ -3438,7 +3758,7 @@ end
--- Function that checks if at leat one unit of a group has been spawned close to a spawn point on the runway.
-- @param #AIRBASE self
-- @param Wrapper.Group#GROUP group Group to be checked.
-- @param #number radius Radius around the spawn point to be checked. Default is 50 m.
-- @param #number radius (Optional) Radius around the spawn point to be checked. Default is 50 m.
-- @param #boolean despawn If true, the group is destroyed.
-- @return #boolean True if group is within radius around spawn points on runway.
function AIRBASE:CheckOnRunWay(group, radius, despawn)
+2 -33
View File
@@ -117,7 +117,7 @@ end
-- @param #CLIENT self
-- @param #string ClientName Name of the DCS **Unit** as defined within the Mission Editor.
-- @param #string ClientBriefing Text that describes the briefing of the mission when a Player logs into the Client.
-- @param #boolean Error A flag that indicates whether an error should be raised if the CLIENT cannot be found. By default an error will be raised.
-- @param #boolean Error (Optional) A flag that indicates whether an error should be raised if the CLIENT cannot be found. By default an error will be raised.
-- @return #CLIENT
-- @usage
-- -- Create new Clients.
@@ -148,7 +148,7 @@ function CLIENT:FindByName( ClientName, ClientBriefing, Error )
end
end
--- Transport defines that the Client is a Transport. Transports show cargo.
--- Register a client.
-- @param #CLIENT self
-- @param #string ClientName Name of the client unit.
-- @return #CLIENT self
@@ -507,37 +507,6 @@ function CLIENT:GetClientGroupDCSUnit()
end
end
--- Evaluates if the CLIENT is a transport.
-- @param #CLIENT self
-- @return #boolean true is a transport.
function CLIENT:IsTransport()
self:F()
return self.ClientTransport
end
--- Shows the @{AI.AI_Cargo#CARGO} contained within the CLIENT to the player as a message.
-- The @{AI.AI_Cargo#CARGO} is shown using the @{Core.Message#MESSAGE} distribution system.
-- @param #CLIENT self
function CLIENT:ShowCargo()
self:F()
local CargoMsg = ""
for CargoName, Cargo in pairs( CARGOS ) do
if self == Cargo:IsLoadedInClient() then
CargoMsg = CargoMsg .. Cargo.CargoName .. " Type:" .. Cargo.CargoType .. " Weight: " .. Cargo.CargoWeight .. "\n"
end
end
if CargoMsg == "" then
CargoMsg = "empty"
end
self:Message( CargoMsg, 15, "Co-Pilot: Cargo Status", 30 )
end
--- The main message driver for the CLIENT.
-- This function displays various messages to the Player logged into the CLIENT through the DCS World Messaging system.
-- @param #CLIENT self
+127 -72
View File
@@ -875,7 +875,7 @@ end
--- Set callsign of the CONTROLLABLE. See [DCS command setCallsign](https://wiki.hoggitworld.com/view/DCS_command_setCallsign)
-- @param #CONTROLLABLE self
-- @param DCS#CALLSIGN CallName Number corresponding the the callsign identifier you wish this group to be called.
-- @param #number CallNumber The number value the group will be referred to as. Only valid numbers are 1-9. For example Uzi **5**-1. Default 1.
-- @param #number CallNumber (Optional) The number value the group will be referred to as. Only valid numbers are 1-9. For example Uzi **5**-1. Default 1.
-- @param #number Delay (Optional) Delay in seconds before the callsign is set. Default is immediately.
-- @return #CONTROLLABLE self
function CONTROLLABLE:CommandSetCallsign( CallName, CallNumber, Delay )
@@ -953,7 +953,7 @@ end
--- Set radio frequency. See [DCS command SetFrequency](https://wiki.hoggitworld.com/view/DCS_command_setFrequency)
-- @param #CONTROLLABLE self
-- @param #number Frequency Radio frequency in MHz.
-- @param #number Modulation Radio modulation. Default `radio.modulation.AM`.
-- @param #number Modulation (Optional) Radio modulation. Default `radio.modulation.AM`.
-- @param #number Power (Optional) Power of the Radio in Watts. Defaults to 10.
-- @param #number Delay (Optional) Delay in seconds before the frequency is set. Default is immediately.
-- @return #CONTROLLABLE self
@@ -980,7 +980,7 @@ end
--- [AIR] Set radio frequency. See [DCS command SetFrequencyForUnit](https://wiki.hoggitworld.com/view/DCS_command_setFrequencyForUnit)
-- @param #CONTROLLABLE self
-- @param #number Frequency Radio frequency in MHz.
-- @param #number Modulation Radio modulation. Default `radio.modulation.AM`.
-- @param #number Modulation (Optional) Radio modulation. Default `radio.modulation.AM`.
-- @param #number Power (Optional) Power of the Radio in Watts. Defaults to 10.
-- @param #number UnitID (Optional, if your object is a UNIT) The UNIT ID this is for.
-- @param #number Delay (Optional) Delay in seconds before the frequency is set. Default is immediately.
@@ -1005,7 +1005,7 @@ end
--- [AIR] Set smoke on or off. See [DCS command smoke on off](https://wiki.hoggitworld.com/view/DCS_command_smoke_on_off)
-- @param #CONTROLLABLE self
-- @param #boolean OnOff Set to true for on and false for off. Defaults to true.
-- @param #boolean OnOff (Optional) Set to true for on and false for off. Defaults to true.
-- @param #number Delay (Optional) Delay the command by this many seconds.
-- @return #CONTROLLABLE self
function CONTROLLABLE:CommandSmokeOnOff(OnOff, Delay)
@@ -1065,7 +1065,7 @@ end
--- Set EPLRS data link on/off.
-- @param #CONTROLLABLE self
-- @param #boolean SwitchOnOff If true (or nil) switch EPLRS on. If false switch off.
-- @param #number idx Task index. Default 1.
-- @param #number idx (Optional) Task index. Default 1.
-- @return #table Task wrapped action.
function CONTROLLABLE:TaskEPLRS( SwitchOnOff, idx )
@@ -1099,32 +1099,14 @@ end
-- @param #number AttackQty (optional) This parameter limits maximal quantity of attack. The aircraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aircraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
-- @param DCS#Azimuth Direction (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
-- @param DCS#Distance Altitude (optional) Desired attack start altitude. Controllable/aircraft will make its attacks from the altitude. If the altitude is too low or too high to use weapon aircraft/controllable will choose closest altitude to the desired attack start altitude. If the desired altitude is defined controllable/aircraft will not attack from safe altitude.
-- @param #boolean AttackQtyLimit (optional) The flag determines how to interpret attackQty parameter. If the flag is true then attackQty is a limit on maximal attack quantity for "AttackGroup" and "AttackUnit" tasks. If the flag is false then attackQty is a desired attack quantity for "Bombing" and "BombingRunway" tasks.
-- @param #boolean GroupAttack (Optional) If true, attack as group.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:TaskAttackGroup( AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit, GroupAttack )
-- self:F2( { self.ControllableName, AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, AttackQtyLimit } )
-- AttackGroup = {
-- id = 'AttackGroup',
-- params = {
-- groupId = Group.ID,
-- weaponType = number,
-- expend = enum AI.Task.WeaponExpend,
-- attackQty = number,
-- directionEnabled = boolean,
-- direction = Azimuth,
-- altitudeEnabled = boolean,
-- altitude = Distance,
-- attackQtyLimit = boolean,
-- }
-- }
function CONTROLLABLE:TaskAttackGroup( AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, GroupAttack )
-- self:F2( { self.ControllableName, AttackGroup, WeaponType, WeaponExpend, AttackQty, Direction, Altitude, GroupAttack } )
local DCSTask = { id = 'AttackGroup',
params = {
groupId = AttackGroup:GetID(),
weaponType = WeaponType or 1073741822,
weaponType = WeaponType or ENUMS.WeaponFlag.Auto,
expend = WeaponExpend or "Auto",
attackQtyLimit = AttackQty and true or false,
attackQty = AttackQty or 1,
@@ -1135,7 +1117,6 @@ function CONTROLLABLE:TaskAttackGroup( AttackGroup, WeaponType, WeaponExpend, At
groupAttack = GroupAttack and true or false,
},
}
return DCSTask
end
@@ -1163,7 +1144,7 @@ function CONTROLLABLE:TaskAttackUnit( AttackUnit, GroupAttack, WeaponExpend, Att
altitude = Altitude,
attackQtyLimit = AttackQty and true or false,
attackQty = AttackQty,
weaponType = WeaponType or 1073741822,
weaponType = WeaponType or ENUMS.WeaponFlag.Auto,
},
}
@@ -1197,7 +1178,7 @@ function CONTROLLABLE:TaskBombing( Vec2, GroupAttack, WeaponExpend, AttackQty, D
direction = Direction and math.rad(Direction) or 0,
altitudeEnabled = Altitude and true or false,
altitude = Altitude or 2000,
weaponType = WeaponType or 1073741822,
weaponType = WeaponType or ENUMS.WeaponFlag.AnyBomb,
attackType = Divebomb and "Dive" or nil,
},
}
@@ -1249,7 +1230,7 @@ end
-- @param #number AttackQty (Optional) This parameter limits maximal quantity of attack. The aircraft/controllable will not make more attack than allowed even if the target controllable not destroyed and the aircraft/controllable still have ammo. If not defined the aircraft/controllable will attack target until it will be destroyed or until the aircraft/controllable will run out of ammo.
-- @param DCS#Azimuth Direction (Optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
-- @param #number Altitude (Optional) The altitude [meters] from where to attack. Default 30 m.
-- @param #number WeaponType (Optional) The WeaponType. Default Auto=1073741822.
-- @param #number WeaponType (Optional) The WeaponType. Default `ENUMS.WeaponFlag.Auto`.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:TaskAttackMapObject( Vec2, GroupAttack, WeaponExpend, AttackQty, Direction, Altitude, WeaponType )
@@ -1266,7 +1247,7 @@ function CONTROLLABLE:TaskAttackMapObject( Vec2, GroupAttack, WeaponExpend, Atta
direction = Direction and math.rad(Direction) or 0,
altitudeEnabled = Altitude and true or false,
altitude = Altitude,
weaponType = WeaponType or 1073741822,
weaponType = WeaponType or ENUMS.WeaponFlag.Auto,
},
}
@@ -1385,7 +1366,7 @@ end
-- The controllable has to be an infantry group!
-- @param #CONTROLLABLE self
-- @param Core.Point#COORDINATE Coordinate Coordinates where AI is expecting to be picked up.
-- @param #number Radius Radius in meters. Default 200 m.
-- @param #number Radius (Optional) Radius in meters. Default 200 m.
-- @param #string UnitType The unit type name of the carrier, e.g. "UH-1H". Must not be specified.
-- @return DCS#Task Embark to transport task.
function CONTROLLABLE:TaskEmbarkToTransport( Coordinate, Radius, UnitType )
@@ -1459,8 +1440,8 @@ end
--- (AIR) Orbit at a position with at a given altitude and speed. Optionally, a race track pattern can be specified.
-- @param #CONTROLLABLE self
-- @param Core.Point#COORDINATE Coord Coordinate at which the CONTROLLABLE orbits. Can also be given as a `DCS#Vec3` or `DCS#Vec2` object.
-- @param #number Altitude Altitude in meters of the orbit pattern. Default y component of Coord.
-- @param #number Speed Speed [m/s] flying the orbit pattern. Default 128 m/s = 250 knots.
-- @param #number Altitude (Optional) Altitude in meters of the orbit pattern. Default y component of Coord.
-- @param #number Speed (Optional) Speed [m/s] flying the orbit pattern. Default 128 m/s = 250 knots.
-- @param Core.Point#COORDINATE CoordRaceTrack (Optional) If this coordinate is specified, the CONTROLLABLE will fly a race-track pattern using this and the initial coordinate.
-- @return #CONTROLLABLE self
function CONTROLLABLE:TaskOrbit( Coord, Altitude, Speed, CoordRaceTrack )
@@ -1530,11 +1511,11 @@ end
--
-- @param #CONTROLLABLE self
-- @param Wrapper.Airbase#AIRBASE Airbase Airbase to attack.
-- @param #number WeaponType (optional) Bitmask of weapon types those allowed to use. See [DCS enum weapon flag](https://wiki.hoggitworld.com/view/DCS_enum_weapon_flag). Default 2147485694 = AnyBomb (GuidedBomb + AnyUnguidedBomb).
-- @param DCS#AI.Task.WeaponExpend WeaponExpend Enum AI.Task.WeaponExpend that defines how much munitions the AI will expend per attack run. Default "ALL".
-- @param #number AttackQty Number of times the group will attack if the target. Default 1.
-- @param DCS#Azimuth Direction (optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
-- @param #boolean GroupAttack (optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a group and not to a single aircraft.
-- @param #number WeaponType (Optional) Bitmask of weapon types those allowed to use. See [DCS enum weapon flag](https://wiki.hoggitworld.com/view/DCS_enum_weapon_flag). Default 2147485694 = AnyBomb (GuidedBomb + AnyUnguidedBomb).
-- @param DCS#AI.Task.WeaponExpend (Optional) WeaponExpend Enum AI.Task.WeaponExpend that defines how much munitions the AI will expend per attack run. Default "ALL".
-- @param #number AttackQty (Optional) Number of times the group will attack if the target. Default 1.
-- @param DCS#Azimuth Direction (Optional) Desired ingress direction from the target to the attacking aircraft. Controllable/aircraft will make its attacks from the direction. Of course if there is no way to attack from the direction due the terrain controllable/aircraft will choose another direction.
-- @param #boolean GroupAttack (Optional) Flag indicates that the target must be engaged by all aircrafts of the controllable. Has effect only if the task is assigned to a group and not to a single aircraft.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:TaskBombingRunway( Airbase, WeaponType, WeaponExpend, AttackQty, Direction, GroupAttack )
@@ -1725,7 +1706,7 @@ end
-- @param DCS#Vec3 Vec3 Position of the unit / lead unit of the controllable relative lead unit of another controllable in frame reference oriented by course of lead unit of another controllable. If another controllable is on land the unit / controllable will orbit around.
-- @param #number LastWaypointIndex Detach waypoint of another controllable. Once reached the unit / controllable Escort task is finished.
-- @param #number EngagementDistance Maximal distance from escorted controllable to threat in meters. If the threat is already engaged by escort escort will disengage if the distance becomes greater than 1.5 * engagementDistMax.
-- @param DCS#AttributeNameArray TargetTypes Array of AttributeName that is contains threat categories allowed to engage. Default {"Air"}. See https://wiki.hoggit.us/view/DCS_enum_attributes
-- @param DCS#AttributeNameArray TargetTypes (Optional) Array of AttributeName that is contains threat categories allowed to engage. Default {"Air"}. See https://wiki.hoggit.us/view/DCS_enum_attributes
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:TaskEscort( FollowControllable, Vec3, LastWaypointIndex, EngagementDistance, TargetTypes )
@@ -1765,7 +1746,7 @@ end
-- @param #number AmmoCount (optional) Quantity of ammunition to expand (omit to fire until ammunition is depleted).
-- @param #number WeaponType (optional) Enum for weapon type ID. This value is only required if you want the group firing to use a specific weapon, for instance using the task on a ship to force it to fire guided missiles at targets within cannon range. See http://wiki.hoggit.us/view/DCS_enum_weapon_flag
-- @param #number Altitude (Optional) Altitude in meters.
-- @param #number ASL Altitude is above mean sea level. Default is above ground level.
-- @param #number ASL (Optional) Altitude is above mean sea level. Default is above ground level.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:TaskFireAtPoint( Vec2, Radius, AmmoCount, WeaponType, Altitude, ASL )
@@ -1818,11 +1799,11 @@ end
-- It's important to note that depending on the type of unit that is being assigned the task (AIR or GROUND), you must choose the correct type of callsign enumerator. For airborne controllables use CALLSIGN.Aircraft and for ground based use CALLSIGN.JTAC enumerators.
-- @param #CONTROLLABLE self
-- @param Wrapper.Group#GROUP AttackGroup Target GROUP object.
-- @param #number WeaponType Bitmask of weapon types, which are allowed to use.
-- @param DCS#AI.Task.Designation Designation (Optional) Designation type.
-- @param #number WeaponType (Optional) Bitmask of weapon types, which are allowed to use. Defaults tp ENUMS.WeaponFlag.AutoDCS.
-- @param DCS#AI.Task.Designation Designation (Optional) Designation type. Defaults to Auto.
-- @param #boolean Datalink (Optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.
-- @param #number Frequency Frequency in MHz used to communicate with the FAC. Default 133 MHz.
-- @param #number Modulation Modulation of radio for communication. Default 0=AM.
-- @param #number Frequency (Optional) Frequency in MHz used to communicate with the FAC. Default 133 MHz.
-- @param #number Modulation (Optional) Modulation of radio for communication. Default 0=AM.
-- @param #number CallsignName Callsign enumerator name of the FAC. (CALLSIGN.Aircraft.{name} for airborne controllables, CALLSIGN.JTACS.{name} for ground units)
-- @param #number CallsignNumber Callsign number, e.g. Axeman-**1**.
-- @return DCS#Task The DCS task structure.
@@ -1848,8 +1829,8 @@ end
--- (AIR) Engaging targets of defined types.
-- @param #CONTROLLABLE self
-- @param DCS#Distance Distance Maximal distance from the target to a route leg. If the target is on a greater distance it will be ignored.
-- @param DCS#AttributeNameArray TargetTypes Array of target categories allowed to engage.
-- @param #number Priority All enroute tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first. Default 0.
-- @param DCS#AttributeNameArray TargetTypes (Optional) Array of target categories allowed to engage. Defaults to {"Air"}.
-- @param #number Priority (Optional) All enroute tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first. Default 0.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskEngageTargets( Distance, TargetTypes, Priority )
@@ -1890,7 +1871,7 @@ end
--- (AIR) Enroute anti-ship task.
-- @param #CONTROLLABLE self
-- @param DCS#AttributeNameArray TargetTypes Array of target categories allowed to engage. Default `{"Ships"}`.
-- @param DCS#AttributeNameArray TargetTypes (Optional) Array of target categories allowed to engage. Default `{"Ships"}`.
-- @param #number Priority (Optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first. Default 0.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskAntiShip(TargetTypes, Priority)
@@ -1911,7 +1892,7 @@ end
--- (AIR) Enroute SEAD task.
-- @param #CONTROLLABLE self
-- @param DCS#AttributeNameArray TargetTypes Array of target categories allowed to engage. Default `{"Air Defence"}`.
-- @param DCS#AttributeNameArray TargetTypes (Optional) Array of target categories allowed to engage. Default `{"Air Defence"}`.
-- @param #number Priority (Optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first. Default 0.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskSEAD(TargetTypes, Priority)
@@ -1932,7 +1913,7 @@ end
--- (AIR) Enroute CAP task.
-- @param #CONTROLLABLE self
-- @param DCS#AttributeNameArray TargetTypes Array of target categories allowed to engage. Default `{"Air"}`.
-- @param DCS#AttributeNameArray TargetTypes (Optional) Array of target categories allowed to engage. Default `{"Air"}`.
-- @param #number Priority (Optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first. Default 0.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskCAP(TargetTypes, Priority)
@@ -2105,11 +2086,11 @@ end
-- Target designation is set to auto and is dependent on the circumstances.
-- See [hoggit](https://wiki.hoggitworld.com/view/DCS_task_fac).
-- @param #CONTROLLABLE self
-- @param #number Frequency Frequency in MHz. Default 133 MHz.
-- @param #number Modulation Radio modulation. Default `radio.modulation.AM`.
-- @param #number Frequency (Optional) Frequency in MHz. Default 133 MHz.
-- @param #number Modulation (Optional) Radio modulation. Default `radio.modulation.AM`.
-- @param #number CallsignID CallsignID, e.g. `CALLSIGN.JTAC.Anvil` for ground or `CALLSIGN.Aircraft.Ford` for air.
-- @param #number CallsignNumber Callsign first number, e.g. 2 for `Ford-2`.
-- @param #number Priority All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first.
-- @param #number Priority (Optional) All en-route tasks have the priority parameter. This is a number (less value - higher priority) that determines actions related to what task will be performed first. Defaults to 0.
-- @return DCS#Task The DCS task structure.
function CONTROLLABLE:EnRouteTaskFAC( Frequency, Modulation, CallsignID, CallsignNumber, Priority )
@@ -2185,6 +2166,7 @@ function CONTROLLABLE:TaskFunction( FunctionString, ... )
self:SetState( self, ArgumentKey, arg )
DCSScript[#DCSScript + 1] = "local Arguments = MissionControllable:GetState( MissionControllable, '" .. ArgumentKey .. "' ) "
DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, unpack( Arguments ) )"
--DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable, ((type(Arguments)=='table') and unpack(Arguments) or nil))" -- this doesn't work
else
DCSScript[#DCSScript + 1] = FunctionString .. "( MissionControllable )"
end
@@ -2338,8 +2320,8 @@ do -- Patrol methods
-- @param #table ZoneList Table of zones.
-- @param #number Speed Speed in km/h the group moves at.
-- @param #string Formation (Optional) Formation the group should use.
-- @param #number DelayMin Delay in seconds before the group progresses to the next route point. Default 1 sec.
-- @param #number DelayMax Max. delay in seconds. Actual delay is randomly chosen between DelayMin and DelayMax. Default equal to DelayMin.
-- @param #number DelayMin (Optional) Delay in seconds before the group progresses to the next route point. Default 1 sec.
-- @param #number DelayMax (Optional) Max. delay in seconds. Actual delay is randomly chosen between DelayMin and DelayMax. Default equal to DelayMin.
-- @return #CONTROLLABLE
function CONTROLLABLE:PatrolZones( ZoneList, Speed, Formation, DelayMin, DelayMax )
@@ -2854,7 +2836,7 @@ do -- Route methods
-- @param #CONTROLLABLE self
-- @param Core.Zone#ZONE Zone The zone where to route to.
-- @param #boolean Randomize Defines whether to target point gets randomized within the Zone.
-- @param #number Speed The speed in m/s. Default is 5.555 m/s = 20 km/h.
-- @param #number Speed (Optional) The speed in m/s. Default is 5.555 m/s = 20 km/h.
-- @param DCS#FORMATION Formation The formation string.
function CONTROLLABLE:TaskRouteToZone( Zone, Randomize, Speed, Formation )
self:F2( Zone )
@@ -2914,7 +2896,7 @@ do -- Route methods
-- A given formation can be given.
-- @param #CONTROLLABLE self
-- @param DCS#Vec2 Vec2 The Vec2 where to route to.
-- @param #number Speed The speed in m/s. Default is 5.555 m/s = 20 km/h.
-- @param #number Speed (Optional) The speed in m/s. Default is 5.555 m/s = 20 km/h.
-- @param DCS#FORMATION Formation The formation string.
function CONTROLLABLE:TaskRouteToVec2( Vec2, Speed, Formation )
@@ -3658,6 +3640,66 @@ function CONTROLLABLE:OptionPreferVerticalLanding()
return nil
end
--- Air - Allow formation side swap
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionAllowFormationSideSwap()
self:F2( { self.ControllableName } )
local DCSControllable = self:GetDCSObject()
if DCSControllable then
local Controller = self:_GetController()
if self:IsAir() then
Controller:setOption( AI.Option.Air.id.ALLOW_FORMATION_SIDE_SWAP, true )
end
return self
end
return nil
end
--- Air - Allow formation takeoff, if enough space
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionAIRunwayLineUp()
self:F2( { self.ControllableName } )
local DCSControllable = self:GetDCSObject()
if DCSControllable then
local Controller = self:_GetController()
if self:IsAir() then
Controller:setOption( 37, true )
end
return self
end
return nil
end
--- Air - Allow to fly home after loss of formation
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionDisengageAndRTBAfterFormationLoss()
self:F2( { self.ControllableName } )
local DCSControllable = self:GetDCSObject()
if DCSControllable then
local Controller = self:_GetController()
if self:IsAir() then
Controller:setOption( 38, 1 )
end
return self
end
return nil
end
--- Can the CONTROLLABLE evade on enemy fire?
-- @param #CONTROLLABLE self
-- @return #boolean
@@ -3806,7 +3848,7 @@ end
--- Set RTB on bingo fuel.
-- @param #CONTROLLABLE self
-- @param #boolean RTB true if RTB on bingo fuel (default), false if no RTB on bingo fuel.
-- @param #boolean RTB (Optional) true if RTB on bingo fuel (default), false if no RTB on bingo fuel.
-- Warning! When you switch this option off, the airborne group will continue to fly until all fuel has been consumed, and will crash.
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionRTBBingoFuel( RTB ) -- R2.2
@@ -3933,7 +3975,7 @@ end
--- [Ground] Option that defines the vehicle spacing when in an on road and off road formation.
-- @param #CONTROLLABLE self
-- @param #number meters Can be zero to 100 meters. Defaults to 50 meters.
-- @param #number meters (Optional) Can be zero to 100 meters. Defaults to 50 meters.
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionFormationInterval(meters)
self:F2( { self.ControllableName } )
@@ -3954,7 +3996,7 @@ end
--- [Air] Defines the usage of Electronic Counter Measures by airborne forces.
-- @param #CONTROLLABLE self
-- @param #number ECMvalue Can be - 0=Never on, 1=if locked by radar, 2=if detected by radar, 3=always on, defaults to 1
-- @param #number ECMvalue (Optional) Can be - 0=Never on, 1=if locked by radar, 2=if detected by radar, 3=always on, defaults to 1
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionECM( ECMvalue )
self:F2( { self.ControllableName } )
@@ -4250,7 +4292,7 @@ end
--- Defines the range at which a GROUND unit/group is allowed to use its weapons automatically.
-- @param #CONTROLLABLE self
-- @param #number EngageRange Engage range limit in percent (a number between 0 and 100). Default 100.
-- @param #number EngageRange (Optional) Engage range limit in percent (a number between 0 and 100). Default 100.
-- @return #CONTROLLABLE self
function CONTROLLABLE:OptionEngageRange( EngageRange )
self:F2( { self.ControllableName } )
@@ -4272,6 +4314,19 @@ function CONTROLLABLE:OptionEngageRange( EngageRange )
return nil
end
--- [AIR] Set if aircraft is allowed to drop empty fuel tanks - set to true to allow, and false to forbid it.
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
function CONTROLLABLE:SetOptionJettisonEmptyTanks(Switch)
self:F2( { self.ControllableName } )
-- Set default if not specified.
Switch = Switch or true
if self:IsAir() then
self:SetOption( AI.Option.Air.id.JETT_TANKS_IF_EMPTY, Switch )
end
return self
end
--- [AIR] Set how the AI lands on an airfield. Here: Straight in.
-- @param #CONTROLLABLE self
-- @return #CONTROLLABLE self
@@ -4400,7 +4455,7 @@ end
--- [AIR] Set the AI to report contact for certain types of objects.
-- @param #CONTROLLABLE self
-- @param #table Objects Table of attribute names for which AI reports contact. Defaults to {"Air"}. See [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes)
-- @param #table Objects (Optional) Table of attribute names for which AI reports contact. Defaults to {"Air"}. See [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes)
-- @return #CONTROLLABLE self
function CONTROLLABLE:SetOptionRadioContact(Objects)
self:F2( { self.ControllableName } )
@@ -4414,7 +4469,7 @@ end
--- [AIR] Set the AI to report engaging certain types of objects.
-- @param #CONTROLLABLE self
-- @param #table Objects Table of attribute names for which AI reports contact. Defaults to {"Air"}, see [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes)
-- @param #table Objects (Optional) Table of attribute names for which AI reports contact. Defaults to {"Air"}, see [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes)
-- @return #CONTROLLABLE self
function CONTROLLABLE:SetOptionRadioEngage(Objects)
self:F2( { self.ControllableName } )
@@ -4428,7 +4483,7 @@ end
--- [AIR] Set the AI to report killing certain types of objects.
-- @param #CONTROLLABLE self
-- @param #table Objects Table of attribute names for which AI reports contact. Defaults to {"Air"}, see [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes)
-- @param #table Objects (Optional) Table of attribute names for which AI reports contact. Defaults to {"Air"}, see [Hoggit Wiki](https://wiki.hoggitworld.com/view/DCS_enum_attributes)
-- @return #CONTROLLABLE self
function CONTROLLABLE:SetOptionRadioKill(Objects)
self:F2( { self.ControllableName } )
@@ -4442,12 +4497,12 @@ end
--- (GROUND) Relocate controllable to a random point within a given radius; use e.g.for evasive actions; Note that not all ground controllables can actually drive, also the alarm state of the controllable might stop it from moving.
-- @param #CONTROLLABLE self
-- @param #number speed Speed of the controllable, default 20
-- @param #number radius Radius of the relocation zone, default 500
-- @param #boolean onroad If true, route on road (less problems with AI way finding), default true
-- @param #boolean shortcut If true and onroad is set, take a shorter route - if available - off road, default false
-- @param #string formation Formation string as in the mission editor, e.g. "Vee", "Diamond", "Line abreast", etc. Defaults to "Off Road"
-- @param #boolean onland (optional) If true, try up to 50 times to get a coordinate on land.SurfaceType.LAND. Note - this descriptor value is not reliably implemented on all maps.
-- @param #number speed (Optional) Speed of the controllable, default 20
-- @param #number radius (Optional) Radius of the relocation zone, default 500
-- @param #boolean onroad (Optional) If true, route on road (less problems with AI way finding), default true
-- @param #boolean shortcut (Optional) If true and onroad is set, take a shorter route - if available - off road, default false
-- @param #string formation (Optional) Formation string as in the mission editor, e.g. "Vee", "Diamond", "Line abreast", etc. Defaults to "Off Road"
-- @param #boolean onland (Optional) If true, try up to 50 times to get a coordinate on land.SurfaceType.LAND. Note - this descriptor value is not reliably implemented on all maps.
-- @return #CONTROLLABLE self
function CONTROLLABLE:RelocateGroundRandomInRadius( speed, radius, onroad, shortcut, formation, onland )
self:F2( { self.ControllableName } )
@@ -5830,8 +5885,8 @@ end
--- [GROUND] Create and enable a new IR Marker for the given controllable UNIT or GROUP.
-- @param #CONTROLLABLE self
-- @param #boolean EnableImmediately (Optionally) If true start up the IR Marker immediately. Else you need to call `myobject:EnableIRMarker()` later on.
-- @param #number Runtime (Optionally) Run this IR Marker for the given number of seconds, then stop. Use in conjunction with EnableImmediately. Defaults to 60 seconds.
-- @param #boolean EnableImmediately (Optional) If true start up the IR Marker immediately. Else you need to call `myobject:EnableIRMarker()` later on.
-- @param #number Runtime (Optional) Run this IR Marker for the given number of seconds, then stop. Use in conjunction with EnableImmediately. Defaults to 60 seconds.
-- @return #CONTROLLABLE self
function CONTROLLABLE:NewIRMarker(EnableImmediately, Runtime)
self:T2("NewIRMarker")

Some files were not shown because too many files have changed in this diff Show More