mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-13 01:06:45 +00:00
Compare commits
12 Commits
589e65963f
..
2.9.18
| Author | SHA1 | Date | |
|---|---|---|---|
| 23112c9954 | |||
| 23c59d906f | |||
| cc62655ffe | |||
| 401e9d9e8e | |||
| 9b1a3e4894 | |||
| 6c32aa6044 | |||
| edf70e971c | |||
| 7c5af54473 | |||
| 2aa9b91ce5 | |||
| fdc19a6898 | |||
| d3ebf023fb | |||
| d40c559d2d |
@@ -1453,11 +1453,7 @@ function EVENT:onEvent( Event )
|
|||||||
-- Weapon.
|
-- Weapon.
|
||||||
if Event.weapon and type(Event.weapon) == "table" and Event.weapon.isExist and Event.weapon:isExist() then
|
if Event.weapon and type(Event.weapon) == "table" and Event.weapon.isExist and Event.weapon:isExist() then
|
||||||
Event.Weapon = Event.weapon
|
Event.Weapon = Event.weapon
|
||||||
if Event.weapon_name == "ZELL Booster" then
|
Event.WeaponName = Event.weapon:isExist() and Event.weapon.getTypeName and Event.weapon:getTypeName() or "Unknown Weapon"
|
||||||
Event.WeaponName = "ZELL Booster"
|
|
||||||
else
|
|
||||||
Event.WeaponName = Event.weapon:isExist() and Event.weapon.getTypeName and Event.weapon:getTypeName() or "Unknown Weapon"
|
|
||||||
end
|
|
||||||
if Event.weapon_name == "ZELL Booster" then Event.WeaponName = "ZELL Booster" end
|
if Event.weapon_name == "ZELL Booster" then Event.WeaponName = "ZELL Booster" end
|
||||||
Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit!
|
Event.WeaponUNIT = CLIENT:Find( Event.Weapon, '', true ) -- Sometimes, the weapon is a player unit!
|
||||||
Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon.getPlayerName and Event.Weapon:getPlayerName()
|
Event.WeaponPlayerName = Event.WeaponUNIT and Event.Weapon.getPlayerName and Event.Weapon:getPlayerName()
|
||||||
|
|||||||
@@ -375,13 +375,3 @@ function SCHEDULEDISPATCHER:NoTrace( Scheduler )
|
|||||||
Scheduler.ShowTrace = false
|
Scheduler.ShowTrace = false
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Helper for memory cleanup for self stopping schedulers
|
|
||||||
-- @param #SCHEDULEDISPATCHER self
|
|
||||||
-- @param Core.Scheduler#SCHEDULER Scheduler Scheduler object.
|
|
||||||
-- @param #string CallID (Optional) Scheduler Call ID.
|
|
||||||
function SCHEDULEDISPATCHER:_Reclaim( Scheduler, CallID )
|
|
||||||
self:Stop( Scheduler, CallID ) -- remove DCS timer, nil ScheduleID
|
|
||||||
if self.Schedule[Scheduler] then self.Schedule[Scheduler][CallID] = nil end
|
|
||||||
self.ObjectSchedulers[CallID] = nil
|
|
||||||
self.PersistentSchedulers[CallID] = nil
|
|
||||||
end
|
|
||||||
|
|||||||
@@ -4201,16 +4201,13 @@ function AIRBOSS:_CheckRecoveryTimes()
|
|||||||
-- Time into the wind 1 day or if longer recovery time + the 5 min early.
|
-- Time into the wind 1 day or if longer recovery time + the 5 min early.
|
||||||
local t = math.max( nextwindow.STOP - nextwindow.START + self.dTturn, 60 * 60 * 24 )
|
local t = math.max( nextwindow.STOP - nextwindow.START + self.dTturn, 60 * 60 * 24 )
|
||||||
|
|
||||||
-- Recovery wind on deck in knots.
|
-- Recovery wind on deck in knots.
|
||||||
-- NOTE: Do NOT clamp the desired wind-over-deck (WOD) to the carrier's max hull
|
|
||||||
-- speed here. WOD = carrier speed + headwind, so a WOD target above the hull's
|
|
||||||
-- top speed is achievable whenever there is wind. CarrierTurnIntoWind ->
|
|
||||||
-- GetHeadingIntoWind already converts the WOD target into the required hull
|
|
||||||
-- speed and caps THAT at the carrier's max speed (Vmax) internally. Clamping the
|
|
||||||
-- WOD target itself capped achievable WOD at ~30 kts (the supercarrier's max
|
|
||||||
-- hull speed) even in strong wind, which made high-WOD recovery windows fall
|
|
||||||
-- short of their requested value.
|
|
||||||
local v = UTILS.KnotsToMps( nextwindow.SPEED )
|
local v = UTILS.KnotsToMps( nextwindow.SPEED )
|
||||||
|
|
||||||
|
-- Check that we do not go above max possible speed.
|
||||||
|
local vmax = self.carrier:GetSpeedMax() / 3.6 -- convert to m/s
|
||||||
|
v = math.min( v, vmax )
|
||||||
|
|
||||||
-- Route carrier into the wind. Sets self.turnintowind=true
|
-- Route carrier into the wind. Sets self.turnintowind=true
|
||||||
self:CarrierTurnIntoWind( t, v, uturn )
|
self:CarrierTurnIntoWind( t, v, uturn )
|
||||||
|
|
||||||
|
|||||||
@@ -135,7 +135,6 @@
|
|||||||
-- local mywing = EASYGCICAP:New("Blue CAP Operations",AIRBASE.Caucasus.Kutaisi,"blue","Blue EWR")
|
-- local mywing = EASYGCICAP:New("Blue CAP Operations",AIRBASE.Caucasus.Kutaisi,"blue","Blue EWR")
|
||||||
--
|
--
|
||||||
-- -- Add a CAP patrol point belonging to our airbase, we'll be at 30k ft doing 400 kn, initial direction 90 degrees (East), leg 20NM
|
-- -- Add a CAP patrol point belonging to our airbase, we'll be at 30k ft doing 400 kn, initial direction 90 degrees (East), leg 20NM
|
||||||
-- -- NOTE - Skip this function and do not create CAP Points if you want GCI behaviour only.
|
|
||||||
-- mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone 1"):GetCoordinate(),30000,400,90,20)
|
-- mywing:AddPatrolPointCAP(AIRBASE.Caucasus.Kutaisi,ZONE:FindByName("Blue Zone 1"):GetCoordinate(),30000,400,90,20)
|
||||||
--
|
--
|
||||||
-- -- Add a Squadron with template "Blue Sq1 M2000c", 20 airframes, skill good, Modex starting with 102 and skin "Vendee Jeanne"
|
-- -- Add a Squadron with template "Blue Sq1 M2000c", 20 airframes, skill good, Modex starting with 102 and skin "Vendee Jeanne"
|
||||||
@@ -191,10 +190,9 @@
|
|||||||
-- * @{#EASYGCICAP.SetDefaultResurrection}: Set how many seconds the AirWing stays inoperable after the AirWing STATIC HQ ist destroyed, default 900 secs.
|
-- * @{#EASYGCICAP.SetDefaultResurrection}: Set how many seconds the AirWing stays inoperable after the AirWing STATIC HQ ist destroyed, default 900 secs.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPSpeed}: Set how many knots the CAP flights should do (will be altitude corrected), default 300 kn.
|
-- * @{#EASYGCICAP.SetDefaultCAPSpeed}: Set how many knots the CAP flights should do (will be altitude corrected), default 300 kn.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPAlt}: Set at which altitude (ASL) the CAP planes will fly, default 25,000 ft.
|
-- * @{#EASYGCICAP.SetDefaultCAPAlt}: Set at which altitude (ASL) the CAP planes will fly, default 25,000 ft.
|
||||||
-- * @{#EASYGCICAP.SetDefaultINTERCEPTAlt}: Set at which altitude (ASL) the Intercept planes will fly, default 25,000 ft.
|
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPDirection}: Set the initial direction from the CAP point the planes will fly in degrees, default is 90°.
|
-- * @{#EASYGCICAP.SetDefaultCAPDirection}: Set the initial direction from the CAP point the planes will fly in degrees, default is 90°.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPLeg}: Set the length of the CAP leg, default is 15 NM.
|
-- * @{#EASYGCICAP.SetDefaultCAPLeg}: Set the length of the CAP leg, default is 15 NM.
|
||||||
-- * @{#EASYGCICAP.SetDefaultCAPGrouping}: Set how many planes will be spawned per mission (CAP/GCI), defaults to 2.
|
-- * @{#EASYGCICAP.SetDefaultCAPGrouping}: Set how many planes will be spawned per mission (CVAP/GCI), defaults to 2.
|
||||||
-- * @{#EASYGCICAP.SetDefaultMissionRange}: Set how many NM the planes can go from the home base, defaults to 100.
|
-- * @{#EASYGCICAP.SetDefaultMissionRange}: Set how many NM the planes can go from the home base, defaults to 100.
|
||||||
-- * @{#EASYGCICAP.SetDefaultNumberAlert5Standby}: Set how many planes will be spawned on cold standby (Alert5), default 2.
|
-- * @{#EASYGCICAP.SetDefaultNumberAlert5Standby}: Set how many planes will be spawned on cold standby (Alert5), default 2.
|
||||||
-- * @{#EASYGCICAP.SetDefaultEngageRange}: Set max engage range for CAP flights if they detect intruders, defaults to 50.
|
-- * @{#EASYGCICAP.SetDefaultEngageRange}: Set max engage range for CAP flights if they detect intruders, defaults to 50.
|
||||||
@@ -288,7 +286,7 @@ EASYGCICAP = {
|
|||||||
|
|
||||||
--- EASYGCICAP class version.
|
--- EASYGCICAP class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
EASYGCICAP.version="0.1.38"
|
EASYGCICAP.version="0.1.36"
|
||||||
|
|
||||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||||
--
|
--
|
||||||
@@ -589,17 +587,6 @@ function EASYGCICAP:SetDefaultCAPAlt(Altitude)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Set default INTERCEPT Altitude in feet
|
|
||||||
-- @param #EASYGCICAP self
|
|
||||||
-- @param #number Altitude (Optional) Altitude defaults to 25000
|
|
||||||
-- @return #EASYGCICAP self
|
|
||||||
function EASYGCICAP:SetDefaultINTERCEPTAlt(Altitude)
|
|
||||||
self:T(self.lid.."SetDefaultINTERCEPTAlt")
|
|
||||||
self.interceptalt = Altitude or 25000
|
|
||||||
return self
|
|
||||||
end
|
|
||||||
--
|
|
||||||
|
|
||||||
--- Set default CAP lieg initial direction in degrees
|
--- Set default CAP lieg initial direction in degrees
|
||||||
-- @param #EASYGCICAP self
|
-- @param #EASYGCICAP self
|
||||||
-- @param #number Direction (Optional) Direction defaults to 90 (East)
|
-- @param #number Direction (Optional) Direction defaults to 90 (East)
|
||||||
@@ -767,15 +754,6 @@ end
|
|||||||
function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
||||||
self:T(self.lid.."_AddAirwing "..Airbasename)
|
self:T(self.lid.."_AddAirwing "..Airbasename)
|
||||||
|
|
||||||
-- Gather Some Stats
|
|
||||||
local function counttable(tbl)
|
|
||||||
local count = 0
|
|
||||||
for _,_data in pairs(tbl) do
|
|
||||||
count = count + 1
|
|
||||||
end
|
|
||||||
return count
|
|
||||||
end
|
|
||||||
|
|
||||||
local CapFormation = self.CapFormation
|
local CapFormation = self.CapFormation
|
||||||
local DespawnAfterLanding = self.DespawnAfterLanding
|
local DespawnAfterLanding = self.DespawnAfterLanding
|
||||||
local DespawnAfterHolding = self.DespawnAfterHolding
|
local DespawnAfterHolding = self.DespawnAfterHolding
|
||||||
@@ -794,11 +772,7 @@ function EASYGCICAP:_AddAirwing(Airbasename, Alias)
|
|||||||
CAP_Wing:SetMarker(false)
|
CAP_Wing:SetMarker(false)
|
||||||
CAP_Wing:SetAirbase(AIRBASE:FindByName(Airbasename))
|
CAP_Wing:SetAirbase(AIRBASE:FindByName(Airbasename))
|
||||||
CAP_Wing:SetRespawnAfterDestroyed()
|
CAP_Wing:SetRespawnAfterDestroyed()
|
||||||
|
CAP_Wing:SetNumberCAP(self.capgrouping)
|
||||||
--- #DONE avoid wings with no CAP points starting CAP anyhow; AirWing uses this to start CAP and creates points when there are none.
|
|
||||||
if counttable(self.ManagedCP) >0 then
|
|
||||||
CAP_Wing:SetNumberCAP(self.capgrouping)
|
|
||||||
end
|
|
||||||
CAP_Wing:SetCapCloseRaceTrack(true)
|
CAP_Wing:SetCapCloseRaceTrack(true)
|
||||||
|
|
||||||
if self.showpatrolpointmarks then
|
if self.showpatrolpointmarks then
|
||||||
@@ -1065,7 +1039,7 @@ function EASYGCICAP:_SetCAPPatrolPoints()
|
|||||||
MESSAGE:New(self.lid.."You are trying to create a CAP point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog()
|
MESSAGE:New(self.lid.."You are trying to create a CAP point for which there is no wing! "..tostring(data.AirbaseName),30,"CHECK"):ToAllIf(self.debug):ToLog()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
local Wing = self.wings[data.AirbaseName][1] -- Ops.AirWing#AIRWING
|
local Wing = self.wings[data.AirbaseName][1] -- Ops.Airwing#AIRWING
|
||||||
local Coordinate = data.Coordinate
|
local Coordinate = data.Coordinate
|
||||||
local Altitude = data.Altitude
|
local Altitude = data.Altitude
|
||||||
local Speed = data.Speed
|
local Speed = data.Speed
|
||||||
@@ -1531,7 +1505,6 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
local overhead = self.overhead
|
local overhead = self.overhead
|
||||||
local capspeed = self.capspeed + 100
|
local capspeed = self.capspeed + 100
|
||||||
local capalt = self.capalt
|
local capalt = self.capalt
|
||||||
local interalt = self.interceptalt or self.capalt
|
|
||||||
local maxsize = self.maxinterceptsize
|
local maxsize = self.maxinterceptsize
|
||||||
local repeatsonfailure = self.repeatsonfailure
|
local repeatsonfailure = self.repeatsonfailure
|
||||||
|
|
||||||
@@ -1619,7 +1592,6 @@ function EASYGCICAP:_AssignIntercept(Cluster)
|
|||||||
:SetRepeatOnFailure(repeats)
|
:SetRepeatOnFailure(repeats)
|
||||||
:SetMissionSpeed(UTILS.KnotsToAltKIAS(capspeed,capalt))
|
:SetMissionSpeed(UTILS.KnotsToAltKIAS(capspeed,capalt))
|
||||||
:SetMissionAltitude(capalt)
|
:SetMissionAltitude(capalt)
|
||||||
:SetEngageAltitude(interalt)
|
|
||||||
|
|
||||||
if nogozoneset:Count() > 0 then
|
if nogozoneset:Count() > 0 then
|
||||||
InterceptAuftrag:AddConditionSuccess(
|
InterceptAuftrag:AddConditionSuccess(
|
||||||
|
|||||||
@@ -2108,7 +2108,7 @@ function MSRS:_HoundTextToSpeech(Message,Frequencies,Modulations,Volume,Label,Co
|
|||||||
|
|
||||||
local ffs = {}
|
local ffs = {}
|
||||||
for _,_f in pairs(Frequencies) do
|
for _,_f in pairs(Frequencies) do
|
||||||
table.insert(ffs,string.format("%.3f",_f))
|
table.insert(ffs,string.format("%.1f",_f))
|
||||||
end
|
end
|
||||||
|
|
||||||
local freqs = table.concat(ffs, ",")
|
local freqs = table.concat(ffs, ",")
|
||||||
@@ -2214,7 +2214,7 @@ function MSRS:_HoundTestTone(Frequencies, Modulations, Coalition)
|
|||||||
|
|
||||||
local ffs = {}
|
local ffs = {}
|
||||||
for _,_f in pairs(Frequencies or self.frequencies) do
|
for _,_f in pairs(Frequencies or self.frequencies) do
|
||||||
table.insert(ffs,string.format("%.3f",_f))
|
table.insert(ffs,string.format("%.1f",_f))
|
||||||
end
|
end
|
||||||
|
|
||||||
local freqs = table.concat(ffs, ",")
|
local freqs = table.concat(ffs, ",")
|
||||||
@@ -2291,7 +2291,7 @@ function MSRS:RadioJammerOn(Frequencies, Modulations, Coalition, Noisetype, Volu
|
|||||||
|
|
||||||
local ffs = {}
|
local ffs = {}
|
||||||
for _,_f in pairs(Frequencies or self.frequencies) do
|
for _,_f in pairs(Frequencies or self.frequencies) do
|
||||||
table.insert(ffs,string.format("%.3f",_f))
|
table.insert(ffs,string.format("%.1f",_f))
|
||||||
end
|
end
|
||||||
|
|
||||||
local freqs = table.concat(ffs, ",")
|
local freqs = table.concat(ffs, ",")
|
||||||
|
|||||||
@@ -523,7 +523,7 @@ ENUMS.ReportingName =
|
|||||||
Tornado = "Tornado",
|
Tornado = "Tornado",
|
||||||
-- Transport / Bomber / Others
|
-- Transport / Bomber / Others
|
||||||
Atlas = "A400",
|
Atlas = "A400",
|
||||||
Lancer = "B-1B",
|
Lancer = "B1-B",
|
||||||
Stratofortress = "B-52H",
|
Stratofortress = "B-52H",
|
||||||
Herc = "C-130",
|
Herc = "C-130",
|
||||||
Hercules = "C-130J-30",
|
Hercules = "C-130J-30",
|
||||||
@@ -568,7 +568,7 @@ ENUMS.ReportingName =
|
|||||||
Apache = "AH-64",
|
Apache = "AH-64",
|
||||||
Chinook = "CH-47",
|
Chinook = "CH-47",
|
||||||
Sea_Stallion = "CH-53",
|
Sea_Stallion = "CH-53",
|
||||||
Kiowa = "OH58D",
|
Kiowa = "OH-58",
|
||||||
Seahawk = "SH-60",
|
Seahawk = "SH-60",
|
||||||
Blackhawk = "UH-60",
|
Blackhawk = "UH-60",
|
||||||
Sea_King = "S-61",
|
Sea_King = "S-61",
|
||||||
|
|||||||
@@ -2379,11 +2379,6 @@ function UTILS.IsLoadingDoorOpen( unit_name )
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if type_name == "Ka-50_3" and unit:getDrawArgumentValue(38) == 1 then
|
|
||||||
BASE:T(unit_name .. " cockpit door is open")
|
|
||||||
return true
|
|
||||||
end
|
|
||||||
|
|
||||||
if type_name=="C-130J-30" and (unit:getDrawArgumentValue(86)==1)then
|
if type_name=="C-130J-30" and (unit:getDrawArgumentValue(86)==1)then
|
||||||
BASE:T(unit_name.." rear doors are open")
|
BASE:T(unit_name.." rear doors are open")
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user