"On landing" actions no longer triggered when player lands away from an airfield

This commit is contained in:
Ambroise Garel
2025-09-18 22:03:11 +02:00
parent 92a00160ef
commit 591ec6e10a
6 changed files with 12 additions and 9 deletions
@@ -225,11 +225,9 @@ do
if not event.initiator then return end -- No event initiator
if Object.getCategory(event.initiator) ~= Object.Category.UNIT then return end -- Initiator isn't an unit
if event.initiator:getCoalition() ~= TUM.settings.getPlayerCoalition() then return end -- Not a friendly
if not event.place then return end -- Not landed at an airbase (e.g. helicopter landing on the ground)
local baseName = "AIRBASE"
if event.place then
baseName = event.place:getName():upper()
end
local baseName = event.place:getName():upper()
if TUM.settings.getValue(TUM.settings.id.MULTIPLAYER) or not event.initiator:getPlayerName() then
doAmbientChatter("atcSafeLanding", {event.initiator:getCallsign(), baseName}, baseName.." ATC", 1)