diff --git a/Moose Development/Moose/Core/Zone.lua b/Moose Development/Moose/Core/Zone.lua index 6de72c546..891e5fc7d 100644 --- a/Moose Development/Moose/Core/Zone.lua +++ b/Moose Development/Moose/Core/Zone.lua @@ -927,7 +927,7 @@ function ZONE_RADIUS:Scan( ObjectCategories, UnitCategories ) local ZoneCoord = self:GetCoordinate() local ZoneRadius = self:GetRadius() - self:F({ZoneCoord = ZoneCoord, ZoneRadius = ZoneRadius, ZoneCoordLL = ZoneCoord:ToStringLLDMS()}) + --self:F({ZoneCoord = ZoneCoord, ZoneRadius = ZoneRadius, ZoneCoordLL = ZoneCoord:ToStringLLDMS()}) local SphereSearch = { id = world.VolumeType.SPHERE, @@ -2924,7 +2924,7 @@ do -- ZONE_ELASTIC --- Add a set of groups. Positions of the group will be considered as polygon vertices when contructing the convex hull. -- @param #ZONE_ELASTIC self - -- @param Core.Set#SET_GROUP SetGroup Set of groups. + -- @param Core.Set#SET_GROUP GroupSet Set of groups. -- @return #ZONE_ELASTIC self function ZONE_ELASTIC:AddSetGroup(GroupSet) diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index f398d7902..73cddf307 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -2040,9 +2040,9 @@ function UTILS.GenerateUHFrequencies() local _start = 220000000 while _start < 399000000 do - if _start ~= 243000000 then - table.insert(FreeUHFFrequencies, _start) - end + if _start ~= 243000000 then + table.insert(FreeUHFFrequencies, _start) + end _start = _start + 500000 end diff --git a/Moose Development/Moose/Wrapper/Positionable.lua b/Moose Development/Moose/Wrapper/Positionable.lua index 9e599a8c4..21dd5f633 100644 --- a/Moose Development/Moose/Wrapper/Positionable.lua +++ b/Moose Development/Moose/Wrapper/Positionable.lua @@ -703,11 +703,11 @@ function POSITIONABLE:IsSubmarine() if DCSUnit then local UnitDescriptor = DCSUnit:getDesc() - if UnitDescriptor.attributes["Submarines"] == true then - return true - else - return false - end + if UnitDescriptor.attributes["Submarines"] == true then + return true + else + return false + end end self:E( { "Cannot check IsSubmarine", Positionable = self, Alive = self:IsAlive() } ) diff --git a/Moose Development/Moose/Wrapper/Unit.lua b/Moose Development/Moose/Wrapper/Unit.lua index 414027a3e..e5490a312 100644 --- a/Moose Development/Moose/Wrapper/Unit.lua +++ b/Moose Development/Moose/Wrapper/Unit.lua @@ -89,9 +89,9 @@ -- -- @field #UNIT UNIT = { - ClassName="UNIT", - UnitName=nil, - GroupName=nil, + ClassName="UNIT", + UnitName=nil, + GroupName=nil, } @@ -325,14 +325,19 @@ function UNIT:IsAlive() local DCSUnit = self:GetDCSObject() -- DCS#Unit if DCSUnit then - local UnitIsAlive = DCSUnit:isExist() and DCSUnit:isActive() + local UnitIsAlive = DCSUnit:isExist() and DCSUnit:isActive() -- and DCSUnit:getLife() > 1 return UnitIsAlive end return nil end - +--- Returns if the Unit is dead. +-- @param #UNIT self +-- @return #boolean `true` if Unit is dead, else false or nil if the unit does not exist +function UNIT:IsDead() + return not self:IsAlive() +end --- Returns the Unit's callsign - the localized string. -- @param #UNIT self @@ -626,7 +631,7 @@ function UNIT:IsFuelSupply() return false end ---- Returns the unit's group if it exist and nil otherwise. +--- Returns the unit's group if it exists and nil otherwise. -- @param Wrapper.Unit#UNIT self -- @return Wrapper.Group#GROUP The Group of the Unit or `nil` if the unit does not exist. function UNIT:GetGroup()