mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2026-08-20 17:07:54 +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.
|
-- Get name of template group.
|
||||||
local templategroupname=group:GetName()
|
local templategroupname=group:GetName()
|
||||||
local unit = group:GetUnit(1)
|
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 Category=group:GetCategory()
|
||||||
local TypeName=group:GetTypeName() or "none"
|
local TypeName=group:GetTypeName() or "none"
|
||||||
local SpeedMax=group:GetSpeedMax()
|
local SpeedMax=group:GetSpeedMax()
|
||||||
@@ -4115,7 +4115,7 @@ function WAREHOUSE:_RegisterAsset(group, ngroups, forceattribute, forcecargobay,
|
|||||||
for _i,_unit in pairs(group:GetUnits()) do
|
for _i,_unit in pairs(group:GetUnits()) do
|
||||||
local unit=_unit --Wrapper.Unit#UNIT
|
local unit=_unit --Wrapper.Unit#UNIT
|
||||||
local Desc=unit:GetDesc()
|
local Desc=unit:GetDesc()
|
||||||
|
|
||||||
-- Weight. We sum up all units in the group.
|
-- Weight. We sum up all units in the group.
|
||||||
local unitweight=forceweight or Desc.massEmpty
|
local unitweight=forceweight or Desc.massEmpty
|
||||||
if unitweight then
|
if unitweight then
|
||||||
|
|||||||
@@ -1119,12 +1119,11 @@ function TARS_SESSION:FindTargets()
|
|||||||
local searchzone = self.searchzone -- Core.Zone#ZONE_BASE
|
local searchzone = self.searchzone -- Core.Zone#ZONE_BASE
|
||||||
or ZONE_RADIUS:New("TARS Debug", coordinate:GetVec2(), scan_radius)
|
or ZONE_RADIUS:New("TARS Debug", coordinate:GetVec2(), scan_radius)
|
||||||
|
|
||||||
--if searchzone then
|
if searchzone.DrawID then searchzone:UndrawZone() end
|
||||||
if searchzone.DrawID then searchzone:UndrawZone() end
|
searchzone:UpdateFromVec2(coordinate:GetVec2(), scan_radius)
|
||||||
searchzone:UpdateFromVec2(coordinate:GetVec2(), scan_radius)
|
searchzone:DrawZone(-1, {0, 0, 1}, 1, {0, 1, 0}, .2, 2, true)
|
||||||
searchzone:DrawZone(-1, {0, 0, 1}, 1, {0, 1, 0}, .2, 2, true)
|
self.searchzone = searchzone
|
||||||
self.searchzone = searchzone
|
self:ScheduleOnce(30, ZONE_BASE.UndrawZone, searchzone)
|
||||||
--end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if self.PilotParameterHelper == true then
|
if self.PilotParameterHelper == true then
|
||||||
|
|||||||
Reference in New Issue
Block a user