mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Update CTLD.lua
#CTLD - Add the group name of the extracted group to TroopsExtracted FSM event
This commit is contained in:
parent
e26caa2f74
commit
4d24eb82be
@ -975,7 +975,7 @@ do
|
||||
--
|
||||
-- This function is called when a player has re-boarded already deployed troops from the field:
|
||||
--
|
||||
-- function my_ctld:OnAfterTroopsExtracted(From, Event, To, Group, Unit, Troops)
|
||||
-- function my_ctld:OnAfterTroopsExtracted(From, Event, To, Group, Unit, Troops, Troopname)
|
||||
-- ... your code here ...
|
||||
-- end
|
||||
--
|
||||
@ -1635,7 +1635,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 #CTLD_CARGO Cargo Cargo troops.
|
||||
-- @param Wrapper.Group#GROUP Troops extracted.
|
||||
-- @param #string Troopname Name of the extracted group.
|
||||
-- @return #CTLD self
|
||||
|
||||
--- FSM Function OnBeforeCratesPickedUp.
|
||||
@ -1723,7 +1724,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 #CTLD_CARGO Cargo Cargo troops.
|
||||
-- @param Wrapper.Group#GROUP Troops extracted.
|
||||
-- @param #string Troopname Name of the extracted group.
|
||||
-- @return #CTLD self
|
||||
|
||||
--- FSM Function OnAfterCratesPickedUp.
|
||||
@ -2533,7 +2535,8 @@ end
|
||||
self:ScheduleOnce(running,self._SendMessage,self,"Troops boarded!", 10, false, Group)
|
||||
self:_SendMessage("Troops boarding!", 10, false, Group)
|
||||
self:_UpdateUnitCargoMass(Unit)
|
||||
self:__TroopsExtracted(running,Group, Unit, nearestGroup)
|
||||
local groupname = nearestGroup:GetName()
|
||||
self:__TroopsExtracted(running,Group, Unit, nearestGroup, groupname)
|
||||
local coord = Unit:GetCoordinate() or Group:GetCoordinate() -- Core.Point#COORDINATE
|
||||
local Point
|
||||
if coord then
|
||||
@ -6032,8 +6035,9 @@ end
|
||||
-- @param Wrapper.Group#GROUP Group Group Object.
|
||||
-- @param Wrapper.Unit#UNIT Unit Unit Object.
|
||||
-- @param Wrapper.Group#GROUP Troops Troops #GROUP Object.
|
||||
-- @param #string Groupname Name of the extracted #GROUP.
|
||||
-- @return #CTLD self
|
||||
function CTLD:onbeforeTroopsExtracted(From, Event, To, Group, Unit, Troops)
|
||||
function CTLD:onbeforeTroopsExtracted(From, Event, To, Group, Unit, Troops, Groupname)
|
||||
self:T({From, Event, To})
|
||||
if Unit and Unit:IsPlayer() and self.PlayerTaskQueue then
|
||||
local playername = Unit:GetPlayerName()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user