Merge branch 'develop' into FF/Ops

This commit is contained in:
Frank
2021-05-20 23:27:05 +02:00
3 changed files with 15 additions and 13 deletions

View File

@@ -327,20 +327,17 @@ do -- Zones
Zone=ZONE_POLYGON_BASE:New(ZoneName, ZoneData.verticies) Zone=ZONE_POLYGON_BASE:New(ZoneName, ZoneData.verticies)
for i,vec2 in pairs(ZoneData.verticies) do --for i,vec2 in pairs(ZoneData.verticies) do
local coord=COORDINATE:NewFromVec2(vec2) -- local coord=COORDINATE:NewFromVec2(vec2)
coord:MarkToAll(string.format("%s Point %d", ZoneName, i)) -- coord:MarkToAll(string.format("%s Point %d", ZoneName, i))
end --end
end end
if Zone then if Zone then
-- Debug output. -- Store color of zone.
--self:I({"Register ZONE: %s (", Name = ZoneName})
Zone.Color=color Zone.Color=color
-- Store in DB. -- Store in DB.
self.ZONENAMES[ZoneName] = ZoneName self.ZONENAMES[ZoneName] = ZoneName

View File

@@ -2186,21 +2186,26 @@ do -- COORDINATE
-- @param #string Text (Optional) Text displayed when mark is added. Default none. -- @param #string Text (Optional) Text displayed when mark is added. Default none.
-- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again. -- @return #number The resulting Mark ID, which is a number. Can be used to remove the object again.
function COORDINATE:MarkupToAllFreeForm(Coordinates, Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly, Text) function COORDINATE:MarkupToAllFreeForm(Coordinates, Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly, Text)
local MarkID = UTILS.GetMarkID() local MarkID = UTILS.GetMarkID()
if ReadOnly==nil then if ReadOnly==nil then
ReadOnly=false ReadOnly=false
end end
Coalition=Coalition or -1 Coalition=Coalition or -1
Color=Color or {1,0,0} Color=Color or {1,0,0}
Color[4]=Alpha or 1.0 Color[4]=Alpha or 1.0
LineType=LineType or 1 LineType=LineType or 1
FillColor=FillColor or Color
FillColor=FillColor or UTILS.DeepCopy(Color)
FillColor[4]=FillAlpha or 0.15 FillColor[4]=FillAlpha or 0.15
local vecs={} local vecs={}
table.insert(vecs, self:GetVec3()) vecs[1]=self:GetVec3()
for _,coord in ipairs(Coordinates) do for i,coord in ipairs(Coordinates) do
table.insert(vecs, coord:GetVec3()) vecs[i+1]=coord:GetVec3()
end end
if #vecs<3 then if #vecs<3 then

View File

@@ -30,7 +30,7 @@ This repository contains the source lua code of the MOOSE framework.
### [MOOSE_INCLUDE](https://github.com/FlightControl-Master/MOOSE_INCLUDE) - For use and generated ### [MOOSE_INCLUDE](https://github.com/FlightControl-Master/MOOSE_INCLUDE) - For use and generated
This repository contains the Moose.lua file to be included within your missions. This repository contains the Moose.lua file to be included within your missions. Note that the Moose\_.lua is technically the same as Moose.lua, but without any commentary or unnecessary whitespace in it. You only need to load **one** of those at the beginning of your mission.
### [MOOSE_DOCS](https://github.com/FlightControl-Master/MOOSE_DOCS) - Not for use ### [MOOSE_DOCS](https://github.com/FlightControl-Master/MOOSE_DOCS) - Not for use