moved traits from engine into mod
This commit is contained in:
@@ -21,7 +21,7 @@ namespace OpenRA.Graphics
|
||||
{
|
||||
readonly World world;
|
||||
internal readonly TerrainRenderer terrainRenderer;
|
||||
internal readonly UiOverlay uiOverlay;
|
||||
public readonly UiOverlay uiOverlay;
|
||||
internal readonly HardwarePalette palette;
|
||||
|
||||
internal WorldRenderer(World world)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="3.5">
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
@@ -75,7 +75,6 @@
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Effects\RepairIndicator.cs" />
|
||||
<Compile Include="GameRules\WeaponInfo.cs" />
|
||||
<Compile Include="Group.cs" />
|
||||
<Compile Include="Orders\GenericSelectTarget.cs" />
|
||||
@@ -135,7 +134,6 @@
|
||||
<Compile Include="Traits\Activities\RemoveSelf.cs" />
|
||||
<Compile Include="Traits\Activities\Sell.cs" />
|
||||
<Compile Include="Orders\IOrderGenerator.cs" />
|
||||
<Compile Include="Orders\PlaceBuildingOrderGenerator.cs" />
|
||||
<Compile Include="Player.cs" />
|
||||
<Compile Include="Graphics\Sheet.cs" />
|
||||
<Compile Include="PathFinder.cs" />
|
||||
@@ -158,17 +156,13 @@
|
||||
<Compile Include="Traits\Buildable.cs" />
|
||||
<Compile Include="Traits\Building.cs" />
|
||||
<Compile Include="Traits\World\BuildingInfluence.cs" />
|
||||
<Compile Include="Traits\Player\PlaceBuilding.cs" />
|
||||
<Compile Include="Traits\World\PlayerColorPalette.cs" />
|
||||
<Compile Include="Traits\World\ResourceLayer.cs" />
|
||||
<Compile Include="Traits\World\ResourceType.cs" />
|
||||
<Compile Include="Traits\SupportPower.cs" />
|
||||
<Compile Include="Traits\ProvidesRadar.cs" />
|
||||
<Compile Include="Traits\Selectable.cs" />
|
||||
<Compile Include="Traits\Player\ProductionQueue.cs" />
|
||||
<Compile Include="Traits\Mobile.cs" />
|
||||
<Compile Include="Traits\Production.cs" />
|
||||
<Compile Include="Traits\RallyPoint.cs" />
|
||||
<Compile Include="Traits\Render\RenderSimple.cs" />
|
||||
<Compile Include="Traits\TraitsInterfaces.cs" />
|
||||
<Compile Include="Traits\Turreted.cs" />
|
||||
@@ -215,7 +209,6 @@
|
||||
<Compile Include="Traits\RevealsShroud.cs" />
|
||||
<Compile Include="Traits\Targetable.cs" />
|
||||
<Compile Include="Traits\Health.cs" />
|
||||
<Compile Include="Traits\RepairableBuilding.cs" />
|
||||
<Compile Include="Traits\Activities\Drag.cs" />
|
||||
<Compile Include="Widgets\VqaPlayerWidget.cs" />
|
||||
<Compile Include="Widgets\Delegates\VideoPlayerDelegate.cs" />
|
||||
@@ -226,7 +219,6 @@
|
||||
<Compile Include="Traits\Armor.cs" />
|
||||
<Compile Include="Graphics\CursorProvider.cs" />
|
||||
<Compile Include="Traits\Player\TechTree.cs" />
|
||||
<Compile Include="Traits\Player\ClassicProductionQueue.cs" />
|
||||
<Compile Include="Traits\Player\PowerManager.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -242,7 +234,6 @@
|
||||
<Compile Include="ObjectCreator.cs" />
|
||||
<Compile Include="Network\SyncReport.cs" />
|
||||
<Compile Include="TraitDictionary.cs" />
|
||||
<Compile Include="Traits\PrimaryBuilding.cs" />
|
||||
<Compile Include="Widgets\Delegates\DeveloperModeDelegate.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -13,7 +13,7 @@ using System.Linq;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
{
|
||||
class PlayerResourcesInfo : ITraitInfo
|
||||
public class PlayerResourcesInfo : ITraitInfo
|
||||
{
|
||||
public readonly int InitialCash = 10000;
|
||||
public readonly int InitialOre = 0;
|
||||
|
||||
@@ -18,7 +18,7 @@ using OpenRA.Widgets;
|
||||
|
||||
namespace OpenRA
|
||||
{
|
||||
class UiOverlay
|
||||
public class UiOverlay
|
||||
{
|
||||
Sprite buildOk, buildBlocked, unitDebug;
|
||||
|
||||
@@ -79,7 +79,7 @@ namespace OpenRA
|
||||
}
|
||||
}
|
||||
|
||||
static class LineBuildUtils
|
||||
public static class LineBuildUtils
|
||||
{
|
||||
public static IEnumerable<int2> GetLineBuildCells(World world, int2 location, string name, BuildingInfo bi)
|
||||
{
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Effects
|
||||
namespace OpenRA.Mods.RA.Effects
|
||||
{
|
||||
class RepairIndicator : IEffect
|
||||
{
|
||||
@@ -87,17 +87,26 @@
|
||||
<Compile Include="Effects\GravityBomb.cs" />
|
||||
<Compile Include="Effects\LaserZap.cs" />
|
||||
<Compile Include="Effects\Missile.cs" />
|
||||
<Compile Include="Effects\RepairIndicator.cs" />
|
||||
<Compile Include="Effects\Smoke.cs" />
|
||||
<Compile Include="Effects\TeslaZap.cs" />
|
||||
<Compile Include="LimitedAmmo.cs" />
|
||||
<Compile Include="Orders\PlaceBuildingOrderGenerator.cs" />
|
||||
<Compile Include="Player\ActorGroupProxy.cs" />
|
||||
<Compile Include="Aircraft.cs" />
|
||||
<Compile Include="Player\ClassicProductionQueue.cs" />
|
||||
<Compile Include="Player\PlaceBuilding.cs" />
|
||||
<Compile Include="Player\ProductionQueue.cs" />
|
||||
<Compile Include="PrimaryBuilding.cs" />
|
||||
<Compile Include="Production.cs" />
|
||||
<Compile Include="RallyPoint.cs" />
|
||||
<Compile Include="RenderDetectionCircle.cs" />
|
||||
<Compile Include="RenderRangeCircle.cs" />
|
||||
<Compile Include="Render\RenderBuilding.cs" />
|
||||
<Compile Include="Render\RenderBuildingTurreted.cs" />
|
||||
<Compile Include="Render\RenderUnit.cs" />
|
||||
<Compile Include="Render\RenderUnitTurreted.cs" />
|
||||
<Compile Include="RepairableBuilding.cs" />
|
||||
<Compile Include="ReservableProduction.cs" />
|
||||
<Compile Include="SupportPowers\AirstrikePower.cs" />
|
||||
<Compile Include="AttackFrontal.cs" />
|
||||
|
||||
2
OpenRA.Game/Orders/PlaceBuildingOrderGenerator.cs → OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs
Normal file → Executable file
2
OpenRA.Game/Orders/PlaceBuildingOrderGenerator.cs → OpenRA.Mods.RA/Orders/PlaceBuildingOrderGenerator.cs
Normal file → Executable file
@@ -13,7 +13,7 @@ using System.Linq;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Orders
|
||||
namespace OpenRA.Mods.RA.Orders
|
||||
{
|
||||
public class PlaceBuildingOrderGenerator : IOrderGenerator
|
||||
{
|
||||
11
OpenRA.Game/Traits/Player/ClassicProductionQueue.cs → OpenRA.Mods.RA/Player/ClassicProductionQueue.cs
Normal file → Executable file
11
OpenRA.Game/Traits/Player/ClassicProductionQueue.cs → OpenRA.Mods.RA/Player/ClassicProductionQueue.cs
Normal file → Executable file
@@ -6,14 +6,13 @@
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class ClassicProductionQueueInfo : ProductionQueueInfo, ITraitPrerequisite<TechTreeInfo>, ITraitPrerequisite<PowerManagerInfo>, ITraitPrerequisite<PlayerResourcesInfo>
|
||||
{
|
||||
4
OpenRA.Game/Traits/Player/PlaceBuilding.cs → OpenRA.Mods.RA/Player/PlaceBuilding.cs
Normal file → Executable file
4
OpenRA.Game/Traits/Player/PlaceBuilding.cs → OpenRA.Mods.RA/Player/PlaceBuilding.cs
Normal file → Executable file
@@ -10,10 +10,10 @@
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class PlaceBuildingInfo : TraitInfo<PlaceBuilding> {}
|
||||
|
||||
3
OpenRA.Game/Traits/Player/ProductionQueue.cs → OpenRA.Mods.RA/Player/ProductionQueue.cs
Normal file → Executable file
3
OpenRA.Game/Traits/Player/ProductionQueue.cs → OpenRA.Mods.RA/Player/ProductionQueue.cs
Normal file → Executable file
@@ -11,8 +11,9 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class ProductionQueueInfo : ITraitInfo
|
||||
{
|
||||
3
OpenRA.Game/Traits/PrimaryBuilding.cs → OpenRA.Mods.RA/PrimaryBuilding.cs
Normal file → Executable file
3
OpenRA.Game/Traits/PrimaryBuilding.cs → OpenRA.Mods.RA/PrimaryBuilding.cs
Normal file → Executable file
@@ -10,8 +10,9 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class PrimaryBuildingInfo : TraitInfo<PrimaryBuilding> { }
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class ProductionInfo : ITraitInfo
|
||||
{
|
||||
@@ -61,7 +61,7 @@ namespace OpenRA.Traits
|
||||
// Animate the spawn -> exit transition
|
||||
var speed = move.MovementSpeedForCell(self, exit);
|
||||
var length = speed > 0 ? (int)( ( to - spawn ).Length*3 / speed ) : 0;
|
||||
newUnit.QueueActivity(new Activities.Drag(spawn, to, length));
|
||||
newUnit.QueueActivity(new Traits.Activities.Drag(spawn, to, length));
|
||||
|
||||
// Log.Write("debug", "length={0} facing={1} exit={2} spawn={3}", length, facing.Facing, exit, spawn);
|
||||
|
||||
@@ -72,7 +72,7 @@ namespace OpenRA.Traits
|
||||
{
|
||||
target = rp.rallyPoint;
|
||||
// Todo: Move implies unit has Mobile
|
||||
newUnit.QueueActivity(new Activities.Move(target, 1));
|
||||
newUnit.QueueActivity(new Traits.Activities.Move(target, 1));
|
||||
}
|
||||
|
||||
if (newUnit.Owner == self.World.LocalPlayer)
|
||||
7
OpenRA.Game/Traits/RallyPoint.cs → OpenRA.Mods.RA/RallyPoint.cs
Normal file → Executable file
7
OpenRA.Game/Traits/RallyPoint.cs → OpenRA.Mods.RA/RallyPoint.cs
Normal file → Executable file
@@ -11,8 +11,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class RallyPointInfo : ITraitInfo, ITraitPrerequisite<RenderSimpleInfo>
|
||||
{
|
||||
@@ -38,8 +39,8 @@ namespace OpenRA.Traits
|
||||
public IEnumerable<Renderable> Render(Actor self)
|
||||
{
|
||||
if (self.Owner == self.World.LocalPlayer && self.World.Selection.Actors.Contains(self))
|
||||
yield return Util.Centered(self,
|
||||
anim.Image, Util.CenterOfCell(rallyPoint));
|
||||
yield return Traits.Util.Centered(self,
|
||||
anim.Image, Traits.Util.CenterOfCell(rallyPoint));
|
||||
}
|
||||
|
||||
public int OrderPriority(Actor self, int2 xy, MouseInput mi, Actor underCursor)
|
||||
16
OpenRA.Game/Traits/RepairableBuilding.cs → OpenRA.Mods.RA/RepairableBuilding.cs
Normal file → Executable file
16
OpenRA.Game/Traits/RepairableBuilding.cs → OpenRA.Mods.RA/RepairableBuilding.cs
Normal file → Executable file
@@ -6,17 +6,13 @@
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
* see LICENSE.
|
||||
*/
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
using OpenRA.Traits;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Traits.Activities;
|
||||
|
||||
namespace OpenRA.Traits
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class RepairableBuildingInfo : ITraitInfo, ITraitPrerequisite<HealthInfo>
|
||||
{
|
||||
@@ -14,7 +14,7 @@ using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Orders;
|
||||
using OpenRA.Mods.RA.Orders;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Widgets;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user