Merge pull request #10364 from Mailaender/unload-overlay

Added the Tiberian Sun harvester unload overlay
This commit is contained in:
Oliver Brakmann
2016-01-16 19:30:19 +01:00
9 changed files with 114 additions and 13 deletions

View File

@@ -433,7 +433,7 @@
<Compile Include="Traits\Render\WithDeathAnimation.cs" />
<Compile Include="Traits\Render\WithDecoration.cs" />
<Compile Include="Traits\Render\WithDockingAnimation.cs" />
<Compile Include="Traits\Render\WithDockingOverlay.cs" />
<Compile Include="Traits\Render\WithDockedOverlay.cs" />
<Compile Include="Traits\Render\WithHarvestAnimation.cs" />
<Compile Include="Traits\Render\WithHarvestOverlay.cs" />
<Compile Include="Traits\Render\WithIdleOverlay.cs" />

View File

@@ -15,7 +15,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Rendered when a harvester is docked.")]
public class WithDockingOverlayInfo : ITraitInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
public class WithDockedOverlayInfo : ITraitInfo, Requires<RenderSpritesInfo>, Requires<BodyOrientationInfo>
{
[Desc("Sequence name to use")]
[SequenceReference] public readonly string Sequence = "docking-overlay";
@@ -29,17 +29,17 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Custom palette is a player palette BaseName")]
public readonly bool IsPlayerPalette = false;
public object Create(ActorInitializer init) { return new WithDockingOverlay(init.Self, this); }
public object Create(ActorInitializer init) { return new WithDockedOverlay(init.Self, this); }
}
public class WithDockingOverlay : INotifyDocking, INotifyBuildComplete, INotifySold
public class WithDockedOverlay : INotifyDocking, INotifyBuildComplete, INotifySold
{
readonly WithDockingOverlayInfo info;
readonly WithDockedOverlayInfo info;
readonly AnimationWithOffset anim;
bool buildComplete;
bool docked;
public WithDockingOverlay(Actor self, WithDockingOverlayInfo info)
public WithDockedOverlay(Actor self, WithDockedOverlayInfo info)
{
this.info = info;

View File

@@ -2876,6 +2876,13 @@ namespace OpenRA.Mods.Common.UtilityCommands
}
}
// Rename WithDockingOverlay to WithDockedOverlay
if (engineVersion < 20160116)
{
if (node.Key.StartsWith("WithDockingOverlay"))
node.Key = "WithDockedOverlay" + node.Key.Substring(18);
}
UpgradeActorRules(engineVersion, ref node.Value.Nodes, node, depth + 1);
}
}