Fix CA1852
This commit is contained in:
committed by
Pavel Penev
parent
277699cbd5
commit
f4af5c1764
@@ -772,6 +772,9 @@ dotnet_diagnostic.CA1849.severity = warning
|
|||||||
# Prefer static HashData method over ComputeHash. (Not available on mono)
|
# Prefer static HashData method over ComputeHash. (Not available on mono)
|
||||||
dotnet_diagnostic.CA1850.severity = none
|
dotnet_diagnostic.CA1850.severity = none
|
||||||
|
|
||||||
|
# Seal internal types.
|
||||||
|
dotnet_diagnostic.CA1852.severity = warning
|
||||||
|
|
||||||
# Unnecessary call to 'Dictionary.ContainsKey(key)'.
|
# Unnecessary call to 'Dictionary.ContainsKey(key)'.
|
||||||
dotnet_diagnostic.CA1853.severity = warning
|
dotnet_diagnostic.CA1853.severity = warning
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ namespace OpenRA
|
|||||||
/// <summary>Value used to represent an invalid token.</summary>
|
/// <summary>Value used to represent an invalid token.</summary>
|
||||||
public static readonly int InvalidConditionToken = -1;
|
public static readonly int InvalidConditionToken = -1;
|
||||||
|
|
||||||
class ConditionState
|
sealed class ConditionState
|
||||||
{
|
{
|
||||||
/// <summary>Delegates that have registered to be notified when this condition changes.</summary>
|
/// <summary>Delegates that have registered to be notified when this condition changes.</summary>
|
||||||
public readonly List<VariableObserverNotifier> Notifiers = new();
|
public readonly List<VariableObserverNotifier> Notifiers = new();
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ namespace OpenRA.FileSystem
|
|||||||
public void Dispose() { /* nothing to do */ }
|
public void Dispose() { /* nothing to do */ }
|
||||||
}
|
}
|
||||||
|
|
||||||
class StaticStreamDataSource : IStaticDataSource
|
sealed class StaticStreamDataSource : IStaticDataSource
|
||||||
{
|
{
|
||||||
readonly Stream s;
|
readonly Stream s;
|
||||||
public StaticStreamDataSource(Stream s)
|
public StaticStreamDataSource(Stream s)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace OpenRA.Graphics
|
|||||||
{
|
{
|
||||||
public sealed class CursorManager
|
public sealed class CursorManager
|
||||||
{
|
{
|
||||||
class Cursor
|
sealed class Cursor
|
||||||
{
|
{
|
||||||
public string Name;
|
public string Name;
|
||||||
public int2 PaddedSize;
|
public int2 PaddedSize;
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ namespace OpenRA.Graphics
|
|||||||
{
|
{
|
||||||
public Action<string> OnMissingModelError { get; set; }
|
public Action<string> OnMissingModelError { get; set; }
|
||||||
|
|
||||||
class PlaceholderModelCache : IModelCache
|
sealed class PlaceholderModelCache : IModelCache
|
||||||
{
|
{
|
||||||
public IVertexBuffer<Vertex> VertexBuffer => throw new NotImplementedException();
|
public IVertexBuffer<Vertex> VertexBuffer => throw new NotImplementedException();
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ namespace OpenRA.Graphics
|
|||||||
return new ReadOnlyPalette(palette);
|
return new ReadOnlyPalette(palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ReadOnlyPalette : IPalette
|
sealed class ReadOnlyPalette : IPalette
|
||||||
{
|
{
|
||||||
readonly IPalette palette;
|
readonly IPalette palette;
|
||||||
public ReadOnlyPalette(IPalette palette) { this.palette = palette; }
|
public ReadOnlyPalette(IPalette palette) { this.palette = palette; }
|
||||||
|
|||||||
@@ -427,7 +427,7 @@ namespace OpenRA.Graphics
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class GlyphInfo
|
sealed class GlyphInfo
|
||||||
{
|
{
|
||||||
public float Advance;
|
public float Advance;
|
||||||
public int2 Offset;
|
public int2 Offset;
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ namespace OpenRA
|
|||||||
MissionSelector = 4
|
MissionSelector = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
class MapField
|
sealed class MapField
|
||||||
{
|
{
|
||||||
enum Type { Normal, NodeList, MiniYaml }
|
enum Type { Normal, NodeList, MiniYaml }
|
||||||
readonly FieldInfo field;
|
readonly FieldInfo field;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace OpenRA
|
|||||||
public class MapPreview : IDisposable, IReadOnlyFileSystem
|
public class MapPreview : IDisposable, IReadOnlyFileSystem
|
||||||
{
|
{
|
||||||
/// <summary>Wrapper that enables map data to be replaced in an atomic fashion.</summary>
|
/// <summary>Wrapper that enables map data to be replaced in an atomic fashion.</summary>
|
||||||
class InnerData
|
sealed class InnerData
|
||||||
{
|
{
|
||||||
public int MapFormat;
|
public int MapFormat;
|
||||||
public string Title;
|
public string Title;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ namespace OpenRA.Network
|
|||||||
{
|
{
|
||||||
public class GeoIP
|
public class GeoIP
|
||||||
{
|
{
|
||||||
class IP2LocationReader
|
sealed class IP2LocationReader
|
||||||
{
|
{
|
||||||
public readonly DateTime Date;
|
public readonly DateTime Date;
|
||||||
readonly Stream stream;
|
readonly Stream stream;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenRA.Network
|
|||||||
{
|
{
|
||||||
public sealed class ReplayConnection : IConnection
|
public sealed class ReplayConnection : IConnection
|
||||||
{
|
{
|
||||||
class Chunk
|
sealed class Chunk
|
||||||
{
|
{
|
||||||
public int Frame;
|
public int Frame;
|
||||||
public (int ClientId, byte[] Packet)[] Packets;
|
public (int ClientId, byte[] Packet)[] Packets;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using OpenRA.Primitives;
|
|||||||
|
|
||||||
namespace OpenRA.Network
|
namespace OpenRA.Network
|
||||||
{
|
{
|
||||||
class SyncReport
|
sealed class SyncReport
|
||||||
{
|
{
|
||||||
const int NumSyncReports = 7;
|
const int NumSyncReports = 7;
|
||||||
static readonly Cache<Type, TypeInfo> TypeInfoCache = new(t => new TypeInfo(t));
|
static readonly Cache<Type, TypeInfo> TypeInfoCache = new(t => new TypeInfo(t));
|
||||||
@@ -161,7 +161,7 @@ namespace OpenRA.Network
|
|||||||
Log.Write("sync", $"Recorded frames do not contain the frame {frame}. No sync report available!");
|
Log.Write("sync", $"Recorded frames do not contain the frame {frame}. No sync report available!");
|
||||||
}
|
}
|
||||||
|
|
||||||
class Report
|
sealed class Report
|
||||||
{
|
{
|
||||||
public int Frame;
|
public int Frame;
|
||||||
public int SyncedRandom;
|
public int SyncedRandom;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace OpenRA.Server
|
namespace OpenRA.Server
|
||||||
{
|
{
|
||||||
class PlayerMessageTracker
|
sealed class PlayerMessageTracker
|
||||||
{
|
{
|
||||||
[TranslationReference("remaining")]
|
[TranslationReference("remaining")]
|
||||||
const string ChatTemporaryDisabled = "notification-chat-temp-disabled";
|
const string ChatTemporaryDisabled = "notification-chat-temp-disabled";
|
||||||
|
|||||||
@@ -1441,7 +1441,7 @@ namespace OpenRA.Server
|
|||||||
|
|
||||||
interface IServerEvent { void Invoke(Server server); }
|
interface IServerEvent { void Invoke(Server server); }
|
||||||
|
|
||||||
class ConnectionConnectEvent : IServerEvent
|
sealed class ConnectionConnectEvent : IServerEvent
|
||||||
{
|
{
|
||||||
readonly Socket socket;
|
readonly Socket socket;
|
||||||
public ConnectionConnectEvent(Socket socket)
|
public ConnectionConnectEvent(Socket socket)
|
||||||
@@ -1455,7 +1455,7 @@ namespace OpenRA.Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ConnectionDisconnectEvent : IServerEvent
|
sealed class ConnectionDisconnectEvent : IServerEvent
|
||||||
{
|
{
|
||||||
readonly Connection connection;
|
readonly Connection connection;
|
||||||
public ConnectionDisconnectEvent(Connection connection)
|
public ConnectionDisconnectEvent(Connection connection)
|
||||||
@@ -1469,7 +1469,7 @@ namespace OpenRA.Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ConnectionPacketEvent : IServerEvent
|
sealed class ConnectionPacketEvent : IServerEvent
|
||||||
{
|
{
|
||||||
readonly Connection connection;
|
readonly Connection connection;
|
||||||
readonly int frame;
|
readonly int frame;
|
||||||
@@ -1488,7 +1488,7 @@ namespace OpenRA.Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ConnectionPingEvent : IServerEvent
|
sealed class ConnectionPingEvent : IServerEvent
|
||||||
{
|
{
|
||||||
readonly Connection connection;
|
readonly Connection connection;
|
||||||
readonly int[] pingHistory;
|
readonly int[] pingHistory;
|
||||||
@@ -1511,7 +1511,7 @@ namespace OpenRA.Server
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CallbackEvent : IServerEvent
|
sealed class CallbackEvent : IServerEvent
|
||||||
{
|
{
|
||||||
readonly Action action;
|
readonly Action action;
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ namespace OpenRA.Support
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ManagedLoadContext : AssemblyLoadContext
|
sealed class ManagedLoadContext : AssemblyLoadContext
|
||||||
{
|
{
|
||||||
readonly string basePath;
|
readonly string basePath;
|
||||||
readonly Dictionary<string, ManagedLibrary> managedAssemblies;
|
readonly Dictionary<string, ManagedLibrary> managedAssemblies;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using System.Globalization;
|
|||||||
|
|
||||||
namespace OpenRA.Support
|
namespace OpenRA.Support
|
||||||
{
|
{
|
||||||
class Benchmark
|
sealed class Benchmark
|
||||||
{
|
{
|
||||||
readonly string prefix;
|
readonly string prefix;
|
||||||
readonly Dictionary<string, List<BenchmarkPoint>> samples = new();
|
readonly Dictionary<string, List<BenchmarkPoint>> samples = new();
|
||||||
@@ -30,7 +30,7 @@ namespace OpenRA.Support
|
|||||||
samples.GetOrAdd(item.Key).Add(new BenchmarkPoint(localTick, item.Value.LastValue));
|
samples.GetOrAdd(item.Key).Add(new BenchmarkPoint(localTick, item.Value.LastValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
class BenchmarkPoint
|
sealed class BenchmarkPoint
|
||||||
{
|
{
|
||||||
public int Tick { get; }
|
public int Tick { get; }
|
||||||
public double Value { get; }
|
public double Value { get; }
|
||||||
|
|||||||
@@ -551,7 +551,7 @@ namespace OpenRA.Support
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class VariableToken : Token
|
sealed class VariableToken : Token
|
||||||
{
|
{
|
||||||
public readonly string Name;
|
public readonly string Name;
|
||||||
|
|
||||||
@@ -561,7 +561,7 @@ namespace OpenRA.Support
|
|||||||
: base(TokenType.Variable, index) { Name = symbol; }
|
: base(TokenType.Variable, index) { Name = symbol; }
|
||||||
}
|
}
|
||||||
|
|
||||||
class NumberToken : Token
|
sealed class NumberToken : Token
|
||||||
{
|
{
|
||||||
public readonly int Value;
|
public readonly int Value;
|
||||||
readonly string symbol;
|
readonly string symbol;
|
||||||
@@ -714,7 +714,7 @@ namespace OpenRA.Support
|
|||||||
return Expressions.Expression.Condition(test, ifTrue, ifFalse);
|
return Expressions.Expression.Condition(test, ifTrue, ifFalse);
|
||||||
}
|
}
|
||||||
|
|
||||||
class AstStack
|
sealed class AstStack
|
||||||
{
|
{
|
||||||
readonly List<Expression> expressions = new();
|
readonly List<Expression> expressions = new();
|
||||||
readonly List<ExpressionType> types = new();
|
readonly List<ExpressionType> types = new();
|
||||||
@@ -772,7 +772,7 @@ namespace OpenRA.Support
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Compiler
|
sealed class Compiler
|
||||||
{
|
{
|
||||||
readonly AstStack ast = new();
|
readonly AstStack ast = new();
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace OpenRA
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides efficient ways to query a set of actors by their traits.
|
/// Provides efficient ways to query a set of actors by their traits.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
class TraitDictionary
|
sealed class TraitDictionary
|
||||||
{
|
{
|
||||||
static readonly Func<Type, ITraitContainer> CreateTraitContainer = t =>
|
static readonly Func<Type, ITraitContainer> CreateTraitContainer = t =>
|
||||||
(ITraitContainer)typeof(TraitContainer<>).MakeGenericType(t).GetConstructor(Type.EmptyTypes).Invoke(null);
|
(ITraitContainer)typeof(TraitContainer<>).MakeGenericType(t).GetConstructor(Type.EmptyTypes).Invoke(null);
|
||||||
@@ -141,7 +141,7 @@ namespace OpenRA
|
|||||||
int Queries { get; }
|
int Queries { get; }
|
||||||
}
|
}
|
||||||
|
|
||||||
class TraitContainer<T> : ITraitContainer
|
sealed class TraitContainer<T> : ITraitContainer
|
||||||
{
|
{
|
||||||
readonly List<Actor> actors = new();
|
readonly List<Actor> actors = new();
|
||||||
readonly List<T> traits = new();
|
readonly List<T> traits = new();
|
||||||
@@ -185,7 +185,7 @@ namespace OpenRA
|
|||||||
return new MultipleEnumerable(this, actor);
|
return new MultipleEnumerable(this, actor);
|
||||||
}
|
}
|
||||||
|
|
||||||
class MultipleEnumerable : IEnumerable<T>
|
sealed class MultipleEnumerable : IEnumerable<T>
|
||||||
{
|
{
|
||||||
readonly TraitContainer<T> container;
|
readonly TraitContainer<T> container;
|
||||||
readonly uint actor;
|
readonly uint actor;
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ namespace OpenRA.Traits
|
|||||||
public int RevealedCells { get; private set; }
|
public int RevealedCells { get; private set; }
|
||||||
|
|
||||||
enum ShroudCellType : byte { Shroud, Fog, Visible }
|
enum ShroudCellType : byte { Shroud, Fog, Visible }
|
||||||
class ShroudSource
|
sealed class ShroudSource
|
||||||
{
|
{
|
||||||
public readonly SourceType Type;
|
public readonly SourceType Type;
|
||||||
public readonly PPos[] ProjectedCells;
|
public readonly PPos[] ProjectedCells;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace OpenRA.UtilityCommands
|
namespace OpenRA.UtilityCommands
|
||||||
{
|
{
|
||||||
class ClearInvalidModRegistrationsCommand : IUtilityCommand
|
sealed class ClearInvalidModRegistrationsCommand : IUtilityCommand
|
||||||
{
|
{
|
||||||
string IUtilityCommand.Name => "--clear-invalid-mod-registrations";
|
string IUtilityCommand.Name => "--clear-invalid-mod-registrations";
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace OpenRA.UtilityCommands
|
namespace OpenRA.UtilityCommands
|
||||||
{
|
{
|
||||||
class RegisterModCommand : IUtilityCommand
|
sealed class RegisterModCommand : IUtilityCommand
|
||||||
{
|
{
|
||||||
string IUtilityCommand.Name => "--register-mod";
|
string IUtilityCommand.Name => "--register-mod";
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace OpenRA.UtilityCommands
|
namespace OpenRA.UtilityCommands
|
||||||
{
|
{
|
||||||
class UnregisterModCommand : IUtilityCommand
|
sealed class UnregisterModCommand : IUtilityCommand
|
||||||
{
|
{
|
||||||
string IUtilityCommand.Name => "--unregister-mod";
|
string IUtilityCommand.Name => "--unregister-mod";
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Activities
|
namespace OpenRA.Mods.Cnc.Activities
|
||||||
{
|
{
|
||||||
class Infiltrate : Enter
|
sealed class Infiltrate : Enter
|
||||||
{
|
{
|
||||||
readonly Infiltrates infiltrates;
|
readonly Infiltrates infiltrates;
|
||||||
readonly INotifyInfiltration[] notifiers;
|
readonly INotifyInfiltration[] notifiers;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Effects
|
namespace OpenRA.Mods.Cnc.Effects
|
||||||
{
|
{
|
||||||
class GpsDotEffect : IEffect, IEffectAnnotation
|
sealed class GpsDotEffect : IEffect, IEffectAnnotation
|
||||||
{
|
{
|
||||||
readonly Actor actor;
|
readonly Actor actor;
|
||||||
readonly GpsDotInfo info;
|
readonly GpsDotInfo info;
|
||||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Effects
|
|||||||
readonly PlayerDictionary<DotState> dotStates;
|
readonly PlayerDictionary<DotState> dotStates;
|
||||||
readonly IVisibilityModifier[] visibilityModifiers;
|
readonly IVisibilityModifier[] visibilityModifiers;
|
||||||
|
|
||||||
class DotState
|
sealed class DotState
|
||||||
{
|
{
|
||||||
public readonly GpsWatcher Watcher;
|
public readonly GpsWatcher Watcher;
|
||||||
public readonly bool FrozenActorWithRenderables;
|
public readonly bool FrozenActorWithRenderables;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using OpenRA.Mods.Cnc.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Effects
|
namespace OpenRA.Mods.Cnc.Effects
|
||||||
{
|
{
|
||||||
class GpsSatellite : IEffect, ISpatiallyPartitionable
|
sealed class GpsSatellite : IEffect, ISpatiallyPartitionable
|
||||||
{
|
{
|
||||||
readonly Player launcher;
|
readonly Player launcher;
|
||||||
readonly Animation anim;
|
readonly Animation anim;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using OpenRA.Mods.Cnc.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Effects
|
namespace OpenRA.Mods.Cnc.Effects
|
||||||
{
|
{
|
||||||
class SatelliteLaunch : IEffect, ISpatiallyPartitionable
|
sealed class SatelliteLaunch : IEffect, ISpatiallyPartitionable
|
||||||
{
|
{
|
||||||
readonly GpsPowerInfo info;
|
readonly GpsPowerInfo info;
|
||||||
readonly Actor launcher;
|
readonly Actor launcher;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.FileFormats
|
namespace OpenRA.Mods.Cnc.FileFormats
|
||||||
{
|
{
|
||||||
class Blowfish
|
sealed class Blowfish
|
||||||
{
|
{
|
||||||
public Blowfish(byte[] key)
|
public Blowfish(byte[] key)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,11 +16,11 @@ namespace OpenRA.Mods.Cnc.FileFormats
|
|||||||
{
|
{
|
||||||
/* TODO: Convert this direct C port into readable code. */
|
/* TODO: Convert this direct C port into readable code. */
|
||||||
|
|
||||||
class BlowfishKeyProvider
|
sealed class BlowfishKeyProvider
|
||||||
{
|
{
|
||||||
const string PublicKeyString = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
|
const string PublicKeyString = "AihRvNoIbTn85FZRYNZRcT+i6KpU+maCsEqr3Q5q+LDB5tH7Tz2qQ38V";
|
||||||
|
|
||||||
class PublicKey
|
sealed class PublicKey
|
||||||
{
|
{
|
||||||
public readonly uint[] KeyOne = new uint[64];
|
public readonly uint[] KeyOne = new uint[64];
|
||||||
public readonly uint[] KeyTwo = new uint[64];
|
public readonly uint[] KeyTwo = new uint[64];
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.Cnc.FileSystem
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class Entry
|
sealed class Entry
|
||||||
{
|
{
|
||||||
public readonly uint Offset;
|
public readonly uint Offset;
|
||||||
public readonly uint Size;
|
public readonly uint Size;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using OpenRA.Primitives;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Graphics
|
namespace OpenRA.Mods.Cnc.Graphics
|
||||||
{
|
{
|
||||||
class TeslaZapRenderable : IPalettedRenderable, IFinalizedRenderable
|
sealed class TeslaZapRenderable : IPalettedRenderable, IFinalizedRenderable
|
||||||
{
|
{
|
||||||
static readonly int[][] Steps = new[]
|
static readonly int[][] Steps = new[]
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
|||||||
VariableLengthTable = 4
|
VariableLengthTable = 4
|
||||||
}
|
}
|
||||||
|
|
||||||
class ShpD2Frame : ISpriteFrame
|
sealed class ShpD2Frame : ISpriteFrame
|
||||||
{
|
{
|
||||||
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
||||||
public Size Size { get; }
|
public Size Size { get; }
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
|||||||
{
|
{
|
||||||
enum Format { XORPrev = 0x20, XORLCW = 0x40, LCW = 0x80 }
|
enum Format { XORPrev = 0x20, XORLCW = 0x40, LCW = 0x80 }
|
||||||
|
|
||||||
class ImageHeader : ISpriteFrame
|
sealed class ImageHeader : ISpriteFrame
|
||||||
{
|
{
|
||||||
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
||||||
public Size Size => reader.Size;
|
public Size Size => reader.Size;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
|||||||
{
|
{
|
||||||
public class TmpRALoader : ISpriteLoader
|
public class TmpRALoader : ISpriteLoader
|
||||||
{
|
{
|
||||||
class TmpRAFrame : ISpriteFrame
|
sealed class TmpRAFrame : ISpriteFrame
|
||||||
{
|
{
|
||||||
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
||||||
public Size Size { get; }
|
public Size Size { get; }
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
|||||||
{
|
{
|
||||||
public class TmpTDLoader : ISpriteLoader
|
public class TmpTDLoader : ISpriteLoader
|
||||||
{
|
{
|
||||||
class TmpTDFrame : ISpriteFrame
|
sealed class TmpTDFrame : ISpriteFrame
|
||||||
{
|
{
|
||||||
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
||||||
public Size Size { get; }
|
public Size Size { get; }
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
|||||||
{
|
{
|
||||||
public class TmpTSLoader : ISpriteLoader
|
public class TmpTSLoader : ISpriteLoader
|
||||||
{
|
{
|
||||||
class TmpTSDepthFrame : ISpriteFrame
|
sealed class TmpTSDepthFrame : ISpriteFrame
|
||||||
{
|
{
|
||||||
readonly TmpTSFrame parent;
|
readonly TmpTSFrame parent;
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ namespace OpenRA.Mods.Cnc.SpriteLoaders
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class TmpTSFrame : ISpriteFrame
|
sealed class TmpTSFrame : ISpriteFrame
|
||||||
{
|
{
|
||||||
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
public SpriteFrameType Type => SpriteFrameType.Indexed8;
|
||||||
public Size Size { get; }
|
public Size Size { get; }
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Actor's turret rises from the ground before attacking.")]
|
[Desc("Actor's turret rises from the ground before attacking.")]
|
||||||
class AttackPopupTurretedInfo : AttackTurretedInfo, Requires<BuildingInfo>, Requires<WithEmbeddedTurretSpriteBodyInfo>
|
sealed class AttackPopupTurretedInfo : AttackTurretedInfo, Requires<BuildingInfo>, Requires<WithEmbeddedTurretSpriteBodyInfo>
|
||||||
{
|
{
|
||||||
[Desc("How many game ticks should pass before closing the actor's turret.")]
|
[Desc("How many game ticks should pass before closing the actor's turret.")]
|
||||||
public readonly int CloseDelay = 125;
|
public readonly int CloseDelay = 125;
|
||||||
@@ -46,7 +46,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new AttackPopupTurreted(init, this); }
|
public override object Create(ActorInitializer init) { return new AttackPopupTurreted(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class AttackPopupTurreted : AttackTurreted, INotifyIdle, IDamageModifier
|
sealed class AttackPopupTurreted : AttackTurreted, INotifyIdle, IDamageModifier
|
||||||
{
|
{
|
||||||
enum PopupState { Open, Rotating, Transitioning, Closed }
|
enum PopupState { Open, Rotating, Transitioning, Closed }
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
return new AttackTDGunboatTurretedActivity(self, newTarget, forceAttack, targetLineColor);
|
return new AttackTDGunboatTurretedActivity(self, newTarget, forceAttack, targetLineColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
class AttackTDGunboatTurretedActivity : Activity
|
sealed class AttackTDGunboatTurretedActivity : Activity
|
||||||
{
|
{
|
||||||
readonly AttackTDGunboatTurreted attack;
|
readonly AttackTDGunboatTurreted attack;
|
||||||
readonly Target target;
|
readonly Target target;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Implements the charge-then-burst attack logic specific to the RA tesla coil.")]
|
[Desc("Implements the charge-then-burst attack logic specific to the RA tesla coil.")]
|
||||||
class AttackTeslaInfo : AttackBaseInfo
|
sealed class AttackTeslaInfo : AttackBaseInfo
|
||||||
{
|
{
|
||||||
[Desc("How many charges this actor has to attack with, once charged.")]
|
[Desc("How many charges this actor has to attack with, once charged.")]
|
||||||
public readonly int MaxCharges = 1;
|
public readonly int MaxCharges = 1;
|
||||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new AttackTesla(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new AttackTesla(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class AttackTesla : AttackBase, ITick, INotifyAttack
|
sealed class AttackTesla : AttackBase, ITick, INotifyAttack
|
||||||
{
|
{
|
||||||
readonly AttackTeslaInfo info;
|
readonly AttackTeslaInfo info;
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
return new ChargeAttack(this, newTarget, forceAttack, targetLineColor);
|
return new ChargeAttack(this, newTarget, forceAttack, targetLineColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChargeAttack : Activity, IActivityNotifyStanceChanged
|
sealed class ChargeAttack : Activity, IActivityNotifyStanceChanged
|
||||||
{
|
{
|
||||||
readonly AttackTesla attack;
|
readonly AttackTesla attack;
|
||||||
readonly Target target;
|
readonly Target target;
|
||||||
@@ -144,7 +144,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChargeFire : Activity
|
sealed class ChargeFire : Activity
|
||||||
{
|
{
|
||||||
readonly AttackTesla attack;
|
readonly AttackTesla attack;
|
||||||
readonly Target target;
|
readonly Target target;
|
||||||
|
|||||||
@@ -20,12 +20,12 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.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>
|
sealed class DisguiseTooltipInfo : TooltipInfo, Requires<DisguiseInfo>
|
||||||
{
|
{
|
||||||
public override object Create(ActorInitializer init) { return new DisguiseTooltip(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new DisguiseTooltip(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class DisguiseTooltip : ConditionalTrait<DisguiseTooltipInfo>, ITooltip
|
sealed class DisguiseTooltip : ConditionalTrait<DisguiseTooltipInfo>, ITooltip
|
||||||
{
|
{
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly Disguise disguise;
|
readonly Disguise disguise;
|
||||||
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Desc("Provides access to the disguise command, which makes the actor appear to be another player's actor.")]
|
[Desc("Provides access to the disguise command, which makes the actor appear to be another player's actor.")]
|
||||||
class DisguiseInfo : TraitInfo
|
sealed class DisguiseInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[VoiceReference]
|
[VoiceReference]
|
||||||
public readonly string Voice = "Action";
|
public readonly string Voice = "Action";
|
||||||
@@ -98,7 +98,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new Disguise(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new Disguise(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, IRadarColorModifier, INotifyAttack,
|
sealed class Disguise : IEffectiveOwner, IIssueOrder, IResolveOrder, IOrderVoice, IRadarColorModifier, INotifyAttack,
|
||||||
INotifyDamage, INotifyUnload, INotifyDemolition, INotifyInfiltration, ITick
|
INotifyDamage, INotifyUnload, INotifyDemolition, INotifyInfiltration, ITick
|
||||||
{
|
{
|
||||||
public ActorInfo AsActor { get; private set; }
|
public ActorInfo AsActor { get; private set; }
|
||||||
@@ -280,7 +280,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class DisguiseOrderTargeter : UnitOrderTargeter
|
sealed class DisguiseOrderTargeter : UnitOrderTargeter
|
||||||
{
|
{
|
||||||
readonly DisguiseInfo info;
|
readonly DisguiseInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
gps.UnregisterForOnGpsRefreshed(fufubg.self, fufubg);
|
gps.UnregisterForOnGpsRefreshed(fufubg.self, fufubg);
|
||||||
};
|
};
|
||||||
|
|
||||||
class Traits
|
sealed class Traits
|
||||||
{
|
{
|
||||||
public readonly FrozenActorLayer FrozenActorLayer;
|
public readonly FrozenActorLayer FrozenActorLayer;
|
||||||
public readonly GpsWatcher GpsWatcher;
|
public readonly GpsWatcher GpsWatcher;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Show an indicator revealing the actor underneath the fog when a GPSWatcher is activated.")]
|
[Desc("Show an indicator revealing the actor underneath the fog when a GPSWatcher is activated.")]
|
||||||
class GpsDotInfo : TraitInfo
|
sealed class GpsDotInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[Desc("Sprite collection for symbols.")]
|
[Desc("Sprite collection for symbols.")]
|
||||||
public readonly string Image = "gpsdot";
|
public readonly string Image = "gpsdot";
|
||||||
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new GpsDot(this); }
|
public override object Create(ActorInitializer init) { return new GpsDot(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class GpsDot : INotifyCreated, INotifyAddedToWorld, INotifyRemovedFromWorld
|
sealed class GpsDot : INotifyCreated, INotifyAddedToWorld, INotifyRemovedFromWorld
|
||||||
{
|
{
|
||||||
readonly GpsDotInfo info;
|
readonly GpsDotInfo info;
|
||||||
GpsDotEffect effect;
|
GpsDotEffect effect;
|
||||||
|
|||||||
@@ -18,14 +18,14 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
{
|
{
|
||||||
[TraitLocation(SystemActors.Player)]
|
[TraitLocation(SystemActors.Player)]
|
||||||
[Desc("Required for `GpsPower`. Attach this to the player actor.")]
|
[Desc("Required for `GpsPower`. Attach this to the player actor.")]
|
||||||
class GpsWatcherInfo : TraitInfo
|
sealed class GpsWatcherInfo : TraitInfo
|
||||||
{
|
{
|
||||||
public override object Create(ActorInitializer init) { return new GpsWatcher(init.Self.Owner); }
|
public override object Create(ActorInitializer init) { return new GpsWatcher(init.Self.Owner); }
|
||||||
}
|
}
|
||||||
|
|
||||||
interface IOnGpsRefreshed { void OnGpsRefresh(Actor self, Player player); }
|
interface IOnGpsRefreshed { void OnGpsRefresh(Actor self, Player player); }
|
||||||
|
|
||||||
class GpsWatcher : ISync, IPreventsShroudReset
|
sealed class GpsWatcher : ISync, IPreventsShroudReset
|
||||||
{
|
{
|
||||||
[Sync]
|
[Sync]
|
||||||
public bool Launched { get; private set; }
|
public bool Launched { get; private set; }
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Funds are transferred from the owner to the infiltrator.")]
|
[Desc("Funds are transferred from the owner to the infiltrator.")]
|
||||||
class InfiltrateForCashInfo : TraitInfo
|
sealed class InfiltrateForCashInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
||||||
public readonly BitSet<TargetableType> Types = default;
|
public readonly BitSet<TargetableType> Types = default;
|
||||||
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new InfiltrateForCash(this); }
|
public override object Create(ActorInitializer init) { return new InfiltrateForCash(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForCash : INotifyInfiltrated
|
sealed class InfiltrateForCash : INotifyInfiltrated
|
||||||
{
|
{
|
||||||
readonly InfiltrateForCashInfo info;
|
readonly InfiltrateForCashInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Reveals a decoration sprite to the indicated players when infiltrated.")]
|
[Desc("Reveals a decoration sprite to the indicated players when infiltrated.")]
|
||||||
class InfiltrateForDecorationInfo : WithDecorationInfo
|
sealed class InfiltrateForDecorationInfo : WithDecorationInfo
|
||||||
{
|
{
|
||||||
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
||||||
public readonly BitSet<TargetableType> Types = default;
|
public readonly BitSet<TargetableType> Types = default;
|
||||||
@@ -27,7 +27,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new InfiltrateForDecoration(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new InfiltrateForDecoration(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForDecoration : WithDecoration, INotifyInfiltrated
|
sealed class InfiltrateForDecoration : WithDecoration, INotifyInfiltrated
|
||||||
{
|
{
|
||||||
readonly HashSet<Player> infiltrators = new();
|
readonly HashSet<Player> infiltrators = new();
|
||||||
readonly InfiltrateForDecorationInfo info;
|
readonly InfiltrateForDecorationInfo info;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Steal and reset the owner's exploration.")]
|
[Desc("Steal and reset the owner's exploration.")]
|
||||||
class InfiltrateForExplorationInfo : TraitInfo
|
sealed class InfiltrateForExplorationInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
||||||
public readonly BitSet<TargetableType> Types = default;
|
public readonly BitSet<TargetableType> Types = default;
|
||||||
@@ -39,7 +39,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new InfiltrateForExploration(this); }
|
public override object Create(ActorInitializer init) { return new InfiltrateForExploration(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForExploration : INotifyInfiltrated
|
sealed class InfiltrateForExploration : INotifyInfiltrated
|
||||||
{
|
{
|
||||||
readonly InfiltrateForExplorationInfo info;
|
readonly InfiltrateForExplorationInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class InfiltrateForPowerOutageInfo : TraitInfo
|
sealed class InfiltrateForPowerOutageInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
||||||
public readonly BitSet<TargetableType> Types = default;
|
public readonly BitSet<TargetableType> Types = default;
|
||||||
@@ -40,7 +40,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new InfiltrateForPowerOutage(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new InfiltrateForPowerOutage(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForPowerOutage : INotifyOwnerChanged, INotifyInfiltrated
|
sealed class InfiltrateForPowerOutage : INotifyOwnerChanged, INotifyInfiltrated
|
||||||
{
|
{
|
||||||
readonly InfiltrateForPowerOutageInfo info;
|
readonly InfiltrateForPowerOutageInfo info;
|
||||||
PowerManager playerPower;
|
PowerManager playerPower;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class InfiltrateForSupportPowerInfo : TraitInfo
|
sealed class InfiltrateForSupportPowerInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[ActorReference]
|
[ActorReference]
|
||||||
[FieldLoader.Require]
|
[FieldLoader.Require]
|
||||||
@@ -41,7 +41,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
|
public override object Create(ActorInitializer init) { return new InfiltrateForSupportPower(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForSupportPower : INotifyInfiltrated
|
sealed class InfiltrateForSupportPower : INotifyInfiltrated
|
||||||
{
|
{
|
||||||
readonly InfiltrateForSupportPowerInfo info;
|
readonly InfiltrateForSupportPowerInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class InfiltrateForSupportPowerResetInfo : TraitInfo
|
sealed class InfiltrateForSupportPowerResetInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
[Desc("The `TargetTypes` from `Targetable` that are allowed to enter.")]
|
||||||
public readonly BitSet<TargetableType> Types = default;
|
public readonly BitSet<TargetableType> Types = default;
|
||||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new InfiltrateForSupportPowerReset(this); }
|
public override object Create(ActorInitializer init) { return new InfiltrateForSupportPowerReset(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForSupportPowerReset : INotifyInfiltrated
|
sealed class InfiltrateForSupportPowerReset : INotifyInfiltrated
|
||||||
{
|
{
|
||||||
readonly InfiltrateForSupportPowerResetInfo info;
|
readonly InfiltrateForSupportPowerResetInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Transform into a different actor type.")]
|
[Desc("Transform into a different actor type.")]
|
||||||
class InfiltrateForTransformInfo : TraitInfo
|
sealed class InfiltrateForTransformInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[ActorReference]
|
[ActorReference]
|
||||||
[FieldLoader.Require]
|
[FieldLoader.Require]
|
||||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new InfiltrateForTransform(init, this); }
|
public override object Create(ActorInitializer init) { return new InfiltrateForTransform(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrateForTransform : INotifyInfiltrated
|
sealed class InfiltrateForTransform : INotifyInfiltrated
|
||||||
{
|
{
|
||||||
readonly InfiltrateForTransformInfo info;
|
readonly InfiltrateForTransformInfo info;
|
||||||
readonly string faction;
|
readonly string faction;
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class InfiltrationOrderTargeter : UnitOrderTargeter
|
sealed class InfiltrationOrderTargeter : UnitOrderTargeter
|
||||||
{
|
{
|
||||||
readonly InfiltratesInfo info;
|
readonly InfiltratesInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class MadTankInfo : TraitInfo, IRulesetLoaded, Requires<ExplodesInfo>, Requires<WithFacingSpriteBodyInfo>
|
sealed class MadTankInfo : TraitInfo, IRulesetLoaded, Requires<ExplodesInfo>, Requires<WithFacingSpriteBodyInfo>
|
||||||
{
|
{
|
||||||
[SequenceReference]
|
[SequenceReference]
|
||||||
public readonly string ThumpSequence = "piston";
|
public readonly string ThumpSequence = "piston";
|
||||||
@@ -87,7 +87,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MadTank : IIssueOrder, IResolveOrder, IOrderVoice, IIssueDeployOrder
|
sealed class MadTank : IIssueOrder, IResolveOrder, IOrderVoice, IIssueDeployOrder
|
||||||
{
|
{
|
||||||
readonly MadTankInfo info;
|
readonly MadTankInfo info;
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
self.QueueActivity(order.Queued, new DetonationSequence(self, this));
|
self.QueueActivity(order.Queued, new DetonationSequence(self, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
class DetonationSequence : Activity
|
sealed class DetonationSequence : Activity
|
||||||
{
|
{
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly MadTank mad;
|
readonly MadTank mad;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class MineInfo : TraitInfo
|
sealed class MineInfo : TraitInfo
|
||||||
{
|
{
|
||||||
public readonly BitSet<CrushClass> CrushClasses = default;
|
public readonly BitSet<CrushClass> CrushClasses = default;
|
||||||
public readonly bool AvoidFriendly = true;
|
public readonly bool AvoidFriendly = true;
|
||||||
@@ -25,7 +25,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new Mine(this); }
|
public override object Create(ActorInitializer init) { return new Mine(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class Mine : ICrushable, INotifyCrushed
|
sealed class Mine : ICrushable, INotifyCrushed
|
||||||
{
|
{
|
||||||
readonly MineInfo info;
|
readonly MineInfo info;
|
||||||
|
|
||||||
@@ -70,6 +70,6 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Desc("Tag trait for stuff that should not trigger mines.")]
|
[Desc("Tag trait for stuff that should not trigger mines.")]
|
||||||
class MineImmuneInfo : TraitInfo<MineImmune> { }
|
sealed class MineImmuneInfo : TraitInfo<MineImmune> { }
|
||||||
class MineImmune { }
|
sealed class MineImmune { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
return Info.TerrainTypes.Contains(terrainType);
|
return Info.TerrainTypes.Contains(terrainType);
|
||||||
}
|
}
|
||||||
|
|
||||||
class MinefieldOrderGenerator : OrderGenerator
|
sealed class MinefieldOrderGenerator : OrderGenerator
|
||||||
{
|
{
|
||||||
readonly List<Actor> minelayers;
|
readonly List<Actor> minelayers;
|
||||||
readonly Minelayer minelayer;
|
readonly Minelayer minelayer;
|
||||||
@@ -347,7 +347,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BeginMinefieldOrderTargeter : IOrderTargeter
|
sealed class BeginMinefieldOrderTargeter : IOrderTargeter
|
||||||
{
|
{
|
||||||
public string OrderID => "BeginMinefield";
|
public string OrderID => "BeginMinefield";
|
||||||
public int OrderPriority => 5;
|
public int OrderPriority => 5;
|
||||||
@@ -377,7 +377,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
return modifiers.HasModifier(TargetModifiers.ForceAttack);
|
return modifiers.HasModifier(TargetModifiers.ForceAttack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsQueued { get; protected set; }
|
public bool IsQueued { get; private set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
{
|
{
|
||||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||||
[Desc("Palette effect used for blinking \"animations\" on actors.")]
|
[Desc("Palette effect used for blinking \"animations\" on actors.")]
|
||||||
class LightPaletteRotatorInfo : TraitInfo
|
sealed class LightPaletteRotatorInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[Desc("Palettes this effect should not apply to.")]
|
[Desc("Palettes this effect should not apply to.")]
|
||||||
public readonly HashSet<string> ExcludePalettes = new();
|
public readonly HashSet<string> ExcludePalettes = new();
|
||||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new LightPaletteRotator(this); }
|
public override object Create(ActorInitializer init) { return new LightPaletteRotator(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class LightPaletteRotator : ITick, IPaletteModifier
|
sealed class LightPaletteRotator : ITick, IPaletteModifier
|
||||||
{
|
{
|
||||||
readonly LightPaletteRotatorInfo info;
|
readonly LightPaletteRotatorInfo info;
|
||||||
float t = 0;
|
float t = 0;
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class PortableChronoInfo : PausableConditionalTraitInfo, Requires<IMoveInfo>
|
sealed class PortableChronoInfo : PausableConditionalTraitInfo, Requires<IMoveInfo>
|
||||||
{
|
{
|
||||||
[Desc("Cooldown in ticks until the unit can teleport.")]
|
[Desc("Cooldown in ticks until the unit can teleport.")]
|
||||||
public readonly int ChargeDelay = 500;
|
public readonly int ChargeDelay = 500;
|
||||||
@@ -78,7 +78,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new PortableChrono(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new PortableChrono(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class PortableChrono : PausableConditionalTrait<PortableChronoInfo>, IIssueOrder, IResolveOrder, ITick, ISelectionBar, IOrderVoice, ISync
|
sealed class PortableChrono : PausableConditionalTrait<PortableChronoInfo>, IIssueOrder, IResolveOrder, ITick, ISelectionBar, IOrderVoice, ISync
|
||||||
{
|
{
|
||||||
readonly IMove move;
|
readonly IMove move;
|
||||||
[Sync]
|
[Sync]
|
||||||
@@ -177,7 +177,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PortableChronoOrderTargeter : IOrderTargeter
|
sealed class PortableChronoOrderTargeter : IOrderTargeter
|
||||||
{
|
{
|
||||||
readonly string targetCursor;
|
readonly string targetCursor;
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
|
|
||||||
public string OrderID => "PortableChronoTeleport";
|
public string OrderID => "PortableChronoTeleport";
|
||||||
public int OrderPriority => 5;
|
public int OrderPriority => 5;
|
||||||
public bool IsQueued { get; protected set; }
|
public bool IsQueued { get; private set; }
|
||||||
public bool TargetOverridesSelection(Actor self, in Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
|
public bool TargetOverridesSelection(Actor self, in Target target, List<Actor> actorsAt, CPos xy, TargetModifiers modifiers) { return true; }
|
||||||
|
|
||||||
public bool CanTarget(Actor self, in Target target, ref TargetModifiers modifiers, ref string cursor)
|
public bool CanTarget(Actor self, in Target target, ref TargetModifiers modifiers, ref string cursor)
|
||||||
@@ -212,7 +212,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PortableChronoOrderGenerator : OrderGenerator
|
sealed class PortableChronoOrderGenerator : OrderGenerator
|
||||||
{
|
{
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly PortableChrono portableChrono;
|
readonly PortableChrono portableChrono;
|
||||||
|
|||||||
@@ -133,5 +133,5 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class HideBibPreviewInit : RuntimeFlagInit { }
|
sealed class HideBibPreviewInit : RuntimeFlagInit { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,12 +15,12 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits.Render
|
namespace OpenRA.Mods.Cnc.Traits.Render
|
||||||
{
|
{
|
||||||
class WithDisguisingInfantryBodyInfo : WithInfantryBodyInfo, Requires<DisguiseInfo>
|
sealed class WithDisguisingInfantryBodyInfo : WithInfantryBodyInfo, Requires<DisguiseInfo>
|
||||||
{
|
{
|
||||||
public override object Create(ActorInitializer init) { return new WithDisguisingInfantryBody(init, this); }
|
public override object Create(ActorInitializer init) { return new WithDisguisingInfantryBody(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class WithDisguisingInfantryBody : WithInfantryBody
|
sealed class WithDisguisingInfantryBody : WithInfantryBody
|
||||||
{
|
{
|
||||||
readonly Disguise disguise;
|
readonly Disguise disguise;
|
||||||
readonly RenderSprites rs;
|
readonly RenderSprites rs;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits.Render
|
namespace OpenRA.Mods.Cnc.Traits.Render
|
||||||
{
|
{
|
||||||
class WithGunboatBodyInfo : WithSpriteBodyInfo, Requires<BodyOrientationInfo>, Requires<IFacingInfo>, Requires<TurretedInfo>
|
sealed class WithGunboatBodyInfo : WithSpriteBodyInfo, Requires<BodyOrientationInfo>, Requires<IFacingInfo>, Requires<TurretedInfo>
|
||||||
{
|
{
|
||||||
[Desc("Turreted 'Turret' key to display")]
|
[Desc("Turreted 'Turret' key to display")]
|
||||||
public readonly string Turret = "primary";
|
public readonly string Turret = "primary";
|
||||||
@@ -38,7 +38,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
|||||||
public override object Create(ActorInitializer init) { return new WithGunboatBody(init, this); }
|
public override object Create(ActorInitializer init) { return new WithGunboatBody(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class WithGunboatBody : WithSpriteBody, ITick
|
sealed class WithGunboatBody : WithSpriteBody, ITick
|
||||||
{
|
{
|
||||||
readonly WithGunboatBodyInfo info;
|
readonly WithGunboatBodyInfo info;
|
||||||
readonly Animation wake;
|
readonly Animation wake;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits.Render
|
namespace OpenRA.Mods.Cnc.Traits.Render
|
||||||
{
|
{
|
||||||
class WithSplitAttackPaletteInfantryBodyInfo : WithInfantryBodyInfo
|
sealed class WithSplitAttackPaletteInfantryBodyInfo : WithInfantryBodyInfo
|
||||||
{
|
{
|
||||||
[PaletteReference]
|
[PaletteReference]
|
||||||
[Desc("Palette to use for the split attack rendering.")]
|
[Desc("Palette to use for the split attack rendering.")]
|
||||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Traits.Render
|
|||||||
public override object Create(ActorInitializer init) { return new WithSplitAttackPaletteInfantryBody(init, this); }
|
public override object Create(ActorInitializer init) { return new WithSplitAttackPaletteInfantryBody(init, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class WithSplitAttackPaletteInfantryBody : WithInfantryBody
|
sealed class WithSplitAttackPaletteInfantryBody : WithInfantryBody
|
||||||
{
|
{
|
||||||
readonly WithSplitAttackPaletteInfantryBodyInfo info;
|
readonly WithSplitAttackPaletteInfantryBodyInfo info;
|
||||||
readonly Animation splitAnimation;
|
readonly Animation splitAnimation;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class AttackOrderPowerInfo : SupportPowerInfo, Requires<AttackBaseInfo>
|
sealed class AttackOrderPowerInfo : SupportPowerInfo, Requires<AttackBaseInfo>
|
||||||
{
|
{
|
||||||
[Desc("Range circle color.")]
|
[Desc("Range circle color.")]
|
||||||
public readonly Color CircleColor = Color.Red;
|
public readonly Color CircleColor = Color.Red;
|
||||||
@@ -37,7 +37,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new AttackOrderPower(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new AttackOrderPower(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class AttackOrderPower : SupportPower, INotifyCreated, INotifyBurstComplete
|
sealed class AttackOrderPower : SupportPower, INotifyCreated, INotifyBurstComplete
|
||||||
{
|
{
|
||||||
readonly AttackOrderPowerInfo info;
|
readonly AttackOrderPowerInfo info;
|
||||||
AttackBase attack;
|
AttackBase attack;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class ChronoshiftPowerInfo : SupportPowerInfo
|
sealed class ChronoshiftPowerInfo : SupportPowerInfo
|
||||||
{
|
{
|
||||||
[FieldLoader.Require]
|
[FieldLoader.Require]
|
||||||
[Desc("Size of the footprint of the affected area.")]
|
[Desc("Size of the footprint of the affected area.")]
|
||||||
@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new ChronoshiftPower(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new ChronoshiftPower(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class ChronoshiftPower : SupportPower
|
sealed class ChronoshiftPower : SupportPower
|
||||||
{
|
{
|
||||||
readonly char[] footprint;
|
readonly char[] footprint;
|
||||||
readonly CVec dimensions;
|
readonly CVec dimensions;
|
||||||
@@ -140,7 +140,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
class SelectChronoshiftTarget : OrderGenerator
|
sealed class SelectChronoshiftTarget : OrderGenerator
|
||||||
{
|
{
|
||||||
readonly ChronoshiftPower power;
|
readonly ChronoshiftPower power;
|
||||||
readonly char[] footprint;
|
readonly char[] footprint;
|
||||||
@@ -218,7 +218,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class SelectDestination : OrderGenerator
|
sealed class SelectDestination : OrderGenerator
|
||||||
{
|
{
|
||||||
readonly ChronoshiftPower power;
|
readonly ChronoshiftPower power;
|
||||||
readonly CPos sourceLocation;
|
readonly CPos sourceLocation;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[Desc("Requires `GpsWatcher` on the player actor.")]
|
[Desc("Requires `GpsWatcher` on the player actor.")]
|
||||||
class GpsPowerInfo : SupportPowerInfo
|
sealed class GpsPowerInfo : SupportPowerInfo
|
||||||
{
|
{
|
||||||
[Desc("Delay in ticks between launching and revealing the map.")]
|
[Desc("Delay in ticks between launching and revealing the map.")]
|
||||||
public readonly int RevealDelay = 0;
|
public readonly int RevealDelay = 0;
|
||||||
@@ -53,7 +53,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new GpsPower(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new GpsPower(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class GpsPower : SupportPower, INotifyKilled, INotifySold, INotifyOwnerChanged, ITick
|
sealed class GpsPower : SupportPower, INotifyKilled, INotifySold, INotifyOwnerChanged, ITick
|
||||||
{
|
{
|
||||||
readonly Actor self;
|
readonly Actor self;
|
||||||
readonly GpsPowerInfo info;
|
readonly GpsPowerInfo info;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
class IonCannonPowerInfo : SupportPowerInfo, IRulesetLoaded
|
sealed class IonCannonPowerInfo : SupportPowerInfo, IRulesetLoaded
|
||||||
{
|
{
|
||||||
[ActorReference]
|
[ActorReference]
|
||||||
[Desc("Actor to spawn when the attack starts")]
|
[Desc("Actor to spawn when the attack starts")]
|
||||||
@@ -62,7 +62,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class IonCannonPower : SupportPower
|
sealed class IonCannonPower : SupportPower
|
||||||
{
|
{
|
||||||
readonly IonCannonPowerInfo info;
|
readonly IonCannonPowerInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
{
|
{
|
||||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||||
[Desc("Adds the hard-coded shroud palette to the game")]
|
[Desc("Adds the hard-coded shroud palette to the game")]
|
||||||
class ShroudPaletteInfo : TraitInfo
|
sealed class ShroudPaletteInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[PaletteDefinition]
|
[PaletteDefinition]
|
||||||
[FieldLoader.Require]
|
[FieldLoader.Require]
|
||||||
@@ -33,7 +33,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new ShroudPalette(this); }
|
public override object Create(ActorInitializer init) { return new ShroudPalette(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class ShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
|
sealed class ShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
|
||||||
{
|
{
|
||||||
readonly ShroudPaletteInfo info;
|
readonly ShroudPaletteInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[TraitLocation(SystemActors.EditorWorld)]
|
[TraitLocation(SystemActors.EditorWorld)]
|
||||||
class TSEditorResourceLayerInfo : EditorResourceLayerInfo, Requires<EditorActorLayerInfo>
|
sealed class TSEditorResourceLayerInfo : EditorResourceLayerInfo, Requires<EditorActorLayerInfo>
|
||||||
{
|
{
|
||||||
public readonly string VeinType = "Veins";
|
public readonly string VeinType = "Veins";
|
||||||
|
|
||||||
@@ -28,7 +28,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new TSEditorResourceLayer(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new TSEditorResourceLayer(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class TSEditorResourceLayer : EditorResourceLayer
|
sealed class TSEditorResourceLayer : EditorResourceLayer
|
||||||
{
|
{
|
||||||
readonly TSEditorResourceLayerInfo info;
|
readonly TSEditorResourceLayerInfo info;
|
||||||
readonly EditorActorLayer actorLayer;
|
readonly EditorActorLayer actorLayer;
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using OpenRA.Traits;
|
|||||||
namespace OpenRA.Mods.Cnc.Traits
|
namespace OpenRA.Mods.Cnc.Traits
|
||||||
{
|
{
|
||||||
[TraitLocation(SystemActors.World)]
|
[TraitLocation(SystemActors.World)]
|
||||||
class TSResourceLayerInfo : ResourceLayerInfo
|
sealed class TSResourceLayerInfo : ResourceLayerInfo
|
||||||
{
|
{
|
||||||
public readonly string VeinType = "Veins";
|
public readonly string VeinType = "Veins";
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new TSResourceLayer(init.Self, this); }
|
public override object Create(ActorInitializer init) { return new TSResourceLayer(init.Self, this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class TSResourceLayer : ResourceLayer, INotifyActorDisposing
|
sealed class TSResourceLayer : ResourceLayer, INotifyActorDisposing
|
||||||
{
|
{
|
||||||
readonly TSResourceLayerInfo info;
|
readonly TSResourceLayerInfo info;
|
||||||
readonly HashSet<CPos> veinholeCells = new();
|
readonly HashSet<CPos> veinholeCells = new();
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
{
|
{
|
||||||
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
[TraitLocation(SystemActors.World | SystemActors.EditorWorld)]
|
||||||
[Desc("Adds the hard-coded shroud palette to the game")]
|
[Desc("Adds the hard-coded shroud palette to the game")]
|
||||||
class TSShroudPaletteInfo : TraitInfo
|
sealed class TSShroudPaletteInfo : TraitInfo
|
||||||
{
|
{
|
||||||
[PaletteDefinition]
|
[PaletteDefinition]
|
||||||
[FieldLoader.Require]
|
[FieldLoader.Require]
|
||||||
@@ -29,7 +29,7 @@ namespace OpenRA.Mods.Cnc.Traits
|
|||||||
public override object Create(ActorInitializer init) { return new TSShroudPalette(this); }
|
public override object Create(ActorInitializer init) { return new TSShroudPalette(this); }
|
||||||
}
|
}
|
||||||
|
|
||||||
class TSShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
|
sealed class TSShroudPalette : ILoadsPalettes, IProvidesAssetBrowserPalettes
|
||||||
{
|
{
|
||||||
readonly TSShroudPaletteInfo info;
|
readonly TSShroudPaletteInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ using OpenRA.Primitives;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class ConvertPngToShpCommand : IUtilityCommand
|
sealed class ConvertPngToShpCommand : IUtilityCommand
|
||||||
{
|
{
|
||||||
string IUtilityCommand.Name => "--shp";
|
string IUtilityCommand.Name => "--shp";
|
||||||
|
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ using OpenRA.Mods.Common.FileFormats;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class ImportRedAlertMapCommand : ImportGen1MapCommand, IUtilityCommand
|
sealed class ImportRedAlertMapCommand : ImportGen1MapCommand, IUtilityCommand
|
||||||
{
|
{
|
||||||
// TODO: 128x128 is probably not true for "mega maps" from the expansions.
|
// TODO: 128x128 is probably not true for "mega maps" from the expansions.
|
||||||
public ImportRedAlertMapCommand()
|
public ImportRedAlertMapCommand()
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using OpenRA.Mods.Common.FileFormats;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class ImportTiberianDawnMapCommand : ImportGen1MapCommand, IUtilityCommand
|
sealed class ImportTiberianDawnMapCommand : ImportGen1MapCommand, IUtilityCommand
|
||||||
{
|
{
|
||||||
// NOTE: 64x64 map size is a C&C95 engine limitation
|
// NOTE: 64x64 map size is a C&C95 engine limitation
|
||||||
public ImportTiberianDawnMapCommand()
|
public ImportTiberianDawnMapCommand()
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class ImportTiberianSunMapCommand : ImportGen2MapCommand, IUtilityCommand
|
sealed class ImportTiberianSunMapCommand : ImportGen2MapCommand, IUtilityCommand
|
||||||
{
|
{
|
||||||
string IUtilityCommand.Name => "--import-ts-map";
|
string IUtilityCommand.Name => "--import-ts-map";
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using OpenRA.Mods.Common.FileFormats;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class LegacyRulesImporter : IUtilityCommand
|
sealed class LegacyRulesImporter : IUtilityCommand
|
||||||
{
|
{
|
||||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using OpenRA.Mods.Common.FileFormats;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class ImportLegacySequenceCommand : IUtilityCommand
|
sealed class ImportLegacySequenceCommand : IUtilityCommand
|
||||||
{
|
{
|
||||||
bool IUtilityCommand.ValidateArguments(string[] args)
|
bool IUtilityCommand.ValidateArguments(string[] args)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ using OpenRA.Mods.Common.FileFormats;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class ImportLegacyTilesetCommand : IUtilityCommand
|
sealed class ImportLegacyTilesetCommand : IUtilityCommand
|
||||||
{
|
{
|
||||||
string IUtilityCommand.Name => "--tileset-import";
|
string IUtilityCommand.Name => "--tileset-import";
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ using OpenRA.Primitives;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Cnc.UtilityCommands
|
namespace OpenRA.Mods.Cnc.UtilityCommands
|
||||||
{
|
{
|
||||||
class RemapShpCommand : IUtilityCommand
|
sealed class RemapShpCommand : IUtilityCommand
|
||||||
{
|
{
|
||||||
string IUtilityCommand.Name => "--remap";
|
string IUtilityCommand.Name => "--remap";
|
||||||
|
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FlyAttackRun : Activity
|
sealed class FlyAttackRun : Activity
|
||||||
{
|
{
|
||||||
readonly AttackAircraft attack;
|
readonly AttackAircraft attack;
|
||||||
readonly WDist exitRange;
|
readonly WDist exitRange;
|
||||||
@@ -261,7 +261,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class StrafeAttackRun : Activity
|
sealed class StrafeAttackRun : Activity
|
||||||
{
|
{
|
||||||
readonly AttackAircraft attackAircraft;
|
readonly AttackAircraft attackAircraft;
|
||||||
readonly Aircraft aircraft;
|
readonly Aircraft aircraft;
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
yield return new TargetLineNode(destination, targetLineColor.Value);
|
yield return new TargetLineNode(destination, targetLineColor.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
class ReleaseUnit : Activity
|
sealed class ReleaseUnit : Activity
|
||||||
{
|
{
|
||||||
readonly Carryall carryall;
|
readonly Carryall carryall;
|
||||||
readonly BodyOrientation body;
|
readonly BodyOrientation body;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Activities
|
namespace OpenRA.Mods.Common.Activities
|
||||||
{
|
{
|
||||||
class Demolish : Enter
|
sealed class Demolish : Enter
|
||||||
{
|
{
|
||||||
readonly int delay;
|
readonly int delay;
|
||||||
readonly int flashes;
|
readonly int flashes;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Activities
|
namespace OpenRA.Mods.Common.Activities
|
||||||
{
|
{
|
||||||
class DonateCash : Enter
|
sealed class DonateCash : Enter
|
||||||
{
|
{
|
||||||
readonly int payload;
|
readonly int payload;
|
||||||
readonly int playerExperience;
|
readonly int playerExperience;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Activities
|
namespace OpenRA.Mods.Common.Activities
|
||||||
{
|
{
|
||||||
class DonateExperience : Enter
|
sealed class DonateExperience : Enter
|
||||||
{
|
{
|
||||||
readonly int level;
|
readonly int level;
|
||||||
readonly int playerExperience;
|
readonly int playerExperience;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Activities
|
namespace OpenRA.Mods.Common.Activities
|
||||||
{
|
{
|
||||||
class InstantRepair : Enter
|
sealed class InstantRepair : Enter
|
||||||
{
|
{
|
||||||
readonly InstantlyRepairsInfo info;
|
readonly InstantlyRepairsInfo info;
|
||||||
|
|
||||||
|
|||||||
@@ -486,7 +486,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MoveFirstHalf : MovePart
|
sealed class MoveFirstHalf : MovePart
|
||||||
{
|
{
|
||||||
public MoveFirstHalf(Move move, WPos from, WPos to, WAngle fromFacing, WAngle toFacing,
|
public MoveFirstHalf(Move move, WPos from, WPos to, WAngle fromFacing, WAngle toFacing,
|
||||||
WRot? fromTerrainOrientation, WRot? toTerrainOrientation, int terrainOrientationMargin, int carryoverProgress, bool shouldArc, bool movingOnGroundLayer)
|
WRot? fromTerrainOrientation, WRot? toTerrainOrientation, int terrainOrientationMargin, int carryoverProgress, bool shouldArc, bool movingOnGroundLayer)
|
||||||
@@ -569,7 +569,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class MoveSecondHalf : MovePart
|
sealed class MoveSecondHalf : MovePart
|
||||||
{
|
{
|
||||||
public MoveSecondHalf(Move move, WPos from, WPos to, WAngle fromFacing, WAngle toFacing,
|
public MoveSecondHalf(Move move, WPos from, WPos to, WAngle fromFacing, WAngle toFacing,
|
||||||
WRot? fromTerrainOrientation, WRot? toTerrainOrientation, int terrainOrientationMargin, int carryoverProgress, bool shouldArc, bool movingOnGroundLayer)
|
WRot? fromTerrainOrientation, WRot? toTerrainOrientation, int terrainOrientationMargin, int carryoverProgress, bool shouldArc, bool movingOnGroundLayer)
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
yield return new TargetLineNode(Target.FromActor(cargo), targetLineColor.Value);
|
yield return new TargetLineNode(Target.FromActor(cargo), targetLineColor.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
class AttachUnit : Activity
|
sealed class AttachUnit : Activity
|
||||||
{
|
{
|
||||||
readonly Actor cargo;
|
readonly Actor cargo;
|
||||||
readonly Carryable carryable;
|
readonly Carryable carryable;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Activities
|
namespace OpenRA.Mods.Common.Activities
|
||||||
{
|
{
|
||||||
class RepairBridge : Enter
|
sealed class RepairBridge : Enter
|
||||||
{
|
{
|
||||||
readonly EnterBehaviour enterBehaviour;
|
readonly EnterBehaviour enterBehaviour;
|
||||||
readonly string speechNotification;
|
readonly string speechNotification;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Activities
|
namespace OpenRA.Mods.Common.Activities
|
||||||
{
|
{
|
||||||
class RideTransport : Enter
|
sealed class RideTransport : Enter
|
||||||
{
|
{
|
||||||
readonly Passenger passenger;
|
readonly Passenger passenger;
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Activities
|
namespace OpenRA.Mods.Common.Activities
|
||||||
{
|
{
|
||||||
class Sell : Activity
|
sealed class Sell : Activity
|
||||||
{
|
{
|
||||||
readonly IHealth health;
|
readonly IHealth health;
|
||||||
readonly SellableInfo sellableInfo;
|
readonly SellableInfo sellableInfo;
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ namespace OpenRA.Mods.Common.Activities
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class IssueOrderAfterTransform : Activity
|
sealed class IssueOrderAfterTransform : Activity
|
||||||
{
|
{
|
||||||
readonly string orderString;
|
readonly string orderString;
|
||||||
readonly Target target;
|
readonly Target target;
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ namespace OpenRA.Mods.Common
|
|||||||
: base(value) { }
|
: base(value) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
class ActorInitLoader : TypeConverter
|
sealed class ActorInitLoader : TypeConverter
|
||||||
{
|
{
|
||||||
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AddActorAction : IEditorAction
|
sealed class AddActorAction : IEditorAction
|
||||||
{
|
{
|
||||||
public string Text { get; private set; }
|
public string Text { get; private set; }
|
||||||
|
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CopyPasteEditorAction : IEditorAction
|
sealed class CopyPasteEditorAction : IEditorAction
|
||||||
{
|
{
|
||||||
[TranslationReference("amount")]
|
[TranslationReference("amount")]
|
||||||
const string CopiedTiles = "notification-copied-tiles";
|
const string CopiedTiles = "notification-copied-tiles";
|
||||||
@@ -271,7 +271,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class UndoCopyPaste
|
sealed class UndoCopyPaste
|
||||||
{
|
{
|
||||||
public CPos Cell { get; }
|
public CPos Cell { get; }
|
||||||
public TerrainTile MapTile { get; }
|
public TerrainTile MapTile { get; }
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
public void Dispose() { }
|
public void Dispose() { }
|
||||||
}
|
}
|
||||||
|
|
||||||
class RemoveActorAction : IEditorAction
|
sealed class RemoveActorAction : IEditorAction
|
||||||
{
|
{
|
||||||
[TranslationReference("name", "id")]
|
[TranslationReference("name", "id")]
|
||||||
const string RemovedActor = "notification-removed-actor";
|
const string RemovedActor = "notification-removed-actor";
|
||||||
@@ -143,7 +143,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class RemoveResourceAction : IEditorAction
|
sealed class RemoveResourceAction : IEditorAction
|
||||||
{
|
{
|
||||||
[TranslationReference("type")]
|
[TranslationReference("type")]
|
||||||
const string RemovedResource = "notification-removed-resource";
|
const string RemovedResource = "notification-removed-resource";
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AddResourcesEditorAction : IEditorAction
|
sealed class AddResourcesEditorAction : IEditorAction
|
||||||
{
|
{
|
||||||
[TranslationReference("amount", "type")]
|
[TranslationReference("amount", "type")]
|
||||||
const string AddedResource = "notification-added-resource";
|
const string AddedResource = "notification-added-resource";
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class PaintTileEditorAction : IEditorAction
|
sealed class PaintTileEditorAction : IEditorAction
|
||||||
{
|
{
|
||||||
[TranslationReference("id")]
|
[TranslationReference("id")]
|
||||||
const string AddedTile = "notification-added-tile";
|
const string AddedTile = "notification-added-tile";
|
||||||
@@ -225,7 +225,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class FloodFillEditorAction : IEditorAction
|
sealed class FloodFillEditorAction : IEditorAction
|
||||||
{
|
{
|
||||||
[TranslationReference("id")]
|
[TranslationReference("id")]
|
||||||
const string FilledTile = "notification-filled-tile";
|
const string FilledTile = "notification-filled-tile";
|
||||||
@@ -363,7 +363,7 @@ namespace OpenRA.Mods.Common.Widgets
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class UndoTile
|
sealed class UndoTile
|
||||||
{
|
{
|
||||||
public CPos Cell { get; }
|
public CPos Cell { get; }
|
||||||
public TerrainTile MapTile { get; }
|
public TerrainTile MapTile { get; }
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Graphics;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Effects
|
namespace OpenRA.Mods.Common.Effects
|
||||||
{
|
{
|
||||||
class FloatingSprite : IEffect, ISpatiallyPartitionable
|
sealed class FloatingSprite : IEffect, ISpatiallyPartitionable
|
||||||
{
|
{
|
||||||
readonly WDist[] speed;
|
readonly WDist[] speed;
|
||||||
readonly WDist[] gravity;
|
readonly WDist[] gravity;
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ namespace OpenRA.Mods.Common.FileFormats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class BitReader
|
sealed class BitReader
|
||||||
{
|
{
|
||||||
readonly Stream stream;
|
readonly Stream stream;
|
||||||
byte bitBuffer = 0;
|
byte bitBuffer = 0;
|
||||||
@@ -242,7 +242,7 @@ namespace OpenRA.Mods.Common.FileFormats
|
|||||||
* codes. Those tables are the number of codes of each length, and the symbols
|
* codes. Those tables are the number of codes of each length, and the symbols
|
||||||
* sorted by length, retaining their original order within each length.
|
* sorted by length, retaining their original order within each length.
|
||||||
*/
|
*/
|
||||||
class Huffman
|
sealed class Huffman
|
||||||
{
|
{
|
||||||
public short[] Count; // number of symbols of each length
|
public short[] Count; // number of symbols of each length
|
||||||
public short[] Symbol; // canonically ordered symbols
|
public short[] Symbol; // canonically ordered symbols
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ namespace OpenRA.Mods.Common.FileFormats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CabExtracter
|
sealed class CabExtracter
|
||||||
{
|
{
|
||||||
readonly FileDescriptor file;
|
readonly FileDescriptor file;
|
||||||
readonly Dictionary<int, Stream> volumes;
|
readonly Dictionary<int, Stream> volumes;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ namespace OpenRA.Mods.Common.FileFormats
|
|||||||
{
|
{
|
||||||
public sealed class MSCabCompression
|
public sealed class MSCabCompression
|
||||||
{
|
{
|
||||||
class CabFolder
|
sealed class CabFolder
|
||||||
{
|
{
|
||||||
public readonly uint BlockOffset;
|
public readonly uint BlockOffset;
|
||||||
public readonly ushort BlockCount;
|
public readonly ushort BlockCount;
|
||||||
@@ -34,7 +34,7 @@ namespace OpenRA.Mods.Common.FileFormats
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class CabFile
|
sealed class CabFile
|
||||||
{
|
{
|
||||||
public readonly string FileName;
|
public readonly string FileName;
|
||||||
public readonly uint DecompressedLength;
|
public readonly uint DecompressedLength;
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ namespace OpenRA.Mods.Common.Graphics
|
|||||||
return new FinalizedModelRenderable(wr, this);
|
return new FinalizedModelRenderable(wr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
class FinalizedModelRenderable : IFinalizedRenderable
|
sealed class FinalizedModelRenderable : IFinalizedRenderable
|
||||||
{
|
{
|
||||||
readonly ModelRenderable model;
|
readonly ModelRenderable model;
|
||||||
readonly ModelRenderProxy renderProxy;
|
readonly ModelRenderProxy renderProxy;
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ namespace OpenRA.Mods.Common.Graphics
|
|||||||
return new FinalizedUIModelRenderable(wr, this);
|
return new FinalizedUIModelRenderable(wr, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
class FinalizedUIModelRenderable : IFinalizedRenderable
|
sealed class FinalizedUIModelRenderable : IFinalizedRenderable
|
||||||
{
|
{
|
||||||
readonly UIModelRenderable model;
|
readonly UIModelRenderable model;
|
||||||
readonly ModelRenderProxy renderProxy;
|
readonly ModelRenderProxy renderProxy;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ using OpenRA.Server;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.Common.Lint
|
namespace OpenRA.Mods.Common.Lint
|
||||||
{
|
{
|
||||||
class CheckAngle : ILintRulesPass, ILintServerMapPass
|
sealed class CheckAngle : ILintRulesPass, ILintServerMapPass
|
||||||
{
|
{
|
||||||
void ILintRulesPass.Run(Action<string> emitError, Action<string> emitWarning, ModData modData, Ruleset rules)
|
void ILintRulesPass.Run(Action<string> emitError, Action<string> emitWarning, ModData modData, Ruleset rules)
|
||||||
{
|
{
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user