mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-08-15 10:47:21 +00:00
Autolase - fixed error when not using a pilotset
This commit is contained in:
parent
6fe2422bc9
commit
e7e2184760
@ -109,7 +109,7 @@ AUTOLASE = {
|
|||||||
|
|
||||||
--- AUTOLASE class version.
|
--- AUTOLASE class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
AUTOLASE.version = "0.0.9"
|
AUTOLASE.version = "0.0.10"
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
-- Begin Functional.Autolase.lua
|
-- Begin Functional.Autolase.lua
|
||||||
@ -297,13 +297,15 @@ end
|
|||||||
-- @param #AUTOLASE self
|
-- @param #AUTOLASE self
|
||||||
-- @return #AUTOLASE self
|
-- @return #AUTOLASE self
|
||||||
function AUTOLASE:SetPilotMenu()
|
function AUTOLASE:SetPilotMenu()
|
||||||
local pilottable = self.pilotset:GetSetObjects() or {}
|
if self.usepilotset then
|
||||||
for _,_unit in pairs (pilottable) do
|
local pilottable = self.pilotset:GetSetObjects() or {}
|
||||||
local Unit = _unit -- Wrapper.Unit#UNIT
|
for _,_unit in pairs (pilottable) do
|
||||||
if Unit and Unit:IsAlive() then
|
local Unit = _unit -- Wrapper.Unit#UNIT
|
||||||
local Group = Unit:GetGroup()
|
if Unit and Unit:IsAlive() then
|
||||||
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Autolase Status",nil,self.ShowStatus,self,Group)
|
local Group = Unit:GetGroup()
|
||||||
lasemenu:Refresh()
|
local lasemenu = MENU_GROUP_COMMAND:New(Group,"Autolase Status",nil,self.ShowStatus,self,Group)
|
||||||
|
lasemenu:Refresh()
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return self
|
return self
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user