From 0e3f175ee706990589d56c39e3d891369f1aa585 Mon Sep 17 00:00:00 2001 From: Ambroise Garel <47314805+akaAgar@users.noreply.github.com> Date: Wed, 23 Jul 2025 20:40:57 +0200 Subject: [PATCH] "New aircraft taking off" radio messages now mention the relative position to the player --- Script/The Universal Mission/AirForce.lua | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/Script/The Universal Mission/AirForce.lua b/Script/The Universal Mission/AirForce.lua index 792cbe1..c185ce0 100644 --- a/Script/The Universal Mission/AirForce.lua +++ b/Script/The Universal Mission/AirForce.lua @@ -91,6 +91,8 @@ do if not groupInfo then return false end table.insert(fighterGroups[side], groupInfo.groupID) + local players = coalition.getPlayers(TUM.settings.getPlayerCoalition()) + if side == TUM.settings.getPlayerCoalition() then local newUnit = nil local newGroup = DCSEx.world.getGroupByID(groupInfo.groupID) @@ -103,9 +105,19 @@ do typeName = Library.objectNames.get(newUnit) end - TUM.radio.playForCoalition(TUM.settings.getPlayerCoalition(), "pilotNewFriendlyAircraft", { typeName, launchAirbase:getName() }, callsign) + for _,p in ipairs(players) do + local abInfo = launchAirbase:getName() + abInfo = abInfo.." ("..DCSEx.dcs.getBRAA(launchAirbase:getPoint(), p:getPoint(), false, false, true).." from you)" + + TUM.radio.playForUnit(DCSEx.dcs.getObjectIDAsNumber(p), "pilotNewFriendlyAircraft", { typeName, abInfo }, callsign) + end else - TUM.radio.playForCoalition(TUM.settings.getPlayerCoalition(), "commandNewEnemyAircraft", { tostring(groupSize), launchAirbase:getName() }, "Command") + for _,p in ipairs(players) do + local abInfo = launchAirbase:getName() + abInfo = abInfo.." ("..DCSEx.dcs.getBRAA(launchAirbase:getPoint(), p:getPoint(), false, false, true).." from you)" + + TUM.radio.playForUnit(DCSEx.dcs.getObjectIDAsNumber(p), "commandNewEnemyAircraft", { tostring(groupSize), abInfo }, "Command") + end end return true