mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
#CTLD
* added a check for zones; not added when zone does not exist
This commit is contained in:
parent
3a6c52ae73
commit
ff0f1c4c24
@ -1074,7 +1074,7 @@ CTLD.UnitTypes = {
|
|||||||
|
|
||||||
--- CTLD class version.
|
--- CTLD class version.
|
||||||
-- @field #string version
|
-- @field #string version
|
||||||
CTLD.version="1.0.15"
|
CTLD.version="1.0.16"
|
||||||
|
|
||||||
--- Instantiate a new CTLD.
|
--- Instantiate a new CTLD.
|
||||||
-- @param #CTLD self
|
-- @param #CTLD self
|
||||||
@ -3405,7 +3405,13 @@ end
|
|||||||
-- @return #CTLD self
|
-- @return #CTLD self
|
||||||
function CTLD:AddCTLDZone(Name, Type, Color, Active, HasBeacon, Shiplength, Shipwidth)
|
function CTLD:AddCTLDZone(Name, Type, Color, Active, HasBeacon, Shiplength, Shipwidth)
|
||||||
self:T(self.lid .. " AddCTLDZone")
|
self:T(self.lid .. " AddCTLDZone")
|
||||||
|
|
||||||
|
local zone = ZONE:FindByName(Name)
|
||||||
|
if not zone then
|
||||||
|
self:E(self.lid.."**** Zone does not exist: "..Name)
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
local ctldzone = {} -- #CTLD.CargoZone
|
local ctldzone = {} -- #CTLD.CargoZone
|
||||||
ctldzone.active = Active or false
|
ctldzone.active = Active or false
|
||||||
ctldzone.color = Color or SMOKECOLOR.Red
|
ctldzone.color = Color or SMOKECOLOR.Red
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user