Remove WithDecorationCarryable.

This commit is contained in:
Paul Chote
2016-11-19 16:58:50 +00:00
parent 2dc70146c8
commit 81113e07a6
2 changed files with 0 additions and 40 deletions

View File

@@ -85,7 +85,6 @@
<Compile Include="Warheads\ChangeOwnerWarhead.cs" />
<Compile Include="UtilityCommands\D2kMapImporter.cs" />
<Compile Include="UtilityCommands\ImportD2kMapCommand.cs" />
<Compile Include="Traits\Render\WithDecorationCarryable.cs" />
<Compile Include="Traits\World\D2kEditorResourceLayer.cs" />
<Compile Include="Lint\CheckImportActors.cs" />
</ItemGroup>

View File

@@ -1,39 +0,0 @@
#region Copyright & License Information
/*
* Copyright 2007-2016 The OpenRA Developers (see AUTHORS)
* This file is part of OpenRA, which is free software. It is made
* available to you under the terms of the GNU General Public License
* as published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version. For more
* information, see COPYING.
*/
#endregion
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Traits.Render;
using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits.Render
{
[Desc("Displays a sprite when the carryable actor is waiting for pickup.")]
public class WithDecorationCarryableInfo : WithDecorationInfo, Requires<CarryableInfo>
{
public override object Create(ActorInitializer init) { return new WithDecorationCarryable(init.Self, this); }
}
public class WithDecorationCarryable : WithDecoration
{
readonly Carryable carryable;
public WithDecorationCarryable(Actor self, WithDecorationCarryableInfo info)
: base(self, info)
{
carryable = self.Trait<Carryable>();
}
protected override bool ShouldRender(Actor self)
{
return carryable.Reserved && base.ShouldRender(self);
}
}
}