Merge pull request #6836 from pchote/polish-gdi0102

Closes #6757
Closes #6834
This commit is contained in:
Matthias Mailänder
2014-10-26 08:02:46 +01:00
11 changed files with 117 additions and 56 deletions

View File

@@ -5,9 +5,36 @@ VehicleReinforcements = { "jeep" }
AttackerSquadSize = 3
Reinforce = function(passengers)
Reinforcements.ReinforceWithTransport(player, "oldlst", passengers, { lstStart.Location, lstEnd.Location }, { lstStart.Location })
ReinforceWithLandingCraft = function(units, transportStart, transportUnload, rallypoint)
local transport = Actor.Create("oldlst", true, { Owner = player, Facing = 0, Location = transportStart })
local subcell = 0
Utils.Do(units, function(a)
transport.LoadPassenger(Actor.Create(a, false, { Owner = transport.Owner, Facing = transport.Facing, Location = transportUnload, SubCell = subcell }))
subcell = subcell + 1
end)
transport.ScriptedMove(transportUnload)
transport.CallFunc(function()
Utils.Do(units, function()
local a = transport.UnloadPassenger()
a.IsInWorld = true
a.MoveIntoWorld(transport.Location - CVec.New(0, 1))
if rallypoint ~= nil then
a.Move(rallypoint)
end
end)
end)
transport.Wait(5)
transport.ScriptedMove(transportStart)
transport.Destroy()
end
Reinforce = function(units)
Media.PlaySpeechNotification(player, "Reinforce")
ReinforceWithLandingCraft(units, lstStart.Location, lstEnd.Location)
end
BridgeheadSecured = function()
@@ -61,6 +88,15 @@ WorldLoaded = function()
gdiObjective1 = player.AddPrimaryObjective("Eliminate all Nod forces in the area")
gdiObjective2 = player.AddSecondaryObjective("Capture the Tiberium Refinery")
-- Work around limitations with the yaml merger that prevent MustBeDestroyed from working on the silos
siloARemoved = false
Trigger.OnCapture(SiloA, function() siloARemoved = true end)
Trigger.OnKilled(SiloA, function() siloARemoved = true end)
siloBRemoved = false
Trigger.OnCapture(SiloB, function() siloBRemoved = true end)
Trigger.OnKilled(SiloB, function() siloBRemoved = true end)
Trigger.OnCapture(NodRefinery, function() player.MarkCompletedObjective(gdiObjective2) end)
Trigger.OnKilled(NodRefinery, function() player.MarkFailedObjective(gdiObjective2) end)
@@ -71,7 +107,7 @@ Tick = function()
if player.HasNoRequiredUnits() then
enemy.MarkCompletedObjective(nodObjective)
end
if enemy.HasNoRequiredUnits() then
if enemy.HasNoRequiredUnits() and siloARemoved and siloBRemoved then
player.MarkCompletedObjective(gdiObjective1)
end
end

View File

@@ -302,12 +302,12 @@ Actors:
Owner: GDI
Health: 0.34375
Facing: 0
Actor79: silo
SiloA: silo
Location: 57,32
Owner: Nod
Health: 1
Facing: 0
Actor80: silo
SiloB: silo
Location: 59,32
Owner: Nod
Health: 1
@@ -800,6 +800,7 @@ Rules:
Buildable:
Prerequisites: ~disabled
SILO:
MustBeDestroyed:
Buildable:
Prerequisites: ~disabled
WEAP:
@@ -873,9 +874,7 @@ Sequences:
idle: lst
Start: 0
Facings: 1
unload: lst
Start: 0
Facings: 1
ZOffset: -1024
VoxelSequences: