document traits
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Traits
|
||||||
{
|
{
|
||||||
|
[Desc("Checks for pause related desyncs. Attach this to the world actor.")]
|
||||||
public class DebugPauseStateInfo : ITraitInfo
|
public class DebugPauseStateInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new DebugPauseState(init.world); }
|
public object Create(ActorInitializer init) { return new DebugPauseState(init.world); }
|
||||||
|
|||||||
@@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Traits
|
||||||
{
|
{
|
||||||
|
[Desc("Attach this to the player actor.")]
|
||||||
public class DeveloperModeInfo : ITraitInfo
|
public class DeveloperModeInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public int Cash = 20000;
|
public int Cash = 20000;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -15,6 +15,7 @@ using OpenRA.Graphics;
|
|||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Traits
|
||||||
{
|
{
|
||||||
|
[Desc("Required for FrozenUnderFog to work. Attach this to the player actor.")]
|
||||||
public class FrozenActorLayerInfo : ITraitInfo
|
public class FrozenActorLayerInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new FrozenActorLayer(init.self); }
|
public object Create(ActorInitializer init) { return new FrozenActorLayer(init.self); }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -12,6 +12,7 @@ using OpenRA.Network;
|
|||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Traits
|
||||||
{
|
{
|
||||||
|
[Desc("Used to detect exploits. Attach this to the world actor.")]
|
||||||
public class ValidateOrderInfo : TraitInfo<ValidateOrder> { }
|
public class ValidateOrderInfo : TraitInfo<ValidateOrder> { }
|
||||||
|
|
||||||
public class ValidateOrder : IValidateOrder
|
public class ValidateOrder : IValidateOrder
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -15,6 +15,7 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace OpenRA.Traits
|
namespace OpenRA.Traits
|
||||||
{
|
{
|
||||||
|
[Desc("Required for shroud and fog visibility checks. Add this to the player actor.")]
|
||||||
public class ShroudInfo : ITraitInfo
|
public class ShroudInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new Shroud(init.self); }
|
public object Create(ActorInitializer init) { return new Shroud(init.self); }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Apply palette full screen rotations during chronoshifts. Add this to the world actor.")]
|
||||||
class ChronoshiftPaletteEffectInfo : TraitInfo<ChronoshiftPaletteEffect> { }
|
class ChronoshiftPaletteEffectInfo : TraitInfo<ChronoshiftPaletteEffect> { }
|
||||||
|
|
||||||
public class ChronoshiftPaletteEffect : IPaletteModifier, ITick
|
public class ChronoshiftPaletteEffect : IPaletteModifier, ITick
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Enables commands triggered by typing them into the chatbox. Attach this to the world actor.")]
|
||||||
public class ChatCommandsInfo : TraitInfo<ChatCommands> { }
|
public class ChatCommandsInfo : TraitInfo<ChatCommands> { }
|
||||||
|
|
||||||
public class ChatCommands : INotifyChat
|
public class ChatCommands : INotifyChat
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Enables developer cheats via the chatbox. Attach this to the world actor.")]
|
||||||
public class DevCommandsInfo : TraitInfo<DevCommands> { }
|
public class DevCommandsInfo : TraitInfo<DevCommands> { }
|
||||||
|
|
||||||
public class DevCommands : IChatCommand, IWorldLoaded
|
public class DevCommands : IChatCommand, IWorldLoaded
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Shows a list of available commands in the chatbox. Attach this to the world actor.")]
|
||||||
public class HelpCommandInfo : TraitInfo<HelpCommand> { }
|
public class HelpCommandInfo : TraitInfo<HelpCommand> { }
|
||||||
|
|
||||||
public class HelpCommand : IChatCommand, IWorldLoaded
|
public class HelpCommand : IChatCommand, IWorldLoaded
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Allows the player to pause or surrender the game via the chatbox. Attach this to the world actor.")]
|
||||||
public class PlayerCommandsInfo : TraitInfo<PlayerCommands> { }
|
public class PlayerCommandsInfo : TraitInfo<PlayerCommands> { }
|
||||||
|
|
||||||
public class PlayerCommands : IChatCommand, IWorldLoaded
|
public class PlayerCommands : IChatCommand, IWorldLoaded
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -13,6 +13,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Leave a \"crate\" actor after destruction.")]
|
||||||
public class ContainsCrateInfo : TraitInfo<ContainsCrate> { }
|
public class ContainsCrateInfo : TraitInfo<ContainsCrate> { }
|
||||||
|
|
||||||
public class ContainsCrate : INotifyKilled
|
public class ContainsCrate : INotifyKilled
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Attach this to the world actor.")]
|
||||||
public class CreateMPPlayersInfo : TraitInfo<CreateMPPlayers> { }
|
public class CreateMPPlayersInfo : TraitInfo<CreateMPPlayers> { }
|
||||||
|
|
||||||
public class CreateMPPlayers : ICreatePlayers
|
public class CreateMPPlayers : ICreatePlayers
|
||||||
@@ -72,7 +73,7 @@ namespace OpenRA.Mods.RA
|
|||||||
if (p.PlayerReference.Enemies.Contains(q.InternalName))
|
if (p.PlayerReference.Enemies.Contains(q.InternalName))
|
||||||
return Stance.Enemy;
|
return Stance.Enemy;
|
||||||
|
|
||||||
// Hack: Map players share a ClientID with the host, so would
|
// HACK: Map players share a ClientID with the host, so would
|
||||||
// otherwise take the host's team stance instead of being neutral
|
// otherwise take the host's team stance instead of being neutral
|
||||||
if (p.PlayerReference.Playable && q.PlayerReference.Playable)
|
if (p.PlayerReference.Playable && q.PlayerReference.Playable)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -13,6 +13,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Display a sprite tag \"fake\" when selected.")]
|
||||||
class FakeInfo : TraitInfo<Fake> { }
|
class FakeInfo : TraitInfo<Fake> { }
|
||||||
|
|
||||||
class Fake : ITags
|
class Fake : ITags
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -12,6 +12,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Used by SpawnMPUnits. Attach these to the world actor. You can have multiple variants by adding @suffixes.")]
|
||||||
public class MPStartUnitsInfo : TraitInfo<MPStartUnits>
|
public class MPStartUnitsInfo : TraitInfo<MPStartUnits>
|
||||||
{
|
{
|
||||||
public readonly string Class = "none";
|
public readonly string Class = "none";
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* tag trait for stuff that shouldnt trigger mines */
|
[Desc("Tag trait for stuff that should not trigger mines.")]
|
||||||
class MineImmuneInfo : TraitInfo<MineImmune> { }
|
class MineImmuneInfo : TraitInfo<MineImmune> { }
|
||||||
class MineImmune { }
|
class MineImmune { }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("The actor stays invisible under fog of war.")]
|
||||||
public class HiddenUnderFogInfo : TraitInfo<HiddenUnderFog> { }
|
public class HiddenUnderFogInfo : TraitInfo<HiddenUnderFog> { }
|
||||||
|
|
||||||
public class HiddenUnderFog : IRenderModifier, IVisibilityModifier
|
public class HiddenUnderFog : IRenderModifier, IVisibilityModifier
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Apply palette full screen rotations during atom bomb explosions. Add this to the world actor.")]
|
||||||
class NukePaletteEffectInfo : TraitInfo<NukePaletteEffect> { }
|
class NukePaletteEffectInfo : TraitInfo<NukePaletteEffect> { }
|
||||||
|
|
||||||
public class NukePaletteEffect : IPaletteModifier, ITick
|
public class NukePaletteEffect : IPaletteModifier, ITick
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Part of the unfinished group-movement system. Attach this to the player actor.")]
|
||||||
class ActorGroupProxyInfo : TraitInfo<ActorGroupProxy> { }
|
class ActorGroupProxyInfo : TraitInfo<ActorGroupProxy> { }
|
||||||
|
|
||||||
class ActorGroupProxy : IResolveOrder
|
class ActorGroupProxy : IResolveOrder
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -12,7 +12,9 @@ using OpenRA.Mods.RA.Buildings;
|
|||||||
using OpenRA.Traits;
|
using OpenRA.Traits;
|
||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
|
|
||||||
{
|
{
|
||||||
|
[Desc("Attach this to the player actor to allow building repair by team mates.")]
|
||||||
class AllyRepairInfo : TraitInfo<AllyRepair> { }
|
class AllyRepairInfo : TraitInfo<AllyRepair> { }
|
||||||
|
|
||||||
class AllyRepair : IResolveOrder
|
class AllyRepair : IResolveOrder
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -15,6 +15,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Attach this to the player actor to collect observer stats.")]
|
||||||
public class PlayerStatisticsInfo : ITraitInfo
|
public class PlayerStatisticsInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new PlayerStatistics(init.self); }
|
public object Create(ActorInitializer init) { return new PlayerStatistics(init.self); }
|
||||||
@@ -108,6 +109,7 @@ namespace OpenRA.Mods.RA
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Desc("Attach this to a unit to update observer stats.")]
|
||||||
public class UpdatesPlayerStatisticsInfo : TraitInfo<UpdatesPlayerStatistics> { }
|
public class UpdatesPlayerStatisticsInfo : TraitInfo<UpdatesPlayerStatistics> { }
|
||||||
|
|
||||||
public class UpdatesPlayerStatistics : INotifyKilled
|
public class UpdatesPlayerStatistics : INotifyKilled
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Destroy the actor right after being added to the game world.")]
|
||||||
public class RemoveImmediatelyInfo : TraitInfo<RemoveImmediately> {}
|
public class RemoveImmediatelyInfo : TraitInfo<RemoveImmediately> {}
|
||||||
|
|
||||||
public class RemoveImmediately : INotifyAddedToWorld
|
public class RemoveImmediately : INotifyAddedToWorld
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Spawn base actor at the spawnpoint and support units in an annulus around the base actor. Both are defined at MPStartUnits. Attach this to the world actor.")]
|
||||||
public class SpawnMPUnitsInfo : TraitInfo<SpawnMPUnits>, Requires<MPStartLocationsInfo>, Requires<MPStartUnitsInfo> { }
|
public class SpawnMPUnitsInfo : TraitInfo<SpawnMPUnits>, Requires<MPStartLocationsInfo>, Requires<MPStartUnitsInfo> { }
|
||||||
|
|
||||||
public class SpawnMPUnits : IWorldLoaded
|
public class SpawnMPUnits : IWorldLoaded
|
||||||
@@ -37,7 +38,6 @@ namespace OpenRA.Mods.RA
|
|||||||
if (unitGroup == null)
|
if (unitGroup == null)
|
||||||
throw new InvalidOperationException("No starting units defined for country {0} with class {1}".F(p.Country.Race, spawnClass));
|
throw new InvalidOperationException("No starting units defined for country {0} with class {1}".F(p.Country.Race, spawnClass));
|
||||||
|
|
||||||
// Spawn base actor at the spawnpoint
|
|
||||||
if (unitGroup.BaseActor != null)
|
if (unitGroup.BaseActor != null)
|
||||||
{
|
{
|
||||||
w.CreateActor(unitGroup.BaseActor.ToLowerInvariant(), new TypeDictionary
|
w.CreateActor(unitGroup.BaseActor.ToLowerInvariant(), new TypeDictionary
|
||||||
@@ -51,7 +51,6 @@ namespace OpenRA.Mods.RA
|
|||||||
if (!unitGroup.SupportActors.Any())
|
if (!unitGroup.SupportActors.Any())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Spawn support units in an annulus around the base actor
|
|
||||||
var supportSpawnCells = w.Map.FindTilesInAnnulus(sp, unitGroup.InnerSupportRadius + 1, unitGroup.OuterSupportRadius);
|
var supportSpawnCells = w.Map.FindTilesInAnnulus(sp, unitGroup.InnerSupportRadius + 1, unitGroup.OuterSupportRadius);
|
||||||
|
|
||||||
foreach (var s in unitGroup.SupportActors)
|
foreach (var s in unitGroup.SupportActors)
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Required for GpsPower. Attach this to the player actor.")]
|
||||||
class GpsWatcherInfo : ITraitInfo
|
class GpsWatcherInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public object Create (ActorInitializer init) { return new GpsWatcher(init.self.Owner); }
|
public object Create (ActorInitializer init) { return new GpsWatcher(init.self.Owner); }
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Attach this to the player actor.")]
|
||||||
public class SupportPowerManagerInfo : ITraitInfo, Requires<DeveloperModeInfo>, Requires<TechTreeInfo>
|
public class SupportPowerManagerInfo : ITraitInfo, Requires<DeveloperModeInfo>, Requires<TechTreeInfo>
|
||||||
{
|
{
|
||||||
public object Create(ActorInitializer init) { return new SupportPowerManager(init); }
|
public object Create(ActorInitializer init) { return new SupportPowerManager(init); }
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -17,6 +17,8 @@ namespace OpenRA.Mods.RA
|
|||||||
public class VoxelNormalsPaletteInfo : ITraitInfo
|
public class VoxelNormalsPaletteInfo : ITraitInfo
|
||||||
{
|
{
|
||||||
public readonly string Name = "normals";
|
public readonly string Name = "normals";
|
||||||
|
|
||||||
|
[Desc("Can be TiberianSun or RedAlert2")]
|
||||||
public readonly NormalType Type = NormalType.TiberianSun;
|
public readonly NormalType Type = NormalType.TiberianSun;
|
||||||
|
|
||||||
public object Create(ActorInitializer init) { return new VoxelNormalsPalette(this); }
|
public object Create(ActorInitializer init) { return new VoxelNormalsPalette(this); }
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Attach this to the world actor. Required for LaysTerrain to work.")]
|
||||||
public class BuildableTerrainLayerInfo : TraitInfo<BuildableTerrainLayer> { }
|
public class BuildableTerrainLayerInfo : TraitInfo<BuildableTerrainLayer> { }
|
||||||
public class BuildableTerrainLayer : IRenderOverlay, IWorldLoaded, ITickRender
|
public class BuildableTerrainLayer : IRenderOverlay, IWorldLoaded, ITickRender
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#region Copyright & License Information
|
#region Copyright & License Information
|
||||||
/*
|
/*
|
||||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
* Copyright 2007-2014 The OpenRA Developers (see AUTHORS)
|
||||||
* This file is part of OpenRA, which is free software. It is made
|
* 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
|
* available to you under the terms of the GNU General Public License
|
||||||
* as published by the Free Software Foundation. For more information,
|
* as published by the Free Software Foundation. For more information,
|
||||||
@@ -18,6 +18,7 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
|
[Desc("Required for the A* PathDebug from DeveloperMode. Attach this to the world actor.")]
|
||||||
class PathfinderDebugOverlayInfo : TraitInfo<PathfinderDebugOverlay> { }
|
class PathfinderDebugOverlayInfo : TraitInfo<PathfinderDebugOverlay> { }
|
||||||
class PathfinderDebugOverlay : IRenderOverlay, IWorldLoaded
|
class PathfinderDebugOverlay : IRenderOverlay, IWorldLoaded
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -4,9 +4,8 @@ using OpenRA.Traits;
|
|||||||
|
|
||||||
namespace OpenRA.Mods.RA
|
namespace OpenRA.Mods.RA
|
||||||
{
|
{
|
||||||
public sealed class ResourceClaimLayerInfo : TraitInfo<ResourceClaimLayer>
|
[Desc("Allows harvesters to coordinate their operations. Attach this to the world actor.")]
|
||||||
{
|
public sealed class ResourceClaimLayerInfo : TraitInfo<ResourceClaimLayer> { }
|
||||||
}
|
|
||||||
|
|
||||||
public sealed class ResourceClaimLayer : IWorldLoaded
|
public sealed class ResourceClaimLayer : IWorldLoaded
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user