mirror of
https://github.com/akaAgar/the-universal-mission-for-dcs-world.git
synced 2026-08-30 11:16:01 +00:00
"New aircraft taking off" radio messages now mention the relative position to the player
This commit is contained in:
@@ -91,6 +91,8 @@ do
|
|||||||
if not groupInfo then return false end
|
if not groupInfo then return false end
|
||||||
table.insert(fighterGroups[side], groupInfo.groupID)
|
table.insert(fighterGroups[side], groupInfo.groupID)
|
||||||
|
|
||||||
|
local players = coalition.getPlayers(TUM.settings.getPlayerCoalition())
|
||||||
|
|
||||||
if side == TUM.settings.getPlayerCoalition() then
|
if side == TUM.settings.getPlayerCoalition() then
|
||||||
local newUnit = nil
|
local newUnit = nil
|
||||||
local newGroup = DCSEx.world.getGroupByID(groupInfo.groupID)
|
local newGroup = DCSEx.world.getGroupByID(groupInfo.groupID)
|
||||||
@@ -103,9 +105,19 @@ do
|
|||||||
typeName = Library.objectNames.get(newUnit)
|
typeName = Library.objectNames.get(newUnit)
|
||||||
end
|
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
|
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
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|||||||
Reference in New Issue
Block a user