mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2025-11-25 19:31:01 +00:00
Added "cover me!" and additional "engage target" wingman commands
This commit is contained in:
parent
65e1c72824
commit
32d009b959
@ -278,36 +278,38 @@ Library.radioMessages = {
|
||||
"Command, confirm grid on objective $1."
|
||||
},
|
||||
playerWingmanEngageAirDefense = {
|
||||
"Flight, prioritize air defense, engage now.",
|
||||
"Flight, take down air defense systems.",
|
||||
"Flight, suppress air defense threats.",
|
||||
"Flight, air defense is yours, take it out.",
|
||||
"Flight, eliminate air defense positions."
|
||||
},
|
||||
"Flight, prioritize $1, engage now.",
|
||||
"Flight, take down $1 systems.",
|
||||
"Flight, suppress $1 threats.",
|
||||
"Flight, $1 is yours, take it out.",
|
||||
"Flight, eliminate $1 positions."
|
||||
}, -- "$1" should be "air defense" in audio version
|
||||
playerWingmanEngageBandits = {
|
||||
"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."
|
||||
"Flight, engage $1.",
|
||||
"Flight, you're cleared hot on $1.",
|
||||
"Flight, commit on $1 when ready.",
|
||||
"Flight, engage $1, your discretion.",
|
||||
"Flight, you're free to engage $1."
|
||||
}, -- "$1" should be "bandits" in audio version
|
||||
playerWingmanCoverMe = {
|
||||
"Flight, need cover now.",
|
||||
"Flight, keep my six clean.",
|
||||
"Flight, engaged defensive, cover me!",
|
||||
"Flight, break off and clear my tail.",
|
||||
"Flight, keep bandits off me."
|
||||
},
|
||||
playerWingmanEngageGround = {
|
||||
"Flight, engage ground targets.",
|
||||
"Flight, prosecute ground targets ahead.",
|
||||
"Flight, engage all ground contacts.",
|
||||
"Flight, strike vehicle positions.",
|
||||
"Flight, take the lead on ground targets.",
|
||||
},
|
||||
playerWingmanEngageHelicopters = {
|
||||
"Flight, you're cleared to prosecute helos.",
|
||||
"Flight, engage helos at your discretion.",
|
||||
"Flight, engage rotary contacts, break when done.",
|
||||
},
|
||||
"Flight, engage $1 targets.",
|
||||
"Flight, prosecute $1 targets ahead.",
|
||||
"Flight, engage all $1 contacts.",
|
||||
"Flight, strike $1 positions.",
|
||||
"Flight, take the lead on $1 targets.",
|
||||
}, -- "$1" should be "ground" in audio version
|
||||
playerWingmanEngageShips = {
|
||||
"Flight, engage enemy vessels now.",
|
||||
"Flight, strike ships in your sector.",
|
||||
"Flight, take the lead on sea targets.",
|
||||
},
|
||||
"Flight, engage enemy $1 now.",
|
||||
"Flight, strike $1 in your sector.",
|
||||
"Flight, take the lead on enemy $1.",
|
||||
}, -- "$1" should be "ships" in audio version
|
||||
playerWingmanGoToMarker = {
|
||||
"Flight, proceed to waypoint.",
|
||||
"Flight, push to the hold point now.",
|
||||
|
||||
@ -6,30 +6,25 @@
|
||||
TUM.wingmenMenu = {}
|
||||
|
||||
do
|
||||
local function radioCommandReportContacts()
|
||||
local function radioCommandCoverMe(args)
|
||||
local player = world:getPlayer()
|
||||
if not player then return false end
|
||||
TUM.radio.playForAll("playerWingmanReportContacts", nil, player:getCallsign(), false)
|
||||
if not player then return end
|
||||
|
||||
TUM.wingmenTasking.commandReportContacts(nil, false, true)
|
||||
TUM.radio.playForAll("playerWingmanCoverMe"..args.radioMessageSuffix, nil, player:getCallsign(), false)
|
||||
|
||||
TUM.wingmenTasking.commandEngage(Group.Category.AIRPLANE, { "Fighters", "Interceptors", "Multirole fighters" } , true)
|
||||
end
|
||||
|
||||
local function radioCommandEngage(args)
|
||||
local player = world:getPlayer()
|
||||
if not player then return end
|
||||
|
||||
TUM.radio.playForAll("playerWingmanEngage"..args.radioMessageSuffix, nil, player:getCallsign(), false)
|
||||
args.radioTargetName = args.radioTargetName or "hostile"
|
||||
|
||||
TUM.radio.playForAll("playerWingmanEngage"..args.radioMessageSuffix, { args.radioTargetName }, player:getCallsign(), false)
|
||||
TUM.wingmenTasking.commandEngage(args.category, args.attributes, true)
|
||||
end
|
||||
|
||||
local function radioCommandReportStatus()
|
||||
local player = world:getPlayer()
|
||||
if not player then return end
|
||||
TUM.radio.playForAll("playerWingmanReportStatus", nil, player:getCallsign(), false)
|
||||
|
||||
TUM.wingmenTasking.commandReportStatus(true)
|
||||
end
|
||||
|
||||
local function radioCommandGoToMapMarker()
|
||||
local player = world:getPlayer()
|
||||
if not player then return end
|
||||
@ -54,18 +49,67 @@ do
|
||||
TUM.wingmenTasking.commandRejoin(nil, true)
|
||||
end
|
||||
|
||||
local function radioCommandReportContacts()
|
||||
local player = world:getPlayer()
|
||||
if not player then return false end
|
||||
TUM.radio.playForAll("playerWingmanReportContacts", nil, player:getCallsign(), false)
|
||||
|
||||
TUM.wingmenTasking.commandReportContacts(nil, false, true)
|
||||
end
|
||||
|
||||
local function radioCommandReportStatus()
|
||||
local player = world:getPlayer()
|
||||
if not player then return end
|
||||
TUM.radio.playForAll("playerWingmanReportStatus", nil, player:getCallsign(), false)
|
||||
|
||||
TUM.wingmenTasking.commandReportStatus(true)
|
||||
end
|
||||
|
||||
function TUM.wingmenMenu.create()
|
||||
if TUM.settings.getValue(TUM.settings.id.MULTIPLAYER) then return end -- No wingmen in multiplayer
|
||||
-- TODO: if WINGMEN_COUNT == 0 then return end
|
||||
|
||||
local rootPath = missionCommands.addSubMenu("✈ Flight")
|
||||
missionCommands.addCommand("Cover me!", rootPath, radioCommandCoverMe, nil)
|
||||
|
||||
local isWW2 = (TUM.settings.getValue(TUM.settings) == DCSEx.enums.timePeriod.WORLD_WAR_2)
|
||||
|
||||
------------------------------------------------------
|
||||
-- "Engage targets" submenu
|
||||
------------------------------------------------------
|
||||
local engagePath = missionCommands.addSubMenu("Engage", rootPath)
|
||||
missionCommands.addCommand("Bandits", engagePath, radioCommandEngage, { attributes = nil, category = Group.Category.HELICOPTER, radioMessageSuffix = "Bandits" })
|
||||
missionCommands.addCommand("Helicopters", engagePath, radioCommandEngage, { attributes = nil, category = Group.Category.HELICOPTER, radioMessageSuffix = "Helicopters" })
|
||||
missionCommands.addCommand("Air defense", engagePath, radioCommandEngage, { attributes = { "Air Defence" }, category = Group.Category.GROUND, radioMessageSuffix = "AirDefense" })
|
||||
missionCommands.addCommand("Ground targets", engagePath, radioCommandEngage, { attributes = {"Tanks", "Trucks", "Artillery", "IFV", "APC"}, category = Group.Category.GROUND, radioMessageSuffix = "Ground" })
|
||||
missionCommands.addCommand("Ships", engagePath, radioCommandEngage, { attributes = nil, category = Group.Category.SHIP, radioMessageSuffix = "Ships" })
|
||||
local engageSubPath = nil
|
||||
|
||||
-- Aircraft -- (radioTargetName must be plural)
|
||||
missionCommands.addCommand("Any aircraft", engagePath, radioCommandEngage, { attributes = nil, category = Group.Category.AIRPLANE, radioMessageSuffix = "Bandits", radioTargetName = "bandits" })
|
||||
engageSubPath = missionCommands.addSubMenu("Aircraft", rootPath)
|
||||
missionCommands.addCommand("Fighters", engageSubPath, radioCommandEngage, { attributes = { "Fighters", "Interceptors", "Multirole fighters" }, category = Group.Category.AIRPLANE, radioMessageSuffix = "Bandits", radioTargetName = "fighters" })
|
||||
missionCommands.addCommand("Bombers and transports", engageSubPath, radioCommandEngage, { attributes = nil, category = Group.Category.AIRPLANE, radioMessageSuffix = "Bandits", radioTargetName = "strategic aircraft" })
|
||||
if not isWW2 then missionCommands.addCommand("Helicopters", engageSubPath, radioCommandEngage, { attributes = nil, category = Group.Category.HELICOPTER, radioMessageSuffix = "Bandits", radioTargetName = "helos" }) end
|
||||
|
||||
-- Ground -- (radioTargetName must be singular)
|
||||
missionCommands.addCommand("Any ground", engagePath, radioCommandEngage, { attributes = {"Tanks", "Trucks", "Artillery", "IFV", "APC"}, category = Group.Category.GROUND, radioMessageSuffix = "Ground", radioTargetName = "ground" })
|
||||
engageSubPath = missionCommands.addSubMenu("Ground", rootPath)
|
||||
missionCommands.addCommand("Armor", engageSubPath, radioCommandEngage, { attributes = {"Tanks", "IFV", "APC"}, category = Group.Category.GROUND, radioMessageSuffix = "Ground", radioTargetName = "armor" })
|
||||
missionCommands.addCommand("Artillery", engageSubPath, radioCommandEngage, { attributes = {"Artillery"}, category = Group.Category.GROUND, radioMessageSuffix = "Ground", radioTargetName = "artillery" })
|
||||
missionCommands.addCommand("Trucks", engageSubPath, radioCommandEngage, { attributes = {"Trucks"}, category = Group.Category.GROUND, radioMessageSuffix = "Ground", radioTargetName = "unarmed" })
|
||||
|
||||
-- Air defense -- (radioTargetName must be singular)
|
||||
missionCommands.addCommand("Any air defense", engagePath, radioCommandEngage, { attributes = { "Air Defence" }, category = Group.Category.GROUND, radioMessageSuffix = "AirDefense", radioTargetName = "air defense" })
|
||||
engageSubPath = missionCommands.addSubMenu("Air defense", rootPath)
|
||||
missionCommands.addCommand("AAA", engageSubPath, radioCommandEngage, { attributes = { "AAA" }, category = Group.Category.GROUND, radioMessageSuffix = "AirDefense", radioTargetName = "AAA" })
|
||||
if not isWW2 then
|
||||
missionCommands.addCommand("MANPADS", engageSubPath, radioCommandEngage, { attributes = { "SR SAM", "IR Guided SAM" }, category = Group.Category.GROUND, radioMessageSuffix = "AirDefense", radioTargetName = "MANPADS" })
|
||||
missionCommands.addCommand("Short range SAMs", engageSubPath, radioCommandEngage, { attributes = { "SR SAM", "IR Guided SAM" }, category = Group.Category.GROUND, radioMessageSuffix = "AirDefense", radioTargetName = "SHORAD" })
|
||||
missionCommands.addCommand("Long-range SAMs", engageSubPath, radioCommandEngage, { attributes = { "LR SAM", "MR SAM" }, category = Group.Category.GROUND, radioMessageSuffix = "AirDefense", radioTargetName = "HIMAD" })
|
||||
end
|
||||
|
||||
-- Ships -- (radioTargetName must be plural)
|
||||
missionCommands.addCommand("Any ship", engagePath, radioCommandEngage, { attributes = nil, category = Group.Category.SHIP, radioMessageSuffix = "Ships", radioTargetName = "ships" })
|
||||
engageSubPath = missionCommands.addSubMenu("Ships", rootPath)
|
||||
missionCommands.addCommand("Armed ships", engageSubPath, radioCommandEngage, { attributes = { "Armed ships" }, category = Group.Category.SHIP, radioMessageSuffix = "Ships", radioTargetName = "armed ships" })
|
||||
missionCommands.addCommand("Cargo ships", engageSubPath, radioCommandEngage, { attributes = { "Unarmed ships" }, category = Group.Category.SHIP, radioMessageSuffix = "Ships", radioTargetName = "cargo ships" })
|
||||
------------------------------------------------------
|
||||
|
||||
missionCommands.addCommand("Report contacts", rootPath, radioCommandReportContacts, nil)
|
||||
missionCommands.addCommand("Status", rootPath, radioCommandReportStatus, nil)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user