Merge pull request #7194 from reaperrr/move-ra-common25

More Mods.RA reorganisation, more files moved to Mods.Common
This commit is contained in:
Paul Chote
2015-01-01 16:39:26 +13:00
150 changed files with 220 additions and 234 deletions

View File

@@ -13,8 +13,7 @@ using OpenRA.Activities;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA; using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
using OpenRA.Mods.RA.Render;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits namespace OpenRA.Mods.Cnc.Traits

View File

@@ -11,7 +11,7 @@
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits namespace OpenRA.Mods.Cnc.Traits

View File

@@ -8,7 +8,8 @@
*/ */
#endregion #endregion
using OpenRA.Mods.RA.Render; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits namespace OpenRA.Mods.Cnc.Traits

View File

@@ -10,7 +10,7 @@
using OpenRA.Mods.Cnc.Effects; using OpenRA.Mods.Cnc.Effects;
using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.RA; using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -122,10 +122,17 @@
<Compile Include="Traits\Buildable.cs" /> <Compile Include="Traits\Buildable.cs" />
<Compile Include="Traits\Buildings\BaseBuilding.cs" /> <Compile Include="Traits\Buildings\BaseBuilding.cs" />
<Compile Include="Traits\Buildings\BaseProvider.cs" /> <Compile Include="Traits\Buildings\BaseProvider.cs" />
<Compile Include="Traits\Buildings\Bib.cs" />
<Compile Include="Traits\Buildings\Building.cs" />
<Compile Include="Traits\Buildings\BuildingInfluence.cs" />
<Compile Include="Traits\Buildings\BuildingUtils.cs" />
<Compile Include="Traits\Buildings\DeadBuildingState.cs" /> <Compile Include="Traits\Buildings\DeadBuildingState.cs" />
<Compile Include="Traits\Buildings\FreeActor.cs" />
<Compile Include="Traits\Buildings\LineBuild.cs" /> <Compile Include="Traits\Buildings\LineBuild.cs" />
<Compile Include="Traits\Buildings\LineBuildNode.cs" /> <Compile Include="Traits\Buildings\LineBuildNode.cs" />
<Compile Include="Traits\Buildings\RallyPoint.cs" /> <Compile Include="Traits\Buildings\RallyPoint.cs" />
<Compile Include="Traits\Buildings\RepairsUnits.cs" />
<Compile Include="Traits\Buildings\FootprintUtils.cs" />
<Compile Include="Traits\Burns.cs" /> <Compile Include="Traits\Burns.cs" />
<Compile Include="Traits\Huntable.cs" /> <Compile Include="Traits\Huntable.cs" />
<Compile Include="Traits\CustomBuildTimeValue.cs" /> <Compile Include="Traits\CustomBuildTimeValue.cs" />
@@ -137,6 +144,7 @@
<Compile Include="Traits\JamsMissiles.cs" /> <Compile Include="Traits\JamsMissiles.cs" />
<Compile Include="Traits\KillsSelf.cs" /> <Compile Include="Traits\KillsSelf.cs" />
<Compile Include="Traits\Modifiers\DisabledOverlay.cs" /> <Compile Include="Traits\Modifiers\DisabledOverlay.cs" />
<Compile Include="Traits\Modifiers\FrozenUnderFog.cs" />
<Compile Include="Traits\Modifiers\HiddenUnderFog.cs" /> <Compile Include="Traits\Modifiers\HiddenUnderFog.cs" />
<Compile Include="Traits\Modifiers\UpgradeOverlay.cs" /> <Compile Include="Traits\Modifiers\UpgradeOverlay.cs" />
<Compile Include="Traits\MustBeDestroyed.cs" /> <Compile Include="Traits\MustBeDestroyed.cs" />
@@ -162,6 +170,7 @@
<Compile Include="Traits\Power\ScalePowerWithHealth.cs" /> <Compile Include="Traits\Power\ScalePowerWithHealth.cs" />
<Compile Include="Traits\ProvidesRadar.cs" /> <Compile Include="Traits\ProvidesRadar.cs" />
<Compile Include="Traits\RadarColorFromTerrain.cs" /> <Compile Include="Traits\RadarColorFromTerrain.cs" />
<Compile Include="Traits\Render\RenderBuilding.cs" />
<Compile Include="Traits\Render\RenderEditorOnly.cs" /> <Compile Include="Traits\Render\RenderEditorOnly.cs" />
<Compile Include="Traits\Render\RenderFlare.cs" /> <Compile Include="Traits\Render\RenderFlare.cs" />
<Compile Include="Traits\Render\RenderNameTag.cs" /> <Compile Include="Traits\Render\RenderNameTag.cs" />
@@ -170,7 +179,10 @@
<Compile Include="Traits\Render\RenderUnit.cs" /> <Compile Include="Traits\Render\RenderUnit.cs" />
<Compile Include="Traits\Render\TimedUpgradeBar.cs" /> <Compile Include="Traits\Render\TimedUpgradeBar.cs" />
<Compile Include="Traits\Render\WithBuildingPlacedAnimation.cs" /> <Compile Include="Traits\Render\WithBuildingPlacedAnimation.cs" />
<Compile Include="Traits\Render\WithMakeAnimation.cs" />
<Compile Include="Traits\Render\WithCrateBody.cs" />
<Compile Include="Traits\Render\WithDeathAnimation.cs" /> <Compile Include="Traits\Render\WithDeathAnimation.cs" />
<Compile Include="Traits\Render\WithHarvestAnimation.cs" />
<Compile Include="Traits\Render\WithResources.cs" /> <Compile Include="Traits\Render\WithResources.cs" />
<Compile Include="Traits\Render\WithRotor.cs" /> <Compile Include="Traits\Render\WithRotor.cs" />
<Compile Include="Traits\Render\WithShadow.cs" /> <Compile Include="Traits\Render\WithShadow.cs" />
@@ -198,6 +210,7 @@
<Compile Include="Traits\World\RadarPings.cs" /> <Compile Include="Traits\World\RadarPings.cs" />
<Compile Include="Traits\World\ResourceClaim.cs" /> <Compile Include="Traits\World\ResourceClaim.cs" />
<Compile Include="Traits\World\ResourceClaimLayer.cs" /> <Compile Include="Traits\World\ResourceClaimLayer.cs" />
<Compile Include="Traits\World\ResourceLayer.cs" />
<Compile Include="Traits\World\ShroudPalette.cs" /> <Compile Include="Traits\World\ShroudPalette.cs" />
<Compile Include="Traits\World\ShroudRenderer.cs" /> <Compile Include="Traits\World\ShroudRenderer.cs" />
<Compile Include="Traits\World\SmudgeLayer.cs" /> <Compile Include="Traits\World\SmudgeLayer.cs" />
@@ -220,6 +233,8 @@
<Compile Include="UtilityCommands\UpgradeModCommand.cs" /> <Compile Include="UtilityCommands\UpgradeModCommand.cs" />
<Compile Include="UtilityCommands\UpgradeRules.cs" /> <Compile Include="UtilityCommands\UpgradeRules.cs" />
<Compile Include="Warheads\CreateEffectWarhead.cs" /> <Compile Include="Warheads\CreateEffectWarhead.cs" />
<Compile Include="Warheads\CreateResourceWarhead.cs" />
<Compile Include="Warheads\DestroyResourceWarhead.cs" />
<Compile Include="Warheads\HealthPercentageDamageWarhead.cs" /> <Compile Include="Warheads\HealthPercentageDamageWarhead.cs" />
<Compile Include="Warheads\LeaveSmudgeWarhead.cs" /> <Compile Include="Warheads\LeaveSmudgeWarhead.cs" />
<Compile Include="Warheads\SpreadDamageWarhead.cs" /> <Compile Include="Warheads\SpreadDamageWarhead.cs" />

