mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-07-16 14:12:47 +00:00
Merge remote-tracking branch 'origin/master-ng' into develop
This commit is contained in:
@@ -4097,7 +4097,7 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
|
||||
-- Get name of template group.
|
||||
local templategroupname=group:GetName()
|
||||
local unit = group:GetUnit(1)
|
||||
local Descriptors= (unit and unit:IsAlive()) and unit:GetDesc() or {}
|
||||
local Descriptors= (unit and unit:IsAlive()~=nil) and unit:GetDesc() or {}
|
||||
local Category=group:GetCategory()
|
||||
local TypeName=group:GetTypeName() or "none"
|
||||
local SpeedMax=group:GetSpeedMax()
|
||||
@@ -4115,7 +4115,7 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
|
||||
for _i,_unit in pairs(group:GetUnits()) do
|
||||
local unit=_unit --Wrapper.Unit#UNIT
|
||||
local Desc=unit:GetDesc()
|
||||
|
||||
|
||||
-- Weight. We sum up all units in the group.
|
||||
local unitweight=forceweight or Desc.massEmpty
|
||||
if unitweight then
|
||||
|
||||
@@ -1119,12 +1119,11 @@ function TARS_SESSION:FindTargets()
|
||||
local searchzone = self.searchzone -- Core.Zone#ZONE_BASE
|
||||
or ZONE_RADIUS:New("TARS Debug", coordinate:GetVec2(), scan_radius)
|
||||
|
||||
--if searchzone then
|
||||
if searchzone.DrawID then searchzone:UndrawZone() end
|
||||
searchzone:UpdateFromVec2(coordinate:GetVec2(), scan_radius)
|
||||
searchzone:DrawZone(-1, {0, 0, 1}, 1, {0, 1, 0}, .2, 2, true)
|
||||
self.searchzone = searchzone
|
||||
--end
|
||||
if searchzone.DrawID then searchzone:UndrawZone() end
|
||||
searchzone:UpdateFromVec2(coordinate:GetVec2(), scan_radius)
|
||||
searchzone:DrawZone(-1, {0, 0, 1}, 1, {0, 1, 0}, .2, 2, true)
|
||||
self.searchzone = searchzone
|
||||
self:ScheduleOnce(30, ZONE_BASE.UndrawZone, searchzone)
|
||||
end
|
||||
|
||||
if self.PilotParameterHelper == true then
|
||||
|
||||
Reference in New Issue
Block a user