Compare commits
4
Commits
9ce22b0c13
...
9baed7be1b
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9baed7be1b | ||
|
|
1c88738494 | ||
|
|
5389029648 | ||
|
|
59a450bb18 |
Binary file not shown.
@@ -2,13 +2,14 @@ local script_list =
|
|||||||
{
|
{
|
||||||
-- Load order must be correct
|
-- Load order must be correct
|
||||||
-- "mist.lua", --mist_4_5_122
|
-- "mist.lua", --mist_4_5_122
|
||||||
"Moose_.lua",
|
-- "Moose_.lua",
|
||||||
'mist_4_5_126.lua',
|
'mist_4_5_126.lua',
|
||||||
'Localizations.lua',
|
'Localizations.lua',
|
||||||
'Utils.lua',
|
'Utils.lua',
|
||||||
-- "spawnListener.lua",
|
-- "spawnListener.lua",
|
||||||
"RadioManager.lua",
|
"RadioManager.lua",
|
||||||
"Buta's_Airboss.lua",
|
"Buta's_Airboss.lua",
|
||||||
|
"Range.lua",
|
||||||
-- "Airboss[CN].lua",
|
-- "Airboss[CN].lua",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,38 @@ Range = {
|
|||||||
|
|
||||||
do
|
do
|
||||||
function Range:New()
|
function Range:New()
|
||||||
|
local zoneGroupNamePrefix = 'RangeZone'
|
||||||
|
for i=1,10,1 do
|
||||||
|
local zoneGroupName = zoneGroupNamePrefix..i
|
||||||
|
local points = Utils.getWayPoints(zoneGroupName)
|
||||||
|
if not points then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
|
||||||
|
for j=1,100,1 do
|
||||||
|
local sectionName = '-Urban-'..j
|
||||||
|
|
||||||
|
points = Utils.getWayPoints(zoneGroupName..sectionName)
|
||||||
|
if points then
|
||||||
|
Range.drawPolygon(points)
|
||||||
|
trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName)
|
||||||
|
end
|
||||||
|
|
||||||
|
sectionName = '-Tree-'..j
|
||||||
|
points = Utils.getWayPoints(zoneGroupName..sectionName)
|
||||||
|
if points then
|
||||||
|
Range.drawPolygon(points)
|
||||||
|
trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName)
|
||||||
|
end
|
||||||
|
|
||||||
|
sectionName = '-Open-'..j
|
||||||
|
points = Utils.getWayPoints(zoneGroupName..sectionName)
|
||||||
|
if points then
|
||||||
|
Range.drawPolygon(points)
|
||||||
|
trigger.action.textToAll(-1,Utils.getMarkID(),Utils.makeVec3(points[1]),{1,1,1,1},{0,0,0,0},8,false,sectionName)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -40,6 +72,26 @@ do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function Range.drawPolygon(points)
|
||||||
|
local regionPolygonID = Utils.getMarkID()
|
||||||
|
|
||||||
|
if #points == 3 then
|
||||||
|
trigger.action.rectToAll(-1,regionPolygonID,points[1],points[2],points[3],{0,1,0,1},{0,1,0,0.3},1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if #points == 4 then
|
||||||
|
trigger.action.quadToAll(-1,regionPolygonID,
|
||||||
|
points[1],
|
||||||
|
points[2],
|
||||||
|
points[3],
|
||||||
|
points[4],
|
||||||
|
{0,1,0,1},{0,1,0,0.3},1)
|
||||||
|
end
|
||||||
|
|
||||||
|
if #points > 4 then
|
||||||
|
Utils.drawPolygon(-1,regionPolygonID,points,{0,1,0,1},{0,1,0,0.3},1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
Range:New()
|
||||||
end
|
end
|
||||||
+4
-1
@@ -11,10 +11,12 @@ do
|
|||||||
for i,value in ipairs(Utils.MapMarkIDs) do
|
for i,value in ipairs(Utils.MapMarkIDs) do
|
||||||
if value then
|
if value then
|
||||||
result = i
|
result = i
|
||||||
|
Utils.MapMarkIDs[i] = false
|
||||||
|
break
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if result == nil then
|
if not result then
|
||||||
result = #Utils.MapMarkIDs + 1
|
result = #Utils.MapMarkIDs + 1
|
||||||
Utils.MapMarkIDs[result] = false
|
Utils.MapMarkIDs[result] = false
|
||||||
end
|
end
|
||||||
@@ -321,6 +323,7 @@ do
|
|||||||
function Utils.drawPolygon(Coalition,MarkID,vecs,Color,FillColor,LineType,ReadOnly,Text)
|
function Utils.drawPolygon(Coalition,MarkID,vecs,Color,FillColor,LineType,ReadOnly,Text)
|
||||||
local s=string.format("trigger.action.markupToAll(7, %d, %d,", Coalition, MarkID)
|
local s=string.format("trigger.action.markupToAll(7, %d, %d,", Coalition, MarkID)
|
||||||
for _,vec in pairs(vecs) do
|
for _,vec in pairs(vecs) do
|
||||||
|
vec = Utils.makeVec3(vec)
|
||||||
--s=s..string.format("%s,", UTILS._OneLineSerialize(vec))
|
--s=s..string.format("%s,", UTILS._OneLineSerialize(vec))
|
||||||
s=s..string.format("{x=%.1f, y=%.1f, z=%.1f},", vec.x, vec.y, vec.z)
|
s=s..string.format("{x=%.1f, y=%.1f, z=%.1f},", vec.x, vec.y, vec.z)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user