mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Added "engage bandits" wingman command
This commit is contained in:
parent
d259f8f94c
commit
d05f460f1f
@ -70,6 +70,20 @@ Library.radioMessages = {
|
|||||||
pilotWarningMANPADS = { "MANPADS launch! Flare, flare, flare!", "Flight, MANPADS in the air. Dump flares, now!", "Coming from the ground, MANPADS hot!", "Go defensive, MANPADS off your nose! Flare, flare!", "MANPADS just came up from the deck, break hard and pop everything!" },
|
pilotWarningMANPADS = { "MANPADS launch! Flare, flare, flare!", "Flight, MANPADS in the air. Dump flares, now!", "Coming from the ground, MANPADS hot!", "Go defensive, MANPADS off your nose! Flare, flare!", "MANPADS just came up from the deck, break hard and pop everything!" },
|
||||||
pilotWarningSAMLaunch = { "Spike! SAM just launched, break!", "SAM up! Defensive now!", "Launch! SAM, coming fast, pump chaff, go cold!", "SAM in the air, break hard!", "SAM fired, visual smoke! Extend, extend!" },
|
pilotWarningSAMLaunch = { "Spike! SAM just launched, break!", "SAM up! Defensive now!", "Launch! SAM, coming fast, pump chaff, go cold!", "SAM in the air, break hard!", "SAM fired, visual smoke! Extend, extend!" },
|
||||||
|
|
||||||
|
pilotWingmanEngageBandits = {
|
||||||
|
"Copy, engaging now.",
|
||||||
|
"Tally one, pressing.",
|
||||||
|
"Roger, comitting.",
|
||||||
|
"Confirm, going after him.",
|
||||||
|
"Affirm, moving in on bandits."
|
||||||
|
},
|
||||||
|
pilotWingmanEngageNoTarget = {
|
||||||
|
"Negative tally, unable engage.",
|
||||||
|
"Cannot comply, blind on target.",
|
||||||
|
"No joy on targets, cannot proceed.",
|
||||||
|
"Negative contact, unable to commit.",
|
||||||
|
"That's a no, not seeing any targets."
|
||||||
|
},
|
||||||
pilotWingmanOrbit = {
|
pilotWingmanOrbit = {
|
||||||
"Wilco, holding here.",
|
"Wilco, holding here.",
|
||||||
"Copy, orbiting now.",
|
"Copy, orbiting now.",
|
||||||
@ -201,6 +215,13 @@ Library.radioMessages = {
|
|||||||
"Command, pass coordinates for objective $1.",
|
"Command, pass coordinates for objective $1.",
|
||||||
"Command, confirm grid on objective $1."
|
"Command, confirm grid on objective $1."
|
||||||
},
|
},
|
||||||
|
playerFlightEngageBandits = {
|
||||||
|
"Flight, engage bandits.",
|
||||||
|
"Flight, you're cleared hot bandits.",
|
||||||
|
"Flight, commit on bandits when ready.",
|
||||||
|
"Flight, engage bandits, your discretion.",
|
||||||
|
"Flight, you're free to engage bandits."
|
||||||
|
},
|
||||||
playerFlightOrbit = {
|
playerFlightOrbit = {
|
||||||
"Flight, orbit my position.",
|
"Flight, orbit my position.",
|
||||||
"Flight, set up an orbit on me.",
|
"Flight, set up an orbit on me.",
|
||||||
@ -208,7 +229,7 @@ Library.radioMessages = {
|
|||||||
"Flight, anchor on my current pos.",
|
"Flight, anchor on my current pos.",
|
||||||
"Flight, orbit overhead"
|
"Flight, orbit overhead"
|
||||||
},
|
},
|
||||||
playerFlightRejoin =
|
playerFlightRejoin =
|
||||||
{
|
{
|
||||||
"Flight, rejoin my side",
|
"Flight, rejoin my side",
|
||||||
"Flight, push it up, rejoin formation.",
|
"Flight, push it up, rejoin formation.",
|
||||||
|
|||||||
@ -9,6 +9,7 @@ do
|
|||||||
TUM.supportWingmen.orderID = {
|
TUM.supportWingmen.orderID = {
|
||||||
ORBIT = 1,
|
ORBIT = 1,
|
||||||
REJOIN = 2,
|
REJOIN = 2,
|
||||||
|
ENGAGE_BANDITS = 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
local wingmenGroupID = nil
|
local wingmenGroupID = nil
|
||||||
@ -21,6 +22,8 @@ do
|
|||||||
TUM.radio.playForAll("playerFlightOrbit", nil, player:getCallsign(), false)
|
TUM.radio.playForAll("playerFlightOrbit", nil, player:getCallsign(), false)
|
||||||
elseif orderID == TUM.supportWingmen.orderID.REJOIN then
|
elseif orderID == TUM.supportWingmen.orderID.REJOIN then
|
||||||
TUM.radio.playForAll("playerFlightRejoin", nil, player:getCallsign(), false)
|
TUM.radio.playForAll("playerFlightRejoin", nil, player:getCallsign(), false)
|
||||||
|
elseif orderID == TUM.supportWingmen.orderID.ENGAGE_BANDITS then
|
||||||
|
TUM.radio.playForAll("playerFlightEngageBandits", nil, player:getCallsign(), false)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not wingmenGroupID then return end
|
if not wingmenGroupID then return end
|
||||||
@ -55,6 +58,22 @@ do
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
TUM.radio.playForAll("pilotWingmanRejoin", nil, wingmanCallsign, true)
|
TUM.radio.playForAll("pilotWingmanRejoin", nil, wingmanCallsign, true)
|
||||||
|
elseif orderID == TUM.supportWingmen.orderID.ENGAGE_BANDITS then
|
||||||
|
local banditGroups = coalition.getGroups(TUM.settings.getEnemyCoalition(), Group.Category.AIRPLANE)
|
||||||
|
if not banditGroups or #banditGroups == 0 then
|
||||||
|
TUM.radio.playForAll("pilotWingmanEngageNoTarget", nil, wingmanCallsign, true)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- TODO: sort by nearest
|
||||||
|
local targetGroup = banditGroups[1]
|
||||||
|
|
||||||
|
taskTable = {
|
||||||
|
id = "AttackGroup",
|
||||||
|
params = {
|
||||||
|
groupId = DCSEx.dcs.getObjectIDAsNumber(targetGroup),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
TUM.radio.playForAll("pilotWingmanEngageBandits", nil, wingmanCallsign, true)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not taskTable then return end
|
if not taskTable then return end
|
||||||
@ -109,6 +128,8 @@ do
|
|||||||
if TUM.settings.getValue(TUM.settings.id.MULTIPLAYER) then return end -- No wingmen in multiplayer
|
if TUM.settings.getValue(TUM.settings.id.MULTIPLAYER) then return end -- No wingmen in multiplayer
|
||||||
|
|
||||||
local rootPath = missionCommands.addSubMenu("Flight")
|
local rootPath = missionCommands.addSubMenu("Flight")
|
||||||
|
|
||||||
|
missionCommands.addCommand("Engage bandits", rootPath, doWingmenOrder, TUM.supportWingmen.orderID.ENGAGE_BANDITS)
|
||||||
missionCommands.addCommand("Orbit", rootPath, doWingmenOrder, TUM.supportWingmen.orderID.ORBIT)
|
missionCommands.addCommand("Orbit", rootPath, doWingmenOrder, TUM.supportWingmen.orderID.ORBIT)
|
||||||
missionCommands.addCommand("Rejoin", rootPath, doWingmenOrder, TUM.supportWingmen.orderID.REJOIN)
|
missionCommands.addCommand("Rejoin", rootPath, doWingmenOrder, TUM.supportWingmen.orderID.REJOIN)
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user