View File

@@ -9,10 +9,9 @@
#endregion #endregion
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Buildings namespace OpenRA.Mods.Common.Traits
{ {
public class BibInfo : ITraitInfo, Requires<BuildingInfo>, Requires<RenderSpritesInfo> public class BibInfo : ITraitInfo, Requires<BuildingInfo>, Requires<RenderSpritesInfo>
{ {

View File

@@ -11,12 +11,10 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Render;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Buildings namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Remove this trait to limit base-walking by cheap or defensive buildings.")] [Desc("Remove this trait to limit base-walking by cheap or defensive buildings.")]
public class GivesBuildableAreaInfo : TraitInfo<GivesBuildableArea> { } public class GivesBuildableAreaInfo : TraitInfo<GivesBuildableArea> { }
@@ -53,6 +51,7 @@ namespace OpenRA.Mods.RA.Buildings
if (target.IsInRange(center, WRange.FromCells(bp.Trait.Info.Range))) if (target.IsInRange(center, WRange.FromCells(bp.Trait.Info.Range)))
return bp.Actor; return bp.Actor;
} }
return null; return null;
} }
@@ -66,7 +65,7 @@ namespace OpenRA.Mods.RA.Buildings
var buildingMaxBounds = Dimensions; var buildingMaxBounds = Dimensions;
var buildingTraits = world.Map.Rules.Actors[buildingName].Traits; var buildingTraits = world.Map.Rules.Actors[buildingName].Traits;
if (buildingTraits.Contains<BibInfo>() && !(buildingTraits.Get<BibInfo>().HasMinibib)) if (buildingTraits.Contains<BibInfo>() && !buildingTraits.Get<BibInfo>().HasMinibib)
buildingMaxBounds += new CVec(0, 1); buildingMaxBounds += new CVec(0, 1);
var scanStart = world.Map.Clamp(topLeft - new CVec(Adjacent, Adjacent)); var scanStart = world.Map.Clamp(topLeft - new CVec(Adjacent, Adjacent));
@@ -186,6 +185,7 @@ namespace OpenRA.Mods.RA.Buildings
foreach (var s in Info.UndeploySounds) foreach (var s in Info.UndeploySounds)
Sound.PlayToPlayer(self.Owner, s, self.CenterPosition); Sound.PlayToPlayer(self.Owner, s, self.CenterPosition);
} }
public void OnTransform(Actor self) { } public void OnTransform(Actor self) { }
public void AfterTransform(Actor self) { } public void AfterTransform(Actor self) { }
} }

View File

