mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
# Conflicts: # Moose Development/Moose/Ops/CTLD.lua
This commit is contained in:
commit
c8c031d05f
@ -725,6 +725,8 @@ do
|
||||
-- my_ctld.movecratesbeforebuild = true -- crates must be moved once before they can be build. Set to false for direct builds.
|
||||
-- my_ctld.surfacetypes = {land.SurfaceType.LAND,land.SurfaceType.ROAD,land.SurfaceType.RUNWAY,land.SurfaceType.SHALLOW_WATER} -- surfaces for loading back objects.
|
||||
-- my_ctld.nobuildmenu = false -- if set to true effectively enforces to have engineers build/repair stuff for you.
|
||||
-- my_ctld.RadioSound = "beacon.ogg" -- -- this sound will be hearable if you tune in the beacon frequency. Add the sound file to your miz.
|
||||
-- my_ctld.RadioSoundFC3 = "beacon.ogg" -- this sound will be hearable by FC3 users (actually all UHF radios); change to something like "beaconsilent.ogg" and add the sound file to your miz if you don't want to annoy FC3 pilots.
|
||||
--
|
||||
-- ## 2.1 User functions
|
||||
--
|
||||
@ -1219,7 +1221,11 @@ CTLD.UnitTypes = {
|
||||
|
||||
--- CTLD class version.
|
||||
-- @field #string version
|
||||
-<<<<<<< HEAD
|
||||
CTLD.version="1.0.36"
|
||||
=======
|
||||
CTLD.version="1.0.37"
|
||||
>>>>>>> origin/master
|
||||
|
||||
--- Instantiate a new CTLD.
|
||||
-- @param #CTLD self
|
||||
@ -1302,6 +1308,7 @@ function CTLD:New(Coalition, Prefixes, Alias)
|
||||
|
||||
-- radio beacons
|
||||
self.RadioSound = "beacon.ogg"
|
||||
self.RadioSoundFC3 = "beacon.ogg"
|
||||
self.RadioPath = "l10n/DEFAULT/"
|
||||
|
||||
-- zones stuff
|
||||
@ -4077,6 +4084,7 @@ function CTLD:_RefreshRadioBeacons()
|
||||
-- Get Beacon object from zone
|
||||
local czone = cargozone -- #CTLD.CargoZone
|
||||
local Sound = self.RadioSound
|
||||
local Silent = self.RadioSoundFC3 or self.RadioSound
|
||||
if czone.active and czone.hasbeacon then
|
||||
local FMbeacon = czone.fmbeacon -- #CTLD.ZoneBeacon
|
||||
local VHFbeacon = czone.vhfbeacon -- #CTLD.ZoneBeacon
|
||||
@ -4086,8 +4094,8 @@ function CTLD:_RefreshRadioBeacons()
|
||||
local VHF = VHFbeacon.frequency -- KHz
|
||||
local UHF = UHFbeacon.frequency -- MHz
|
||||
self:_AddRadioBeacon(Name,Sound,FM, CTLD.RadioModulation.FM, IsShip, IsDropped)
|
||||
self:_AddRadioBeacon(Name,Sound,VHF,CTLD.RadioModulation.FM, IsShip, IsDropped)
|
||||
self:_AddRadioBeacon(Name,Sound,UHF,CTLD.RadioModulation.AM, IsShip, IsDropped)
|
||||
self:_AddRadioBeacon(Name,Sound,VHF,CTLD.RadioModulation.AM, IsShip, IsDropped)
|
||||
self:_AddRadioBeacon(Name,Silent,UHF,CTLD.RadioModulation.AM, IsShip, IsDropped)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -1692,7 +1692,9 @@ function CONTROLLABLE:EnRouteTaskSEAD(TargetTypes, Priority)
|
||||
return DCSTask
|
||||
end
|
||||
|
||||
--- (AIR) Engaging a controllable. The task does not assign the target controllable to the unit/controllable to attack now; it just allows the unit/controllable to engage the target controllable as well as other assigned targets.
|
||||
--- (AIR) Engaging a controllable. The task does not assign the target controllable to the unit/controllable to attack now;
|
||||
-- it just allows the unit/controllable to engage the target controllable as well as other assigned targets.
|
||||
-- See [hoggit](https://wiki.hoggitworld.com/view/DCS_task_engageGroup).
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #CONTROLLABLE AttackGroup The Controllable to be attacked.
|
||||
-- @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.
|
||||
@ -1741,6 +1743,7 @@ function CONTROLLABLE:EnRouteTaskEngageGroup( AttackGroup, Priority, WeaponType,
|
||||
end
|
||||
|
||||
--- (AIR) Search and attack the Unit.
|
||||
-- See [hoggit](https://wiki.hoggitworld.com/view/DCS_task_engageUnit).
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param Wrapper.Unit#UNIT EngageUnit The UNIT.
|
||||
-- @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.
|
||||
@ -1776,6 +1779,7 @@ function CONTROLLABLE:EnRouteTaskEngageUnit( EngageUnit, Priority, GroupAttack,
|
||||
end
|
||||
|
||||
--- (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
|
||||
-- [hoggit](https://wiki.hoggitworld.com/view/DCS_task_awacs).
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return DCS#Task The DCS task structure.
|
||||
function CONTROLLABLE:EnRouteTaskAWACS()
|
||||
@ -1789,6 +1793,7 @@ function CONTROLLABLE:EnRouteTaskAWACS()
|
||||
end
|
||||
|
||||
--- (AIR) Aircraft will act as a tanker for friendly units. No parameters.
|
||||
-- See [hoggit](https://wiki.hoggitworld.com/view/DCS_task_tanker).
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return DCS#Task The DCS task structure.
|
||||
function CONTROLLABLE:EnRouteTaskTanker()
|
||||
@ -1804,6 +1809,7 @@ end
|
||||
-- En-route tasks for ground units/controllables
|
||||
|
||||
--- (GROUND) Ground unit (EW-radar) will act as an EWR for friendly units (will provide them with information about contacts). No parameters.
|
||||
-- See [hoggit](https://wiki.hoggitworld.com/view/DCS_task_ewr).
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @return DCS#Task The DCS task structure.
|
||||
function CONTROLLABLE:EnRouteTaskEWR()
|
||||
@ -1821,14 +1827,17 @@ end
|
||||
--- (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose the target (enemy ground controllable) as well as other assigned targets.
|
||||
-- The killer is player-controlled allied CAS-aircraft that is in contact with the FAC.
|
||||
-- If the task is assigned to the controllable lead unit will be a FAC.
|
||||
-- See [hoggit](https://wiki.hoggitworld.com/view/DCS_task_fac_engageGroup).
|
||||
-- @param #CONTROLLABLE self
|
||||
-- @param #CONTROLLABLE AttackGroup Target CONTROLLABLE.
|
||||
-- @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 is 0.
|
||||
-- @param #number WeaponType (Optional) Bitmask of weapon types those allowed to use. Default is "Auto".
|
||||
-- @param DCS#AI.Task.Designation Designation (Optional) Designation type.
|
||||
-- @param #boolean Datalink (optional) Allows to use datalink to send the target information to attack aircraft. Enabled by default.
|
||||
-- @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`.
|
||||
-- @return DCS#Task The DCS task structure.
|
||||
function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponType, Designation, Datalink )
|
||||
function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponType, Designation, Datalink, Frequency, Modulation, CallsignID, CallsignNumber )
|
||||
|
||||
local DCSTask = {
|
||||
id = 'FAC_EngageControllable',
|
||||
@ -1837,6 +1846,10 @@ function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponT
|
||||
weaponType = WeaponType or "Auto",
|
||||
designation = Designation,
|
||||
datalink = Datalink and Datalink or false,
|
||||
frequency = (Frequency or 133)*1000000,
|
||||
modulation = Modulation or radio.modulation.AM,
|
||||
callname = CallsignID,
|
||||
number = CallsignNumber,
|
||||
priority = Priority or 0,
|
||||
},
|
||||
}
|
||||
@ -1845,27 +1858,26 @@ function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponT
|
||||
end
|
||||
|
||||
--- (AIR + GROUND) The task makes the controllable/unit a FAC and lets the FAC to choose a targets (enemy ground controllable) around as well as other assigned targets.
|
||||
-- The killer is player-controlled allied CAS-aircraft that is in contact with the FAC.
|
||||
-- If the task is assigned to the controllable lead unit will be a FAC.
|
||||
-- Assigns the controlled group to act as a Forward Air Controller or JTAC. Any detected targets will be assigned as targets to the player via the JTAC radio menu.
|
||||
-- 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 DCS#Distance Radius The maximal distance from the FAC to a target.
|
||||
-- @param #number Frequency Frequency in MHz. Default 133 MHz.
|
||||
-- @param #number Modulation 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.
|
||||
-- @return DCS#Task The DCS task structure.
|
||||
function CONTROLLABLE:EnRouteTaskFAC( Radius, Priority )
|
||||
|
||||
-- FAC = {
|
||||
-- id = 'FAC',
|
||||
-- params = {
|
||||
-- radius = Distance,
|
||||
-- priority = number
|
||||
-- }
|
||||
-- }
|
||||
function CONTROLLABLE:EnRouteTaskFAC( Frequency, Modulation, CallsignID, CallsignNumber, Priority )
|
||||
|
||||
local DCSTask = {
|
||||
id = 'FAC',
|
||||
params = {
|
||||
radius = Radius,
|
||||
priority = Priority
|
||||
frequency = (Frequency or 133)*1000000,
|
||||
modulation = Modulation or radio.modulation.AM,
|
||||
callname = CallsignID,
|
||||
number = CallsignNumber,
|
||||
priority = Priority or 0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user