Replace ActorInfo.Traits.WithInterface with ActorInfo.TraitInfos<T>()

This commit is contained in:
atlimit8
2015-09-19 13:22:00 -05:00
parent 6e39a5e264
commit 9acf121eb1
48 changed files with 76 additions and 77 deletions

View File

@@ -18,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.Common.Traits
{
[Desc("Draw a circle indicating my weapon's range.")]
class RenderRangeCircleInfo : ITraitInfo, IPlaceBuildingDecoration, Requires<AttackBaseInfo>
class RenderRangeCircleInfo : ITraitInfo, IPlaceBuildingDecorationInfo, Requires<AttackBaseInfo>
{
public readonly string RangeCircleType = null;
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Common.Traits
public IEnumerable<IRenderable> Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition)
{
var armaments = ai.Traits.WithInterface<ArmamentInfo>()
var armaments = ai.TraitInfos<ArmamentInfo>()
.Where(a => a.UpgradeMinEnabledLevel == 0);
var range = FallbackRange;