more simplification of Strategic*
This commit is contained in:
@@ -75,8 +75,6 @@
|
||||
<Compile Include="ProductionBar.cs" />
|
||||
<Compile Include="Render\RenderEditorOnly.cs" />
|
||||
<Compile Include="SmokeTrailWhenDamaged.cs" />
|
||||
<Compile Include="Strategic\StrategicVictoryConditions.cs" />
|
||||
<Compile Include="Strategic\StrategicPoint.cs" />
|
||||
<Compile Include="ProximityCapturable.cs" />
|
||||
<Compile Include="Air\Fly.cs" />
|
||||
<Compile Include="Air\FlyAttack.cs" />
|
||||
@@ -356,6 +354,7 @@
|
||||
<Compile Include="Render\WithSmoke.cs" />
|
||||
<Compile Include="Render\RenderHarvester.cs" />
|
||||
<Compile Include="Lint\CheckActorReferences.cs" />
|
||||
<Compile Include="StrategicVictoryConditions.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenRA.FileFormats\OpenRA.FileFormats.csproj">
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 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. For more information,
|
||||
* see COPYING.
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class StrategicPointInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new StrategicPoint(init.self, this); }
|
||||
}
|
||||
|
||||
public class StrategicPoint : INotifyCapture, ITick, ISync
|
||||
{
|
||||
[Sync] public Player OriginalOwner;
|
||||
[Sync] public int TicksOwned = 0;
|
||||
|
||||
public StrategicPointInfo Info;
|
||||
|
||||
public StrategicPoint(Actor self, StrategicPointInfo info)
|
||||
{
|
||||
Info = info;
|
||||
OriginalOwner = self.Owner;
|
||||
}
|
||||
|
||||
public void OnCapture(Actor self, Actor captor, Player oldOwner, Player newOwner)
|
||||
{
|
||||
TicksOwned = 0;
|
||||
}
|
||||
|
||||
public void Tick(Actor self)
|
||||
{
|
||||
if (OriginalOwner == self.Owner || self.Owner.WinState != WinState.Undefined) return;
|
||||
TicksOwned++;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,9 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class StrategicPointInfo : TraitInfo<StrategicPoint> {}
|
||||
public class StrategicPoint {}
|
||||
|
||||
public class StrategicVictoryConditionsInfo : ITraitInfo, Requires<ConquestVictoryConditionsInfo>
|
||||
{
|
||||
public readonly int TicksToHold = 25 * 60 * 5; // ~5 minutes
|
||||
Reference in New Issue
Block a user