Add support for an announcement function for carryall reinforcements
This commit is contained in:
@@ -39,7 +39,7 @@ InitObjectives = function(player)
|
||||
end)
|
||||
end
|
||||
|
||||
SendCarryallReinforcements = function(player, currentWave, totalWaves, delay, pathFunction, unitTypes, customCondition, customHuntFunction)
|
||||
SendCarryallReinforcements = function(player, currentWave, totalWaves, delay, pathFunction, unitTypes, customCondition, customHuntFunction, announcementFunction)
|
||||
Trigger.AfterDelay(delay, function()
|
||||
if customCondition and customCondition() then
|
||||
return
|
||||
@@ -50,6 +50,10 @@ SendCarryallReinforcements = function(player, currentWave, totalWaves, delay, pa
|
||||
return
|
||||
end
|
||||
|
||||
if announcementFunction then
|
||||
announcementFunction(currentWave)
|
||||
end
|
||||
|
||||
local path = pathFunction()
|
||||
local units = Reinforcements.ReinforceWithTransport(player, "carryall.reinforce", unitTypes[currentWave], path, { path[1] })[2]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user