#CTLD - OnAfterTroopsRTB, added Zone Name and Zone Object as last 2 parameters handed

This commit is contained in:
Applevangelist 2024-08-09 10:12:57 +02:00
parent a3864d5f32
commit c1958b62ff

View File

@ -1591,6 +1591,8 @@ function CTLD:New(Coalition, Prefixes, Alias)
-- @param #string To State.
-- @param Wrapper.Group#GROUP Group Group Object.
-- @param Wrapper.Unit#UNIT Unit Unit Object.
-- @param #string ZoneName Name of the Zone where the Troops have been RTB'd.
-- @param Core.Zone#ZONE_RADIUS ZoneObject of the Zone where the Troops have been RTB'd.
--- FSM Function OnAfterTroopsPickedUp.
-- @function [parent=#CTLD] OnAfterTroopsPickedUp
@ -1717,6 +1719,8 @@ function CTLD:New(Coalition, Prefixes, Alias)
-- @param #string To State.
-- @param Wrapper.Group#GROUP Group Group Object.
-- @param Wrapper.Unit#UNIT Unit Unit Object.
-- @param #string ZoneName Name of the Zone where the Troops have been RTB'd.
-- @param Core.Zone#ZONE_RADIUS ZoneObject of the Zone where the Troops have been RTB'd.
--- FSM Function OnAfterLoad.
-- @function [parent=#CTLD] OnAfterLoad
@ -3190,7 +3194,7 @@ function CTLD:_UnloadTroops(Group, Unit)
end -- cargotable loop
else -- droppingatbase
self:_SendMessage("Troops have returned to base!", 10, false, Group)
self:__TroopsRTB(1, Group, Unit)
self:__TroopsRTB(1, Group, Unit, zonename, zone)
end
-- cleanup load list
local loaded = {} -- #CTLD.LoadedCargo
@ -5595,8 +5599,10 @@ end
-- @param #string To State.
-- @param Wrapper.Group#GROUP Group Group Object.
-- @param Wrapper.Unit#UNIT Unit Unit Object.
-- @param #string ZoneName Name of the Zone where the Troops have been RTB'd.
-- @param Core.Zone#ZONE_RADIUS ZoneObject of the Zone where the Troops have been RTB'd.
-- @return #CTLD self
function CTLD:onbeforeTroopsRTB(From, Event, To, Group, Unit)
function CTLD:onbeforeTroopsRTB(From, Event, To, Group, Unit, ZoneName, ZoneObject)
self:T({From, Event, To})
return self
end