Merge pull request #8720 from abcdefg30/parashadow

Use the correct ShadowPalette for d2k paradrops
This commit is contained in:
Matthias Mailänder
2015-07-20 21:56:50 +02:00
9 changed files with 57 additions and 23 deletions

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Common.Traits
[SequenceReference("ShadowImage")] public readonly string ShadowSequence = null;
[Desc("Palette used to render the paradropped unit's shadow.")]
public readonly string ShadowPalette = "player";
public readonly string ShadowPalette = "shadow";
[Desc("Shadow position relative to the paradropped unit's intended landing position.")]
public readonly WVec ShadowOffset = new WVec(0, 128, 0);

View File

@@ -16,7 +16,13 @@ else
ChangeStance = true
end
IdleHunt = function(actor) Trigger.OnIdle(actor, actor.Hunt) end
IdleHunt = function(actor)
Trigger.OnIdle(actor, function(a)
if a.IsInWorld then
a.Hunt()
end
end)
end
ProduceUnits = function(factory, count)
if ussr.IsProducing("e1") then

View File

@@ -27,7 +27,13 @@ else
ChangeStance = true
end
IdleHunt = function(actor) Trigger.OnIdle(actor, actor.Hunt) end
IdleHunt = function(actor)
Trigger.OnIdle(actor, function(a)
if a.IsInWorld then
a.Hunt()
end
end)
end
Tick = function()
if TeleportJeepCamera and Jeep.IsInWorld then

View File

@@ -36,9 +36,17 @@ ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4, Paradrop5, Par
BindActorTriggers = function(a)
if a.HasProperty("Hunt") then
if a.Owner == allies then
Trigger.OnIdle(a, a.Hunt)
Trigger.OnIdle(a, function(a)
if a.IsInWorld then
a.Hunt()
end
end)
else
Trigger.OnIdle(a, function(a) a.AttackMove(AlliedTechnologyCenter.Location) end)
Trigger.OnIdle(a, function(a)
if a.IsInWorld then
a.AttackMove(AlliedTechnologyCenter.Location)
end
end)
end
end

View File

@@ -60,7 +60,11 @@ ParadropSovietUnits = function()
local units = powerproxy.SendParatroopers(MCVDeployLocation.CenterPosition, false, 256 - 53)
Utils.Do(units, function(a)
Trigger.OnIdle(a, a.Hunt)
Trigger.OnIdle(a, function(actor)
if actor.IsInWorld then
actor.Hunt()
end
end)
end)
powerproxy.Destroy()

View File

@@ -1252,6 +1252,10 @@ Rules:
powerproxy.paratroopers:
ParatroopersPower:
DropItems: E1,E1,E1,E2,E2
powerproxy.allied:
Inherits: powerproxy.paratroopers
ParatroopersPower:
DropItems: ARTY,ARTY,ARTY
CAMERA.sam:
Inherits: CAMERA
RevealsShroud:
@@ -1261,12 +1265,6 @@ Rules:
RevealsShroud:
Range: 1000
ARTY:
Parachutable:
KilledOnImpassableTerrain: false
WithParachute:
UpgradeTypes: parachute
UpgradeMinEnabledLevel: 1
Image: parach
UpgradeManager:
BodyOrientation:
AFLD.mission:

View File

@@ -28,7 +28,6 @@ else --Difficulty == "Hard"
LongBowReinforcements = { "heli" }
end
AlliedArtilleryParadrops = { "arty", "arty", "arty" }
AlliedAirReinforcementsWaypoints =
{
{ AirReinforcementsEntry1.Location, AirReinforcementsEntry2.Location },
@@ -186,7 +185,11 @@ SendSovietParadrops = function(table)
local units = powerproxy.SendParatroopers(table[2].CenterPosition, false, table[1])
Utils.Do(units, function(unit)
Trigger.OnIdle(unit, unit.Hunt)
Trigger.OnIdle(unit, function(a)
if a.IsInWorld then
a.Hunt()
end
end)
end)
end
@@ -279,21 +282,20 @@ TimerExpired = function()
end
end
DropAlliedArtillery = function(table)
local plane = Actor.Create("badr", true, { Owner = allies, Location = table[1] })
Utils.Do(AlliedArtilleryParadrops, function(type)
local unit = Actor.Create(type, false, { Owner = allies })
plane.LoadPassenger(unit)
end)
plane.Paradrop(table[2])
DropAlliedArtillery = function(facing, dropzone)
local proxy = Actor.Create("powerproxy.allied", true, { Owner = allies })
proxy.SendParatroopers(dropzone, false, facing)
proxy.Destroy()
end
SendLongBowReinforcements = function()
Media.PlaySpeechNotification(allies, "AlliedReinforcementsArrived")
Reinforcements.Reinforce(allies, LongBowReinforcements, AlliedAirReinforcementsWaypoints[1])
Reinforcements.Reinforce(allies, LongBowReinforcements, AlliedAirReinforcementsWaypoints[2])
if ParadropArtillery then
DropAlliedArtillery({ Utils.Random(AlliedAirReinforcementsWaypoints)[1], Alliesbase.Location })
local facing = Utils.RandomInteger(Facing.NorthWest, Facing.SouthWest)
DropAlliedArtillery(facing, Alliesbase.CenterPosition)
end
end

View File

@@ -35,7 +35,13 @@ ParaWaves =
{ AttackTicks * 3, { "SovietSquad", SovietParaDrop1 } }
}
IdleHunt = function(unit) Trigger.OnIdle(unit, unit.Hunt) end
IdleHunt = function(unit)
Trigger.OnIdle(unit, function(a)
if a.IsInWorld then
a.Hunt()
end
end)
end
GuardHarvester = function(unit, harvester)
if not unit.IsDead then

View File

@@ -128,7 +128,11 @@
WithParachute:
UpgradeTypes: parachute
UpgradeMinEnabledLevel: 1
ShadowImage: parach-shadow
ShadowSequence: idle
Image: parach
Sequence: idle
OpeningSequence: open
Offset: 0,0,200
^Tank: