Switched to using constants for colors

This commit is contained in:
Pax1601
2024-10-20 17:01:28 +02:00
parent 7fa39561e3
commit 4946807d88
6 changed files with 106 additions and 66 deletions

View File

@@ -381,25 +381,50 @@ function Olympus.move(groupName, lat, lng, altitude, altitudeType, speed, speedT
end
Olympus.debug("Olympus.move executed successfully on Helicopter", 2)
elseif category == "GroundUnit" then
local startPoint = mist.getLeadPos(group)
local endPoint = coord.LLtoLO(lat, lng, 0)
local bearing = math.atan2(endPoint.z - startPoint.z, endPoint.x - startPoint.x)
vars = {
group = group,
point = endPoint,
heading = bearing,
speed = speed
}
local action = "Off Road"
local disableRoads = true
if taskOptions and taskOptions['id'] == 'FollowRoads' and taskOptions['value'] == true then
vars["disableRoads"] = false
else
vars["form"] = "Off Road"
vars["disableRoads"] = true
action = "On Road"
disableRoads = false
end
missionTask = {
id = 'Mission',
params = {
route = {
points = {
[1] = {
type = "Turning Point",
action = action,
disableRoads = disableRoads,
x = endPoint.x,
y = endPoint.z,
speed = speed,
speed_locked = false,
ETA_locked = false,
name = 'Mission1',
},
[2] = {
type = "Turning Point",
action = action,
disableRoads = disableRoads,
x = endPoint.x,
y = endPoint.z,
speed = speed,
speed_locked = false,
ETA_locked = false,
name = 'Mission1',
},
}
},
}
}
local groupCon = group:getController()
if groupCon then
groupCon:setTask(missionTask)
end
mist.groupToRandomPoint(vars)
Olympus.debug("Olympus.move executed successfully on GroundUnit", 2)
elseif category == "NavyUnit" then
local startPoint = mist.getLeadPos(group)