Add support for an announcement function for carryall reinforcements

This commit is contained in:
abcdefg30
2020-03-17 14:23:27 +01:00
committed by reaperrr
parent 74f86d70f8
commit b580b4fd33
2 changed files with 10 additions and 3 deletions

View File

@@ -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]