mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added backend for advanced commands
This commit is contained in:
@@ -139,8 +139,41 @@ function Olympus.buildTask(options)
|
||||
pattern = options['pattern'] or "Circle"
|
||||
}
|
||||
}
|
||||
elseif options['id'] == 'Bombing' and options['lat'] and options['lng'] then
|
||||
task = {
|
||||
id = 'Bombing',
|
||||
params = {
|
||||
point = coord.LLtoLO(options['lat'], options['lng'], 0),
|
||||
attackQty = 1
|
||||
}
|
||||
}
|
||||
elseif options['id'] == 'CarpetBombing' and options['lat'] and options['lng'] then
|
||||
task = {
|
||||
id = 'CarpetBombing',
|
||||
params = {
|
||||
point = coord.LLtoLO(options['lat'], options['lng'], 0),
|
||||
attackQty = 1,
|
||||
carpetLength = 1000,
|
||||
attackType = 'Carpet'
|
||||
}
|
||||
}
|
||||
elseif options['id'] == 'AttackMapObject' and options['lat'] and options['lng'] then
|
||||
task = {
|
||||
id = 'AttackMapObject',
|
||||
params = {
|
||||
point = coord.LLtoLO(options['lat'], options['lng'], 0),
|
||||
}
|
||||
}
|
||||
end
|
||||
elseif options['id'] == 'FireAtPoint' and options['lat'] and options['lng'] and options['radius'] then
|
||||
task = {
|
||||
id = 'AttackMapObject',
|
||||
params = {
|
||||
point = coord.LLtoLO(options['lat'], options['lng'], 0),
|
||||
radius = options['radius']
|
||||
}
|
||||
}
|
||||
end
|
||||
end
|
||||
return task
|
||||
end
|
||||
|
||||
@@ -238,6 +271,12 @@ function Olympus.smoke(color, lat, lng)
|
||||
trigger.action.smoke(mist.utils.makeVec3GL(coord.LLtoLO(lat, lng, 0)), colorEnum)
|
||||
end
|
||||
|
||||
-- Creates an explosion on the ground
|
||||
function Olympus.explosion(intensity, lat, lng)
|
||||
Olympus.debug("Olympus.explosion " .. intensity .. " (" .. lat .. ", " .. lng ..")", 2)
|
||||
trigger.action.explosion(mist.utils.makeVec3GL(coord.LLtoLO(lat, lng, 0)), intensity)
|
||||
end
|
||||
|
||||
-- Spawns a single ground unit
|
||||
function Olympus.spawnGroundUnit(coalition, unitType, lat, lng)
|
||||
Olympus.debug("Olympus.spawnGroundUnit " .. coalition .. " " .. unitType .. " (" .. lat .. ", " .. lng ..")", 2)
|
||||
|
||||
Reference in New Issue
Block a user