Improved menu interaction and added pinning functionality (#23)
* Improved menu interaction * Added Overview message * Added Pinning functionality. Pinning a mission so you can easily pull up the briefing again. * Added "Clear View" command to get rid of the message on the screen.
This commit is contained in:
@@ -22,7 +22,10 @@ function BlueSam.New(database, logger, zoneName)
|
||||
do
|
||||
local groups = database:getBlueSamGroupsInZone(zoneName)
|
||||
|
||||
---@type table<string, Vec3>
|
||||
local blueUnitsPos = {}
|
||||
|
||||
---@type table<string, Vec3>
|
||||
local redUnitsPos = {}
|
||||
|
||||
for _, groupName in pairs(groups) do
|
||||
@@ -53,7 +56,7 @@ function BlueSam.New(database, logger, zoneName)
|
||||
local cleanup_distance = 5
|
||||
for blueUnitName, blueUnitPos in pairs(blueUnitsPos) do
|
||||
for redUnitName, redUnitPos in pairs(redUnitsPos) do
|
||||
local distance = Spearhead.Util.VectorDistance(blueUnitPos, redUnitPos)
|
||||
local distance = Spearhead.Util.VectorDistance3d(blueUnitPos, redUnitPos)
|
||||
env.info("distance: " .. tostring(distance))
|
||||
if distance <= cleanup_distance then
|
||||
self._cleanupUnits[redUnitName] = true
|
||||
|
||||
@@ -31,7 +31,11 @@ function StageBase.New(databaseManager, logger, airbaseName)
|
||||
self._initialSide = Spearhead.DcsUtil.getStartingCoalition(self._airbase)
|
||||
|
||||
do --init
|
||||
|
||||
---@type table<string, Vec3>
|
||||
local redUnitsPos = {}
|
||||
|
||||
---@type table<string, Vec3>
|
||||
local blueUnitsPos = {}
|
||||
|
||||
do -- fill tables
|
||||
@@ -72,7 +76,7 @@ function StageBase.New(databaseManager, logger, airbaseName)
|
||||
|
||||
for blueUnitName, blueUnitPos in pairs(blueUnitsPos) do
|
||||
for redUnitName, redUnitPos in pairs(redUnitsPos) do
|
||||
local distance = Spearhead.Util.VectorDistance(blueUnitPos, redUnitPos)
|
||||
local distance = Spearhead.Util.VectorDistance3d(blueUnitPos, redUnitPos)
|
||||
env.info("distance: " .. tostring(distance))
|
||||
if distance <= cleanup_distance then
|
||||
self._cleanup_units[redUnitName] = true
|
||||
|
||||
Reference in New Issue
Block a user