@@ -10,7 +10,7 @@
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Buildings namespace OpenRA.Mods.Common.Traits
{ {
[Desc("A dictionary of buildings placed on the map. Attach this to the world actor.")] [Desc("A dictionary of buildings placed on the map. Attach this to the world actor.")]
public class BuildingInfluenceInfo : ITraitInfo public class BuildingInfluenceInfo : ITraitInfo

View File

@@ -10,11 +10,9 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Buildings namespace OpenRA.Mods.Common.Traits
{ {
public static class BuildingUtils public static class BuildingUtils
{ {
@@ -68,10 +66,9 @@ namespace OpenRA.Mods.RA.Buildings
// Cell contains an actor. Is it the type we want? // Cell contains an actor. Is it the type we want?
if (world.ActorsWithTrait<LineBuildNode>().Any(a => if (world.ActorsWithTrait<LineBuildNode>().Any(a =>
( (a.Actor.Location == cell &&
a.Actor.Location == cell && a.Actor.Info.Traits.Get<LineBuildNodeInfo>()
a.Actor.Info.Traits.Get<LineBuildNodeInfo>().Types.Intersect(lbi.NodeTypes).Any() .Types.Intersect(lbi.NodeTypes).Any())))
)))
dirs[d] = i; // Cell contains actor of correct type dirs[d] = i; // Cell contains actor of correct type
else else
dirs[d] = -1; // Cell is blocked by another actor type dirs[d] = -1; // Cell is blocked by another actor type

View File

@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
namespace OpenRA.Mods.RA.Buildings namespace OpenRA.Mods.Common.Traits
{ {
public static class FootprintUtils public static class FootprintUtils
{ {

View File

@@ -12,7 +12,7 @@ using OpenRA.Activities;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Player recives a unit for free once the building is placed. This also works for structures.", [Desc("Player recives a unit for free once the building is placed. This also works for structures.",
"If you want more than one unit to appear copy this section and assign IDs like FreeActor@2, ...")] "If you want more than one unit to appear copy this section and assign IDs like FreeActor@2, ...")]
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.RA.Traits
{ {
public FreeActor(ActorInitializer init, FreeActorInfo info) public FreeActor(ActorInitializer init, FreeActorInfo info)
{ {
if (init.Contains<FreeActorInit>() && !init.Get<FreeActorInit>().value) if (init.Contains<FreeActorInit>() && !init.Get<FreeActorInit>().ActorValue)
return; return;
init.self.World.AddFrameEndTask(w => init.self.World.AddFrameEndTask(w =>
@@ -57,16 +57,16 @@ namespace OpenRA.Mods.RA.Traits
public class FreeActorInit : IActorInit<bool> public class FreeActorInit : IActorInit<bool>
{ {
[FieldFromYamlKey] [FieldFromYamlKey]
public readonly bool value = true; public readonly bool ActorValue = true;
public FreeActorInit() { } public FreeActorInit() { }
public FreeActorInit(bool init) { value = init; } public FreeActorInit(bool init) { ActorValue = init; }
public bool Value(World world) { return value; } public bool Value(World world) { return ActorValue; }
} }
public class ParentActorInit : IActorInit<Actor> public class ParentActorInit : IActorInit<Actor>
{ {
public readonly Actor value; public readonly Actor ActorValue;
public ParentActorInit(Actor parent) { value = parent; } public ParentActorInit(Actor parent) { ActorValue = parent; }
public Actor Value(World world) { return value; } public Actor Value(World world) { return ActorValue; }
} }
} }

View File

@@ -10,7 +10,7 @@
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits namespace OpenRA.Mods.Common.Traits
{ {
public class RepairsUnitsInfo : TraitInfo<RepairsUnits> public class RepairsUnitsInfo : TraitInfo<RepairsUnits>
{ {

View File

@@ -12,10 +12,9 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")] [Desc("This actor will remain visible (but not updated visually) under fog, once discovered.")]
public class FrozenUnderFogInfo : ITraitInfo, Requires<BuildingInfo> public class FrozenUnderFogInfo : ITraitInfo, Requires<BuildingInfo>

View File

@@ -12,11 +12,9 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.Common.Traits
{ {
public class RenderBuildingInfo : RenderSimpleInfo, Requires<BuildingInfo>, IPlaceBuildingDecoration public class RenderBuildingInfo : RenderSimpleInfo, Requires<BuildingInfo>, IPlaceBuildingDecoration
{ {

View File

@@ -11,10 +11,9 @@
using System; using System;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Renders crates with both water and land variants.")] [Desc("Renders crates with both water and land variants.")]
class WithCrateBodyInfo : ITraitInfo, Requires<RenderSpritesInfo> class WithCrateBodyInfo : ITraitInfo, Requires<RenderSpritesInfo>

View File

@@ -8,12 +8,11 @@
*/ */
#endregion #endregion
using OpenRA.Graphics;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.Common.Traits; using OpenRA.Graphics;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Displays an overlay whenever resources are harvested by the actor.")] [Desc("Displays an overlay whenever resources are harvested by the actor.")]
class WithHarvestAnimationInfo : ITraitInfo, Requires<RenderSpritesInfo>, Requires<IBodyOrientationInfo> class WithHarvestAnimationInfo : ITraitInfo, Requires<RenderSpritesInfo>, Requires<IBodyOrientationInfo>
@@ -45,7 +44,7 @@ namespace OpenRA.Mods.RA.Render
() => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))), () => body.LocalToWorld(info.Offset.Rotate(body.QuantizeOrientation(self, self.Orientation))),
() => !visible, () => !visible,
() => false, () => false,
p => WithTurret.ZOffsetFromCenter(self, p, 0))); p => ZOffsetFromCenter(self, p, 0)));
} }
public void Harvested(Actor self, ResourceType resource) public void Harvested(Actor self, ResourceType resource)
@@ -60,5 +59,11 @@ namespace OpenRA.Mods.RA.Render
public void MovingToResources(Actor self, CPos targetCell, Activity next) { } public void MovingToResources(Actor self, CPos targetCell, Activity next) { }
public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { } public void MovingToRefinery(Actor self, CPos targetCell, Activity next) { }
public void MovementCancelled(Actor self) { } public void MovementCancelled(Actor self) { }
public static int ZOffsetFromCenter(Actor self, WPos pos, int offset)
{
var delta = self.CenterPosition - pos;
return delta.Y + delta.Z + offset;
}
} }
} }

View File

@@ -12,12 +12,10 @@ using System;
using System.Linq; using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Render;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.Common.Traits
{ {
public class WithMakeAnimationInfo : ITraitInfo, Requires<BuildingInfo>, Requires<RenderBuildingInfo> public class WithMakeAnimationInfo : ITraitInfo, Requires<BuildingInfo>, Requires<RenderBuildingInfo>
{ {

View File

@@ -12,10 +12,9 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits namespace OpenRA.Mods.Common.Traits
{ {
[Desc("Attach this to the world actor.", "Order of the layers defines the Z sorting.")] [Desc("Attach this to the world actor.", "Order of the layers defines the Z sorting.")]
public class ResourceLayerInfo : TraitInfo<ResourceLayer>, Requires<ResourceTypeInfo> { } public class ResourceLayerInfo : TraitInfo<ResourceLayer>, Requires<ResourceTypeInfo> { }

View File

@@ -10,6 +10,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Graphics;
using OpenRA.Traits; using OpenRA.Traits;
@@ -20,7 +21,13 @@ namespace OpenRA.Mods.Common.Traits
void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer); void OnNotifyResourceClaimLost(Actor self, ResourceClaim claim, Actor claimer);
} }
public interface IPlaceBuildingDecoration
{
IEnumerable<IRenderable> Render(WorldRenderer wr, World w, ActorInfo ai, WPos centerPosition);
}
public interface INotifyChat { bool OnChat(string from, string message); } public interface INotifyChat { bool OnChat(string from, string message); }
public interface INotifyParachuteLanded { void OnLanded(); }
public interface IRenderActorPreviewInfo { IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init); } public interface IRenderActorPreviewInfo { IEnumerable<IActorPreview> RenderPreview(ActorPreviewInitializer init); }
public interface ICruiseAltitudeInfo { WRange GetCruiseAltitude(); } public interface ICruiseAltitudeInfo { WRange GetCruiseAltitude(); }

View File

@@ -15,7 +15,7 @@ using OpenRA.GameRules;
using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Effects;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Common namespace OpenRA.Mods.Common.Warheads
{ {
public class CreateEffectWarhead : Warhead public class CreateEffectWarhead : Warhead
{ {

View File

@@ -12,10 +12,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Warheads
{ {
public class CreateResourceWarhead : Warhead public class CreateResourceWarhead : Warhead
{ {
@@ -26,7 +26,6 @@ namespace OpenRA.Mods.RA
public readonly string AddsResourceType = null; public readonly string AddsResourceType = null;
// TODO: Allow maximum resource splatter to be defined. (Per tile, and in total). // TODO: Allow maximum resource splatter to be defined. (Per tile, and in total).
public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers) public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)
{ {
if (string.IsNullOrEmpty(AddsResourceType)) if (string.IsNullOrEmpty(AddsResourceType))

View File

@@ -12,10 +12,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.Common.Warheads
{ {
public class DestroyResourceWarhead : Warhead public class DestroyResourceWarhead : Warhead
{ {
@@ -23,7 +23,6 @@ namespace OpenRA.Mods.RA
public readonly int[] Size = { 0, 0 }; public readonly int[] Size = { 0, 0 };
// TODO: Allow maximum resource removal to be defined. (Per tile, and in total). // TODO: Allow maximum resource removal to be defined. (Per tile, and in total).
public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers) public override void DoImpact(Target target, Actor firedBy, IEnumerable<int> damageModifiers)
{ {
var world = firedBy.World; var world = firedBy.World;

View File

@@ -15,7 +15,7 @@ using OpenRA.Effects;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Common namespace OpenRA.Mods.Common.Warheads
{ {
public class HealthPercentageDamageWarhead : DamageWarhead public class HealthPercentageDamageWarhead : DamageWarhead
{ {

View File

@@ -16,7 +16,7 @@ using OpenRA.GameRules;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Common namespace OpenRA.Mods.Common.Warheads
{ {
public class LeaveSmudgeWarhead : Warhead public class LeaveSmudgeWarhead : Warhead
{ {

View File

@@ -15,7 +15,7 @@ using OpenRA.Effects;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.Common namespace OpenRA.Mods.Common.Warheads
{ {
public class SpreadDamageWarhead : DamageWarhead public class SpreadDamageWarhead : DamageWarhead
{ {

View File

@@ -9,7 +9,7 @@
#endregion #endregion
using OpenRA.Mods.D2k.Activities; using OpenRA.Mods.D2k.Activities;
using OpenRA.Mods.RA; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits namespace OpenRA.Mods.D2k.Traits

View File

@@ -9,7 +9,8 @@
#endregion #endregion
using System.Linq; using System.Linq;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits namespace OpenRA.Mods.D2k.Traits

View File

@@ -10,7 +10,7 @@
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits namespace OpenRA.Mods.D2k.Traits

View File

@@ -11,7 +11,7 @@
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits namespace OpenRA.Mods.D2k.Traits

View File

@@ -11,7 +11,7 @@
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.D2k.Traits namespace OpenRA.Mods.D2k.Traits

View File

@@ -13,7 +13,6 @@ using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA; using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -11,6 +11,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -15,8 +15,8 @@ using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA; using OpenRA.Mods.RA;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Orders; using OpenRA.Mods.RA.Orders;
using OpenRA.Mods.RA.Traits;
using OpenRA.Network; using OpenRA.Network;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -13,7 +13,7 @@ using System.Collections.Generic;
using System.Drawing; using System.Drawing;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.RA; using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Widgets; using OpenRA.Widgets;

View File

@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -15,7 +15,6 @@ using System.Linq;
using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Support; using OpenRA.Support;

View File

@@ -11,9 +11,9 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.AI namespace OpenRA.Mods.RA.AI

View File

@@ -10,6 +10,7 @@
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -9,7 +9,8 @@
#endregion #endregion
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities namespace OpenRA.Mods.RA.Activities

View File

@@ -9,6 +9,7 @@
#endregion #endregion
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities namespace OpenRA.Mods.RA.Activities

View File

@@ -13,6 +13,7 @@ using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities namespace OpenRA.Mods.RA.Activities

View File

@@ -9,7 +9,7 @@
#endregion #endregion
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -13,7 +13,6 @@ using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Mods.RA.Render;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities namespace OpenRA.Mods.RA.Activities

View File

@@ -10,7 +10,8 @@
using System.Linq; using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.RA.Render; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities namespace OpenRA.Mods.RA.Activities

View File

@@ -9,8 +9,9 @@
#endregion #endregion
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Activities namespace OpenRA.Mods.RA.Activities

View File

@@ -12,7 +12,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.RA.Render; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -11,7 +11,7 @@
using System.Drawing; using System.Drawing;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
public static class ActorExts public static class ActorExts
{ {

View File

@@ -16,7 +16,7 @@ using OpenRA.Mods.Common.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
public class Barrel public class Barrel
{ {

View File

@@ -14,10 +14,10 @@ using System.Drawing;
using System.Linq; using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.GameRules; using OpenRA.GameRules;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
public abstract class AttackBaseInfo : ITraitInfo public abstract class AttackBaseInfo : ITraitInfo
{ {

View File

@@ -10,10 +10,9 @@
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.RA.Render;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Charges up before being able to attack.")] [Desc("Charges up before being able to attack.")]
class AttackChargeInfo : AttackOmniInfo class AttackChargeInfo : AttackOmniInfo

View File

@@ -10,10 +10,9 @@
using System; using System;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Actor will follow units until in range to attack them.")] [Desc("Actor will follow units until in range to attack them.")]
public class AttackFollowInfo : AttackBaseInfo public class AttackFollowInfo : AttackBaseInfo

View File

@@ -12,7 +12,7 @@ using System;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Unit got to face the target")] [Desc("Unit got to face the target")]
public class AttackFrontalInfo : AttackBaseInfo, Requires<IFacingInfo> public class AttackFrontalInfo : AttackBaseInfo, Requires<IFacingInfo>

View File

@@ -14,10 +14,9 @@ using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Render;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
public class FirePort public class FirePort
{ {

View File

@@ -11,7 +11,7 @@
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Give the unit a \"heal-weapon\" that attacks friendly targets if they are damaged.", [Desc("Give the unit a \"heal-weapon\" that attacks friendly targets if they are damaged.",
"It conflicts with any other weapon or Attack*: trait because it will hurt friendlies during the", "It conflicts with any other weapon or Attack*: trait because it will hurt friendlies during the",

View File

@@ -11,7 +11,7 @@
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
class AttackOmniInfo : AttackBaseInfo class AttackOmniInfo : AttackBaseInfo
{ {

View File

@@ -12,7 +12,7 @@ using System.Collections.Generic;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Actor has a visual turret used to attack.")] [Desc("Actor has a visual turret used to attack.")]
public class AttackTurretedInfo : AttackFollowInfo, Requires<TurretedInfo> public class AttackTurretedInfo : AttackFollowInfo, Requires<TurretedInfo>

View File

@@ -9,10 +9,9 @@
#endregion #endregion
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Will AttackMove to a random location within MoveRadius when idle.", [Desc("Will AttackMove to a random location within MoveRadius when idle.",
"This conflicts with player orders and should only be added to animal creeps.")] "This conflicts with player orders and should only be added to animal creeps.")]

View File

@@ -11,7 +11,7 @@
using System.Linq; using System.Linq;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Used together with AttackMedic: to make the healer do it's job automatically to nearby units.")] [Desc("Used together with AttackMedic: to make the healer do it's job automatically to nearby units.")]
class AutoHealInfo : TraitInfo<AutoHeal>, Requires<AttackBaseInfo> { } class AutoHealInfo : TraitInfo<AutoHeal>, Requires<AttackBaseInfo> { }

View File

@@ -13,7 +13,7 @@ using System.Linq;
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("The actor will automatically engage the enemy when it is in range.")] [Desc("The actor will automatically engage the enemy when it is in range.")]
public class AutoTargetInfo : ITraitInfo, Requires<AttackBaseInfo> public class AutoTargetInfo : ITraitInfo, Requires<AttackBaseInfo>

View File

@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
class C4DemolitionInfo : ITraitInfo class C4DemolitionInfo : ITraitInfo
{ {

View File

@@ -11,7 +11,7 @@
using System.Linq; using System.Linq;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("This actor can be captured by a unit with Captures: trait.")] [Desc("This actor can be captured by a unit with Captures: trait.")]
class CapturableInfo : ITraitInfo class CapturableInfo : ITraitInfo

View File

@@ -10,7 +10,7 @@
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
class CaptureNotificationInfo : ITraitInfo class CaptureNotificationInfo : ITraitInfo
{ {

View File

@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("This actor can capture other actors which have the Capturable: trait.")] [Desc("This actor can capture other actors which have the Capturable: trait.")]
class CapturesInfo : ITraitInfo class CapturesInfo : ITraitInfo

View File

@@ -11,9 +11,10 @@
using System; using System;
using System.Drawing; using System.Drawing;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Traits;
using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.RA.Effects; using OpenRA.Mods.RA.Effects;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA
{ {

View File

@@ -11,8 +11,8 @@
using System; using System;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Activities; using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Overrides the default ToolTip when this actor is disguised (aids in deceiving enemy players).")] [Desc("Overrides the default ToolTip when this actor is disguised (aids in deceiving enemy players).")]
class DisguiseToolTipInfo : TooltipInfo, Requires<DisguiseInfo> class DisguiseToolTipInfo : TooltipInfo, Requires<DisguiseInfo>

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Effects namespace OpenRA.Mods.RA.Effects

View File

@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
namespace OpenRA.Mods.RA.Effects namespace OpenRA.Mods.RA.Effects
{ {

View File

@@ -10,11 +10,10 @@
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Spawn new actors when sold.")] [Desc("Spawn new actors when sold.")]
class EmitInfantryOnSellInfo : TraitInfo<EmitInfantryOnSell> class EmitInfantryOnSellInfo : TraitInfo<EmitInfantryOnSell>

View File

@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Can instantly repair other actors, but gets consumed afterwards.")] [Desc("Can instantly repair other actors, but gets consumed afterwards.")]
class EngineerRepairInfo : TraitInfo<EngineerRepair> { } class EngineerRepairInfo : TraitInfo<EngineerRepair> { }

View File

@@ -9,10 +9,10 @@
#endregion #endregion
using System.Linq; using System.Linq;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("This actor can be captured by a unit with ExternalCaptures: trait.")] [Desc("This actor can be captured by a unit with ExternalCaptures: trait.")]
public class ExternalCapturableInfo : ITraitInfo public class ExternalCapturableInfo : ITraitInfo

View File

@@ -11,7 +11,7 @@
using System.Drawing; using System.Drawing;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Visualize the remaining CaptureCompleteTime from ExternalCapturable: trait.")] [Desc("Visualize the remaining CaptureCompleteTime from ExternalCapturable: trait.")]
class ExternalCapturableBarInfo : ITraitInfo, Requires<ExternalCapturableInfo> class ExternalCapturableBarInfo : ITraitInfo, Requires<ExternalCapturableInfo>

View File

@@ -14,7 +14,7 @@ using OpenRA.Mods.Common.Orders;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("This actor can capture other actors which have the ExternalCapturable: trait.")] [Desc("This actor can capture other actors which have the ExternalCapturable: trait.")]
class ExternalCapturesInfo : ITraitInfo class ExternalCapturesInfo : ITraitInfo

View File

@@ -15,7 +15,7 @@ using OpenRA.Graphics;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("The player can give this unit the order to follow and protect friendly units with the Guardable trait.")] [Desc("The player can give this unit the order to follow and protect friendly units with the Guardable trait.")]
class GuardInfo : TraitInfo<Guard> { } class GuardInfo : TraitInfo<Guard> { }

View File

@@ -12,7 +12,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Actor has a limited amount of ammo, after using it all the actor must reload in some way.")] [Desc("Actor has a limited amount of ammo, after using it all the actor must reload in some way.")]
public class LimitedAmmoInfo : ITraitInfo public class LimitedAmmoInfo : ITraitInfo

View File

@@ -11,7 +11,7 @@
using System; using System;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA

View File

@@ -147,11 +147,6 @@
<Compile Include="AutoHeal.cs" /> <Compile Include="AutoHeal.cs" />
<Compile Include="AutoTarget.cs" /> <Compile Include="AutoTarget.cs" />
<Compile Include="CaptureNotification.cs" /> <Compile Include="CaptureNotification.cs" />
<Compile Include="Buildings\Building.cs" />
<Compile Include="Buildings\BuildingInfluence.cs" />
<Compile Include="Buildings\FootprintUtils.cs" />
<Compile Include="Buildings\RepairableBuilding.cs" />
<Compile Include="Buildings\BuildingUtils.cs" />
<Compile Include="Scripting\Properties\RepairableBuildingProperties.cs" /> <Compile Include="Scripting\Properties\RepairableBuildingProperties.cs" />
<Compile Include="C4Demolition.cs" /> <Compile Include="C4Demolition.cs" />
<Compile Include="ExternalCapturable.cs" /> <Compile Include="ExternalCapturable.cs" />
@@ -225,7 +220,6 @@
<Compile Include="RenderDetectionCircle.cs" /> <Compile Include="RenderDetectionCircle.cs" />
<Compile Include="RenderJammerCircle.cs" /> <Compile Include="RenderJammerCircle.cs" />
<Compile Include="RenderRangeCircle.cs" /> <Compile Include="RenderRangeCircle.cs" />
<Compile Include="Render\RenderBuilding.cs" />
<Compile Include="Render\RenderBuildingCharge.cs" /> <Compile Include="Render\RenderBuildingCharge.cs" />
<Compile Include="Render\RenderBuildingSilo.cs" /> <Compile Include="Render\RenderBuildingSilo.cs" />
<Compile Include="Render\RenderBuildingTurreted.cs" /> <Compile Include="Render\RenderBuildingTurreted.cs" />
@@ -270,23 +264,20 @@
<Compile Include="Traits\Buildings\Bridge.cs" /> <Compile Include="Traits\Buildings\Bridge.cs" />
<Compile Include="Traits\Buildings\BridgeHut.cs" /> <Compile Include="Traits\Buildings\BridgeHut.cs" />
<Compile Include="Traits\Buildings\Fake.cs" /> <Compile Include="Traits\Buildings\Fake.cs" />
<Compile Include="Traits\Buildings\FreeActor.cs" />
<Compile Include="Traits\Buildings\OreRefinery.cs" /> <Compile Include="Traits\Buildings\OreRefinery.cs" />
<Compile Include="Traits\Buildings\PrimaryBuilding.cs" /> <Compile Include="Traits\Buildings\PrimaryBuilding.cs" />
<Compile Include="Traits\Buildings\RepairsUnits.cs" /> <Compile Include="Traits\Buildings\RepairableBuilding.cs" />
<Compile Include="Traits\Buildings\Reservable.cs" /> <Compile Include="Traits\Buildings\Reservable.cs" />
<Compile Include="Traits\Buildings\TargetableBuilding.cs" /> <Compile Include="Traits\Buildings\TargetableBuilding.cs" />
<Compile Include="Traits\Cloak.cs" /> <Compile Include="Traits\Cloak.cs" />
<Compile Include="Traits\Harvester.cs" /> <Compile Include="Traits\Harvester.cs" />
<Compile Include="Traits\HarvesterHuskModifier.cs" /> <Compile Include="Traits\HarvesterHuskModifier.cs" />
<Compile Include="Traits\LeavesHusk.cs" /> <Compile Include="Traits\LeavesHusk.cs" />
<Compile Include="Traits\Modifiers\FrozenUnderFog.cs" />
<Compile Include="Traits\RepairsBridges.cs" /> <Compile Include="Traits\RepairsBridges.cs" />
<Compile Include="Traits\TargetableSubmarine.cs" /> <Compile Include="Traits\TargetableSubmarine.cs" />
<Compile Include="Traits\TargetableUnit.cs" /> <Compile Include="Traits\TargetableUnit.cs" />
<Compile Include="Traits\World\BridgeLayer.cs" /> <Compile Include="Traits\World\BridgeLayer.cs" />
<Compile Include="Traits\World\PathfinderDebugOverlay.cs" /> <Compile Include="Traits\World\PathfinderDebugOverlay.cs" />
<Compile Include="Traits\World\ResourceLayer.cs" />
<Compile Include="TransformOnCapture.cs" /> <Compile Include="TransformOnCapture.cs" />
<Compile Include="TransformOnPassenger.cs" /> <Compile Include="TransformOnPassenger.cs" />
<Compile Include="Transforms.cs" /> <Compile Include="Transforms.cs" />
@@ -336,10 +327,8 @@
<Compile Include="Render\WithTurret.cs" /> <Compile Include="Render\WithTurret.cs" />
<Compile Include="Render\WithBarrel.cs" /> <Compile Include="Render\WithBarrel.cs" />
<Compile Include="Widgets\Logic\CreditsLogic.cs" /> <Compile Include="Widgets\Logic\CreditsLogic.cs" />
<Compile Include="Render\WithHarvestAnimation.cs" />
<Compile Include="Widgets\Logic\SimpleTooltipLogic.cs" /> <Compile Include="Widgets\Logic\SimpleTooltipLogic.cs" />
<Compile Include="Widgets\Logic\WorldTooltipLogic.cs" /> <Compile Include="Widgets\Logic\WorldTooltipLogic.cs" />
<Compile Include="Buildings\Bib.cs" />
<Compile Include="AI\Squad.cs" /> <Compile Include="AI\Squad.cs" />
<Compile Include="AI\States\StateBase.cs" /> <Compile Include="AI\States\StateBase.cs" />
<Compile Include="AI\States\GroundStates.cs" /> <Compile Include="AI\States\GroundStates.cs" />
@@ -347,7 +336,6 @@
<Compile Include="AI\States\AirStates.cs" /> <Compile Include="AI\States\AirStates.cs" />
<Compile Include="Widgets\Logic\InstallLogic.cs" /> <Compile Include="Widgets\Logic\InstallLogic.cs" />
<Compile Include="CombatDebugOverlay.cs" /> <Compile Include="CombatDebugOverlay.cs" />
<Compile Include="Render\WithCrateBody.cs" />
<Compile Include="Widgets\Logic\GameTimerLogic.cs" /> <Compile Include="Widgets\Logic\GameTimerLogic.cs" />
<Compile Include="Widgets\Logic\ReplayControlBarLogic.cs" /> <Compile Include="Widgets\Logic\ReplayControlBarLogic.cs" />
<Compile Include="Attack\AttackFollow.cs" /> <Compile Include="Attack\AttackFollow.cs" />
@@ -371,12 +359,11 @@
<Compile Include="Lint\CheckActors.cs" /> <Compile Include="Lint\CheckActors.cs" />
<Compile Include="Lint\CheckMapCordon.cs" /> <Compile Include="Lint\CheckMapCordon.cs" />
<Compile Include="Parachutable.cs" /> <Compile Include="Parachutable.cs" />
<Compile Include="Render\WithMakeAnimation.cs" />
<Compile Include="Widgets\Logic\InstallFromCDLogic.cs" /> <Compile Include="Widgets\Logic\InstallFromCDLogic.cs" />
<Compile Include="Widgets\Logic\InstallMusicLogic.cs" /> <Compile Include="Widgets\Logic\InstallMusicLogic.cs" />
<Compile Include="Render\WithActiveAnimation.cs" /> <Compile Include="Render\WithActiveAnimation.cs" />
<Compile Include="SupportPowers\SpawnActorPower.cs" /> <Compile Include="SupportPowers\SpawnActorPower.cs" />
<Compile Include="Buildings\ClonesProducedUnits.cs" /> <Compile Include="Traits\Buildings\ClonesProducedUnits.cs" />
<Compile Include="Cloneable.cs" /> <Compile Include="Cloneable.cs" />
<Compile Include="Widgets\ProductionPaletteWidget.cs" /> <Compile Include="Widgets\ProductionPaletteWidget.cs" />
<Compile Include="Widgets\ProductionTabsWidget.cs" /> <Compile Include="Widgets\ProductionTabsWidget.cs" />
@@ -394,8 +381,6 @@
<Compile Include="Widgets\Logic\DebugMenuLogic.cs" /> <Compile Include="Widgets\Logic\DebugMenuLogic.cs" />
<Compile Include="ProductionQueueFromSelection.cs" /> <Compile Include="ProductionQueueFromSelection.cs" />
<Compile Include="GainsStatUpgrades.cs" /> <Compile Include="GainsStatUpgrades.cs" />
<Compile Include="Warheads\CreateResourceWarhead.cs" />
<Compile Include="Warheads\DestroyResourceWarhead.cs" />
<Compile Include="Warheads\PerCellDamageWarhead.cs" /> <Compile Include="Warheads\PerCellDamageWarhead.cs" />
<Compile Include="Scripting\Properties\HarvesterProperties.cs" /> <Compile Include="Scripting\Properties\HarvesterProperties.cs" />
<Compile Include="Scripting\Properties\HelicopterProperties.cs" /> <Compile Include="Scripting\Properties\HelicopterProperties.cs" />

View File

@@ -12,6 +12,7 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Orders namespace OpenRA.Mods.RA.Orders

View File

@@ -14,11 +14,9 @@ using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Render;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits;
namespace OpenRA.Mods.RA.Orders namespace OpenRA.Mods.RA.Orders
{ {

View File

@@ -11,7 +11,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Orders namespace OpenRA.Mods.RA.Orders

View File

@@ -9,7 +9,8 @@
#endregion #endregion
using OpenRA.Mods.Common.Effects; using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.RA.Render; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA

View File

@@ -8,10 +8,9 @@
*/ */
#endregion #endregion
using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Attach this to the player actor to allow building repair by team mates.")] [Desc("Attach this to the player actor to allow building repair by team mates.")]

View File

@@ -10,10 +10,9 @@
using System.Drawing; using System.Drawing;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Plays an audio notification and shows a radar ping when a building is attacked.", [Desc("Plays an audio notification and shows a radar ping when a building is attacked.",
"Attach this to the player actor.")] "Attach this to the player actor.")]

View File

@@ -11,7 +11,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -11,7 +11,6 @@
using System.Linq; using System.Linq;
using OpenRA.Effects; using OpenRA.Effects;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Primitives; using OpenRA.Primitives;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -11,7 +11,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA

View File

@@ -12,7 +12,6 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.RA.Traits; using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;

View File

@@ -10,7 +10,7 @@
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Unit will reload its limited ammo itself.")] [Desc("Unit will reload its limited ammo itself.")]
public class ReloadsInfo : ITraitInfo, Requires<LimitedAmmoInfo> public class ReloadsInfo : ITraitInfo, Requires<LimitedAmmoInfo>

View File

@@ -13,10 +13,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.RA.Activities; using OpenRA.Mods.RA.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Changes the visual Z position periodically.")] [Desc("Changes the visual Z position periodically.")]
class HoversInfo : ITraitInfo, Requires<IMoveInfo> class HoversInfo : ITraitInfo, Requires<IMoveInfo>

View File

@@ -8,7 +8,9 @@
*/ */
#endregion #endregion
namespace OpenRA.Mods.RA.Render using OpenRA.Mods.Common.Traits;
namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Used for tesla coil and obelisk.")] [Desc("Used for tesla coil and obelisk.")]
public class RenderBuildingChargeInfo : RenderBuildingInfo public class RenderBuildingChargeInfo : RenderBuildingInfo

View File

@@ -10,11 +10,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
using OpenRA.Mods.Common.Graphics;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
class RenderBuildingSiloInfo : RenderBuildingInfo class RenderBuildingSiloInfo : RenderBuildingInfo
{ {

View File

@@ -16,7 +16,7 @@ using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
class RenderBuildingTurretedInfo : RenderBuildingInfo, Requires<TurretedInfo> class RenderBuildingTurretedInfo : RenderBuildingInfo, Requires<TurretedInfo>
{ {

View File

@@ -15,7 +15,7 @@ using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
class RenderBuildingWallInfo : RenderBuildingInfo class RenderBuildingWallInfo : RenderBuildingInfo
{ {

View File

@@ -11,12 +11,11 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Buildings;
using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
class RenderBuildingWarFactoryInfo : RenderBuildingInfo class RenderBuildingWarFactoryInfo : RenderBuildingInfo
{ {

View File

@@ -10,7 +10,7 @@
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
class RenderDisguiseInfo : RenderInfantryInfo, Requires<DisguiseInfo> class RenderDisguiseInfo : RenderInfantryInfo, Requires<DisguiseInfo>
{ {

View File

@@ -11,10 +11,9 @@
using OpenRA.Activities; using OpenRA.Activities;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
class RenderHarvesterInfo : RenderUnitInfo, Requires<HarvesterInfo> class RenderHarvesterInfo : RenderUnitInfo, Requires<HarvesterInfo>
{ {

View File

@@ -10,12 +10,12 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.Common.Graphics; using OpenRA.Mods.Common.Graphics;
using OpenRA.Graphics;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
public class RenderInfantryInfo : RenderSimpleInfo, Requires<IMoveInfo> public class RenderInfantryInfo : RenderSimpleInfo, Requires<IMoveInfo>
{ {

View File

@@ -12,7 +12,7 @@ using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
public class RenderLandingCraftInfo : RenderUnitInfo, Requires<IMoveInfo>, Requires<CargoInfo> public class RenderLandingCraftInfo : RenderUnitInfo, Requires<IMoveInfo>, Requires<CargoInfo>
{ {

View File

@@ -12,7 +12,7 @@ using System.Linq;
using OpenRA.Mods.Common.Traits; using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
class RenderUnitReloadInfo : RenderUnitInfo, Requires<ArmamentInfo>, Requires<AttackBaseInfo> class RenderUnitReloadInfo : RenderUnitInfo, Requires<ArmamentInfo>, Requires<AttackBaseInfo>
{ {

View File

@@ -11,9 +11,10 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using OpenRA.Graphics; using OpenRA.Graphics;
using OpenRA.Mods.Common.Traits;
using OpenRA.Traits; using OpenRA.Traits;
namespace OpenRA.Mods.RA.Render namespace OpenRA.Mods.RA.Traits
{ {
[Desc("Replaces the idle animation of a building.")] [Desc("Replaces the idle animation of a building.")]
public class WithActiveAnimationInfo : ITraitInfo, Requires<RenderBuildingInfo> public class WithActiveAnimationInfo : ITraitInfo, Requires<RenderBuildingInfo>

Some files were not shown because too many files have changed in this diff Show More