mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
xxx
This commit is contained in:
@@ -74,7 +74,7 @@
|
|||||||
-- @image Designation.JPG
|
-- @image Designation.JPG
|
||||||
--
|
--
|
||||||
-- Date: 24 Oct 2021
|
-- Date: 24 Oct 2021
|
||||||
-- Last Update: Oct 2023
|
-- Last Update: Jan 2024
|
||||||
--
|
--
|
||||||
--- Class AUTOLASE
|
--- Class AUTOLASE
|
||||||
-- @type AUTOLASE
|
-- @type AUTOLASE
|
||||||
@@ -87,6 +87,7 @@
|
|||||||
-- @field Core.Set#SET_GROUP RecceSet
|
-- @field Core.Set#SET_GROUP RecceSet
|
||||||
-- @field #table LaserCodes
|
-- @field #table LaserCodes
|
||||||
-- @field #table playermenus
|
-- @field #table playermenus
|
||||||
|
-- @field #boolean smokemenu
|
||||||
-- @extends Ops.Intel#INTEL
|
-- @extends Ops.Intel#INTEL
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -97,6 +98,7 @@ AUTOLASE = {
|
|||||||
verbose = 0,
|
verbose = 0,
|
||||||
alias = "",
|
alias = "",
|
||||||
debug = false,
|
debug = false,
|
||||||
|
smokemenu = true,
|
||||||
}
|
}
|
||||||
|
|
||||||
--- Laser spot info
|
--- Laser spot info
|
||||||
@@ -115,7 +117,7 @@ AUTOLASE = {
|
|||||||
|
|
||||||
--- AUTOLASE class version.
|
--- AUTOLASE class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
AUTOLASE.version = "0.1.22"
|
AUTOLASE.version = "0.1.23"
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Begin Functional.Autolase.lua
|
-- Begin Functional.Autolase.lua
|
||||||
@@ -202,6 +204,7 @@ function AUTOLASE:New(RecceSet, Coalition, Alias, PilotSet)
|
|||||||
self.blacklistattributes = {}
|
self.blacklistattributes = {}
|
||||||
self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
|
self:SetLaserCodes( { 1688, 1130, 4785, 6547, 1465, 4578 } ) -- set self.LaserCodes
|
||||||
self.playermenus = {}
|
self.playermenus = {}
|
||||||
|
self.smokemenu = true
|
||||||
|
|
||||||
-- Set some string id for output to DCS.log file.
|
-- Set some string id for output to DCS.log file.
|
||||||
self.lid=string.format("AUTOLASE %s (%s) | ", self.alias, self.coalition and UTILS.GetCoalitionName(self.coalition) or "unknown")
|
self.lid=string.format("AUTOLASE %s (%s) | ", self.alias, self.coalition and UTILS.GetCoalitionName(self.coalition) or "unknown")
|
||||||
@@ -329,9 +332,11 @@ function AUTOLASE:SetPilotMenu()
|
|||||||
local lasetopm = MENU_GROUP:New(Group,"Autolase",nil)
|
local lasetopm = MENU_GROUP:New(Group,"Autolase",nil)
|
||||||
self.playermenus[unitname] = lasetopm
|
self.playermenus[unitname] = lasetopm
|
||||||
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit)
|
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Status",lasetopm,self.ShowStatus,self,Group,Unit)
|
||||||
local smoke = (self.smoketargets == true) and "off" or "on"
|
if self.smokemenu then
|
||||||
local smoketext = string.format("Switch smoke targets to %s",smoke)
|
local smoke = (self.smoketargets == true) and "off" or "on"
|
||||||
local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets))
|
local smoketext = string.format("Switch smoke targets to %s",smoke)
|
||||||
|
local smokemenu = MENU_GROUP_COMMAND:New(Group,smoketext,lasetopm,self.SetSmokeTargets,self,(not self.smoketargets))
|
||||||
|
end
|
||||||
for _,_grp in pairs(self.RecceSet.Set) do
|
for _,_grp in pairs(self.RecceSet.Set) do
|
||||||
local grp = _grp -- Wrapper.Group#GROUP
|
local grp = _grp -- Wrapper.Group#GROUP
|
||||||
local unit = grp:GetUnit(1)
|
local unit = grp:GetUnit(1)
|
||||||
@@ -581,6 +586,23 @@ function AUTOLASE:SetSmokeTargets(OnOff,Color)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- (User) Show the "Switch smoke target..." menu entry for pilots. On by default.
|
||||||
|
-- @param #AUTOLASE self
|
||||||
|
-- @return #AUTOLASE self
|
||||||
|
function AUTOLASE:EnableSmokeMenu()
|
||||||
|
self.smokemenu = true
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
--- (User) Do not show the "Switch smoke target..." menu entry for pilots.
|
||||||
|
-- @param #AUTOLASE self
|
||||||
|
-- @return #AUTOLASE self
|
||||||
|
function AUTOLASE:DisableSmokeMenu()
|
||||||
|
self.smokemenu = false
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- (Internal) Function to calculate line of sight.
|
--- (Internal) Function to calculate line of sight.
|
||||||
-- @param #AUTOLASE self
|
-- @param #AUTOLASE self
|
||||||
-- @param Wrapper.Unit#UNIT Unit
|
-- @param Wrapper.Unit#UNIT Unit
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ PLAYERTASK = {
|
|||||||
|
|
||||||
--- PLAYERTASK class version.
|
--- PLAYERTASK class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
PLAYERTASK.version="0.1.22"
|
PLAYERTASK.version="0.1.23"
|
||||||
|
|
||||||
--- Generic task condition.
|
--- Generic task condition.
|
||||||
-- @type PLAYERTASK.Condition
|
-- @type PLAYERTASK.Condition
|
||||||
@@ -2609,6 +2609,7 @@ function PLAYERTASKCONTROLLER:_CheckPrecisionTasks()
|
|||||||
-- not done yet
|
-- not done yet
|
||||||
local dcoord = self.LasingDrone:GetCoordinate()
|
local dcoord = self.LasingDrone:GetCoordinate()
|
||||||
local tcoord = task.Target:GetCoordinate()
|
local tcoord = task.Target:GetCoordinate()
|
||||||
|
tcoord.y = tcoord.y + 2
|
||||||
local dist = dcoord:Get2DDistance(tcoord)
|
local dist = dcoord:Get2DDistance(tcoord)
|
||||||
-- close enough?
|
-- close enough?
|
||||||
if dist < 3000 and not self.LasingDrone:IsLasing() then
|
if dist < 3000 and not self.LasingDrone:IsLasing() then
|
||||||
@@ -3192,7 +3193,7 @@ function PLAYERTASKCONTROLLER:_ActiveTaskInfo(Task, Group, Client)
|
|||||||
local islasing = self.LasingDrone:IsLasing() == true and yes or no
|
local islasing = self.LasingDrone:IsLasing() == true and yes or no
|
||||||
local prectext = self.gettext:GetEntry("POINTERTARGETREPORT",self.locale)
|
local prectext = self.gettext:GetEntry("POINTERTARGETREPORT",self.locale)
|
||||||
prectext = string.format(prectext,inreach,islasing)
|
prectext = string.format(prectext,inreach,islasing)
|
||||||
text = text .. prectext
|
text = text .. prectext.."("..self.LaserCode..")"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
-- Buddylasing
|
-- Buddylasing
|
||||||
|
|||||||
Reference in New Issue
Block a user