mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-16 22:22:25 +00:00
Merge branch 'develop' into FF/Ops
This commit is contained in:
@@ -1637,6 +1637,7 @@ do -- COORDINATE
|
||||
if AirbaseCategory == Airbase.Category.SHIP or AirbaseCategory == Airbase.Category.HELIPAD then
|
||||
RoutePoint.linkUnit = AirbaseID
|
||||
RoutePoint.helipadId = AirbaseID
|
||||
RoutePoint.airdromeId = airbase:IsAirdrome() and AirbaseID or nil
|
||||
elseif AirbaseCategory == Airbase.Category.AIRDROME then
|
||||
RoutePoint.airdromeId = AirbaseID
|
||||
else
|
||||
|
||||
+1248
-1346
File diff suppressed because it is too large
Load Diff
@@ -320,8 +320,8 @@ function SCORING:New( GameName, SavePath, AutoSave )
|
||||
|
||||
-- Create the CSV file.
|
||||
self.AutoSavePath = SavePath
|
||||
self.AutoSave = AutoSave or true
|
||||
if self.AutoSave == true then
|
||||
self.AutoSave = (AutoSave == nil or AutoSave == true) and true or false
|
||||
if self.AutoSavePath and self.AutoSave == true then
|
||||
self:OpenCSV( GameName )
|
||||
end
|
||||
|
||||
|
||||
@@ -5498,15 +5498,15 @@ function AIRBOSS:_GetAircraftAoA( playerData )
|
||||
aoa.OnSpeedMin = self:_AoAUnit2Deg( playerData, 14.0 ) -- 14.17 --14.5 units -- VNAO Edit - Original value 14.5
|
||||
aoa.Fast = self:_AoAUnit2Deg( playerData, 13.5 ) -- 13.33 --14.0 units -- VNAO Edit - Original value 14
|
||||
aoa.FAST = self:_AoAUnit2Deg( playerData, 12.5 ) -- 11.67 --13.0 units -- VNAO Edit - Original value 13
|
||||
elseif goshawk then
|
||||
elseif goshawk then --These parameters edited by CIRCUIT to support new VNAO flight model
|
||||
-- T-45C Goshawk parameters.
|
||||
aoa.SLOW = 8.00 -- 19
|
||||
aoa.Slow = 7.75 -- 18
|
||||
aoa.OnSpeedMax = 7.25 -- 17.5
|
||||
aoa.OnSpeed = 7.00 -- 17
|
||||
aoa.OnSpeedMin = 6.75 -- 16.5
|
||||
aoa.Fast = 6.25 -- 16
|
||||
aoa.FAST = 6.00 -- 15
|
||||
aoa.SLOW = 9.5 -- 8.00 -- 19
|
||||
aoa.Slow = 9.25 -- 7.75 -- 18
|
||||
aoa.OnSpeedMax = 9.0 --7.25 -- 17.5
|
||||
aoa.OnSpeed = 8.5 -- 7.00 -- 17
|
||||
aoa.OnSpeedMin = 8.25 -- 6.75 -- 16.5
|
||||
aoa.Fast = 7.75 -- 6.25 -- 16
|
||||
aoa.FAST = 5.5 -- 6.00 -- 15
|
||||
elseif skyhawk then
|
||||
-- A-4E-C Skyhawk parameters from https://forums.eagle.ru/showpost.php?p=3703467&postcount=390
|
||||
-- Note that these are arbitrary UNITS and not degrees. We need a conversion formula!
|
||||
@@ -8161,8 +8161,14 @@ function AIRBOSS:_CheckPlayerStatus()
|
||||
-- TODO: This might cause problems if the CCA is set to be very small!
|
||||
if unit:IsInZone( self.zoneCCA ) then
|
||||
|
||||
-- VNAO Edit - Added wrapped up call to LSO grading
|
||||
if playerData.step==AIRBOSS.PatternStep.WAKE then-- VNAO Edit - Added
|
||||
local hornet = playerData.actype == AIRBOSS.AircraftCarrier.HORNET
|
||||
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOE
|
||||
or playerData.actype == AIRBOSS.AircraftCarrier.RHINOF
|
||||
or playerData.actype == AIRBOSS.AircraftCarrier.GROWLER
|
||||
local tomcat = playerData.actype == AIRBOSS.AircraftCarrier.F14A or playerData.actype == AIRBOSS.AircraftCarrier.F14B
|
||||
|
||||
-- VNAO Edit - Added wrapped up call to LSO grading Hornet
|
||||
if playerData.step==AIRBOSS.PatternStep.WAKE and hornet then-- VNAO Edit - Added
|
||||
if math.abs(playerData.unit:GetRoll())>35 and math.abs(playerData.unit:GetRoll())<=40 then-- VNAO Edit - Added
|
||||
playerData.wrappedUpAtWakeLittle = true -- VNAO Edit - Added
|
||||
elseif math.abs(playerData.unit:GetRoll()) >40 and math.abs(playerData.unit:GetRoll())<=45 then-- VNAO Edit - Added
|
||||
@@ -8186,6 +8192,30 @@ function AIRBOSS:_CheckPlayerStatus()
|
||||
end -- VNAO Edit - Added
|
||||
end-- VNAO Edit - Added
|
||||
|
||||
-- VNAO Edit - Added wrapped up call to LSO grading Tomcat
|
||||
if playerData.step==AIRBOSS.PatternStep.WAKE and tomcat then-- VNAO Edit - Added
|
||||
if math.abs(playerData.unit:GetRoll())>35 and math.abs(playerData.unit:GetRoll())<=40 then-- VNAO Edit - Added
|
||||
playerData.wrappedUpAtWakeLittle = true -- VNAO Edit - Added
|
||||
elseif math.abs(playerData.unit:GetRoll()) >40 and math.abs(playerData.unit:GetRoll())<=45 then-- VNAO Edit - Added
|
||||
playerData.wrappedUpAtWakeFull = true-- VNAO Edit - Added
|
||||
elseif math.abs(playerData.unit:GetRoll()) >45 then-- VNAO Edit - Added
|
||||
playerData.wrappedUpAtWakeUnderline = true -- VNAO Edit - Added
|
||||
elseif math.abs(playerData.unit:GetRoll()) <12 and math.abs(playerData.unit:GetRoll()) >=5 then -- VNAO Edit - Added a new AA comment based on discussion with Lipps today, and going to replace the AA at the X with the original LUL comments
|
||||
playerData.AAatWakeLittle = true -- VNAO Edit - Added
|
||||
elseif math.abs(playerData.unit:GetRoll()) <5 and math.abs(playerData.unit:GetRoll()) >=2 then -- VNAO Edit - Added a new AA comment based on discussion with Lipps today, and going to replace the AA at the X with the original LUL comments
|
||||
playerData.AAatWakeFull = true -- VNAO Edit - Added
|
||||
elseif math.abs(playerData.unit:GetRoll()) <2 then -- VNAO Edit - Added a new AA comment based on discussion with Lipps today, and going to replace the AA at the X with the original LUL comments
|
||||
playerData.AAatWakeUnderline = true -- VNAO Edit - Added
|
||||
else -- VNAO Edit - Added
|
||||
end -- VNAO Edit - Added
|
||||
|
||||
if math.abs(playerData.unit:GetAoA())>= 15 then -- VNAO Edit - Added
|
||||
playerData.AFU = true -- VNAO Edit - Added
|
||||
elseif math.abs(playerData.unit:GetAoA())<= 5 then -- VNAO Edit - Added
|
||||
playerData.AFU = true -- VNAO Edit - Added
|
||||
else -- VNAO Edit - Added
|
||||
end -- VNAO Edit - Added
|
||||
end-- VNAO Edit - Added
|
||||
|
||||
-- Display aircraft attitude and other parameters as message text.
|
||||
if playerData.attitudemonitor then
|
||||
@@ -12229,8 +12259,8 @@ function AIRBOSS:GetHeadingIntoWind_new( vdeck, magnetic, coord )
|
||||
local magvar= magnetic and self.magvar or 0
|
||||
|
||||
-- Ship heading so cross wind is min for the given wind.
|
||||
-- local intowind = (540 + (windto - magvar + math.deg(theta) )) % 360 -- VNAO Edit: Using old heading into wind algorithm
|
||||
local intowind = self:GetHeadingIntoWind_old(vdeck,magnetic) -- VNAO Edit: Using old heading into wind algorithm
|
||||
local intowind = (540 + (windto - magvar + math.deg(theta) )) % 360
|
||||
|
||||
|
||||
return intowind, v
|
||||
end
|
||||
@@ -12682,7 +12712,8 @@ function AIRBOSS:_LSOgrade( playerData )
|
||||
local nL=count(G, '_')/2
|
||||
local nS=count(G, '%(')
|
||||
local nN=N-nS-nL
|
||||
|
||||
|
||||
if TIG=="_OK_" then nL = nL -1 end --Circuit added to prevent grade deduction for perfect groove
|
||||
|
||||
-- Groove time 15-18.99 sec for a unicorn. Or 60-65 for V/STOL unicorn.
|
||||
local Tgroove=playerData.Tgroove
|
||||
@@ -12712,7 +12743,6 @@ function AIRBOSS:_LSOgrade( playerData )
|
||||
else
|
||||
|
||||
if vtol then
|
||||
|
||||
-- Add AV-8B Harrier devation allowances due to lower groundspeed and 3x conventional groove time, this allows to maintain LSO tolerances while respecting the deviations are not unsafe.--Pene testing
|
||||
-- Large devaitions still result in a No Grade, A Unicorn still requires a clean pass with no deviation.
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -21,7 +21,7 @@
|
||||
-- ===
|
||||
-- @module Ops.PlayerTask
|
||||
-- @image OPS_PlayerTask.jpg
|
||||
-- @date Last Update May 2025
|
||||
-- @date Last Update Oct 2025
|
||||
|
||||
|
||||
do
|
||||
@@ -59,6 +59,8 @@ do
|
||||
-- @field #string FinalState
|
||||
-- @field #string TypeName
|
||||
-- @field #number PreviousCount
|
||||
-- @field #boolean CanSmoke
|
||||
-- @field #boolean ShowThreatDetails
|
||||
-- @extends Core.Fsm#FSM
|
||||
|
||||
|
||||
@@ -94,11 +96,13 @@ PLAYERTASK = {
|
||||
NextTaskFailure = {},
|
||||
FinalState = "none",
|
||||
PreviousCount = 0,
|
||||
CanSmoke = true,
|
||||
ShowThreatDetails = true,
|
||||
}
|
||||
|
||||
--- PLAYERTASK class version.
|
||||
-- @field #string version
|
||||
PLAYERTASK.version="0.1.28"
|
||||
PLAYERTASK.version="0.1.29"
|
||||
|
||||
--- Generic task condition.
|
||||
-- @type PLAYERTASK.Condition
|
||||
@@ -231,6 +235,7 @@ function PLAYERTASK:New(Type, Target, Repeat, Times, TTSType)
|
||||
-- @param #string From From state.
|
||||
-- @param #string Event Event.
|
||||
-- @param #string To To state.
|
||||
-- @param #boolen Silent If true, suppress message output on cancel.
|
||||
|
||||
--- On After "Planned" event. Task has been planned.
|
||||
-- @function [parent=#PLAYERTASK] OnAfterPilotPlanned
|
||||
@@ -468,6 +473,26 @@ function PLAYERTASK:SetSubType(Type)
|
||||
return self
|
||||
end
|
||||
|
||||
--- [USER] Set if a task can have a smoke marker.
|
||||
-- @param #PLAYERTASK self
|
||||
-- @param #boolean OnOff If true (default) it can be smoke, false if not.
|
||||
-- @return #PLAYERTASK self
|
||||
function PLAYERTASK:SetCanSmoke(OnOff)
|
||||
self:T(self.lid.."AddSSetCanSmokeubType")
|
||||
self.CanSmoke = OnOff
|
||||
return self
|
||||
end
|
||||
|
||||
--- [USER] Set if a task can show threat details.
|
||||
-- @param #PLAYERTASK self
|
||||
-- @param #boolean OnOff If true (default) it can be shown, false if not.
|
||||
-- @return #PLAYERTASK self
|
||||
function PLAYERTASK:SetShowThreatDetails(OnOff)
|
||||
self:T(self.lid.."SetShowThreatDetails")
|
||||
self.ShowThreatDetails = OnOff
|
||||
return self
|
||||
end
|
||||
|
||||
--- [USER] Get task sub type description from this task.
|
||||
-- @param #PLAYERTASK self
|
||||
-- @return #string Type or nil
|
||||
@@ -1173,11 +1198,12 @@ end
|
||||
-- @param #string From
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @param #boolean Silent
|
||||
-- @return #PLAYERTASK self
|
||||
function PLAYERTASK:onafterCancel(From, Event, To)
|
||||
function PLAYERTASK:onafterCancel(From, Event, To, Silent)
|
||||
self:T({From, Event, To})
|
||||
if self.TaskController then
|
||||
self.TaskController:__TaskCancelled(-1,self)
|
||||
self.TaskController:__TaskCancelled(-1,self, Silent)
|
||||
end
|
||||
self.timestamp = timer.getAbsTime()
|
||||
self.FinalState = "Cancelled"
|
||||
@@ -1606,7 +1632,7 @@ do
|
||||
--
|
||||
-- The event is triggered when a task was cancelled manually. Use @{#PLAYERTASKCONTROLLER.OnAfterTaskCancelled}()` to link into this event:
|
||||
--
|
||||
-- function taskmanager:OnAfterTaskCancelled(From, Event, To, Task)
|
||||
-- function taskmanager:OnAfterTaskCancelled(From, Event, To, Task, Silent)
|
||||
-- ... your code here ...
|
||||
-- end
|
||||
--
|
||||
@@ -1770,12 +1796,15 @@ PLAYERTASKCONTROLLER.Messages = {
|
||||
THREATMEDIUM = "medium",
|
||||
THREATLOW = "low",
|
||||
THREATTEXT = "%s\nThreat: %s\nTargets left: %d\nCoord: %s",
|
||||
NOTHREATTEXT = "%s\nNo target information available.",
|
||||
ELEVATION = "\nTarget Elevation: %s %s",
|
||||
METER = "meter",
|
||||
FEET = "feet",
|
||||
THREATTEXTTTS = "%s, %s. Target information for %s. Threat level %s. Targets left %d. Target location %s.",
|
||||
NOTHREATTEXTTTS = "%s, %s. No target information available.",
|
||||
MARKTASK = "%s, %s, copy, task %03d location marked on map!",
|
||||
SMOKETASK = "%s, %s, copy, task %03d location smoked!",
|
||||
NOSMOKETASK = "%s, %s, negative, task %03d location cannot be smoked!",
|
||||
FLARETASK = "%s, %s, copy, task %03d location illuminated!",
|
||||
ABORTTASK = "All stations, %s, %s has aborted %s task %03d!",
|
||||
UNKNOWN = "Unknown",
|
||||
@@ -1854,12 +1883,15 @@ PLAYERTASKCONTROLLER.Messages = {
|
||||
THREATMEDIUM = "mittel",
|
||||
THREATLOW = "niedrig",
|
||||
THREATTEXT = "%s\nGefahrstufe: %s\nZiele: %d\nKoord: %s",
|
||||
NOTHREATTEXT = "%s\nKeine Zielinformation verfügbar.",
|
||||
ELEVATION = "\nZiel Höhe: %s %s",
|
||||
METER = "Meter",
|
||||
FEET = "Fuss",
|
||||
THREATTEXTTTS = "%s, %s. Zielinformation zu %s. Gefahrstufe %s. Ziele %d. Zielposition %s.",
|
||||
NOTHREATTEXTTTS = "%s, %s. Keine Zielinformation verfügbar.",
|
||||
MARKTASK = "%s, %s, verstanden, Zielposition %03d auf der Karte markiert!",
|
||||
SMOKETASK = "%s, %s, verstanden, Zielposition %03d mit Rauch markiert!",
|
||||
NOSMOKETASK = "%s, %s, negativ, Zielposition %03d kann nicht markiert werden!",
|
||||
FLARETASK = "%s, %s, verstanden, Zielposition %03d beleuchtet!",
|
||||
ABORTTASK = "%s, an alle, %s hat Auftrag %s %03d abgebrochen!",
|
||||
UNKNOWN = "Unbekannt",
|
||||
@@ -1920,7 +1952,7 @@ PLAYERTASKCONTROLLER.Messages = {
|
||||
|
||||
--- PLAYERTASK class version.
|
||||
-- @field #string version
|
||||
PLAYERTASKCONTROLLER.version="0.1.70"
|
||||
PLAYERTASKCONTROLLER.version="0.1.71"
|
||||
|
||||
--- Create and run a new TASKCONTROLLER instance.
|
||||
-- @param #PLAYERTASKCONTROLLER self
|
||||
@@ -2061,6 +2093,7 @@ function PLAYERTASKCONTROLLER:New(Name, Coalition, Type, ClientFilter)
|
||||
-- @param #string Event Event.
|
||||
-- @param #string To To state.
|
||||
-- @param Ops.PlayerTask#PLAYERTASK Task
|
||||
-- @param #boolean Silent If true suppress message output.
|
||||
|
||||
--- On After "TaskFailed" event. Task has failed.
|
||||
-- @function [parent=#PLAYERTASKCONTROLLER] OnAfterTaskFailed
|
||||
@@ -2741,11 +2774,12 @@ end
|
||||
|
||||
--- [User] Manually cancel a specific task
|
||||
-- @param #PLAYERTASKCONTROLLER self
|
||||
-- @param Ops.PlayerTask#PLAYERTASK Task The task to be cancelled
|
||||
-- @param Ops.PlayerTask#PLAYERTASK Task The task to be cancelled.
|
||||
-- @param #boolean Silent If true suppress message output.
|
||||
-- @return #PLAYERTASKCONTROLLER self
|
||||
function PLAYERTASKCONTROLLER:CancelTask(Task)
|
||||
function PLAYERTASKCONTROLLER:CancelTask(Task,Silent)
|
||||
self:T(self.lid.."CancelTask")
|
||||
Task:__Cancel(-1)
|
||||
Task:__Cancel(-1,Silent)
|
||||
return self
|
||||
end
|
||||
|
||||
@@ -3734,6 +3768,7 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Task, Group, Client)
|
||||
local Elevation = Coordinate:GetLandHeight() or 0 -- meters
|
||||
local CoordText = ""
|
||||
local CoordTextLLDM = nil
|
||||
local ShowThreatInfo = task.ShowThreatDetails
|
||||
local LasingDrone = self:_FindLasingDroneForTaskID(task.PlayerTaskNr)
|
||||
if self.Type ~= PLAYERTASKCONTROLLER.Type.A2A then
|
||||
CoordText = Coordinate:ToStringA2G(Client,nil,self.ShowMagnetic)
|
||||
@@ -3757,7 +3792,12 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Task, Group, Client)
|
||||
local clientlist, clientcount = task:GetClients()
|
||||
local ThreatGraph = "[" .. string.rep( "■", ThreatLevel ) .. string.rep( "□", 10 - ThreatLevel ) .. "]: "..ThreatLevel
|
||||
local ThreatLocaleText = self.gettext:GetEntry("THREATTEXT",self.locale)
|
||||
text = string.format(ThreatLocaleText, taskname, ThreatGraph, targets, CoordText)
|
||||
if ShowThreatInfo == true then
|
||||
text = string.format(ThreatLocaleText, taskname, ThreatGraph, targets, CoordText)
|
||||
else
|
||||
ThreatLocaleText = self.gettext:GetEntry("NOTHREATTEXT",self.locale)
|
||||
text = string.format(ThreatLocaleText, taskname)
|
||||
end
|
||||
local settings = _DATABASE:GetPlayerSettings(playername) or _SETTINGS -- Core.Settings#SETTINGS
|
||||
local elevationmeasure = self.gettext:GetEntry("FEET",self.locale)
|
||||
if settings:IsMetric() then
|
||||
@@ -3880,9 +3920,19 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Task, Group, Client)
|
||||
end
|
||||
--self:I(self.lid.." | ".. CoordText)
|
||||
end
|
||||
local ttstext
|
||||
local ThreatLocaleTextTTS = self.gettext:GetEntry("THREATTEXTTTS",self.locale)
|
||||
local ttstext = string.format(ThreatLocaleTextTTS,ttsplayername,self.MenuName or self.Name,ttstaskname,ThreatLevelText, targets, CoordText)
|
||||
-- THREATTEXT = "%s\nThreat: %s\nTargets left: %d\nCoord: %s",
|
||||
-- THREATTEXTTTS = "%s, %s. Target information for %s. Threat level %s. Targets left %d. Target location %s.",
|
||||
if ShowThreatInfo == true then
|
||||
ttstext = string.format(ThreatLocaleTextTTS,ttsplayername,self.MenuName or self.Name,ttstaskname,ThreatLevelText, targets, CoordText)
|
||||
else
|
||||
ThreatLocaleTextTTS = self.gettext:GetEntry("NOTHREATTEXTTTS",self.locale)
|
||||
ttstext = string.format(ThreatLocaleTextTTS,ttsplayername,self.MenuName or self.Name)
|
||||
end
|
||||
|
||||
-- POINTERTARGETLASINGTTS = ". Pointer over target and lasing."
|
||||
|
||||
if task.Type == AUFTRAG.Type.PRECISIONBOMBING and self.precisionbombing then
|
||||
if LasingDrone and LasingDrone.playertask.inreach and LasingDrone:IsLasing() then
|
||||
local lasingtext = self.gettext:GetEntry("POINTERTARGETLASINGTTS",self.locale)
|
||||
@@ -3951,15 +4001,25 @@ function PLAYERTASKCONTROLLER:_SmokeTask(Group, Client)
|
||||
local text = ""
|
||||
if self.TasksPerPlayer:HasUniqueID(playername) then
|
||||
local task = self.TasksPerPlayer:ReadByID(playername) -- Ops.PlayerTask#PLAYERTASK
|
||||
task:SmokeTarget()
|
||||
local textmark = self.gettext:GetEntry("SMOKETASK",self.locale)
|
||||
text = string.format(textmark, ttsplayername, self.MenuName or self.Name, task.PlayerTaskNr)
|
||||
self:T(self.lid..text)
|
||||
--local m=MESSAGE:New(text,"10","Tasking"):ToAll()
|
||||
if self.UseSRS then
|
||||
self.SRSQueue:NewTransmission(text,nil,self.SRS,nil,2)
|
||||
if task.CanSmoke == true then
|
||||
task:SmokeTarget()
|
||||
local textmark = self.gettext:GetEntry("SMOKETASK",self.locale)
|
||||
text = string.format(textmark, ttsplayername, self.MenuName or self.Name, task.PlayerTaskNr)
|
||||
self:T(self.lid..text)
|
||||
--local m=MESSAGE:New(text,"10","Tasking"):ToAll()
|
||||
if self.UseSRS then
|
||||
self.SRSQueue:NewTransmission(text,nil,self.SRS,nil,2)
|
||||
end
|
||||
self:__TaskTargetSmoked(5,task)
|
||||
else
|
||||
local textmark = self.gettext:GetEntry("NOSMOKETASK",self.locale)
|
||||
text = string.format(textmark, ttsplayername, self.MenuName or self.Name, task.PlayerTaskNr)
|
||||
self:T(self.lid..text)
|
||||
--local m=MESSAGE:New(text,"10","Tasking"):ToAll()
|
||||
if self.UseSRS then
|
||||
self.SRSQueue:NewTransmission(text,nil,self.SRS,nil,2)
|
||||
end
|
||||
end
|
||||
self:__TaskTargetSmoked(5,task)
|
||||
else
|
||||
text = self.gettext:GetEntry("NOACTIVETASK",self.locale)
|
||||
end
|
||||
@@ -4793,22 +4853,27 @@ end
|
||||
-- @param #string Event
|
||||
-- @param #string To
|
||||
-- @param Ops.PlayerTask#PLAYERTASK Task
|
||||
-- @param #boolean Silent If true, suppress message output on cancel.
|
||||
-- @return #PLAYERTASKCONTROLLER self
|
||||
function PLAYERTASKCONTROLLER:onafterTaskCancelled(From, Event, To, Task)
|
||||
function PLAYERTASKCONTROLLER:onafterTaskCancelled(From, Event, To, Task, Silent)
|
||||
self:T({From, Event, To})
|
||||
self:T(self.lid.."TaskCancelled")
|
||||
local canceltxt = self.gettext:GetEntry("TASKCANCELLED",self.locale)
|
||||
local canceltxttts = self.gettext:GetEntry("TASKCANCELLEDTTS",self.locale)
|
||||
local taskname = string.format(canceltxt, Task.PlayerTaskNr, tostring(Task.Type))
|
||||
if not self.NoScreenOutput then
|
||||
self:_SendMessageToClients(taskname,15)
|
||||
--local m = MESSAGE:New(taskname,15,"Tasking"):ToCoalition(self.Coalition)
|
||||
if Silent ~= true then
|
||||
local canceltxt = self.gettext:GetEntry("TASKCANCELLED",self.locale)
|
||||
local canceltxttts = self.gettext:GetEntry("TASKCANCELLEDTTS",self.locale)
|
||||
local taskname = string.format(canceltxt, Task.PlayerTaskNr, tostring(Task.Type))
|
||||
|
||||
if self.NoScreenOutput ~= true then
|
||||
self:_SendMessageToClients(taskname,15)
|
||||
--local m = MESSAGE:New(taskname,15,"Tasking"):ToCoalition(self.Coalition)
|
||||
end
|
||||
|
||||
if self.UseSRS then
|
||||
taskname = string.format(canceltxttts, self.MenuName or self.Name, Task.PlayerTaskNr, tostring(Task.TTSType))
|
||||
self.SRSQueue:NewTransmission(taskname,nil,self.SRS,nil,2)
|
||||
end
|
||||
|
||||
end
|
||||
if self.UseSRS then
|
||||
taskname = string.format(canceltxttts, self.MenuName or self.Name, Task.PlayerTaskNr, tostring(Task.TTSType))
|
||||
self.SRSQueue:NewTransmission(taskname,nil,self.SRS,nil,2)
|
||||
end
|
||||
|
||||
local clients=Task:GetClientObjects()
|
||||
for _,client in pairs(clients) do
|
||||
self:_RemoveMenuEntriesForTask(Task,client)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -4271,18 +4271,56 @@ function UTILS.SpawnFARPAndFunctionalStatics(Name,Coordinate,FARPType,Coalition,
|
||||
local FarpVec2 = Coordinate:GetVec2()
|
||||
|
||||
if NumberPads > 1 then
|
||||
local Grid = UTILS.GenerateGridPoints(FarpVec2, NumberPads, SpacingX, SpacingY)
|
||||
local Grid = UTILS.GenerateGridPoints(FarpVec2, NumberPads, SpacingX, SpacingY)
|
||||
local groupData = {
|
||||
["visible"] = true,
|
||||
["hidden"] = false,
|
||||
["units"] = {},
|
||||
["y"] = 0, -- Group center latitude
|
||||
["x"] = 0, -- Group center longitude
|
||||
["name"] = Name,
|
||||
}
|
||||
local unitData = {
|
||||
["category"] = "Heliports",
|
||||
["type"] = STypeName, -- FARP type
|
||||
["y"] = 0, -- Latitude coordinate (meters)
|
||||
["x"] = 0, -- Longitude coordinate (meters)
|
||||
["name"] = Name,
|
||||
["heading"] = 0, -- Heading in radians
|
||||
["heliport_modulation"] = mod, -- 0 = AM, 1 = FM
|
||||
["heliport_frequency"] = freq, -- Radio frequency in MHz
|
||||
["heliport_callsign_id"] = callsign, -- Callsign ID
|
||||
["dead"] = false,
|
||||
["shape_name"] = SShapeName,
|
||||
["dynamicSpawn"] = DynamicSpawns,
|
||||
["allowHotStart"] = HotStart,
|
||||
}
|
||||
for id,gridpoint in ipairs(Grid) do
|
||||
-- Spawn FARP
|
||||
local location = COORDINATE:NewFromVec2(gridpoint)
|
||||
local newfarp = SPAWNSTATIC:NewFromType(STypeName,"Heliports",Country) -- "Invisible FARP" "FARP"
|
||||
newfarp:InitShape(SShapeName) -- "invisiblefarp" "FARPS"
|
||||
newfarp:InitFARP(callsign,freq,mod,DynamicSpawns,HotStart)
|
||||
local spawnedfarp = newfarp:SpawnFromCoordinate(location,0,Name.."-"..id)
|
||||
table.insert(ReturnObjects,spawnedfarp)
|
||||
|
||||
PopulateStorage(Name.."-"..id,liquids,equip,airframes)
|
||||
end
|
||||
local UnitTemplate = UTILS.DeepCopy(unitData)
|
||||
UnitTemplate.x = gridpoint.x
|
||||
UnitTemplate.y = gridpoint.y
|
||||
if id > 1 then UnitTemplate.name = Name.."-"..id end
|
||||
table.insert(groupData.units,UnitTemplate)
|
||||
if id==1 then
|
||||
groupData.x = gridpoint.x
|
||||
groupData.y = gridpoint.y
|
||||
end
|
||||
end
|
||||
--BASE:I("Spawning FARP")
|
||||
--UTILS.PrintTableToLog(groupData,1)
|
||||
local Static=coalition.addGroup(Country, -1, groupData)
|
||||
-- Currently DCS >= 2.8 does not trigger birth events if FARPS are spawned!
|
||||
-- We create such an event. The airbase is registered in Core.Event
|
||||
local Event = {
|
||||
id = EVENTS.Birth,
|
||||
time = timer.getTime(),
|
||||
initiator = Static
|
||||
}
|
||||
-- Create BIRTH event.
|
||||
world.onEvent(Event)
|
||||
|
||||
PopulateStorage(Name.."-1",liquids,equip,airframes)
|
||||
else
|
||||
-- Spawn FARP
|
||||
local newfarp = SPAWNSTATIC:NewFromType(STypeName,"Heliports",Country) -- "Invisible FARP" "FARP"
|
||||
|
||||
@@ -108,8 +108,9 @@ DYNAMICCARGO.State = {
|
||||
-- @type DYNAMICCARGO.AircraftTypes
|
||||
DYNAMICCARGO.AircraftTypes = {
|
||||
["CH-47Fbl1"] = "CH-47Fbl1",
|
||||
["Mi-8MTV2"] = "CH-47Fbl1",
|
||||
["Mi-8MT"] = "CH-47Fbl1",
|
||||
["Mi-8MTV2"] = "Mi-8MTV2",
|
||||
["Mi-8MT"] = "Mi-8MT",
|
||||
["C-130J-30"] = "C-130J-30",
|
||||
}
|
||||
|
||||
--- Helo types possible.
|
||||
@@ -122,23 +123,29 @@ DYNAMICCARGO.AircraftDimensions = {
|
||||
["length"] = 11,
|
||||
["ropelength"] = 30,
|
||||
},
|
||||
["Mi-8MTV2"] = {
|
||||
["Mi-8MTV2"] = {
|
||||
["width"] = 6,
|
||||
["height"] = 6,
|
||||
["length"] = 15,
|
||||
["ropelength"] = 30,
|
||||
},
|
||||
["Mi-8MT"] = {
|
||||
["Mi-8MT"] = {
|
||||
["width"] = 6,
|
||||
["height"] = 6,
|
||||
["length"] = 15,
|
||||
["ropelength"] = 30,
|
||||
},
|
||||
["C-130J-30"] = {
|
||||
["width"] = 4,
|
||||
["height"] = 12,
|
||||
["length"] = 35,
|
||||
["ropelength"] = 0,
|
||||
},
|
||||
}
|
||||
|
||||
--- DYNAMICCARGO class version.
|
||||
-- @field #string version
|
||||
DYNAMICCARGO.version="0.0.9"
|
||||
DYNAMICCARGO.version="0.1.0"
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
-- TODO list
|
||||
|
||||
@@ -1058,9 +1058,12 @@ function GROUP:GetTypeName()
|
||||
local DCSGroup = self:GetDCSObject()
|
||||
|
||||
if DCSGroup then
|
||||
local GroupTypeName = DCSGroup:getUnit(1):getTypeName()
|
||||
--self:T3( GroupTypeName )
|
||||
return( GroupTypeName )
|
||||
local unit = DCSGroup:getUnit(1)
|
||||
if unit then
|
||||
local GroupTypeName = unit:getTypeName()
|
||||
--self:T3( GroupTypeName )
|
||||
return( GroupTypeName )
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -1075,9 +1078,12 @@ function GROUP:GetNatoReportingName()
|
||||
local DCSGroup = self:GetDCSObject()
|
||||
|
||||
if DCSGroup then
|
||||
local GroupTypeName = DCSGroup:getUnit(1):getTypeName()
|
||||
--self:T3( GroupTypeName )
|
||||
return UTILS.GetReportingName(GroupTypeName)
|
||||
local unit = DCSGroup:getUnit(1)
|
||||
if unit then
|
||||
local GroupTypeName = unit:getTypeName()
|
||||
--self:T3( GroupTypeName )
|
||||
return UTILS.GetReportingName(GroupTypeName)
|
||||
end
|
||||
end
|
||||
|
||||
return "Bogey"
|
||||
@@ -1093,9 +1099,12 @@ function GROUP:GetPlayerName()
|
||||
local DCSGroup = self:GetDCSObject()
|
||||
|
||||
if DCSGroup then
|
||||
local PlayerName = DCSGroup:getUnit(1):getPlayerName()
|
||||
--self:T3( PlayerName )
|
||||
return( PlayerName )
|
||||
local unit = DCSGroup:getUnit(1)
|
||||
if unit then
|
||||
local PlayerName = unit:getPlayerName()
|
||||
--self:T3( PlayerName )
|
||||
return( PlayerName )
|
||||
end
|
||||
end
|
||||
|
||||
return nil
|
||||
@@ -1111,9 +1120,12 @@ function GROUP:GetCallsign()
|
||||
local DCSGroup = self:GetDCSObject()
|
||||
|
||||
if DCSGroup then
|
||||
local GroupCallSign = DCSGroup:getUnit(1):getCallsign()
|
||||
--self:T3( GroupCallSign )
|
||||
return GroupCallSign
|
||||
local unit = DCSGroup:getUnit(1)
|
||||
if unit then
|
||||
local GroupCallSign = unit:getCallsign()
|
||||
--self:T3( GroupCallSign )
|
||||
return GroupCallSign
|
||||
end
|
||||
end
|
||||
|
||||
BASE:E( { "Cannot GetCallsign", Positionable = self, Alive = self:IsAlive() } )
|
||||
|
||||
@@ -170,6 +170,27 @@ function IDENTIFIABLE:GetCoalition()
|
||||
return nil
|
||||
end
|
||||
|
||||
--- Returns true if identifiable is of RED coalition.
|
||||
-- @param #IDENTIFIABLE self
|
||||
-- @return #boolean If the identifiable is red.
|
||||
function IDENTIFIABLE:IsRed()
|
||||
return self:GetCoalition() == coalition.side.RED
|
||||
end
|
||||
|
||||
--- Returns true if identifiable is of BLUE coalition.
|
||||
-- @param #IDENTIFIABLE self
|
||||
-- @return #boolean If the identifiable is blue.
|
||||
function IDENTIFIABLE:IsBlue()
|
||||
return self:GetCoalition() == coalition.side.BLUE
|
||||
end
|
||||
|
||||
--- Returns true if identifiable is of NEUTRAL coalition.
|
||||
-- @param #IDENTIFIABLE self
|
||||
-- @return #boolean If the identifiable is neutral.
|
||||
function IDENTIFIABLE:IsNeutral()
|
||||
return self:GetCoalition() == coalition.side.NEUTRAL
|
||||
end
|
||||
|
||||
--- Returns the name of the coalition of the Identifiable.
|
||||
-- @param #IDENTIFIABLE self
|
||||
-- @return #string The name of the coalition.
|
||||
|
||||
@@ -1923,6 +1923,7 @@ do -- Cargo
|
||||
["HL_DSHK"] = 6*POSITIONABLE.DefaultInfantryWeight,
|
||||
["CCKW_353"] = 16*POSITIONABLE.DefaultInfantryWeight, --GMC CCKW 2½-ton 6×6 truck, estimating 16 soldiers,
|
||||
["MaxxPro_MRAP"] = 7*POSITIONABLE.DefaultInfantryWeight,
|
||||
["Sd_Kfz_251"] = 10*POSITIONABLE.DefaultInfantryWeight,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user