mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
fix CTLD:ActivateZone not processing default correctly and using wrong zone table (#1575)
This commit is contained in:
parent
96d1d3cb66
commit
6690f70b05
@ -1840,15 +1840,15 @@ function CTLD:ActivateZone(Name,ZoneType,NewState)
|
|||||||
self:T(self.lid .. " AddZone")
|
self:T(self.lid .. " AddZone")
|
||||||
local newstate = true
|
local newstate = true
|
||||||
-- set optional in case we\'re deactivating
|
-- set optional in case we\'re deactivating
|
||||||
if not NewState or NewState == false then
|
if NewState ~= nil then
|
||||||
newstate = false
|
newstate = NewState
|
||||||
end
|
end
|
||||||
|
|
||||||
-- get correct table
|
-- get correct table
|
||||||
local zone = ZoneType -- #CTLD.CargoZone
|
|
||||||
local table = {}
|
local table = {}
|
||||||
if zone.type == CTLD.CargoZoneType.LOAD then
|
if ZoneType == CTLD.CargoZoneType.LOAD then
|
||||||
table = self.pickupZones
|
table = self.pickupZones
|
||||||
elseif zone.type == CTLD.CargoZoneType.DROP then
|
elseif ZoneType == CTLD.CargoZoneType.DROP then
|
||||||
table = self.dropOffZones
|
table = self.dropOffZones
|
||||||
else
|
else
|
||||||
table = self.wpZones
|
table = self.wpZones
|
||||||
@ -1864,6 +1864,7 @@ function CTLD:ActivateZone(Name,ZoneType,NewState)
|
|||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
--- User function - Deactivate Name #CTLD.CargoZoneType ZoneType for this CTLD instance.
|
--- User function - Deactivate Name #CTLD.CargoZoneType ZoneType for this CTLD instance.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
-- @param #string Name Name of the zone to change in the ME.
|
-- @param #string Name Name of the zone to change in the ME.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user