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.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.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.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
|
-- ## 2.1 User functions
|
||||||
--
|
--
|
||||||
@ -1219,7 +1221,11 @@ CTLD.UnitTypes = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
|
-<<<<<<< HEAD
|
||||||
CTLD.version="1.0.36"
|
CTLD.version="1.0.36"
|
||||||
|
=======
|
||||||
|
CTLD.version="1.0.37"
|
||||||
|
>>>>>>> origin/master
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -1302,6 +1308,7 @@ function CTLD:New(Coalition, Prefixes, Alias)
|
|||||||
|
|
||||||
-- radio beacons
|
-- radio beacons
|
||||||
self.RadioSound = "beacon.ogg"
|
self.RadioSound = "beacon.ogg"
|
||||||
|
self.RadioSoundFC3 = "beacon.ogg"
|
||||||
self.RadioPath = "l10n/DEFAULT/"
|
self.RadioPath = "l10n/DEFAULT/"
|
||||||
|
|
||||||
-- zones stuff
|
-- zones stuff
|
||||||
@ -4023,7 +4030,7 @@ function CTLD:_AddRadioBeacon(Name, Sound, Mhz, Modulation, IsShip, IsDropped)
|
|||||||
local Sound = self.RadioPath..Sound
|
local Sound = self.RadioPath..Sound
|
||||||
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000, Name..math.random(1,10000)) -- Beacon in MP only runs for 30secs straight
|
trigger.action.radioTransmission(Sound, ZoneVec3, Modulation, false, Frequency, 1000, Name..math.random(1,10000)) -- Beacon in MP only runs for 30secs straight
|
||||||
self:T2(string.format("Beacon added | Name = %s | Sound = %s | Vec3 = %d %d %d | Freq = %f | Modulation = %d (0=AM/1=FM)",Name,Sound,ZoneVec3.x,ZoneVec3.y,ZoneVec3.z,Mhz,Modulation))
|
self:T2(string.format("Beacon added | Name = %s | Sound = %s | Vec3 = %d %d %d | Freq = %f | Modulation = %d (0=AM/1=FM)",Name,Sound,ZoneVec3.x,ZoneVec3.y,ZoneVec3.z,Mhz,Modulation))
|
||||||
else
|
else
|
||||||
local ZoneCoord = Zone:GetCoordinate()
|
local ZoneCoord = Zone:GetCoordinate()
|
||||||
local ZoneVec3 = ZoneCoord:GetVec3() or {x=0,y=0,z=0}
|
local ZoneVec3 = ZoneCoord:GetVec3() or {x=0,y=0,z=0}
|
||||||
local Frequency = Mhz * 1000000 -- Freq in Hert
|
local Frequency = Mhz * 1000000 -- Freq in Hert
|
||||||
@ -4077,6 +4084,7 @@ function CTLD:_RefreshRadioBeacons()
|
|||||||
-- Get Beacon object from zone
|
-- Get Beacon object from zone
|
||||||
local czone = cargozone -- #CTLD.CargoZone
|
local czone = cargozone -- #CTLD.CargoZone
|
||||||
local Sound = self.RadioSound
|
local Sound = self.RadioSound
|
||||||
|
local Silent = self.RadioSoundFC3 or self.RadioSound
|
||||||
if czone.active and czone.hasbeacon then
|
if czone.active and czone.hasbeacon then
|
||||||
local FMbeacon = czone.fmbeacon -- #CTLD.ZoneBeacon
|
local FMbeacon = czone.fmbeacon -- #CTLD.ZoneBeacon
|
||||||
local VHFbeacon = czone.vhfbeacon -- #CTLD.ZoneBeacon
|
local VHFbeacon = czone.vhfbeacon -- #CTLD.ZoneBeacon
|
||||||
@ -4086,8 +4094,8 @@ function CTLD:_RefreshRadioBeacons()
|
|||||||
local VHF = VHFbeacon.frequency -- KHz
|
local VHF = VHFbeacon.frequency -- KHz
|
||||||
local UHF = UHFbeacon.frequency -- MHz
|
local UHF = UHFbeacon.frequency -- MHz
|
||||||
self:_AddRadioBeacon(Name,Sound,FM, CTLD.RadioModulation.FM, IsShip, IsDropped)
|
self:_AddRadioBeacon(Name,Sound,FM, CTLD.RadioModulation.FM, IsShip, IsDropped)
|
||||||
self:_AddRadioBeacon(Name,Sound,VHF,CTLD.RadioModulation.FM, IsShip, IsDropped)
|
self:_AddRadioBeacon(Name,Sound,VHF,CTLD.RadioModulation.AM, IsShip, IsDropped)
|
||||||
self:_AddRadioBeacon(Name,Sound,UHF,CTLD.RadioModulation.AM, IsShip, IsDropped)
|
self:_AddRadioBeacon(Name,Silent,UHF,CTLD.RadioModulation.AM, IsShip, IsDropped)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@ -1692,7 +1692,9 @@ function CONTROLLABLE:EnRouteTaskSEAD(TargetTypes, Priority)
|
|||||||
return DCSTask
|
return DCSTask
|
||||||
end
|
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 self
|
||||||
-- @param #CONTROLLABLE AttackGroup The Controllable to be attacked.
|
-- @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.
|
-- @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
|
end
|
||||||
|
|
||||||
--- (AIR) Search and attack the Unit.
|
--- (AIR) Search and attack the Unit.
|
||||||
|
-- See [hoggit](https://wiki.hoggitworld.com/view/DCS_task_engageUnit).
|
||||||
-- @param #CONTROLLABLE self
|
-- @param #CONTROLLABLE self
|
||||||
-- @param Wrapper.Unit#UNIT EngageUnit The UNIT.
|
-- @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.
|
-- @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
|
end
|
||||||
|
|
||||||
--- (AIR) Aircraft will act as an AWACS for friendly units (will provide them with information about contacts). No parameters.
|
--- (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
|
-- @param #CONTROLLABLE self
|
||||||
-- @return DCS#Task The DCS task structure.
|
-- @return DCS#Task The DCS task structure.
|
||||||
function CONTROLLABLE:EnRouteTaskAWACS()
|
function CONTROLLABLE:EnRouteTaskAWACS()
|
||||||
@ -1789,6 +1793,7 @@ function CONTROLLABLE:EnRouteTaskAWACS()
|
|||||||
end
|
end
|
||||||
|
|
||||||
--- (AIR) Aircraft will act as a tanker for friendly units. No parameters.
|
--- (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
|
-- @param #CONTROLLABLE self
|
||||||
-- @return DCS#Task The DCS task structure.
|
-- @return DCS#Task The DCS task structure.
|
||||||
function CONTROLLABLE:EnRouteTaskTanker()
|
function CONTROLLABLE:EnRouteTaskTanker()
|
||||||
@ -1804,6 +1809,7 @@ end
|
|||||||
-- En-route tasks for ground units/controllables
|
-- 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.
|
--- (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
|
-- @param #CONTROLLABLE self
|
||||||
-- @return DCS#Task The DCS task structure.
|
-- @return DCS#Task The DCS task structure.
|
||||||
function CONTROLLABLE:EnRouteTaskEWR()
|
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.
|
--- (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.
|
-- 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.
|
-- 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 self
|
||||||
-- @param #CONTROLLABLE AttackGroup Target CONTROLLABLE.
|
-- @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 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 #number WeaponType (Optional) Bitmask of weapon types those allowed to use. Default is "Auto".
|
||||||
-- @param DCS#AI.Task.Designation Designation (Optional) Designation type.
|
-- @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 #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.
|
-- @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 = {
|
local DCSTask = {
|
||||||
id = 'FAC_EngageControllable',
|
id = 'FAC_EngageControllable',
|
||||||
@ -1837,6 +1846,10 @@ function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponT
|
|||||||
weaponType = WeaponType or "Auto",
|
weaponType = WeaponType or "Auto",
|
||||||
designation = Designation,
|
designation = Designation,
|
||||||
datalink = Datalink and Datalink or false,
|
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,
|
priority = Priority or 0,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
@ -1845,27 +1858,26 @@ function CONTROLLABLE:EnRouteTaskFAC_EngageGroup( AttackGroup, Priority, WeaponT
|
|||||||
end
|
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.
|
--- (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.
|
-- 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.
|
||||||
-- If the task is assigned to the controllable lead unit will be a FAC.
|
-- 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 #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.
|
-- @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.
|
-- @return DCS#Task The DCS task structure.
|
||||||
function CONTROLLABLE:EnRouteTaskFAC( Radius, Priority )
|
function CONTROLLABLE:EnRouteTaskFAC( Frequency, Modulation, CallsignID, CallsignNumber, Priority )
|
||||||
|
|
||||||
-- FAC = {
|
|
||||||
-- id = 'FAC',
|
|
||||||
-- params = {
|
|
||||||
-- radius = Distance,
|
|
||||||
-- priority = number
|
|
||||||
-- }
|
|
||||||
-- }
|
|
||||||
|
|
||||||
local DCSTask = {
|
local DCSTask = {
|
||||||
id = 'FAC',
|
id = 'FAC',
|
||||||
params = {
|
params = {
|
||||||
radius = Radius,
|
frequency = (Frequency or 133)*1000000,
|
||||||
priority = Priority
|
modulation = Modulation or radio.modulation.AM,
|
||||||
|
callname = CallsignID,
|
||||||
|
number = CallsignNumber,
|
||||||
|
priority = Priority or 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user