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")
|
||||
local newstate = true
|
||||
-- set optional in case we\'re deactivating
|
||||
if not NewState or NewState == false then
|
||||
newstate = false
|
||||
if NewState ~= nil then
|
||||
newstate = NewState
|
||||
end
|
||||
|
||||
-- get correct table
|
||||
local zone = ZoneType -- #CTLD.CargoZone
|
||||
local table = {}
|
||||
if zone.type == CTLD.CargoZoneType.LOAD then
|
||||
if ZoneType == CTLD.CargoZoneType.LOAD then
|
||||
table = self.pickupZones
|
||||
elseif zone.type == CTLD.CargoZoneType.DROP then
|
||||
elseif ZoneType == CTLD.CargoZoneType.DROP then
|
||||
table = self.dropOffZones
|
||||
else
|
||||
table = self.wpZones
|
||||
@ -1864,6 +1864,7 @@ function CTLD:ActivateZone(Name,ZoneType,NewState)
|
||||
return self
|
||||
end
|
||||
|
||||
|
||||
--- User function - Deactivate Name #CTLD.CargoZoneType ZoneType for this CTLD instance.
|
||||
-- @param #CTLD self
|
||||
-- @param #string Name Name of the zone to change in the ME.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user