Fix OreRefinery and TiberiumRefinery names

This commit is contained in:
penev92
2015-01-19 12:12:31 +02:00
parent 6a40dfd0db
commit 202e280551
6 changed files with 21 additions and 21 deletions

View File

@@ -72,7 +72,7 @@
<Compile Include="Effects\IonCannon.cs" />
<Compile Include="Traits\AttackPopupTurreted.cs" />
<Compile Include="Traits\Buildings\ProductionAirdrop.cs" />
<Compile Include="Traits\Buildings\TiberiumRefinery.cs" />
<Compile Include="Traits\Buildings\TiberianDawnRefinery.cs" />
<Compile Include="Traits\PoisonedByTiberium.cs" />
<Compile Include="Traits\Render\RenderGunboat.cs" />
<Compile Include="Traits\Render\WithCargo.cs" />

View File

@@ -11,18 +11,17 @@
using OpenRA.Activities;
using OpenRA.Mods.Cnc.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Traits;
namespace OpenRA.Mods.Cnc.Traits
{
public class TiberiumRefineryInfo : OreRefineryInfo
public class TiberianDawnRefineryInfo : RefineryInfo
{
public override object Create(ActorInitializer init) { return new TiberiumRefinery(init.Self, this); }
public override object Create(ActorInitializer init) { return new TiberianDawnRefinery(init.Self, this); }
}
public class TiberiumRefinery : OreRefinery
public class TiberianDawnRefinery : Refinery
{
public TiberiumRefinery(Actor self, TiberiumRefineryInfo info) : base(self, info) { }
public TiberianDawnRefinery(Actor self, RefineryInfo info) : base(self, info) { }
public override Activity DockSequence(Actor harv, Actor self)
{

View File

@@ -81,7 +81,7 @@ namespace OpenRA.Mods.RA.AI
var type = BuildingType.Building;
if (world.Map.Rules.Actors[currentBuilding.Item].Traits.Contains<AttackBaseInfo>())
type = BuildingType.Defense;
else if (world.Map.Rules.Actors[currentBuilding.Item].Traits.Contains<OreRefineryInfo>())
else if (world.Map.Rules.Actors[currentBuilding.Item].Traits.Contains<RefineryInfo>())
type = BuildingType.Refinery;
var location = ai.ChooseBuildLocation(currentBuilding.Item, true, type);

View File

@@ -111,7 +111,7 @@
<Compile Include="Traits\SupportPowers\ParatroopersPower.cs" />
<Compile Include="TraitsInterfaces.cs" />
<Compile Include="Traits\Buildings\Fake.cs" />
<Compile Include="Traits\Buildings\OreRefinery.cs" />
<Compile Include="Traits\Buildings\Refinery.cs" />
<Compile Include="Traits\Harvester.cs" />
<Compile Include="Traits\HarvesterHuskModifier.cs" />
<Compile Include="Traits\LeavesHusk.cs" />

View File

@@ -11,7 +11,6 @@
using System.Collections.Generic;
using System.Linq;
using OpenRA.Activities;
using OpenRA.Mods.Common.Activities;
using OpenRA.Mods.Common.Effects;
using OpenRA.Mods.Common.Traits;
using OpenRA.Mods.RA.Activities;
@@ -19,7 +18,7 @@ using OpenRA.Traits;
namespace OpenRA.Mods.RA.Traits
{
public class OreRefineryInfo : ITraitInfo
public class RefineryInfo : ITraitInfo
{
[Desc("Docking cell relative to top-left cell.")]
public readonly CVec DockOffset = new CVec(1, 2);
@@ -28,16 +27,16 @@ namespace OpenRA.Mods.RA.Traits
public readonly int TickLifetime = 30;
public readonly int TickVelocity = 2;
public readonly int TickRate = 10;
[Desc("Actually harvester facing when docking, 0-255 counter-clock-wise.")]
[Desc("Actual harvester facing when docking, 0-255 counter-clock-wise.")]
public readonly int DockAngle = 64;
public virtual object Create(ActorInitializer init) { return new OreRefinery(init.Self, this); }
public virtual object Create(ActorInitializer init) { return new Refinery(init.Self, this); }
}
public class OreRefinery : ITick, IAcceptResources, INotifyKilled, INotifySold, INotifyCapture, INotifyOwnerChanged, IExplodeModifier, ISync
public class Refinery : ITick, IAcceptResources, INotifyKilled, INotifySold, INotifyCapture, INotifyOwnerChanged, IExplodeModifier, ISync
{
readonly Actor self;
readonly OreRefineryInfo info;
readonly RefineryInfo info;
PlayerResources playerResources;
int currentDisplayTick = 0;
@@ -50,9 +49,7 @@ namespace OpenRA.Mods.RA.Traits
public bool AllowDocking { get { return !preventDock; } }
public CVec DeliveryOffset { get { return info.DockOffset; } }
public virtual Activity DockSequence(Actor harv, Actor self) { return new RAHarvesterDockSequence(harv, self, info.DockAngle); }
public OreRefinery(Actor self, OreRefineryInfo info)
public Refinery(Actor self, RefineryInfo info)
{
this.self = self;
this.info = info;
@@ -60,6 +57,11 @@ namespace OpenRA.Mods.RA.Traits
currentDisplayTick = info.TickRate;
}
public virtual Activity DockSequence(Actor harv, Actor self)
{
return new RAHarvesterDockSequence(harv, self, info.DockAngle);
}
public IEnumerable<TraitPair<Harvester>> GetLinkedHarvesters()
{
return self.World.ActorsWithTrait<Harvester>()

View File

@@ -11,18 +11,17 @@
using OpenRA.Activities;
using OpenRA.Mods.RA.Traits;
using OpenRA.Mods.TS.Activities;
using OpenRA.Traits;
namespace OpenRA.Mods.TS.Traits
{
public class TiberianSunRefineryInfo : OreRefineryInfo
public class TiberianSunRefineryInfo : RefineryInfo
{
public override object Create(ActorInitializer init) { return new TiberianSunRefinery(init.Self, this); }
}
public class TiberianSunRefinery : OreRefinery
public class TiberianSunRefinery : Refinery
{
public TiberianSunRefinery(Actor self, TiberianSunRefineryInfo info) : base(self, info) { }
public TiberianSunRefinery(Actor self, RefineryInfo info) : base(self, info) { }
public override Activity DockSequence(Actor harv, Actor self)
{