diff --git a/Moose Development/Moose/Core/Database.lua b/Moose Development/Moose/Core/Database.lua index 133c55a60..6b19d7ae3 100644 --- a/Moose Development/Moose/Core/Database.lua +++ b/Moose Development/Moose/Core/Database.lua @@ -327,20 +327,17 @@ do -- Zones Zone=ZONE_POLYGON_BASE:New(ZoneName, ZoneData.verticies) - for i,vec2 in pairs(ZoneData.verticies) do - local coord=COORDINATE:NewFromVec2(vec2) - coord:MarkToAll(string.format("%s Point %d", ZoneName, i)) - end + --for i,vec2 in pairs(ZoneData.verticies) do + -- local coord=COORDINATE:NewFromVec2(vec2) + -- coord:MarkToAll(string.format("%s Point %d", ZoneName, i)) + --end end if Zone then - -- Debug output. - --self:I({"Register ZONE: %s (", Name = ZoneName}) - + -- Store color of zone. Zone.Color=color - -- Store in DB. self.ZONENAMES[ZoneName] = ZoneName diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 94683b74f..18c7986fc 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -2186,21 +2186,26 @@ do -- COORDINATE -- @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. function COORDINATE:MarkupToAllFreeForm(Coordinates, Coalition, Color, Alpha, FillColor, FillAlpha, LineType, ReadOnly, Text) + local MarkID = UTILS.GetMarkID() if ReadOnly==nil then ReadOnly=false end + Coalition=Coalition or -1 + Color=Color or {1,0,0} Color[4]=Alpha or 1.0 + LineType=LineType or 1 - FillColor=FillColor or Color + + FillColor=FillColor or UTILS.DeepCopy(Color) FillColor[4]=FillAlpha or 0.15 local vecs={} - table.insert(vecs, self:GetVec3()) - for _,coord in ipairs(Coordinates) do - table.insert(vecs, coord:GetVec3()) + vecs[1]=self:GetVec3() + for i,coord in ipairs(Coordinates) do + vecs[i+1]=coord:GetVec3() end if #vecs<3 then diff --git a/README.md b/README.md index 976a47f96..b622326a8 100644 --- a/README.md +++ b/README.md @@ -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 -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