* Fix a problem that sometimes the object event is called prior to the SET_CLIENT event for players joining, leading to false negatives on specifically filtered SET_CLIENT objects
* Add POSITIONABLE.CargoBayCapacityValues for manual configuration of cargo capacities.
* Add comment documenting local variable
* Remove extraneous semicolon
* Update Positionable.lua
Updated a bit plus documentation and working enumerator
---------
Co-authored-by: Thomas <72444570+Applevangelist@users.noreply.github.com>
* Added FSM event "Progress" that will be triggered if the targetcount goes down for a task, but is not yet zero. This will bubble up to PLAYERTASKCONTROLLER
#PLAYERTASKCONTROLLER
* Added FSM event"TaskProgess" (see above). The event function will recveive the PLAYERTASK and the current target count
* Changed the menu build strategy to ensure a lot less menu rebuilds. Menus are now only build if
* A new player joins (for the joining single player)
* On joining a task (for the joining single player)
* When aborting a task (for the aborting single player)
* On Task succes (for all players)
* Removal of time based builds: The status loop will now only enforce the menu build if the task count in the queue is smaller than the menu item limit. This effectively enforces a time-based order of tasks, and newer, even higher prio task will not bubble into the task list of pilots automatically.
Reinforcing
- improved check if reinforcing is still ongoing
- improved handling by commander/chief
- added check that assets are not added to a mission twice
* Bring options for afterburner usage down to AUFTRAG level
# OpsGroup (Flightgroup)
* Follow setting option for AB usage from mission, if set, generally and for execution phase of the AUFTRAG
Adds option to drop crates from a herc via parachute drop as CTLD_Cargo that needs proper unpacking - can be picked up be a helo.
Co-authored-by: UglySkyfire <69476075+UglySkyfire@users.noreply.github.com>
** RANGE**
- Added scenery as target
**OPSGROUP**
- Added option that group does not return to its legion
**AUFTRAG**
- Added option that assets do not return to its legion
* Fixed issue with underlying OpsTransport
* Added FSM Transition OnAfterPilotUnloaded()
* Added options for SRS TTS output - no sound files
* Added voice options for downed pilot and operator - these can have different voices
* #CSAR - Add Persistence (#1889)
* Adds a modified version of ops.CTLD's Persistence to ops.CSAR
* Update Marker.lua
* Changed documentation for Marker.lua and MarkerOps_Base.lua (#1891)
---------
Co-authored-by: Jason du Plessis <33880363+TheChosenOn3@users.noreply.github.com>
Co-authored-by: grandpaSam <wouldyukindly@gmail.com>
* #CSAR - Add Persistence (#1889)
* Adds a modified version of ops.CTLD's Persistence to ops.CSAR
* Update Marker.lua
---------
Co-authored-by: Jason du Plessis <33880363+TheChosenOn3@users.noreply.github.com>
- Increased dealy before Route to base to 1.0 sec. Previous delay of 0.1 sec was apparently too short for the stop flag to take effect and the task was not called done. Hence the mission was also not done.
**CHIEF**
- Fixed bugs of polygon opszones
- Added option to use CAPTUREZONE auftrag for opszones
**OPSZONE**
- Fixed bug when marker off
**ZONE_POLYGON_BASE**
- Added `GetRadius()` function
**LEGION**
- Improved Reinforcement
* Extended use of marker ops:
-- Enable the function like so:
-- mycontroller:EnableMarkerOps("TASK")
-- Then as a player in a client slot, you can add a map marker on the F10 map. Next edit the text
-- in the marker to make it identifiable, e.g
--
-- TASK Name=Tanks Sochi, Text=Destroy tank group located near Sochi!
--
-- Where **TASK** is the tag that tells the controller this mark is a target location (must).
-- **Name=** ended by a comma **,** tells the controller the supposed menu entry name (optional). No extra spaces! End with a comma!
-- **Text=** tells the controller the supposed free text task description (optional, only taken if **Name=** is present first). No extra spaces!
function PLAYERTASKCONTROLLER:EnableMarkerOps(Tag)
* Documentation fixes. (#1810)
Fix documentation references.
Correct spelling errors.
Remove empty whitespaces.
Correct a single mis-spelled ZONE_BASE variable, see 'Core/Zone.lua' (variable "Sureface" -> "Surface", no references to mis-spelled "Sureface" throughout the codebase).
Correct mis-spelling of "coaltion" in 'Functional/Mantis.lua', corrected to "coalition".
* Documentation fixes. (#1811)
Update documentation text and links.
Fix spelling errors.
Other minor adjustments where appropriate, such as remove whitespaces and format code.
* Documentation fixes. (#1815)
Minor documentation and code formatting fixes.
This is mostly intended to have something re-trigger the documentation generation to see if the filename capitalization is resolved.
* Code formatting preparation. (#1817)
Use EmmyLuaCodeStyle that comes with "Lua" VS Code extension (https://marketplace.visualstudio.com/items?itemName=sumneko.lua). More features and configurability than LuaFormatter, and no need for additional extension (beyond "Lua").
Formatting file set up from default template with some tweaks to correspond to most common coding style observed in the code base. Further tweaks are likely required.
* Documentation fixes. (#1816)
Co-authored-by: TommyC81 <tommyc81@gmail.com>
* Added GetTargets()
#TARGET
* Also call Dead() when no targets left over
#PLAYERTASKCONTROLLER
* Added FSM events for Flaring, Smoking, and Illumination
* Added Illumination of targets in menu if it is night
* Rename menu parent setting to SetParentMenu(Menu)
* Added function to obtain *average* Vec3 of the GROUP
* Added function to obtain *average* Coordinate of the GROUP
#TARGET
* Make use of new coordinate function in GROUP
* Added switchable smoking of own position
* Changed smoking - now laser target single, other targets as combined coordinate
* Added battle field illumination
* Added support for the KA-50. Note - camera is seen as "always on". For lasing, target needs to be head-on 12 o'clock
* Added switchable smoking of own position
* Changed smoking - now laser target single, other targets as combined coordinate
* Added battle field illumination
* Added support for the KA-50. Note - camera is seen as "always on". For lasing, target needs to be head-on 12 o'clock
* Added setting of laser distance as camera sight calc is a non-starter
* Added specific laser zone of 20m x length to catch targets to lase
* Reworked detection of hit on lased target
* Fixed SetILS report not working
* Use new AIRBASE additions to set takeoff/landing runway
* Fixed Visibility is reported twice
* Added SetReportmBar() to report for mBar/hpa QNH/QFE even if not metric
* Added option to output additional freetext information when using SRS SetAdditionalInformation()
#1792
* Make AWACS SRS talk as own coalition
Set MSRS coalition to make AWACS talk only to its coalition, not to spectators
* Typo
SetModernEraAgressive() function should be SetModernEraAggressive() (two 'g')
**OPSZONE**
- Added `:SetTimeCapture()` function to set time interval until a zone is captured.
**FLIGHTCONTROL**
- Added coalition to tower and pilot msrs.
* Fixed some typos of forms of the word 'strategy'.
* Fix ZONE_BASE:GetProperty() usage example comment
Co-authored-by: dogjutsu <dogjutsu@mattjay.net>
* Added option to enforce case sensitive matches on Tagname
#PLAYERTASKCONTROLLER
* Text tweaking
* Fixed "mark on map" not showing subtitles
* Revamped menu build to have less rebuilds
* Added option to show additional info menu for tasks before joining
* Fixed some typos of forms of the word 'strategy'.
* Retrieve Zone 'properties' with ZONE_BASE.
* Extraneous comment cleanup.
Co-authored-by: dogjutsu <dogjutsu@mattjay.net>
**RANGE**
- Changed keyword in result tables to "command" for compatibility with DCSServerBot
**AIRBOSS**
- Changed keyword in result tables to "command" for compatibility with DCSServerBot
- Fix bug in Alt and AoA data round function when creating trapsheet data
**SOCKET**
- Changed for compatibility with DCSServerBot
* Added Optical Tracker to ID SAMs, corrected logic error in ID'ing SAMs
#PLAYERTASKCONTROLLER
* Added documentation in MarkerOps
* Corrected Cluster radius to be in KM
* Corrected set up of SEAD attribute table to work
**SOCKET**
- Changed port to 10042.
- Removed port as optional parameter in functions.
**AIRBOSS**
- Added FunkMan function
- Added onAfterLSOGrade which sends results table to socket
**RANGE**
- Compat to FunkMan.
* Fixed logic for CallSignTranslations which now applies to both AI and Players, a set overwrite in the group name for a player still takes precedence.
* Added a switch self.PikesSpecialSwitch to omit "doing xy knots" from the station assignment
* Added universally working ATC_GROUND_UNIVERSAL as base class, can be used on any map without further changes
* Kept sub-class names for compatibility
* Added `:SetAirbaseBoundaries(Airbase, Zone)`
* Added `:DrawBoundaries( Color )`
* Added option to suppress screen output
* Added target information via SRS
* Added target radius for BAI vs CAS and target type COORDINATE to be configureable
* Refined SRS output
* Added STATIC targets to get task type BOMBING
* Added solution to detect bombing runways (kind of, bombing occuring in AFB zone)
* Added solution for COORDINATE and ZONE type TARGETs (find enemy GROUP and/or STATIC objects in target radius)
* Refined documentation
**AIRBOSS**
- Stennis now takes dimensions of other super carriers
**FLIGHTCONTROL**
- Added queue for sounds
- Fixed bugs and minor improvements
**ZONE**
- Added defaults when getting colors if not set
**SRS**
- Added new class `MSRSQUEUE`
* Added Event handling stuff in case client leaves/ejects/dies
* A2A - removed menus for smoke/flare
* Task menu entries now refreshed more intelligently
* Added `PLAYERTASKCONTROLLER:OnAfterTaskAdded(From, Event, To, Task)`
* AWACS - added the ability to use custom callsigns with TTS. Revised section 5.1 of documentation to demonstrate
* AWACS - Added nil check to callsign construction when looking for replacement
* Added Function ZipLip
* Changed merge distance to 5nm for account for delay in speech generation
* Altered RadioQueue to not save all calls until a player connects
* Some bugfixes
** ARMYGROUP**
- Added suppression option
**COMMANDER**
- Added function to add targets with defined resources
**OPSGROUP**
- Added option to pause multiple missions
**INTEL**
- Fixed bug in cluster calc
**LEGION**
- Added function to get alive opsgroups
**TARGET**
* Added start condition
**FLIGHTCONTROL**
- Improved menus
- Added more menus
- Improved radio messages overlap
- Added options to limit number of fights taxiing and taking off
**OPSGROUP**
- Improved routing for ground.
**NAVYGROUP**
- Fixed U-turn of turn into wind
**ARMYGROUP**
- Improved updateroute
**LEGION** and **COMMANDER**
- Set mission range LARGE for relocation mission
**AUFTRAG**
- Fixed bug in Nassets for relocation
- #1677
- Fixed that damaged is triggered when group is despawned.
- Fixed total ammo calculation when group is dead
- Fixed assets do not carry out patrol zone after transport
**AUFTRAG**
- Added option to specify mission type for escorts, *e.g.* `AUFTRAG.Type.SEAD`
**LEGION** and **COMMANDER**
- Improved handling of SEAD escorts.
* Added RejectZone (foreign border)
* Option to suppress screen output
* Option to add google key in SetSRS
* Some corrections to callouts
* Menu option to show base info
* WIP - Basic player task assignment
**INTEL**
- Added nil check for cluster position update
**OPSGROUP**
- Improved fire at point task to take only max avail shots and relative shot amount
- Fixed tasks not executed after teleport
**INTEL**
- Added nil check for cluster position update
**OPSGROUP**
- Improved fire at point task to take only max avail shots and relative shot amount
- Fixed tasks not executed after teleport
GROUP - added GROUP:IsPlayer()
INTEL - added clustering by flight deck (10'k ft) for AIR
SET - added option to NOT set the cargo bay weight limit automatically on SET_GROUP:AddGroup( group, DontSetCargoBayLimit )
**CHIEF**
- Added resources as parameters to `:AddStrategicZone` function
**COMMANDER**
- Added function to relocate cohorts `:RelocateCohort`
**AUFTRAG**
- Added new type `AIRDEFENSE`
- Added new type `EWR`
- Added option to teleport assets to the mission ingress waypoint via `:SetTeleport`
- Added `:SetRequiredAttribute` and `:SetRequiredProperty` functions
- Added `:SetEmission` function
**LEGION**
- Fixed bug that assets on GCI dont get additional score for INTERCEPT missions
- Assets on ONGUARD or PATROLZONE are not considered for ARTY and GROUNDATTACK missions
- Added option for transport to `RelocateCohort` function
- Ground/naval assets now automatically return when out of ammo
**OPSGROUP**
- Immobile groups are teleported to mission ingress point
**RECOVERYTANKER**
- Added parameter to set TACAN mode/band (e.g. "X")
**GROUP**
- Fixed bug in `:GetSpeedMax` function
**BEACON**
- Allowed TACAN "X" mode for AA
**CHIEF**
- Added resources as parameters to `:AddStrategicZone` function
**COMMANDER**
- Added function to relocate cohorts `:RelocateCohort`
**AUFTRAG**
- Added new type `AIRDEFENSE`
- Added new type `EWR`
- Added option to teleport assets to the mission ingress waypoint via `:SetTeleport`
- Added `:SetRequiredAttribute` and `:SetRequiredProperty` functions
- Added `:SetEmission` function
**LEGION**
- Fixed bug that assets on GCI dont get additional score for INTERCEPT missions
- Assets on ONGUARD or PATROLZONE are not considered for ARTY and GROUNDATTACK missions
- Added option for transport to `RelocateCohort` function
- Ground/naval assets now automatically return when out of ammo
**OPSGROUP**
- Immobile groups are teleported to mission ingress point
**RECOVERYTANKER**
- Added parameter to set TACAN mode/band (e.g. "X")
**GROUP**
- Fixed bug in `:GetSpeedMax` function
**BEACON**
- Allowed TACAN "X" mode for AA
SRS- added option to set a label for the SRS radio overlay
OpsGroup - added options to use said label, and option to override a frequency for an SRS (TTS) sender
**AIRWING**
- Added option to start in air `:SetTakeoffAir()`
- Added option to despawn near airbase `:SetDespawnAfterHolding()`
- Added option to despawn after landing `:SetDepawnAfterLanding()`
**SQUADRON**
- Added option to start in air `:SetTakeoffAir()`
- Added option to despawn near airbase `:SetDespawnAfterHolding()`
- Added option to despawn after landing `:SetDepawnAfterLanding()`
- Squadron settings overrule Airwing settings
**OPSGROUP**
- Improved `:Teleport()` function
**ZONE**
- Fixed incorrect fillcolor alpha.
**COORDINATE**
- Fixed incorrect fillcolor alpha.
**AUFTRAG**
- Fixed `CASENHANCED` order of arguments wrong in docs.
**FLEET**
- Improved docs.
- Added ``:SetPathfinding` function
**OPSGROUP**
- Fixed RECON mission behaviour if not random.
- Improved stuck check if engaging.
**LEGION**
- Added weapon type as parameter for selecting cohort assets.
**COHORT**
- Added `:GetMissionRange` function that accounts for long range weapons.
- Added counting of asset ammo.
**FLEET v0.0.1**
- New class for naval units corresponding to AIRWING and BRIGADE
**FLOTILLA v0.0.1**
- New class for naval units corresponding to SQUADRON and PLATOON
FLIGHTGROUP
- Improved homebase for spawned units
- Enabled helo inAir check due to DCS bug that inAir returns true when spawned at airbase or farp
SET_ZONE
- Added DrawZone() function
ARMYGROUP
- Improved EngageTarget() function
AUFTRAG
- ARMORATTACK is not falling back to GROUNDATTACK
CHIEF
- Added `:RemoveStrategicZone()` function
- Added `:SetLimitMission()` function to limit number of total or specific mission types.
- Improved Tactical Overview
OPSZONE
- Improved `Stop()` function
OPSGROUP
- Added damage check for groups that are not alive.
- Added `:ReturnToLegion` function.
- Added `:Teleport` function
LEGION
- Aircraft dont start hot if on Alert5 mission
AUFTRAG
- Added Formation parameter to PATROLZONE (for ground only)
ARMYGROUP
- Set Vee formation for engage group
- Added option to detect statics via `INTEL:SetDetectStatics` function.
- Added `INTEL:KnowObject` function to make intel aware of GROUPs or STATICs.
- Improved cluster analysis.
- Changed `NewCluster` event: removed contact as first parameter.
AUFTRAG: Trooptransport set pickup radius to 100 meters.
OPSGROUP: enabled pickup radius for trooptransport auftrag
ARMYGOUP: removed GetPathOnRoad as it seems unncessary
- CHIEF: fixed bug in LEGION.RecruitCohortAssets() function call
- COMMANDER: added total weight to LEGION.RecruitCohortAssets() function call
- POSITIONABLE: fixed bug in relFuel calculation for cargo bay size
Fixed _FindCratesNearby() to optionally ignore the helo's max load capacity, which prevented CTLD from finding, listing, building crates is weights are used. Fixes#1688
- Added check for AUFTRAG that if it is executing and all groups are dead, it's done
- Added check in WAREHOUSE find parking that units need to be alive
- Airwing added :SetPayloadAmount() and SetAirboss() functions
- AUFTRAG fixed Failure to Failed event name
- CHIEF added statics as targets
- LEGION added check that runway is operational and carrier is not recovering for mission selection
AUFTRAG/CHIEF/OPSGROUP - added Auftrag type ARMOREDGUARD to have an ONGUARD mission for tanks w/o triggering transport by CHIEF
Made classes around CHIEF & AIRBOSS a bit less noisy as it kills my logfile
AUFTRAG
- Added mission task param for RECON, PATROLZONE and TROOPTRANSPORT
FLIGHTGROUP
- Fixed CheckGroupDone if group is engaging and has a paused mission
TARGET
- Added GetThreatLevelMax functions
CHIEF
- Added :AddGciCapZone() function
1) Inbound calls both from Players requesting marshal and AI sent to marshal:
"Marshal, [MODEX], marking mom's [BEARING] for [DISTANCE], angels [HEIGHT], state [FUEL_STATE]
2) Commencing call and voiceover (both AI and Players)
For that, two boolean fields have been added to Airboss class to trigger or not extra voice overs:
xtVoiceOvers
xtVoiceOversAI
These fields can be modified trough methods:
AIRBOSS:SetExtraVoiceOvers(true/false)
AIRBOSS:SetExtraVoiceOversAI(true/false)
Note. At the moment both methods initialize to "false" at Airboss:NEW, so in case you want to have this functionality activated, you need to call the methods with (true) when initializing your Airboss class.
The new methods in charge of creating the radio calls are
AIRBOSS:_MarshalAI: for AI flights send to marshal
AIRBOSS:_RequestMarshal: for player flighs requesting marshal from F10 menu
2) AIRBOSS:_CommencingCall(unit, modex), which is called from
AIRBOSS:_ClearForLanding: for AI flights cleared for landing
AIRBOSS:_RequestCommence: for player flights requesting commencing from F10 menu (disregarding if the player call is right or not)
This enhacement of the Airboss class requires 5 new sound files (.ogg) to be included to folder "\Airboss Soundfiles" in your .miz file:
PILOT-Angels.ogg
PILOT-For.ogg
PILOT-MarkingMoms.ogg
PILOT-Marshal.ogg
PILOT-State.ogg
PILOT-Commencing.ogg
This commit enhances Airboss class functionality to provide with the inbound calls both from Players requesting marshal and AI sent to marshal:
- "Marshal, [MODEX], marking mom's [BEARING] for [DISTANCE], angels [HEIGHT], state [FUEL_STATE]
Two new boolean fields have been added to Airboss class to trigger or not the inbound calls:
- inRadioCall
- inRadioCallAI
These fields can be modified trough methods:
- AIRBOSS:SetInboundMessagesPlayer(false)
- AIRBOSS:SetInboundMessagesAI(false)
Note. At the moment both methods initialize to "false" at Airboss:NEW, so in case you want to have this functionality activated, you need to call the methods with (true) when initializing your Airboss class.
This enhacement of the Airboss class requires 5 new sound files (.ogg) to be included to folder "\Airboss Soundfiles" in your .miz file:
- PILOT-Angels.ogg
- PILOT-For.ogg
- PILOT-MarkingMoms.ogg
- PILOT-Marshal.ogg
- PILOT-State.ogg
To get them, please refer to the SOUNDS MOOSE repository or the discord channel. Where they will be available.
Several small changes that should hopefully be a nice QoL upgrade for generating the imports and lead to less newbie confusion.
* Adds a lua binary directly to the repository instead of just expecting the user to have installed it via choco. Added binary is 5.4 as that's the lowest 5.x exe that's easily downloaded, and it works fine for what we need.
* Modifies the launch targets to use workspace_loc macros instead of resource_loc macros. Workspace_loc requires the user to have correctly set the name of their project, but that is already stressed in the documentation. resource_loc was just wrong. (project_loc would cause problems if the user had selected something outside of the moose project before running).
* Modifies launch targets to use the folder structure that the project is actually structured with.
* Adds the include folder and files so Eclipse doesn't explode when they are missing.
* Small modifications to Moose_Create, also includes a path conversion function that in my testing doesn't make a difference eitherway on Windows, but is there for a troubleshooting option.
* Adds courtesy instructions when generating the dynamic include file.
Tested on MP and SP. Both were recording incorrect wires on 1/2 and 4 wires regularly with an occasional 3 wire miss. This tested correct in the Hornet.
TonyG
- Fixed AUFTRAG :Repeat()
- Fixed bug in BRIGADE
- Improved cargo bay calculation in POSITIONABLE (includes rel. fuel)
- Changed carrier event names in OPSGROUP
- New class F10MENU (not sure about it)
-- ## 6. Save and load back units - persistance
--
-- You can save and later load back units dropped or build to make your mission persistent.
-- For this to work, you need to de-sanitize **io** and **lfs** in your MissionScripting.lua, which is located in your DCS installtion folder under Scripts.
-- There is a risk involved in doing that; if you do not know what that means, this is possibly not for you.
--
-- Use the following options to manage your saves:
--
-- my_ctld.enableLoadSave = true -- allow auto-saving and loading of files
-- my_ctld.saveinterval = 600 -- save every 10 minutes
-- my_ctld.filename = "missionsave.csv" -- example filename
-- my_ctld.filepath = "C:\\Users\\myname\\Saved Games\\DCS\Missions\\MyMission" -- example path
--
-- Then use an initial load at the beginning of your mission:
--
-- my_ctld:__Load(10)
--
-- **Caveat:**
-- If you use units build by multiple templates, they will effectively double on loading. Dropped crates are not saved. Current stock is not saved.
- Fixes that ARMY and NAVYGROUPS only go to first waypoint
- Fixes for PATROL and RECON missions that waypoints are added at the end
- Some other stuff
- Still need to fix adinfinitum
- Found and fixed bugs for ARMY and NAVY groups, which caused only one waypoint to be processed
- Added Duration for AUFTRAG
- Fixed bug in auftrag if no legion was assigned and mission was canceled at opsgroup level
- Trying (again) to include the whole route for ARMY and NAVY when UpdateRoute
- Simpler task function for passing waypoint
STILL a lot to do/check!
CTLD - added option to drop crates anywhere
MANTIS - added state tracker to call Green/Red state change events only once
UTILS - added Marianas NDBs to Frequency generation
Added ATC_GROUND_MARIANAISLANDS
Supported optional airbase ZONE_POLYGON boundaries (like initially intented) when there is provided, fallback remain a ZONE from the center of the airfield.
Some airports are bigger than the default radius area and need custom boundaries to work properly on the edge of it.
Bug - text is not synchronized with the wrapper state, hence the `GetText()` will be incorrect.
Method `TextChanged` does not exist, resulting `nil` reference errors when the players update markers. Current implementation of `MARKER:OnEventMarkChange(EventData)` is not implemented the same as its siblings of `OnEventMarkRemoved` and `OnEventMarkAdded`. The siblings would move the FSM accordingly -- aligned implementation
Added options to limit number of downed pilots via Events (mission designers can still "inject" downed pilots):
`self.limitmaxdownedpilots = true
self.maxdownedpilots = 10`
* Added function for message duration (#1542)
... and correct flash status setting
* Update Spawn.lua (#1544)
* Update Spawn.lua
* Update Group.lua (#1546)
Added invisible and immortal commands on GROUP level.
Added functionality to calculate the position of a cluster after x seconds, based on trajectory (average speed and heading) of a cluster
* INTEL:CalcClusterFuturePosition(cluster,seconds)
Will also draw arrows on the map if `self.clustermarkers` is true and `self.verbose > 1`
Change cluster coordinate updates to better suite cluster movement
Avoid loop if mission is governed by an Airwing. Mission cancel will ask airwing to cancel will ask flightgroup to cancel, which doesn't work if the latter is dead. Rare but happens.
Addition of:
- AA - Angled Approach call (advisory)
- Drift Right/Left - DR/DL (advisory)
- Overshoot - OS - graded for start
Updated default SetMPWireCorrection(Dcorr) to 12 from 8.7 based on feedback.
Minor clean up and updates for intro section to include new additions and other changes previously made.
TonyG
Addition of:
- AA - Angled Approach call (advisory)
- Drift Right/Left - DR/DL (advisory)
- Overshoot - OS - graded for start
Updated default SetMPWireCorrection(Dcorr) to 12 from 8.7 based on feedback.
Minor clean up and updates for intro section to include new additions and other changes previously made.
TonyG
Changes on screen description of groove times to match NATOPs grading
NESA
LIG
Changes unicorn groove time from 16-18secs to 15-18.99 seconds.
No change to grading. Reference GitHub issues 1445 &1446.
**AUFTRAG**
- Added PATROLZONE type. Works for all OPSGROUPs (air, ground and sea).
**FLIGHTGROUP**
- Improved EngageTarget
- Added option to automatically engage detected targets.
**TARGET**
- Improved Zone type
-- that will define when the AI will engage with the detected airborne enemy targets.
-- Use the method @{AI.AI_CAP#AI_CAP_ZONE.SetEngageZone}() to define that Zone. -- TODO: Documentation. Check that this is actually correct. The originally referenced class does not exist.
--
--
-- # 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
-- Searching can be switched back on with the method @{#AI_BAI_ZONE.SearchOn}(). Use the method @{#AI_BAI_ZONE.SearchOnOff}() to flexibily switch searching on or off.
--
--
-- # 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
-- Using the @{#AI_CARGO_APC.Pickup}() method, you are able to direct the APCs towards a point on the battlefield to board/load the cargo at the specific coordinate.
-- The APCs will follow nearby roads as much as possible, to ensure fast and clean cargo transportation between the objects and villages in the simulation environment.
--
--
--
-- # 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
-- marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every
-- time is not so much of an issue ...
--
--
--
-- # 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
-- marginal impact on the overall battlefield simulation. Fortunately, the firing strength of infantry is limited, and thus, respacing healthy infantry every
-- time is not so much of an issue ...
--
--
--
-- # 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
-- EscortPlanes = AI_ESCORT:New( EscortUnit, EscortGroup, "Desert", "Welcome to the mission. You are escorted by a plane with code name 'Desert', which can be instructed through the F10 radio menu." )
-- EscortPlanes:MenusAirplanes() -- create menus for airplanes
-- EscortPlanes:__Start(2)
--
--
--
-- # 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
-- Escort groups can have their own mission. This menu item will allow the escort group to resume their Mission from a given waypoint.
-- Note that this is really fantastic, as you now have the dynamic of taking control of the escort groups, and allowing them to resume their path or mission.
--
--
-- # 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 Core.Set#SET_CLIENT clientset The set of clients this menu manager is for
-- @field #table flattree
-- @field #table rootentries
-- @field #table menutree
-- @field #number entrycount
-- @field #boolean debug
-- @extends Core.Base#BASE
--- *As a child my family's menu consisted of two choices: take it, or leave it.*
--
-- ===
--
-- ## CLIENTMENU and CLIENTMENUMANAGER
--
-- Manage menu structures for a SET_CLIENT of clients.
--
-- ## Concept
--
-- Separate creation of a menu tree structure from pushing it to each client. Create a shadow "reference" menu structure tree for your client pilot's in a mission.
-- This can then be propagated to all clients. Manipulate the entries in the structure with removing, clearing or changing single entries, create replacement sub-structures
-- for entries etc, push to one or all clients.
--
-- Many functions can either change the tree for one client or for all clients.
--
-- ## Create a base reference tree and send to all clients
--
-- local clientset = SET_CLIENT:New():FilterStart()
--
-- local menumgr = CLIENTMENUMANAGER:New(clientset,"Dayshift")
-- local mymenu = menumgr:NewEntry("Top")
-- local mymenu_lv1a = menumgr:NewEntry("Level 1 a",mymenu)
-- local mymenu_lv1b = menumgr:NewEntry("Level 1 b",mymenu)
-- -- next one is a command menu entry, which can only be used once
-- local mymenu_lv1c = menumgr:NewEntry("Action Level 1 c",mymenu, testfunction, "testtext"):SetOnce()
--
-- local mymenu_lv2a = menumgr:NewEntry("Go here",mymenu_lv1a)
-- local mymenu_lv2b = menumgr:NewEntry("Level 2 ab",mymenu_lv1a)
-- local mymenu_lv2c = menumgr:NewEntry("Level 2 ac",mymenu_lv1a)
--
-- local mymenu_lv2ba = menumgr:NewEntry("Level 2 ba",mymenu_lv1b)
-- local mymenu_lv2bb = menumgr:NewEntry("Level 2 bb",mymenu_lv1b)
-- local mymenu_lv2bc = menumgr:NewEntry("Level 2 bc",mymenu_lv1b)
--
-- local mymenu_lv3a = menumgr:NewEntry("Level 3 aaa",mymenu_lv2a)
-- local mymenu_lv3b = menumgr:NewEntry("Level 3 aab",mymenu_lv2a)
-- local mymenu_lv3c = menumgr:NewEntry("Level 3 aac",mymenu_lv2a)
--
-- menumgr:Propagate()
--
-- ## Remove a single entry's subtree
--
-- menumgr:RemoveSubEntries(mymenu_lv3a)
--
-- ## Remove a single entry and also it's subtree
--
-- menumgr:DeleteEntry(mymenu_lv3a)
--
-- ## Add a single entry
--
-- local baimenu = menumgr:NewEntry("BAI",mymenu_lv1b)
--
-- menumgr:AddEntry(baimenu)
--
-- ## Add an entry with a function
--
-- local baimenu = menumgr:NewEntry("Task Action", mymenu_lv1b, TestFunction, Argument1, Argument1)
--
-- Now, the class will **automatically append the call with GROUP and CLIENT objects**, as this is can only be done when pushing the entry to the clients. So, the actual function implementation needs to look like this:
--
-- function TestFunction( Argument1, Argument2, Group, Client)
--
-- **Caveat is**, that you need to ensure your arguments are not **nil** or **false**, as LUA will optimize those away. You would end up having Group and Client in wrong places in the function call. Hence,
-- if you need/ want to send **nil** or **false**, send a place holder instead and ensure your function can handle this, e.g.
--
-- local baimenu = menumgr:NewEntry("Task Action", mymenu_lv1b, TestFunction, "nil", Argument1)
--
-- ## Change the text of a leaf entry in the menu tree
--- Remove all entries below the given entry from the client's F10 menus.
-- @param #CLIENTMENUMANAGER self
-- @param #CLIENTMENU Entry The entry where to start. This entry stays.
-- @param Wrapper.Client#CLIENT Client (optional) If given, make this change only for this client. In this case the generic structure will not be touched.
--- Deletes a STORAGE from the DATABASE based on the name of the associated airbase.
-- @param #DATABASE self
-- @param #string AirbaseName The name of the airbase.
functionDATABASE:DeleteStorage(AirbaseName)
self.STORAGES[AirbaseName]=nil
end
--- Finds an STORAGE based on the name of the associated airbase.
-- @param #DATABASE self
-- @param #string AirbaseName Name of the airbase.
-- @return Wrapper.Storage#STORAGE The found STORAGE.
functionDATABASE:FindStorage(AirbaseName)
localstorage=self.STORAGES[AirbaseName]
returnstorage
end
do-- Zones and Pathlines
--- Finds a @{Core.Zone} based on the zone name.
@@ -1333,7 +1368,7 @@ function DATABASE:_EventOnBirth( Event )
ifPlayerNamethen
-- Debug info.
self:I(string.format("Player '%s' joint unit '%s' of group '%s'",tostring(PlayerName),tostring(Event.IniDCSUnitName),tostring(Event.IniDCSGroupName)))
self:I(string.format("Player '%s' joined unit '%s' of group '%s'",tostring(PlayerName),tostring(Event.IniDCSUnitName),tostring(Event.IniDCSGroupName)))
-- Add client in case it does not exist already.
ifnotclientthen
@@ -1813,13 +1848,13 @@ function DATABASE:GetFlightControl(airbasename)
@@ -454,3 +456,138 @@ function MESSAGE:ToLogIf( Condition )
end
returnself
end
_MESSAGESRS={}
--- Set up MESSAGE generally to allow Text-To-Speech via SRS and TTS functions.
-- @param #string PathToSRS Path to SRS Folder, defaults to "C:\\\\Program Files\\\\DCS-SimpleRadio-Standalone".
-- @param #number Port Port number of SRS, defaults to 5002.
-- @param #string PathToCredentials (optional) Path to credentials file for e.g. Google.
-- @param #number Frequency Frequency in MHz. Can also be given as a #table of frequencies.
-- @param #number Modulation Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations.
-- @param #string Gender (optional) Gender, i.e. "male" or "female", defaults to "male".
-- @param #string Culture (optional) Culture, e.g. "en-US", defaults to "en-GB"
-- @param #string Voice (optional) Voice. Will override gender and culture settings, e.g. MSRS.Voices.Microsoft.Hazel or MSRS.Voices.Google.Standard.de_DE_Standard_D. Hint on Microsoft voices - working voices are limited to Hedda, Hazel, David, Zira and Hortense. **Must** be installed on your Desktop or Server!
-- @param #number Coalition (optional) Coalition, can be coalition.side.RED, coalition.side.BLUE or coalition.side.NEUTRAL. Defaults to coalition.side.NEUTRAL.
-- @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.
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number coalition (optional) Coalition, can be coalition.side.RED, coalition.side.BLUE or coalition.side.NEUTRAL. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
--- Sends a message via SRS on the blue coalition side.
-- @param #MESSAGE self
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
--- Sends a message via SRS on the red coalition side.
-- @param #MESSAGE self
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
--- Sends a message via SRS to all - via the neutral coalition side.
-- @param #MESSAGE self
-- @param #number frequency (optional) Frequency in MHz. Can also be given as a #table of frequencies. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #number modulation (optional) Modulation, i.e. radio.modulation.AM or radio.modulation.FM. Can also be given as a #table of modulations. Only needed if you want to override defaults set with `MESSAGE.SetMSRS()` for this one setting.
-- @param #string gender (optional) Gender, i.e. "male" or "female". Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string culture (optional) Culture, e.g. "en-US. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #string voice (optional) Voice. Will override gender and culture settings. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param #number volume (optional) Volume, can be between 0.0 and 1.0 (loudest). Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @param Core.Point#COORDINATE coordinate (optional) Coordinate this messages originates from. Only needed if you want to change defaults set with `MESSAGE.SetMSRS()`.
-- @return #MESSAGE self
-- @usage
-- -- Mind the dot here, not using the colon this time around!
-- * Trigger events when objects in the SET change a zone presence.
--
-- ## Notes on `FilterPrefixes()`:
--
-- This filter always looks for a **partial match** somewhere in the given field. LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through the following to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching).
-- For example, setting a filter like so `FilterPrefixes("Huey")` is perfectly all right, whilst `FilterPrefixes("UH-1H Al-Assad")` might not be due to the minus signs. A quick fix here is to use a dot (.)
-- in place of the special character, or escape it with a percentage sign (%), i.e. either `FilterPrefixes("UH.1H Al.Assad")` or `FilterPrefixes("UH%-1H Al%-Assad")` will give you the expected results.
--
-- ===
--
-- ### Author: **FlightControl**
@@ -46,8 +53,9 @@
-- @image Core_Sets.JPG
do-- SET_BASE
--- @type SET_BASE
---
-- @type SET_BASE
-- @field #table Filter Table of filters.
-- @field #table Set Table of objects.
-- @field #table Index Table of indices.
@@ -242,7 +250,7 @@ do -- SET_BASE
functionSET_BASE:Add(ObjectName,Object)
-- Debug info.
self:T({ObjectName=ObjectName,Object=Object})
self:T2({ObjectName=ObjectName,Object=Object})
-- Ensure that the existing element is removed from the Set before a new one is inserted to the Set
ifself.Set[ObjectName]then
@@ -257,6 +265,8 @@ do -- SET_BASE
-- Trigger Added event.
self:Added(ObjectName,Object)
returnself
end
--- Adds a @{Core.Base#BASE} object in the @{Core.Set#SET_BASE}, using the Object Name as the index.
----- Iterate the SET_BASE and call an iterator function for each **alive** unit, providing the Unit and optional parameters.
---- @param #SET_BASE self
---- @param #function IteratorFunction The function that will be called when there is an alive unit in the SET_BASE. The function needs to accept a UNIT parameter.
-- @param #SET_BASE self
-- @param #function IteratorFunction The function that will be called when there is an alive unit in the SET_BASE. The function needs to accept a UNIT parameter.
---- @return #SET_BASE self
-- function SET_BASE:ForEachDCSUnitAlive( IteratorFunction, ... )
-- self:F3( arg )
@@ -808,8 +818,8 @@ do -- SET_BASE
-- end
--
----- Iterate the SET_BASE and call an iterator function for each **alive** player, providing the Unit of the player and optional parameters.
---- @param #SET_BASE self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a UNIT parameter.
-- @param #SET_BASE self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a UNIT parameter.
---- @return #SET_BASE self
-- function SET_BASE:ForEachPlayer( IteratorFunction, ... )
-- self:F3( arg )
@@ -821,8 +831,8 @@ do -- SET_BASE
--
--
----- Iterate the SET_BASE and call an iterator function for each client, providing the Client to the function and optional parameters.
---- @param #SET_BASE self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a CLIENT parameter.
-- @param #SET_BASE self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_BASE. The function needs to accept a CLIENT parameter.
---- @return #SET_BASE self
-- function SET_BASE:ForEachClient( IteratorFunction, ... )
-- self:F3( arg )
@@ -850,8 +860,10 @@ do -- SET_BASE
self:F3(Object)
localoutcome=false
localname=Object:GetName()
--self:I("SET_BASE: Objectname = "..name)
self:ForEach(
function(object)
--self:I("SET_BASE: In set objectname = "..object:GetName())
ifobject:GetName()==namethen
outcome=true
end
@@ -901,9 +913,12 @@ do -- SET_BASE
end
do-- SET_GROUP
do
--- @type SET_GROUP #SET_GROUP
--SET_GROUP
---
-- @type SET_GROUP #SET_GROUP
-- @field Core.Timer#TIMER ZoneTimer
-- @field #number ZoneTimerInterval
-- @extends Core.Set#SET_BASE
@@ -934,7 +949,8 @@ do -- SET_GROUP
-- * @{#SET_GROUP.FilterCoalitions}: Builds the SET_GROUP with the groups belonging to the coalition(s).
-- * @{#SET_GROUP.FilterCategories}: Builds the SET_GROUP with the groups belonging to the category(ies).
-- * @{#SET_GROUP.FilterCountries}: Builds the SET_GROUP with the groups belonging to the country(ies).
-- * @{#SET_GROUP.FilterPrefixes}: Builds the SET_GROUP with the groups *containing* the given string in the group name. **Attention!** Bad naming convention, as this not really filtering *prefixes*.
-- * @{#SET_GROUP.FilterPrefixes}: Builds the SET_GROUP with the groups *containing* the given string in the group name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_GROUP.FilterActive}: Builds the SET_GROUP with the groups that are only active. Groups that are inactive (late activation) won't be included in the set!
--
-- For the Category Filter, extra methods have been added:
@@ -1568,7 +1584,7 @@ do -- SET_GROUP
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function(ZoneObject,GroupObject)
ifGroupObject:IsCompletelyInZone(ZoneObject)then
@@ -1590,7 +1606,7 @@ do -- SET_GROUP
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function(ZoneObject,GroupObject)
ifGroupObject:IsPartlyInZone(ZoneObject)then
@@ -1612,7 +1628,7 @@ do -- SET_GROUP
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function(ZoneObject,GroupObject)
ifGroupObject:IsNotInZone(ZoneObject)then
@@ -1659,7 +1675,7 @@ do -- SET_GROUP
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Group#GROUP GroupObject
function(ZoneObject,GroupObject)
ifGroupObject:IsAnyInZone(ZoneObject)then
@@ -1857,8 +1873,8 @@ do -- SET_GROUP
end
----- Iterate the SET_GROUP and call an iterator function for each **alive** player, providing the Group of the player and optional parameters.
---- @param #SET_GROUP self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a GROUP parameter.
-- @param #SET_GROUP self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a GROUP parameter.
---- @return #SET_GROUP self
-- function SET_GROUP:ForEachPlayer( IteratorFunction, ... )
-- self:F2( arg )
@@ -1870,8 +1886,8 @@ do -- SET_GROUP
--
--
----- Iterate the SET_GROUP and call an iterator function for each client, providing the Client to the function and optional parameters.
---- @param #SET_GROUP self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a CLIENT parameter.
-- @param #SET_GROUP self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_GROUP. The function needs to accept a CLIENT parameter.
---- @return #SET_GROUP self
-- function SET_GROUP:ForEachClient( IteratorFunction, ... )
-- self:F2( arg )
@@ -1945,7 +1961,7 @@ do -- SET_GROUP
ifself.Filter.Zonesthen
localMGroupZone=false
forZoneName,Zoneinpairs(self.Filter.Zones)do
--self:I( "Zone:", ZoneName )
--self:T( "Zone:", ZoneName )
ifMGroup:IsInZone(Zone)then
MGroupZone=true
end
@@ -2011,8 +2027,9 @@ do -- SET_GROUP
end
do-- SET_UNIT
--- @type SET_UNIT
---
-- @type SET_UNIT
-- @field Core.Timer#TIMER ZoneTimer
-- @field #number ZoneTimerInterval
-- @extends Core.Set#SET_BASE
@@ -2045,7 +2062,8 @@ do -- SET_UNIT
-- * @{#SET_UNIT.FilterCategories}: Builds the SET_UNIT with the units belonging to the category(ies).
-- * @{#SET_UNIT.FilterTypes}: Builds the SET_UNIT with the units belonging to the unit type(s).
-- * @{#SET_UNIT.FilterCountries}: Builds the SET_UNIT with the units belonging to the country(ies).
-- * @{#SET_UNIT.FilterPrefixes}: Builds the SET_UNIT with the units sharing the same string(s) in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_UNIT.FilterPrefixes}: Builds the SET_UNIT with the units sharing the same string(s) in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_UNIT.FilterActive}: Builds the SET_UNIT with the units that are only active. Units that are inactive (late activation) won't be included in the set!
-- * @{#SET_UNIT.FilterZones}: Builds the SET_UNIT with the units within a @{Core.Zone#ZONE}.
--
@@ -2672,7 +2690,7 @@ do -- SET_UNIT
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Unit#UNIT UnitObject
function(ZoneObject,UnitObject)
ifUnitObject:IsInZone(ZoneObject)then
@@ -2694,7 +2712,7 @@ do -- SET_UNIT
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Unit#UNIT UnitObject
function(ZoneObject,UnitObject)
ifUnitObject:IsNotInZone(ZoneObject)then
@@ -3011,8 +3029,8 @@ do -- SET_UNIT
----- Iterate the SET_UNIT and call an iterator function for each **alive** player, providing the Unit of the player and optional parameters.
---- @param #SET_UNIT self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a UNIT parameter.
-- @param #SET_UNIT self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a UNIT parameter.
---- @return #SET_UNIT self
-- function SET_UNIT:ForEachPlayer( IteratorFunction, ... )
-- self:F2( arg )
@@ -3024,8 +3042,8 @@ do -- SET_UNIT
--
--
----- Iterate the SET_UNIT and call an iterator function for each client, providing the Client to the function and optional parameters.
---- @param #SET_UNIT self
---- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a CLIENT parameter.
-- @param #SET_UNIT self
-- @param #function IteratorFunction The function that will be called when there is an alive player in the SET_UNIT. The function needs to accept a CLIENT parameter.
---- @return #SET_UNIT self
-- function SET_UNIT:ForEachClient( IteratorFunction, ... )
-- self:F2( arg )
@@ -3040,7 +3058,7 @@ do -- SET_UNIT
-- @param Wrapper.Unit#UNIT MUnit
-- @return #SET_UNIT self
functionSET_UNIT:IsIncludeObject(MUnit)
self:F2(MUnit)
self:F2({MUnit})
localMUnitInclude=false
@@ -3191,8 +3209,9 @@ do -- SET_UNIT
end
do-- SET_STATIC
--- @type SET_STATIC
---
-- @type SET_STATIC
-- @extends Core.Set#SET_BASE
--- Mission designers can use the SET_STATIC class to build sets of Statics belonging to certain:
@@ -3223,7 +3242,8 @@ do -- SET_STATIC
-- * @{#SET_STATIC.FilterCategories}: Builds the SET_STATIC with the units belonging to the category(ies).
-- * @{#SET_STATIC.FilterTypes}: Builds the SET_STATIC with the units belonging to the unit type(s).
-- * @{#SET_STATIC.FilterCountries}: Builds the SET_STATIC with the units belonging to the country(ies).
-- * @{#SET_STATIC.FilterPrefixes}: Builds the SET_STATIC with the units containing the same string(s) in their name. **ATTENTION** bad naming convention as this *does not** only filter *prefixes*.
-- * @{#SET_STATIC.FilterPrefixes}: Builds the SET_STATIC with the units containing the same string(s) in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_STATIC.FilterZones}: Builds the SET_STATIC with the units within a @{Core.Zone#ZONE}.
--
-- Once the filter criteria have been set for the SET_STATIC, you can start filtering using:
@@ -3612,7 +3632,7 @@ do -- SET_STATIC
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Static#STATIC StaticObject
function(ZoneObject,StaticObject)
ifStaticObject:IsInZone(ZoneObject)then
@@ -3634,7 +3654,7 @@ do -- SET_STATIC
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Static#STATIC StaticObject
function(ZoneObject,StaticObject)
ifStaticObject:IsNotInZone(ZoneObject)then
@@ -3945,8 +3965,9 @@ do -- SET_STATIC
end
do-- SET_CLIENT
--- @type SET_CLIENT
---
-- @type SET_CLIENT
-- @field Core.Timer#TIMER ZoneTimer
-- @field #number ZoneTimerInterval
-- @extends Core.Set#SET_BASE
@@ -3979,7 +4000,8 @@ do -- SET_CLIENT
-- * @{#SET_CLIENT.FilterCategories}: Builds the SET_CLIENT with the clients belonging to the category(ies).
-- * @{#SET_CLIENT.FilterTypes}: Builds the SET_CLIENT with the clients belonging to the client type(s).
-- * @{#SET_CLIENT.FilterCountries}: Builds the SET_CLIENT with the clients belonging to the country(ies).
-- * @{#SET_CLIENT.FilterPrefixes}: Builds the SET_CLIENT with the clients containing the same string(s) in their unit/pilot name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_CLIENT.FilterPrefixes}: Builds the SET_CLIENT with the clients containing the same string(s) in their unit/pilot name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_CLIENT.FilterActive}: Builds the SET_CLIENT with the units that are only active. Units that are inactive (late activation) won't be included in the set!
-- * @{#SET_CLIENT.FilterZones}: Builds the SET_CLIENT with the clients within a @{Core.Zone#ZONE}.
--
@@ -4059,7 +4081,7 @@ do -- SET_CLIENT
--- Remove CLIENT(s) from SET_CLIENT.
-- @param Core.Set#SET_CLIENT self
-- @param Wrapper.Client#CLIENT RemoveClientNames A single name or an array of CLIENT names.
-- @param Wrapper.Client#CLIENT RemoveClientNames A single object or an array of CLIENT objects.
--- Mission designers can use the @{Core.Set#SET_PLAYER} class to build sets of units belonging to alive players:
@@ -4593,7 +4616,8 @@ do -- SET_PLAYER
-- * @{#SET_PLAYER.FilterCategories}: Builds the SET_PLAYER with the clients belonging to the category(ies).
-- * @{#SET_PLAYER.FilterTypes}: Builds the SET_PLAYER with the clients belonging to the client type(s).
-- * @{#SET_PLAYER.FilterCountries}: Builds the SET_PLAYER with the clients belonging to the country(ies).
-- * @{#SET_PLAYER.FilterPrefixes}: Builds the SET_PLAYER with the clients sharing the same string(s) in their unit/pilot name. **ATTENTION** Bad naming convention as this *does not* only filter prefixes.
-- * @{#SET_PLAYER.FilterPrefixes}: Builds the SET_PLAYER with the clients sharing the same string(s) in their unit/pilot name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_PLAYER, you can start filtering using:
--
@@ -4868,7 +4892,7 @@ do -- SET_PLAYER
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Client#CLIENT ClientObject
function(ZoneObject,ClientObject)
ifClientObject:IsInZone(ZoneObject)then
@@ -4890,7 +4914,7 @@ do -- SET_PLAYER
self:F2(arg)
self:ForEach(IteratorFunction,arg,self:GetSet(),
--- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Core.Zone#ZONE_BASE ZoneObject
-- @param Wrapper.Client#CLIENT ClientObject
function(ZoneObject,ClientObject)
ifClientObject:IsNotInZone(ZoneObject)then
@@ -4998,8 +5022,9 @@ do -- SET_PLAYER
end
do-- SET_AIRBASE
--- @type SET_AIRBASE
---
-- @type SET_AIRBASE
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_AIRBASE} class to build sets of airbases optionally belonging to certain:
@@ -5341,8 +5366,9 @@ do -- SET_AIRBASE
end
do-- SET_CARGO
--- @type SET_CARGO
---
-- @type SET_CARGO
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_CARGO} class to build sets of cargos optionally belonging to certain:
@@ -5368,7 +5394,8 @@ do -- SET_CARGO
-- Filter criteria are defined by:
--
-- * @{#SET_CARGO.FilterCoalitions}: Builds the SET_CARGO with the cargos belonging to the coalition(s).
-- * @{#SET_CARGO.FilterPrefixes}: Builds the SET_CARGO with the cargos containing the same string(s). **ATTENTION** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_CARGO.FilterPrefixes}: Builds the SET_CARGO with the cargos containing the same string(s). **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_CARGO.FilterTypes}: Builds the SET_CARGO with the cargos belonging to the cargo type(s).
-- * @{#SET_CARGO.FilterCountries}: Builds the SET_CARGO with the cargos belonging to the country(ies).
--
@@ -5767,8 +5794,9 @@ do -- SET_CARGO
end
do-- SET_ZONE
--- @type SET_ZONE
---
-- @type SET_ZONE
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_ZONE} class to build sets of zones of various types.
@@ -5789,7 +5817,8 @@ do -- SET_ZONE
-- You can set filter criteria to build the collection of zones in SET_ZONE.
-- Filter criteria are defined by:
--
-- * @{#SET_ZONE.FilterPrefixes}: Builds the SET_ZONE with the zones having a certain text pattern in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_ZONE.FilterPrefixes}: Builds the SET_ZONE with the zones having a certain text pattern in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_ZONE, you can start filtering using:
--
@@ -5813,6 +5842,7 @@ do -- SET_ZONE
},
FilterMeta={
},
Checktime=5,
}
--- Creates a new SET_ZONE object, building a set of zones.
@@ -6023,7 +6053,29 @@ do -- SET_ZONE
returnself
end
--- Get the average aggregated coordinate of this set of zones.
-- @param #SET_ZONE self
-- @return Core.Point#COORDINATE
functionSET_ZONE:GetAverageCoordinate()
localx,y,z=0,0,0
localcount=0
for_,_zoneinpairs(self.Set)do
localzone=_zone--Core.Zone#ZONE
localvec3=zone:GetVec3()
x=x+vec3.x
y=y+vec3.y
z=z+vec3.z
count=count+1
end
ifcount>1then
x=x/count
y=y/count
z=z/count
end
localcoord=COORDINATE:New(x,y,z)
returncoord
end
--- Private function.
-- @param #SET_ZONE self
@@ -6131,12 +6183,176 @@ do -- SET_ZONE
returnzmin,dmin
end
--- Set the check time for SET_ZONE:Trigger()
-- @param #SET_ZONE self
-- @param #number seconds Check every seconds for objects entering or leaving the zone. Defaults to 5 secs.
-- @return #SET_ZONE self
functionSET_ZONE:SetCheckTime(seconds)
self.Checktime=secondsor5
returnself
end
--- Start watching if the Object or Objects move into or out of our set of zones.
-- @param #SET_ZONE self
-- @param Wrappe.Controllable#CONTROLLABLE Objects Object or Objects to watch, can be of type UNIT, GROUP, CLIENT, or SET\_UNIT, SET\_GROUP, SET\_CLIENT
-- @return #SET_ZONE self
-- @usage
-- -- Create a SET_GROUP and a SET_ZONE for this:
--
-- local groupset = SET_GROUP:New():FilterPrefixes("Aerial"):FilterStart()
--
-- -- Trigger will check each zone of the SET_ZONE every 5 secs for objects entering or leaving from the groupset
-- local zoneset = SET_ZONE:New():FilterPrefixes("Target Zone"):FilterOnce():Trigger(groupset)
--- Mission designers can use the @{Core.Set#SET_ZONE_GOAL} class to build sets of zones of various types.
@@ -6157,7 +6373,8 @@ do -- SET_ZONE_GOAL
-- You can set filter criteria to build the collection of zones in SET_ZONE_GOAL.
-- Filter criteria are defined by:
--
-- * @{#SET_ZONE_GOAL.FilterPrefixes}: Builds the SET_ZONE_GOAL with the zones having a certain text pattern in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_ZONE_GOAL.FilterPrefixes}: Builds the SET_ZONE_GOAL with the zones having a certain text pattern in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_ZONE_GOAL, you can start filtering using:
--
@@ -6446,8 +6663,9 @@ do -- SET_ZONE_GOAL
end
do-- SET_OPSZONE
--- @type SET_OPSZONE
---
-- @type SET_OPSZONE
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_OPSZONE} class to build sets of zones of various types.
@@ -6468,7 +6686,8 @@ do -- SET_OPSZONE
-- You can set filter criteria to build the collection of zones in SET_OPSZONE.
-- Filter criteria are defined by:
--
-- * @{#SET_OPSZONE.FilterPrefixes}: Builds the SET_OPSZONE with the zones having a certain text pattern in their name. **ATTENTION!** Bad naming convention as this *does not* only filter *prefixes*.
-- * @{#SET_OPSZONE.FilterPrefixes}: Builds the SET_OPSZONE with the zones having a certain text pattern in their name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
--
-- Once the filter criteria have been set for the SET_OPSZONE, you can start filtering using:
--
@@ -6903,8 +7122,9 @@ end
do-- SET_OPSGROUP
--- @type SET_OPSGROUP
---
-- @type SET_OPSGROUP
-- @extends Core.Set#SET_BASE
--- Mission designers can use the @{Core.Set#SET_OPSGROUP} class to build sets of OPS groups belonging to certain:
@@ -6933,7 +7153,8 @@ do -- SET_OPSGROUP
-- * @{#SET_OPSGROUP.FilterCoalitions}: Builds the SET_OPSGROUP with the groups belonging to the coalition(s).
-- * @{#SET_OPSGROUP.FilterCategories}: Builds the SET_OPSGROUP with the groups belonging to the category(ies).
-- * @{#SET_OPSGROUP.FilterCountries}: Builds the SET_OPSGROUP with the groups belonging to the country(ies).
-- * @{#SET_OPSGROUP.FilterPrefixes}: Builds the SET_OPSGROUP with the groups *containing* the given string in the group name. **Attention!** Bad naming convention, as this not really filtering *prefixes*.
-- * @{#SET_OPSGROUP.FilterPrefixes}: Builds the SET_OPSGROUP with the groups *containing* the given string in the group name. **Attention!** LUA regular expression apply here, so special characters in names like minus, dot, hash (#) etc might lead to unexpected results.
-- Have a read through here to understand the application of regular expressions: [LUA regular expressions](https://riptutorial.com/lua/example/20315/lua-pattern-matching)
-- * @{#SET_OPSGROUP.FilterActive}: Builds the SET_OPSGROUP with the groups that are only active. Groups that are inactive (late activation) won't be included in the set!
--
-- For the Category Filter, extra methods have been added:
@@ -7571,6 +7792,7 @@ do -- SET_SCENERY
Scenerys={},
Filter={
SceneryPrefixes=nil,
SceneryRoles=nil,
Zones=nil,
},
}
@@ -7593,7 +7815,7 @@ do -- SET_SCENERY
ifZoneSetthen
for_,_zoneinpairs(ZoneSet.Set)do
self:T("Zone type handed: "..tostring(_zone.ClassName))
self:T("Zone type handed: "..tostring(_zone.ClassName))
table.insert(zonenames,_zone:GetName())
end
self:AddSceneryByName(zonenames)
@@ -7617,7 +7839,7 @@ do -- SET_SCENERY
--- Add SCENERY(s) to SET_SCENERY.
-- @param #SET_SCENERY self
-- @param #string AddScenery A single SCENERY.
-- @param Wrapper.Scenery#SCENERY AddScenery A single SCENERY object.
-- @return #SET_SCENERY self
functionSET_SCENERY:AddScenery(AddScenery)
self:F2(AddScenery:GetName())
@@ -7687,6 +7909,7 @@ do -- SET_SCENERY
end
for_,Zoneinpairs(zones)do
localzonename=Zone:GetName()
self:T(zonename)
self.Filter.Zones[zonename]=Zone
end
returnself
@@ -7705,11 +7928,30 @@ do -- SET_SCENERY
Prefixes={Prefixes}
end
forPrefixID,Prefixinpairs(Prefixes)do
--self:T(Prefix)
self.Filter.SceneryPrefixes[Prefix]=Prefix
end
returnself
end
--- Builds a set of SCENERYs that **contain** an exact match of the "ROLE" property.
-- @param #SET_SCENERY self
-- @param #string Role The string pattern(s) that needs to exactly match the scenery "ROLE" property from the ME quad-zone properties. Can also be passed as a `#table` of strings.
-- @return #SET_SCENERY self
functionSET_SCENERY:FilterRoles(Role)
ifnotself.Filter.SceneryRolesthen
self.Filter.SceneryRoles={}
end
iftype(Role)~="table"then
Role={Role}
end
forPrefixID,Prefixinpairs(Role)do
--self:T(Prefix)
self.Filter.SceneryRoles[Prefix]=Prefix
end
returnself
end
--- Iterate the SET_SCENERY and count how many SCENERYSs are alive.
@@ -555,6 +559,154 @@ function ZONE_BASE:GetZoneMaybe()
end
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.
-- @return #ZONE_BASE self
functionZONE_BASE:SetCheckTime(seconds)
self.Checktime=secondsor5
returnself
end
--- Start watching if the Object or Objects move into or out of a zone.
-- @param #ZONE_BASE self
-- @param Wrappe.Controllable#CONTROLLABLE Objects Object or Objects to watch, can be of type UNIT, GROUP, CLIENT, or SET\_UNIT, SET\_GROUP, SET\_CLIENT
-- @return #ZONE_BASE self
-- @usage
-- -- Create a new zone and start watching it every 5 secs for a defined GROUP entering or leaving
-- local triggerzone = ZONE:New("ZonetoWatch"):Trigger(GROUP:FindByName("Aerial-1"))
--
-- -- This FSM function will be called when the group enters the zone
-- function triggerzone:OnAfterEnteredZone(From,Event,To,Group)
-- MESSAGE:New("Group has entered zone!",15):ToAll()
-- end
--
-- -- This FSM function will be called when the group leaves the zone
-- function triggerzone:OnAfterLeftZone(From,Event,To,Group)
-- @field #number speedMax0 Max speed in meters/second at zero altitude.
-- @field #number massEmpty Empty mass in kg.
-- @field #number tankerType Type of refueling system: 0=boom, 1=probe.
@@ -471,16 +487,16 @@ do -- Types
-- @type AttributeNameArray
-- @list <#AttributeName>
--- @type Zone
-- @type Zone
-- @field DCSVec3#Vec3 point
-- @field #number radius
Zone={}
--- @type ModelTime
-- @type ModelTime
-- @extends #number
--- @type Time
-- @type Time
-- @extends #number
--- A task descriptor (internal structure for DCS World). See [https://wiki.hoggitworld.com/view/Category:Tasks](https://wiki.hoggitworld.com/view/Category:Tasks).
@@ -489,7 +505,7 @@ do -- Types
-- @field #string id
-- @field #Task.param param
--- @type Task.param
-- @type Task.param
--- List of @{#Task}
-- @type TaskArray
@@ -536,7 +552,7 @@ do -- Object
-- @field SCENERY
-- @field CARGO
--- @type Object.Desc
-- @type Object.Desc
-- @extends #Desc
-- @field #number life initial life level
-- @field #Box3 box bounding box of collision geometry
@@ -793,11 +809,118 @@ do -- Airbase
-- @function [parent=#Airbase] getDesc
-- @param self
-- @return #Airbase.Desc
--- Returns the warehouse object associated with the airbase object. Can then be used to call the warehouse class functions to modify the contents of the warehouse.
-- @function [parent=#Airbase] getWarehouse
-- @param self
-- @return #Warehouse The DCS warehouse object of this airbase.
--- Enables or disables the airbase and FARP auto capture game mechanic where ownership of a base can change based on the presence of ground forces or the
--- Returns the current autoCapture setting for the passed base.
-- @function [parent=#Airbase] autoCaptureIsOn
-- @param self
-- @return #boolean `true` if autoCapture behavior is enabled and `false` otherwise.
--- Changes the passed airbase object's coalition to the set value. Must be used with Airbase.autoCapture to disable auto capturing of the base,
-- otherwise the base can revert back to a different coalition depending on the situation and built in game capture rules.
-- @function [parent=#Airbase] setCoalition
-- @param self
-- @param #number coa The new owner coalition: 0=neutra, 1=red, 2=blue.
--- Returns the wsType of every object that exists in DCS. A wsType is a table consisting of 4 entries indexed numerically.
-- It can be used to broadly categorize object types. The table can be broken down as: {mainCategory, subCat1, subCat2, index}
-- @function [parent=#Airbase] getResourceMap
-- @param self
-- @return #table wsType of every object that exists in DCS.
Airbase={}--#Airbase
end-- Airbase
do-- Warehouse
--- [DCS Class Warehouse](https://wiki.hoggitworld.com/view/DCS_Class_Warehouse)
-- The warehouse class gives control over warehouses that exist in airbase objects. These warehouses can limit the aircraft, munitions, and fuel available to coalition aircraft.
-- @type Warehouse
--- Get a warehouse by passing its name.
-- @function [parent=#Warehouse] getByName
-- @param #string Name Name of the warehouse.
-- @return #Warehouse The warehouse object.
--- Adds the passed amount of a given item to the warehouse.
-- itemName is the typeName associated with the item: "weapons.missiles.AIM_54C_Mk47"
-- A wsType table can also be used, however the last digit with wsTypes has been known to change. {4, 4, 7, 322}
-- @function [parent=#Warehouse] addItem
-- @param self
-- @param #string itemName Name of the item.
-- @param #number count Number of items to add.
--- Returns the number of the passed type of item currently in a warehouse object.
-- @function [parent=#Warehouse] getItemCount
-- @param self
-- @param #string itemName Name of the item.
--- Sets the passed amount of a given item to the warehouse.
-- @function [parent=#Warehouse] setItem
-- @param self
-- @param #string itemName Name of the item.
-- @param #number count Number of items to add.
--- Removes the amount of the passed item from the warehouse.
-- @function [parent=#Warehouse] removeItem
-- @param self
-- @param #string itemName Name of the item.
-- @param #number count Number of items to be removed.
--- Adds the passed amount of a liquid fuel into the warehouse inventory.
-- @function [parent=#Warehouse] addLiquid
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @param #number count Amount of liquid to add.
--- Returns the amount of the passed liquid type within a given warehouse.
-- @function [parent=#Warehouse] getLiquidAmount
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @return #number Amount of liquid.
--- Sets the passed amount of a liquid fuel into the warehouse inventory.
-- @function [parent=#Warehouse] setLiquidAmount
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @param #number count Amount of liquid.
--- Removes the set amount of liquid from the inventory in a warehouse.
-- @function [parent=#Warehouse] setLiquidAmount
-- @param self
-- @param #number liquidType Type of liquid to add: 0=jetfuel, 1=aviation gasoline, 2=MW50, 3=Diesel.
-- @param #number count Amount of liquid.
--- Returns the airbase object associated with the warehouse object.
-- @function [parent=#Warehouse] getOwner
-- @param self
-- @return #Airbase The airbase object owning this warehouse.
--- Returns a full itemized list of everything currently in a warehouse. If a category is set to unlimited then the table will be returned empty.
-- Aircraft and weapons are indexed by strings. Liquids are indexed by number.
-- @function [parent=#Warehouse] getInventory
-- @param self
-- @param #string itemName Name of the item.
-- @return #table Itemized list of everything currently in a warehouse
Warehouse={}--#Warehouse
end
do-- Spot
--- [DCS Class Spot](https://wiki.hoggitworld.com/view/DCS_Class_Spot)
@@ -860,7 +983,7 @@ do -- Spot
end-- Spot
do-- Controller
--- Controller is an object that performs A.I.-routines. Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C.
--- Controller is an object that performs A.I.-tasks. Other words controller is an instance of A.I.. Controller stores current main task, active enroute tasks and behavior options. Controller performs commands. Please, read DCS A-10C GUI Manual EN.pdf chapter "Task Planning for Unit Groups", page 91 to understand A.I. system of DCS:A-10C.
--
-- This class has 2 types of functions:
--
@@ -978,7 +1101,7 @@ end -- Controller
do-- Unit
--- @type Unit
-- @type Unit
-- @extends #CoalitionObject
-- @field ID Identifier of an unit. It assigned to an unit by the Mission Editor automatically.
-- @field #Unit.Category Category
@@ -1093,15 +1216,18 @@ do -- Unit
-- @field #Distance detectionDistanceHRM detection distance for RCS=1m^2 in high-resolution mapping mode, nil if radar has no HRM
-- @field #Unit.Radar.detectionDistanceAir detectionDistanceAir detection distance for RCS=1m^2 airborne target, nil if radar doesn't support air search
-- @field #table trucklist List of (alive) #AMMOTRUCK.data trucks
-- @field #table targetlist List of (alive) #AMMOTRUCK.data artillery
-- @field #number coalition Coalition this is for
-- @field Core.Set#SET_GROUP truckset SET of trucks
-- @field Core.Set#SET_GROUP targetset SET of artillery
-- @field #table remunitionqueue List of (alive) #AMMOTRUCK.data artillery to be reloaded
-- @field #table waitingtargets List of (alive) #AMMOTRUCK.data artillery waiting
-- @field #number ammothreshold Threshold (min) ammo before sending a truck
-- @field #number remunidist Max distance trucks will go
-- @field #number monitor Monitor interval in seconds
-- @field #number unloadtime Unload time in seconds
-- @field #number waitingtime Max waiting time in seconds
-- @field #boolean routeonroad Route truck on road if true (default)
-- @field #number reloads Number of reloads a single truck can do before he must return home
-- @extends Core.FSM#FSM
--- *Amateurs talk about tactics, but professionals study logistics.* - General Robert H Barrow, USMC
--
-- Simple Class to re-arm your artillery with trucks.
--
-- #AMMOTRUCK
--
-- * Controls a SET\_GROUP of trucks which will re-arm a SET\_GROUP of artillery groups when they run out of ammunition.
--
-- ## 1 The AMMOTRUCK concept
--
-- A SET\_GROUP of trucks which will re-arm a SET\_GROUP of artillery groups when they run out of ammunition. They will be based on a
-- homebase and drive from there to the artillery groups and then back home.
-- Trucks are the **only known in-game mechanic** to re-arm artillery and other units in DCS. Working units are e.g.: M-939 (blue), Ural-375 and ZIL-135 (both red).
--
-- ## 2 Set-up
--
-- Define a set of trucks and a set of artillery:
--
-- local truckset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Ammo Truck"):FilterStart()
-- local ariset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Artillery"):FilterStart()
--
-- Create an AMMOTRUCK object to take care of the artillery using the trucks, with a homezone:
--
-- local ammotruck = AMMOTRUCK:New(truckset,ariset,coalition.side.BLUE,"Logistics",ZONE:FindByName("HomeZone")
--
-- ## 2 Options and their default values
--
-- ammotruck.ammothreshold = 5 -- send a truck when down to this many rounds
-- ammotruck.remunidist = 20000 -- 20km - send trucks max this far from home
-- ammotruck.unloadtime = 600 -- 10 minutes - min time to unload ammunition
-- ammotruck.waitingtime = 1800 -- 30 mintes - wait max this long until remunition is done
-- ammotruck.monitor = -60 -- 1 minute - AMMOTRUCK checks run every one minute
-- ammotruck.routeonroad = true -- Trucks will **try** to drive on roads
-- ammotruck.usearmygroup = false -- If true, will make use of ARMYGROUP in the background (if used in DEV branch)
-- ammotruck.reloads = 5 -- Maxn re-arms a truck can do before he needs to go home and restock. Set to -1 for unlimited
--
-- ## 3 FSM Events to shape mission
--
-- Truck has been sent off:
--
-- function ammotruck:OnAfterRouteTruck(From, Event, To, Truckdata, Aridata)
-- ...
-- end
--
-- Truck has arrived:
--
-- function ammotruck:OnAfterTruckArrived(From, Event, To, Truckdata)
-- ...
-- end
--
-- Truck is unloading:
--
-- function ammotruck:OnAfterTruckUnloading(From, Event, To, Truckdata)
-- ...
-- end
--
-- Truck is returning home:
--
-- function ammotruck:OnAfterTruckReturning(From, Event, To, Truckdata)
-- ...
-- end
--
-- Truck is arrived at home:
--
-- function ammotruck:OnAfterTruckHome(From, Event, To, Truckdata)
-- ...
-- end
--
-- @field #AMMOTRUCK
AMMOTRUCK={
ClassName="AMMOTRUCK",
lid="",
version="0.0.12",
alias="",
debug=false,
trucklist={},
targetlist={},
coalition=nil,
truckset=nil,
targetset=nil,
remunitionqueue={},
waitingtargets={},
ammothreshold=5,
remunidist=20000,
monitor=-60,
unloadtime=600,
waitingtime=1800,
routeonroad=true,
reloads=5,
}
---
-- @type AMMOTRUCK.State
AMMOTRUCK.State={
IDLE="idle",
DRIVING="driving",
ARRIVED="arrived",
UNLOADING="unloading",
RETURNING="returning",
WAITING="waiting",
RELOADING="reloading",
OUTOFAMMO="outofammo",
REQUESTED="requested",
}
---
--@type AMMOTRUCK.data
--@field Wrapper.Group#GROUP group
--@field #string name
--@field #AMMOTRUCK.State statusquo
--@field #number timestamp
--@field #number ammo
--@field Core.Point#COORDINATE coordinate
--@field #string targetname
--@field Wrapper.Group#GROUP targetgroup
--@field Core.Point#COORDINATE targetcoordinate
--@field #number reloads
---
-- @param #AMMOTRUCK self
-- @param Core.Set#SET_GROUP Truckset Set of truck groups
-- @param Core.Set#SET_GROUP Targetset Set of artillery groups
-- @param #number Coalition Coalition
-- @param #string Alias Alias Name
-- @param Core.Zone#ZONE Homezone Home, return zone for trucks
-- @return #AMMOTRUCK self
-- @usage
-- Define a set of trucks and a set of artillery:
-- local truckset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Ammo Truck"):FilterStart()
-- local ariset = SET_GROUP:New():FilterCoalitions("blue"):FilterActive(true):FilterCategoryGround():FilterPrefixes("Artillery"):FilterStart()
--
-- Create an AMMOTRUCK object to take care of the artillery using the trucks, with a homezone:
-- local ammotruck = AMMOTRUCK:New(truckset,ariset,coalition.side.BLUE,"Logistics",ZONE:FindByName("HomeZone")
--@param #string awacs Group name of your Awacs (optional)
--@param #boolean EmOnOff Make MANTIS switch Emissions on and off instead of changing the alarm state between RED and GREEN (optional)
--@param #number Padding For #SEAD - Extra number of seconds to add to radar switch-back-on time (optional)
--@param #table Zones Table of Core.Zone#ZONE Zones Consider SAM groups in this zone(s) only for this MANTIS instance, must be handed as #table of Zone objects
--@return #MANTIS self
--@usage Start up your MANTIS with a basic setting
-- * **100 meter**: Destroys the missile when the distance to the aircraft is below or equal to 100 meter.
-- * **150 meter**: Destroys the missile when the distance to the aircraft is below or equal to 150 meter.
-- * **200 meter**: Destroys the missile when the distance to the aircraft is below or equal to 200 meter.
--
-- # 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 and superseded by the [Functional.Fox](https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Fox.html) class, which provides the same functionality.
--
-- ===
--
@@ -67,8 +72,8 @@
-- @module Functional.MissileTrainer
-- @image Missile_Trainer.JPG
--- @type MISSILETRAINER
---
-- @type MISSILETRAINER
-- @field Core.Set#SET_CLIENT DBClients
-- @extends Core.Base#BASE
@@ -97,6 +102,11 @@
-- * @{#MISSILETRAINER.InitRangeOnOff}: Sets by default the display of range information of missiles ON of OFF.
-- * @{#MISSILETRAINER.InitBearingOnOff}: Sets by default the display of bearing information of missiles ON of OFF.
-- * @{#MISSILETRAINER.InitMenusOnOff}: Allows to configure the options through the radio menu.
--
-- # 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 and superseded by the [Functional.Fox](https://flightcontrol-master.github.io/MOOSE_DOCS_DEVELOP/Documentation/Functional.Fox.html) class, which provides the same functionality.
--
-- @field #MISSILETRAINER
MISSILETRAINER={
@@ -205,7 +215,7 @@ function MISSILETRAINER:New( Distance, Briefing )
-- self.DB:ForEachClient(
-- --- @param Wrapper.Client#CLIENT Client
-- -- @param Wrapper.Client#CLIENT Client
-- function( Client )
--
-- ... actions ...
@@ -555,7 +565,7 @@ function MISSILETRAINER:_AddBearing( Client, TrainerWeapon )
MESSAGE:NewType(self.DisplayMessagePrefix.."Player '"..PlayerName.."' changed coalition from ".._SCORINGCoalition[self.Players[PlayerName].UnitCoalition].." to ".._SCORINGCoalition[UnitCoalition]..
"(changed "..self.Players[PlayerName].PenaltyCoalition.." times the coalition). "..self.CoalitionChangePenalty.."Penalty points added.",
"(changed "..self.Players[PlayerName].PenaltyCoalition.." times the coalition). "..self.CoalitionChangePenalty.." penalty points added.",
-- * Carry out ARTY and PATROLZONE missions (AUFTRAG)
-- * Define rearming zones
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/OPS%20-%20Brigade).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Ops.Brigade
-- @image OPS_Brigade_.png
--- BRIGADE class.
-- @type BRIGADE
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field #table rearmingZones Rearming zones. Each element is of type `#BRIGADE.SupplyZone`.
-- @field #table refuellingZones Refuelling zones. Each element is of type `#BRIGADE.SupplyZone`.
-- @field Core.Set#SET_ZONE retreatZones Retreat zone set.
-- @extends Ops.Legion#LEGION
--- *I am not afraid of an Army of lions lead by a sheep; I am afraid of sheep lead by a lion* -- Alexander the Great
--
-- ===
--
-- # The BRIGADE Concept
--
-- A BRIGADE consists of one or multiple PLATOONs. These platoons "live" in a WAREHOUSE that has a phyiscal struction (STATIC or UNIT) and can be captured or destroyed.
--
--
-- @field #BRIGADE
BRIGADE={
ClassName="BRIGADE",
verbose=0,
rearmingZones={},
refuellingZones={},
}
--- Supply Zone.
-- @type BRIGADE.SupplyZone
-- @field Core.Zone#ZONE zone The zone.
-- @field Ops.Auftrag#AUFTRAG mission Mission assigned to supply ammo or fuel.
-- @field #boolean markerOn If `true`, marker is on.
-- * Carry out ARTY and PATROLZONE missions (AUFTRAG)
--
-- ===
--
-- ## Example Missions:
--
-- Demo missions can be found on [github](https://github.com/FlightControl-Master/MOOSE_MISSIONS/tree/develop/OPS%20-%20Fleet).
--
-- ===
--
-- ### Author: **funkyfranky**
--
-- ===
-- @module Ops.Fleet
-- @image OPS_Fleet.png
--- FLEET class.
-- @type FLEET
-- @field #string ClassName Name of the class.
-- @field #number verbose Verbosity of output.
-- @field Core.Set#SET_ZONE retreatZones Retreat zone set.
-- @field #boolean pathfinding Set pathfinding on for all spawned navy groups.
-- @extends Ops.Legion#LEGION
--- *A fleet of British ships at war are the best negotiators.* -- Horatio Nelson
--
-- ===
--
-- # The FLEET Concept
--
-- A FLEET consists of one or multiple FLOTILLAs. These flotillas "live" in a WAREHOUSE that has a phyiscal struction (STATIC or UNIT) and can be captured or destroyed.
--
-- # Basic Setup
--
-- A new `FLEET` object can be created with the @{#FLEET.New}(`WarehouseName`, `FleetName`) function, where `WarehouseName` is the name of the static or unit object hosting the fleet
-- and `FleetName` is the name you want to give the fleet. This must be *unique*!
-- A fleet needs a *port zone*, which is set via the @{#FLEET.SetPortZone}(`PortZone`) function. This is the zone where the naval assets are spawned and return to.
--
-- Finally, the fleet needs to be started using the @{#FLEET.Start}() function. If the fleet is not started, it will not process any requests.
--
-- ## Adding Flotillas
--
-- Flotillas can be added via the @{#FLEET.AddFlotilla}(`Flotilla`) function. See @{Ops.Flotilla#FLOTILLA} for how to create a flotilla.
--
-- myFleet:AddFlotilla(FlotillaTiconderoga)
-- myFleet:AddFlotilla(FlotillaPerry)
--
--
--
-- @field #FLEET
FLEET={
ClassName="FLEET",
verbose=0,
pathfinding=false,
}
--- Supply Zone.
-- @type FLEET.SupplyZone
-- @field Core.Zone#ZONE zone The zone.
-- @field Ops.Auftrag#AUFTRAG mission Mission assigned to supply ammo or fuel.
-- @field #boolean markerOn If `true`, marker is on.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.