embed the previously manually edited outdated documentation
from https://github.com/OpenRA/OpenRA/wiki/Trait-Documentation
This commit is contained in:
@@ -8,10 +8,12 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Tag trait for SupplyTruck: actors.")]
|
||||
class AcceptsSuppliesInfo : TraitInfo<AcceptsSupplies> {}
|
||||
|
||||
class AcceptsSupplies {}
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace OpenRA.Mods.RA
|
||||
public abstract class AttackBaseInfo : ITraitInfo
|
||||
{
|
||||
[WeaponReference]
|
||||
[Desc("Has to be defined here and in weapons.yaml.")]
|
||||
public readonly string PrimaryWeapon = null;
|
||||
[WeaponReference]
|
||||
public readonly string SecondaryWeapon = null;
|
||||
|
||||
@@ -10,9 +10,13 @@
|
||||
|
||||
using System;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Give the unit a \"heal-weapon\".\n" +
|
||||
"\t# It conflicts with any other weapon or Attack*: trait because it will hurt friendlies during the\n" +
|
||||
"\t# heal process then. It also won't work with buildings (use RepairsUnits: for them).")]
|
||||
public class AttackMedicInfo : AttackFrontalInfo
|
||||
{
|
||||
public override object Create( ActorInitializer init ) { return new AttackMedic( init.self, this ); }
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Used together with AttackMedic: to make the healer do it's job automatically to nearby units.")]
|
||||
class AutoHealInfo : TraitInfo<AutoHeal>, Requires<AttackBaseInfo> { }
|
||||
|
||||
class AutoHeal : INotifyIdle
|
||||
|
||||
@@ -8,14 +8,17 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("The actor will automatically engage the enemy when it is in range.")]
|
||||
public class AutoTargetInfo : ITraitInfo, Requires<AttackBaseInfo>
|
||||
{
|
||||
[Desc("It will try to hunt down the enemy if it is not set to defend.")]
|
||||
public readonly bool AllowMovement = true;
|
||||
public readonly int ScanRadius = -1;
|
||||
public readonly UnitStance InitialStance = UnitStance.AttackAnything;
|
||||
@@ -128,7 +131,7 @@ namespace OpenRA.Mods.RA
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Desc("Will not get automatically targeted by enemy (like walls)")]
|
||||
class AutoTargetIgnoreInfo : TraitInfo<AutoTargetIgnore> { }
|
||||
class AutoTargetIgnore { }
|
||||
}
|
||||
|
||||
@@ -9,10 +9,11 @@
|
||||
#endregion
|
||||
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
/* tag trait for "bases": mcv/fact */
|
||||
[Desc("Tag trait for construction yard and MCVs. Used by the cycle bases hotkey to identify actors.")]
|
||||
public class BaseBuildingInfo : TraitInfo<BaseBuilding> { }
|
||||
public class BaseBuilding { }
|
||||
}
|
||||
|
||||
@@ -16,14 +16,19 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
[Desc("Remove this trait to limit base-walking by cheap or defensive buildings.")]
|
||||
public class GivesBuildableAreaInfo : TraitInfo<GivesBuildableArea> {}
|
||||
public class GivesBuildableArea {}
|
||||
|
||||
public class BuildingInfo : ITraitInfo, UsesInit<LocationInit>
|
||||
{
|
||||
[Desc("If negative, it will drain power, if positive, it will provide power.")]
|
||||
public readonly int Power = 0;
|
||||
[Desc("Where you are allowed to place the building (Water, Clear, ...)")]
|
||||
public readonly string[] TerrainTypes = {};
|
||||
[Desc("The range to the next building it can be constructed. Set it higher for walls.")]
|
||||
public readonly int Adjacent = 2;
|
||||
[Desc("x means space it blocks, _ is a part that is passable by actors (like bridges).")]
|
||||
public readonly string Footprint = "x";
|
||||
public readonly int2 Dimensions = new int2(1, 1);
|
||||
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
// allow a nonstandard build time value for a cnc classic mod
|
||||
|
||||
[Desc("Overrides the build time calculated by actor value.")]
|
||||
public class CustomBuildTimeValueInfo : TraitInfo<CustomBuildTimeValue>
|
||||
{
|
||||
public readonly int Value = 0;
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
// allow a nonstandard sell/repair value to avoid
|
||||
// buy-sell exploits like c&c's PROC.
|
||||
|
||||
[Desc("Allow a non-standard sell/repair value to avoid buy-sell exploits.")]
|
||||
public class CustomSellValueInfo : TraitInfo<CustomSellValue>
|
||||
{
|
||||
public readonly int Value = 0;
|
||||
|
||||
@@ -8,12 +8,15 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
[Desc("Place the second actor in line to build more of the same at once (used for walls).")]
|
||||
public class LineBuildInfo : TraitInfo<LineBuild>
|
||||
{
|
||||
[Desc("The maximum allowed length of the line.")]
|
||||
public readonly int Range = 5;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
using System;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA.Buildings
|
||||
{
|
||||
[Desc("Building can be repaired by the repair button.")]
|
||||
public class RepairableBuildingInfo : ITraitInfo, Requires<HealthInfo>
|
||||
{
|
||||
public readonly int RepairPercent = 20;
|
||||
|
||||
@@ -10,18 +10,22 @@
|
||||
|
||||
using System.Linq;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("This actor can be captured by a unit with Captures: trait.")]
|
||||
public class CapturableInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Type = "building";
|
||||
public readonly bool AllowAllies = false;
|
||||
public readonly bool AllowNeutral = true;
|
||||
public readonly bool AllowEnemies = true;
|
||||
public readonly int CaptureCompleteTime = 10; // seconds
|
||||
[Desc("Seconds it takes to change the owner.\n" +
|
||||
"\t# It stays neutral during this period. You might want to add a CapturableBar: trait, too.")]
|
||||
public readonly int CaptureCompleteTime = 10;
|
||||
|
||||
public object Create(ActorInitializer init) { return new Capturable(this); }
|
||||
}
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Visualize the remaining CaptureCompleteTime from Capturable: trait.")]
|
||||
class CapturableBarInfo : ITraitInfo, Requires<CapturableInfo>
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new CapturableBar(init.self); }
|
||||
|
||||
@@ -10,15 +10,22 @@
|
||||
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Let's the object generate cash in a set periodic time.")]
|
||||
class CashTricklerInfo : ITraitInfo
|
||||
{
|
||||
[Desc("Amount of money to give each time.")]
|
||||
public readonly int Period = 50;
|
||||
[Desc("Number of ticks to wait between giving money.")]
|
||||
public readonly int Amount = 15;
|
||||
[Desc("Whether to show the cash tick indicators (+$15 rising from actor).")]
|
||||
public readonly bool ShowTicks = true;
|
||||
[Desc("How long the cash tick indicator should be shown for.")]
|
||||
public readonly int TickLifetime = 30;
|
||||
[Desc("Pixels/tick upward movement of the cash tick indicator.")]
|
||||
public readonly int TickVelocity = 1;
|
||||
|
||||
public object Create (ActorInitializer init) { return new CashTrickler(this); }
|
||||
|
||||
@@ -13,6 +13,7 @@ using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.Effects;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.GameRules;
|
||||
using OpenRA.Graphics;
|
||||
using OpenRA.Traits;
|
||||
@@ -29,6 +30,7 @@ namespace OpenRA.Mods.RA.Effects
|
||||
public readonly string Trail = null;
|
||||
public readonly float Inaccuracy = 0;
|
||||
public readonly string Image = null;
|
||||
[Desc("Rate of Turning")]
|
||||
public readonly int ROT = 5;
|
||||
public readonly int RangeLimit = 0;
|
||||
public readonly bool TurboBoost = false;
|
||||
|
||||
@@ -13,12 +13,19 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Player recives a unit for free once the building is placed. This also works for structures.\n" +
|
||||
"\t # If you want more then one unit to appear copy this section and assign IDs like FreeActor@2, ...")]
|
||||
public class FreeActorInfo : ITraitInfo
|
||||
{
|
||||
[ActorReference]
|
||||
[Desc("Name of actor (HARV for refineries)")]
|
||||
public readonly string Actor = null;
|
||||
[Desc("What the unit should start doing. Warning: If this is no harvester\n" +
|
||||
"\t # it will break, when you add FindResources here.")]
|
||||
public readonly string InitialActivity = null;
|
||||
[Desc("Offset relative to structure-center in 2D (e.g. 1, 2)")]
|
||||
public readonly int2 SpawnOffset = int2.Zero;
|
||||
[Desc("Which direction the unit should face.")]
|
||||
public readonly int Facing = 0;
|
||||
|
||||
public object Create( ActorInitializer init ) { return new FreeActor(init, this); }
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace OpenRA.Mods.RA
|
||||
{
|
||||
public class GainsExperienceInfo : ITraitInfo, Requires<ValuedInfo>
|
||||
{
|
||||
[Desc("XP requirements for each level, as multiples of our own cost.")]
|
||||
public readonly float[] CostThreshold = { 2, 4, 8, 16 };
|
||||
public readonly float[] FirepowerModifier = { 1.1f, 1.15f, 1.2f, 1.5f };
|
||||
public readonly float[] ArmorModifier = { 1.1f, 1.2f, 1.3f, 1.5f };
|
||||
|
||||
@@ -11,14 +11,19 @@
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
using OpenRA.Mods.RA.Effects;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("You get money for playing this actor.")]
|
||||
class GivesBountyInfo : TraitInfo<GivesBounty>
|
||||
{
|
||||
[Desc("Calculated by Cost or CustomSellValue so they have to be set to avoid crashes.")]
|
||||
public readonly int Percentage = 10;
|
||||
[Desc("Higher ranked units give higher bounties.")]
|
||||
public readonly int LevelMod = 125;
|
||||
[Desc("Destroying creeps and enemies is rewarded.")]
|
||||
public readonly Stance[] Stances = {Stance.Neutral, Stance.Enemy};
|
||||
}
|
||||
|
||||
|
||||
@@ -8,11 +8,16 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class GivesExperienceInfo : TraitInfo<GivesExperience> { public readonly int Experience = -1; }
|
||||
class GivesExperienceInfo : TraitInfo<GivesExperience>
|
||||
{
|
||||
[Desc("if -1, use the value of the unit cost.")]
|
||||
public readonly int Experience = -1;
|
||||
}
|
||||
|
||||
class GivesExperience : INotifyKilled
|
||||
{
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
@@ -16,8 +17,10 @@ namespace OpenRA.Mods.RA
|
||||
public class LimitedAmmoInfo : ITraitInfo
|
||||
{
|
||||
public readonly int Ammo = 0;
|
||||
[Desc("Defaults to value in Ammo.")]
|
||||
public readonly int PipCount = 0;
|
||||
public readonly int ReloadTicks = 25 * 2; // This is measured in ticks
|
||||
[Desc("Time to reload measured in ticks.")]
|
||||
public readonly int ReloadTicks = 25 * 2;
|
||||
|
||||
public object Create(ActorInitializer init) { return new LimitedAmmo(this); }
|
||||
}
|
||||
|
||||
@@ -18,17 +18,22 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA.Move
|
||||
{
|
||||
[Desc("Unit is able to move.")]
|
||||
public class MobileInfo : ITraitInfo, IFacingInfo, UsesInit<FacingInit>, UsesInit<LocationInit>, UsesInit<SubCellInit>
|
||||
{
|
||||
[FieldLoader.LoadUsing("LoadSpeeds")]
|
||||
[Desc("Set Water: 0 for ground units and lower the value on rough terrain.")]
|
||||
public readonly Dictionary<string, TerrainInfo> TerrainSpeeds;
|
||||
[Desc("e.g. crate, wall, infantry")]
|
||||
public readonly string[] Crushes;
|
||||
public readonly int WaitAverage = 60;
|
||||
public readonly int WaitSpread = 20;
|
||||
public readonly int InitialFacing = 128;
|
||||
[Desc("Rate of Turning")]
|
||||
public readonly int ROT = 255;
|
||||
public readonly int Speed = 1;
|
||||
public readonly bool OnRails = false;
|
||||
[Desc("Allow multiple (infantry) units in one cell.")]
|
||||
public readonly bool SharesCell = false;
|
||||
public readonly int Altitude;
|
||||
|
||||
|
||||
@@ -13,13 +13,24 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Attach this to the world actor (not a building!) to define a new shared build queue.\n" +
|
||||
"\t# Will only work together with the Production: trait on the actor that actually does the production.\n" +
|
||||
"\t# You will also want to add PrimaryBuildings: to let the user choose where new units should exit.")]
|
||||
public class ClassicProductionQueueInfo : ProductionQueueInfo, Requires<TechTreeInfo>, Requires<PowerManagerInfo>, Requires<PlayerResourcesInfo>
|
||||
{
|
||||
[Desc("If you build more actors of the same type, \n" +
|
||||
"\t# the same queue will get it's build time lowered for every actor produced there.")]
|
||||
public readonly bool SpeedUp = false;
|
||||
[Desc("Everytime another production building of the same queue is\n" +
|
||||
"\t# contructed, the build time of all actors in the queue\n" +
|
||||
"\t#get divided by this value.")]
|
||||
public readonly int BuildTimeSpeedUpDivisor = 2;
|
||||
[Desc("You can still build more production buildings\n" +
|
||||
"\t# than this value, but the build time won't increase further.")]
|
||||
public readonly int MaxBuildTimeReductionSteps = 6;
|
||||
|
||||
public override object Create(ActorInitializer init) { return new ClassicProductionQueue(init.self, this); }
|
||||
|
||||
@@ -13,21 +13,41 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Attach this to an actor (usually a building) to let it produce units or construct buildings.\n" +
|
||||
"\t# If one builds another actor of this type, he will get a separate queue to create two actors\n" +
|
||||
"\t# at the same time. Will only work together with the Production: trait.")]
|
||||
public class ProductionQueueInfo : ITraitInfo
|
||||
{
|
||||
[Desc("What kind of production will be added (e.g. Building, Infantry, Vehicle, ...)")]
|
||||
public readonly string Type = null;
|
||||
[Desc("Group queues from separate buildings together into the same tab.")]
|
||||
public readonly string Group = null;
|
||||
|
||||
[Desc("This value is used to translate the unit cost into build time.")]
|
||||
public float BuildSpeedModifier = 0.4f;
|
||||
[Desc("The build time is multiplied with this value on low power.")]
|
||||
public readonly int LowPowerSlowdown = 3;
|
||||
|
||||
[Desc("Notification played when production is complete.\n" +
|
||||
"\t# The filename of the audio is defined per faction in notifications.yaml.")]
|
||||
public readonly string ReadyAudio = "UnitReady";
|
||||
[Desc("Notification played when you can't train another unit\n" +
|
||||
"\t# when the build limit exceeded or the exit is jammed.\n" +
|
||||
"\t# The filename of the audio is defined per faction in notifications.yaml.")]
|
||||
public readonly string BlockedAudio = "NoBuild";
|
||||
[Desc("Notification played when user clicks on the build palette icon.\n" +
|
||||
"\t# The filename of the audio is defined per faction in notifications.yaml.")]
|
||||
public readonly string QueuedAudio = "Training";
|
||||
[Desc("Notification played when player right-clicks\n" +
|
||||
"\t# on the build palette icon. The filename of the audio is defined per faction in notifications.yaml.")]
|
||||
public readonly string OnHoldAudio = "OnHold";
|
||||
[Desc("Notification played when player right-clicks\n" +
|
||||
"\t# on a build palette icon that is already on hold.\n" +
|
||||
"\t# The filename of the audio is defined per faction in notifications.yaml.")]
|
||||
public readonly string CancelledAudio = "Cancelled";
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new ProductionQueue(init.self, init.self.Owner.PlayerActor, this); }
|
||||
|
||||
@@ -11,10 +11,12 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using OpenRA.Mods.RA.Orders;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Used together with ClassicProductionQueue.")]
|
||||
class PrimaryBuildingInfo : TraitInfo<PrimaryBuilding> { }
|
||||
|
||||
class PrimaryBuilding : IIssueOrder, IResolveOrder, ITags
|
||||
@@ -54,7 +56,7 @@ namespace OpenRA.Mods.RA
|
||||
return;
|
||||
}
|
||||
|
||||
// THIS IS SHIT
|
||||
// TODO: THIS IS SHIT
|
||||
// Cancel existing primaries
|
||||
foreach (var p in self.Info.Traits.Get<ProductionInfo>().Produces)
|
||||
foreach (var b in self.World
|
||||
|
||||
@@ -18,13 +18,16 @@ using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("This unit has access to build queues.")]
|
||||
public class ProductionInfo : ITraitInfo
|
||||
{
|
||||
[Desc("e.g. Infantry, Vehicles, Aircraft, Buildings")]
|
||||
public readonly string[] Produces = { };
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new Production(this); }
|
||||
}
|
||||
|
||||
[Desc("Where the unit should leave the building. Multiples are allowed if IDs are added: Exit@2, ...")]
|
||||
public class ExitInfo : TraitInfo<Exit>
|
||||
{
|
||||
public readonly int2 SpawnOffset = int2.Zero; // in px relative to CenterLocation
|
||||
|
||||
@@ -10,10 +10,12 @@
|
||||
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Visualizes the remaining build time of actor produced here.")]
|
||||
class ProductionBarInfo : ITraitInfo
|
||||
{
|
||||
public object Create(ActorInitializer init) { return new ProductionBar( init.self ); }
|
||||
|
||||
@@ -9,10 +9,12 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Used to waypoint units after production or repair is finished.")]
|
||||
public class RallyPointInfo : ITraitInfo
|
||||
{
|
||||
public readonly int[] RallyPoint = { 1, 3 };
|
||||
|
||||
@@ -8,13 +8,17 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Unit will reload its limited ammo itself.")]
|
||||
public class ReloadsInfo : ITraitInfo, Requires<LimitedAmmoInfo>
|
||||
{
|
||||
[Desc("How much ammo is reloaded after a certain period.")]
|
||||
public readonly int Count = 0;
|
||||
[Desc("How long it takes to do so.")]
|
||||
public readonly int Period = 50;
|
||||
|
||||
public object Create(ActorInitializer init) { return new Reloads(init.self, this); }
|
||||
|
||||
@@ -12,9 +12,11 @@ using OpenRA.Mods.RA.Activities;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
using OpenRA.Mods.RA.Render;
|
||||
using OpenRA.Traits;
|
||||
using OpenRA.FileFormats;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Building can be sold")]
|
||||
public class SellableInfo : TraitInfo<Sellable>
|
||||
{
|
||||
public readonly int RefundPercent = 50;
|
||||
|
||||
@@ -9,12 +9,14 @@
|
||||
#endregion
|
||||
|
||||
using System.Collections.Generic;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
class StoresOreInfo : ITraitInfo
|
||||
{
|
||||
[Desc("Number of little squares used to display how filled unit is.")]
|
||||
public readonly int PipCount = 0;
|
||||
public readonly PipType PipColor = PipType.Yellow;
|
||||
public readonly int Capacity = 0;
|
||||
|
||||
@@ -13,12 +13,15 @@ using System.Drawing;
|
||||
using OpenRA.Mods.RA.Activities;
|
||||
using OpenRA.Mods.RA.Buildings;
|
||||
using OpenRA.Mods.RA.Orders;
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("Donate money to building if it has the AcceptSupplies: trait.")]
|
||||
class SupplyTruckInfo : ITraitInfo
|
||||
{
|
||||
[Desc("The amount of cash the owner of the building recieves.")]
|
||||
public readonly int Payload = 500;
|
||||
public object Create(ActorInitializer init) { return new SupplyTruck(this); }
|
||||
}
|
||||
|
||||
@@ -8,21 +8,26 @@
|
||||
*/
|
||||
#endregion
|
||||
|
||||
using OpenRA.FileFormats;
|
||||
using OpenRA.Traits;
|
||||
|
||||
namespace OpenRA.Mods.RA
|
||||
{
|
||||
[Desc("How much the unit is worth.")]
|
||||
public class ValuedInfo : TraitInfo<Valued>
|
||||
{
|
||||
[Desc("Used in production, but also for bounties so remember to set it > 0 even for NPCs.")]
|
||||
public readonly int Cost = 0;
|
||||
}
|
||||
|
||||
public class Valued { }
|
||||
|
||||
[Desc("Shown in the build palette widget.")]
|
||||
public class TooltipInfo : ITraitInfo
|
||||
{
|
||||
public readonly string Description = "";
|
||||
public readonly string Name = "";
|
||||
[Desc("Defaults to actor name + icon suffix.")]
|
||||
public readonly string Icon = null;
|
||||
|
||||
public virtual object Create(ActorInitializer init) { return new Tooltip(init.self, this); }
|
||||
|
||||
Reference in New Issue
Block a user