diff --git a/OpenRA.Editor/BrushTool.cs b/OpenRA.Editor/BrushTool.cs index cd4288efeb..aaee6a6030 100644 --- a/OpenRA.Editor/BrushTool.cs +++ b/OpenRA.Editor/BrushTool.cs @@ -104,7 +104,7 @@ namespace OpenRA.Editor } } - /* todo: optimize */ + /* TODO: optimize */ foreach (var ch in s.Chunks.Values) ch.Dispose(); s.Chunks.Clear(); } diff --git a/OpenRA.Editor/Form1.cs b/OpenRA.Editor/Form1.cs index aeeeda7a07..b0157f4a54 100755 --- a/OpenRA.Editor/Form1.cs +++ b/OpenRA.Editor/Form1.cs @@ -299,7 +299,7 @@ namespace OpenRA.Editor saveToolStripMenuItem.Enabled = true; toolStripMenuItemSave.Enabled = true; saveAsToolStripMenuItem.Enabled = true; - mnuMinimapToPNG.Enabled = true; // todo: what is this VB naming bullshit doing here? + mnuMinimapToPNG.Enabled = true; // TODO: what is this VB naming bullshit doing here? PopulateActorOwnerChooser(); } diff --git a/OpenRA.Editor/LegacyMapImporter.cs b/OpenRA.Editor/LegacyMapImporter.cs index 4e69db2373..96161bad37 100644 --- a/OpenRA.Editor/LegacyMapImporter.cs +++ b/OpenRA.Editor/LegacyMapImporter.cs @@ -82,7 +82,7 @@ namespace OpenRA.Editor // {"scrate","crate"}, }; - // todo: fix this -- will have bitrotted pretty badly. + // TODO: fix this -- will have bitrotted pretty badly. static Dictionary> namedColorMapping = new Dictionary>() { {"gold",Pair.New(Color.FromArgb(246,214,121),Color.FromArgb(40,32,8))}, diff --git a/OpenRA.Editor/MapSelect.Designer.cs b/OpenRA.Editor/MapSelect.Designer.cs index f5c0c585c1..8595601962 100644 --- a/OpenRA.Editor/MapSelect.Designer.cs +++ b/OpenRA.Editor/MapSelect.Designer.cs @@ -12,15 +12,10 @@ namespace OpenRA.Editor { partial class MapSelect { - /// - /// TODO - /// + // TODO: private System.ComponentModel.IContainer components = null; - /// - /// TODO - /// - /// TODO + // TODO: protected override void Dispose(bool disposing) { if (disposing && (components != null)) @@ -32,9 +27,7 @@ namespace OpenRA.Editor #region Код, автоматически созданный конструктором форм Windows - /// - /// TODO - /// + // TODO: private void InitializeComponent() { this.components = new System.ComponentModel.Container(); diff --git a/OpenRA.Editor/Surface.cs b/OpenRA.Editor/Surface.cs index 9e6f8e3003..e8212f5e3b 100755 --- a/OpenRA.Editor/Surface.cs +++ b/OpenRA.Editor/Surface.cs @@ -467,7 +467,7 @@ namespace OpenRA.Editor { for (int y = 0; y < height; y++) { - //todo: crash prevention + //TODO: crash prevention TileSelection[x, y] = Map.MapTiles.Value[start.X + x, start.Y + y]; ResourceSelection[x, y] = Map.MapResources.Value[start.X + x, start.Y + y]; } @@ -487,7 +487,7 @@ namespace OpenRA.Editor var mapX = loc.X + x; var mapY = loc.Y + y; - //todo: crash prevention for outside of bounds + //TODO: crash prevention for outside of bounds Map.MapTiles.Value[mapX, mapY] = TileSelection[x, y]; Map.MapResources.Value[mapX, mapY] = ResourceSelection[x, y]; diff --git a/OpenRA.FileFormats/Manifest.cs b/OpenRA.FileFormats/Manifest.cs index acea418e73..1db3f1bbf1 100644 --- a/OpenRA.FileFormats/Manifest.cs +++ b/OpenRA.FileFormats/Manifest.cs @@ -32,7 +32,7 @@ namespace OpenRA.FileFormats .Select(m => MiniYaml.FromFile("mods/" + m + "/mod.yaml")) .Aggregate(MiniYaml.MergeLiberal)).NodesDict; - // Todo: Use fieldloader + // TODO: Use fieldloader Folders = YamlList(yaml, "Folders"); Packages = YamlList(yaml, "Packages"); Rules = YamlList(yaml, "Rules"); diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 925c5b12fd..a7c20c7781 100755 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -240,7 +240,7 @@ namespace OpenRA } ); } - // todo: move elsewhere. + // TODO: move elsewhere. public void ChangeOwner(Player newOwner) { World.AddFrameEndTask(w => diff --git a/OpenRA.Game/Group.cs b/OpenRA.Game/Group.cs index 854d07924b..f91fe74943 100644 --- a/OpenRA.Game/Group.cs +++ b/OpenRA.Game/Group.cs @@ -39,6 +39,6 @@ namespace OpenRA id, actors.Select(a => "#{0} {1}".F(a.ActorID, a.Info.Name)).JoinWith(","))); } - /* todo: add lazy group path crap, groupleader, pruning, etc */ + /* TODO: add lazy group path crap, groupleader, pruning, etc */ } } diff --git a/OpenRA.Game/Network/UnitOrders.cs b/OpenRA.Game/Network/UnitOrders.cs index a1259da378..c07b5d12d3 100755 --- a/OpenRA.Game/Network/UnitOrders.cs +++ b/OpenRA.Game/Network/UnitOrders.cs @@ -20,7 +20,7 @@ namespace OpenRA.Network { static Player FindPlayerByClient(this World world, Session.Client c) { - /* todo: this is still a hack. + /* TODO: this is still a hack. * the cases we're trying to avoid are the extra players on the host's client -- Neutral, other MapPlayers,..*/ return world.Players.FirstOrDefault( p => (p.ClientIndex == c.Index && p.PlayerReference.Playable)); diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index 5b909231af..74c7853efb 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -68,7 +68,7 @@ namespace OpenRA else { // Map player - ClientIndex = 0; // Owned by the host (todo: fix this) + ClientIndex = 0; // Owned by the host (TODO: fix this) ColorRamp = pr.ColorRamp; PlayerName = pr.Name; NonCombatant = pr.NonCombatant; diff --git a/OpenRA.Game/Selection.cs b/OpenRA.Game/Selection.cs index a248a61142..ac77afc050 100644 --- a/OpenRA.Game/Selection.cs +++ b/OpenRA.Game/Selection.cs @@ -36,7 +36,7 @@ namespace OpenRA if (isClick) { - var adjNewSelection = newSelection.Take(1); /* todo: select BEST, not FIRST */ + var adjNewSelection = newSelection.Take(1); /* TODO: select BEST, not FIRST */ actors = (isCombine ? oldSelection.SymmetricDifference(adjNewSelection) : adjNewSelection).ToList(); } else diff --git a/OpenRA.Game/Server/Server.cs b/OpenRA.Game/Server/Server.cs index 2a399a5793..c9d208b817 100644 --- a/OpenRA.Game/Server/Server.cs +++ b/OpenRA.Game/Server/Server.cs @@ -211,7 +211,7 @@ namespace OpenRA.Server } } - /* lobby rework todo: + /* lobby rework TODO: * - "teams together" option for team games -- will eliminate most need * for manual spawnpoint choosing. */ diff --git a/OpenRA.Game/Sound.cs b/OpenRA.Game/Sound.cs index 58785007b7..9c4d9cad30 100644 --- a/OpenRA.Game/Sound.cs +++ b/OpenRA.Game/Sound.cs @@ -47,7 +47,7 @@ namespace OpenRA { engine = Game.Settings.Server.Dedicated?"Null":engine; switch (engine) - { /* todo: if someone cares about pluggable crap here, ship this out */ + { /* TODO: if someone cares about pluggable crap here, ship this out */ case "AL": return new OpenAlSoundEngine(); case "Null": return new NullSoundEngine(); diff --git a/OpenRA.Game/Traits/CreatesShroud.cs b/OpenRA.Game/Traits/CreatesShroud.cs index cda91774ce..da5b644cbf 100644 --- a/OpenRA.Game/Traits/CreatesShroud.cs +++ b/OpenRA.Game/Traits/CreatesShroud.cs @@ -31,7 +31,7 @@ namespace OpenRA.Traits public void Tick(Actor self) { - // todo: don't tick all the time. + // TODO: don't tick all the time. if(self.Owner == null) return; if (previousLocation != self.Location && v != null) { diff --git a/OpenRA.Game/Traits/Render/RenderSimple.cs b/OpenRA.Game/Traits/Render/RenderSimple.cs index eac7bdaa82..d7927c6131 100755 --- a/OpenRA.Game/Traits/Render/RenderSimple.cs +++ b/OpenRA.Game/Traits/Render/RenderSimple.cs @@ -20,8 +20,11 @@ namespace OpenRA.Traits { [Desc("Defaults to the actor name.")] public readonly string Image = null; + [Desc("custom palette name")] public readonly string Palette = null; + [Desc("custom PlayerColorPalette: BaseName")] public readonly string PlayerPalette = "player"; + [Desc("Change the sprite image size.")] public readonly float Scale = 1f; public virtual object Create(ActorInitializer init) { return new RenderSimple(init.self); } diff --git a/OpenRA.Game/Traits/RevealsShroud.cs b/OpenRA.Game/Traits/RevealsShroud.cs index e20c5e53f8..e5d0db8a17 100644 --- a/OpenRA.Game/Traits/RevealsShroud.cs +++ b/OpenRA.Game/Traits/RevealsShroud.cs @@ -28,7 +28,7 @@ namespace OpenRA.Traits public void Tick(Actor self) { - // todo: don't tick all the time. + // TODO: don't tick all the time. World w = self.World; if(self.Owner == null) return; diff --git a/OpenRA.Game/Traits/World/Fog.cs b/OpenRA.Game/Traits/World/Fog.cs index 0cad7f43df..3fae8b6bcf 100644 --- a/OpenRA.Game/Traits/World/Fog.cs +++ b/OpenRA.Game/Traits/World/Fog.cs @@ -8,15 +8,13 @@ */ #endregion +using OpenRA.FileFormats; + namespace OpenRA.Traits { - public class FogInfo : TraitInfo - { - /* - * This tag trait will enable fog of war in ShroudRenderer. - * Don't forget about HiddenUnderFog and FrozenUnderFog. - */ - } + [Desc("This tag trait will enable fog of war in ShroudRenderer.", + "Don't forget about HiddenUnderFog and FrozenUnderFog.")] + public class FogInfo : TraitInfo { } public class Fog { } } \ No newline at end of file diff --git a/OpenRA.Game/Traits/World/PlayerColorPalette.cs b/OpenRA.Game/Traits/World/PlayerColorPalette.cs index 0b35c05ddc..6739068d2f 100644 --- a/OpenRA.Game/Traits/World/PlayerColorPalette.cs +++ b/OpenRA.Game/Traits/World/PlayerColorPalette.cs @@ -13,10 +13,14 @@ using OpenRA.Graphics; namespace OpenRA.Traits { + [Desc("Add this to the Player actor definition.")] public class PlayerColorPaletteInfo : ITraitInfo { + [Desc("The Name of the palette to base off.")] public readonly string BasePalette = null; + [Desc("The prefix for the resulting player palettes")] public readonly string BaseName = "player"; + [Desc("Remap these indices to player colors.")] public readonly int[] RemapIndex = {}; public readonly bool AllowModifiers = true; diff --git a/OpenRA.Game/Widgets/LineGraphWidget.cs b/OpenRA.Game/Widgets/LineGraphWidget.cs index 37e5c94192..50351b81b4 100644 --- a/OpenRA.Game/Widgets/LineGraphWidget.cs +++ b/OpenRA.Game/Widgets/LineGraphWidget.cs @@ -143,7 +143,7 @@ namespace OpenRA.Widgets keyOffset++; } - //todo: make this stuff not draw outside of the RenderBounds + //TODO: make this stuff not draw outside of the RenderBounds for (int n = pointStart, x = 0; n <= pointEnd; n++, x += xStep) { Game.Renderer.LineRenderer.DrawLine(origin + new float2(x, 0), origin + new float2(x, -5), Color.White, Color.White); diff --git a/OpenRA.Game/Widgets/SliderWidget.cs b/OpenRA.Game/Widgets/SliderWidget.cs index a1cf26e6be..9383bbe52c 100755 --- a/OpenRA.Game/Widgets/SliderWidget.cs +++ b/OpenRA.Game/Widgets/SliderWidget.cs @@ -62,8 +62,8 @@ namespace OpenRA.Widgets case MouseInputEvent.Down: isMoving = true; - /* todo: handle snapping to ticks properly again */ - /* todo: handle nudge via clicking outside the thumb */ + /* TODO: handle snapping to ticks properly again */ + /* TODO: handle nudge via clicking outside the thumb */ UpdateValue(ValueFromPx(mi.Location.X - RenderBounds.Left)); break; diff --git a/OpenRA.Game/World.cs b/OpenRA.Game/World.cs index 3992e9fceb..7dd3fbbc35 100644 --- a/OpenRA.Game/World.cs +++ b/OpenRA.Game/World.cs @@ -168,7 +168,7 @@ namespace OpenRA public void Tick() { - // Todo: Expose this as an order so it can be synced + // TODO: Expose this as an order so it can be synced if (ShouldTick()) { using( new PerfSample("tick_idle") ) diff --git a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs index 43975d632a..35b81831e8 100644 --- a/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs +++ b/OpenRA.Mods.Cnc/Missions/Gdi01Script.cs @@ -95,7 +95,7 @@ namespace OpenRA.Mods.Cnc.Missions a.QueueActivity(mobile.MoveTo(Actors["nod1"].Location, 2 )); a.QueueActivity(mobile.MoveTo(Actors["nod2"].Location, 2 )); a.QueueActivity(mobile.MoveTo(Actors["nod3"].Location, 2 )); - // Todo: Queue hunt order + // TODO: Queue hunt order } }); } diff --git a/OpenRA.Mods.RA/Activities/EnterTransport.cs b/OpenRA.Mods.RA/Activities/EnterTransport.cs index f79b13c51c..96a47412a4 100644 --- a/OpenRA.Mods.RA/Activities/EnterTransport.cs +++ b/OpenRA.Mods.RA/Activities/EnterTransport.cs @@ -30,7 +30,7 @@ namespace OpenRA.Mods.RA.Activities if (!cargo.CanLoad(transport, self)) return NextActivity; - // Todo: Queue a move order to the transport? need to be + // TODO: Queue a move order to the transport? need to be // careful about units that can't path to the transport if ((transport.Location - self.Location).LengthSquared > 2) return NextActivity; diff --git a/OpenRA.Mods.RA/Activities/LayMines.cs b/OpenRA.Mods.RA/Activities/LayMines.cs index 7e6f9f8d07..487b500954 100644 --- a/OpenRA.Mods.RA/Activities/LayMines.cs +++ b/OpenRA.Mods.RA/Activities/LayMines.cs @@ -60,7 +60,7 @@ namespace OpenRA.Mods.RA.Activities return Util.SequenceActivities( mobile.MoveTo(p, 0), this ); } - // todo: return somewhere likely to be safe (near fix) so we're not sitting out in the minefield. + // TODO: return somewhere likely to be safe (near fix) so we're not sitting out in the minefield. return new Wait(20); // nothing to do here } diff --git a/OpenRA.Mods.RA/Activities/UnloadCargo.cs b/OpenRA.Mods.RA/Activities/UnloadCargo.cs index 0531a346da..56968ad59e 100644 --- a/OpenRA.Mods.RA/Activities/UnloadCargo.cs +++ b/OpenRA.Mods.RA/Activities/UnloadCargo.cs @@ -63,7 +63,7 @@ namespace OpenRA.Mods.RA.Activities if (facing != null && facing.Facing != unloadFacing) return Util.SequenceActivities( new Turn(unloadFacing), this ); - // todo: handle the BS of open/close sequences, which are inconsistent, + // TODO: handle the BS of open/close sequences, which are inconsistent, // for reasons that probably make good sense to the westwood guys. var cargo = self.Trait(); diff --git a/OpenRA.Mods.RA/Air/ReturnToBase.cs b/OpenRA.Mods.RA/Air/ReturnToBase.cs index 1244371364..58a8b7dab3 100755 --- a/OpenRA.Mods.RA/Air/ReturnToBase.cs +++ b/OpenRA.Mods.RA/Air/ReturnToBase.cs @@ -74,7 +74,7 @@ namespace OpenRA.Mods.RA.Air var e = (turnRadius / d.Length) * d; var f = new float2(-e.Y, e.X); /* rotate */ - /* todo: support internal tangents, too! */ + /* TODO: support internal tangents, too! */ if (f.X > 0) f = -f; diff --git a/OpenRA.Mods.RA/Armament.cs b/OpenRA.Mods.RA/Armament.cs index a6d9f168df..04bdf153e6 100755 --- a/OpenRA.Mods.RA/Armament.cs +++ b/OpenRA.Mods.RA/Armament.cs @@ -25,13 +25,16 @@ namespace OpenRA.Mods.RA public int Facing; // deviation from turret facing } + [Desc("Allows you to attach weapons to the unit (use @IdentifierSuffix for > 1)")] public class ArmamentInfo : ITraitInfo, Requires { [WeaponReference] [Desc("Has to be defined here and in weapons.yaml.")] public readonly string Weapon = null; public readonly string Turret = "primary"; + [Desc("Move the turret backwards when firing.")] public readonly int Recoil = 0; + [Desc("Time (in frames) until the weapon can fire again.")] public readonly int FireDelay = 0; public readonly float RecoilRecovery = 0.2f; diff --git a/OpenRA.Mods.RA/Attack/AttackBase.cs b/OpenRA.Mods.RA/Attack/AttackBase.cs index 2b47bd84ea..c52b5e0a59 100644 --- a/OpenRA.Mods.RA/Attack/AttackBase.cs +++ b/OpenRA.Mods.RA/Attack/AttackBase.cs @@ -21,7 +21,9 @@ namespace OpenRA.Mods.RA { public readonly bool CanAttackGround = true; + [Desc("Ticks to wait until next AutoTarget: attempt.")] public readonly int MinimumScanTimeInterval = 30; + [Desc("Ticks to wait until next AutoTarget: attempt.")] public readonly int MaximumScanTimeInterval = 60; public abstract object Create(ActorInitializer init); diff --git a/OpenRA.Mods.RA/Attack/AttackFrontal.cs b/OpenRA.Mods.RA/Attack/AttackFrontal.cs index dfcd4bb2e5..2f52e23625 100644 --- a/OpenRA.Mods.RA/Attack/AttackFrontal.cs +++ b/OpenRA.Mods.RA/Attack/AttackFrontal.cs @@ -9,10 +9,12 @@ #endregion using System; +using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA { + [Desc("Unit got to face the target")] public class AttackFrontalInfo : AttackBaseInfo { public readonly int FacingTolerance = 1; diff --git a/OpenRA.Mods.RA/Attack/AttackMedic.cs b/OpenRA.Mods.RA/Attack/AttackMedic.cs index e8399eaaf2..ec705f25ba 100644 --- a/OpenRA.Mods.RA/Attack/AttackMedic.cs +++ b/OpenRA.Mods.RA/Attack/AttackMedic.cs @@ -14,7 +14,7 @@ using OpenRA.FileFormats; namespace OpenRA.Mods.RA { - [Desc("Give the unit a \"heal-weapon\".", + [Desc("Give the unit a \"heal-weapon\" that attacks friendly targets if they are damaged.", "It conflicts with any other weapon or Attack*: trait because it will hurt friendlies during the", "heal process then. It also won't work with buildings (use RepairsUnits: for them)")] public class AttackMedicInfo : AttackFrontalInfo diff --git a/OpenRA.Mods.RA/Buildable.cs b/OpenRA.Mods.RA/Buildable.cs index cdc01bbaea..a7b50097b3 100755 --- a/OpenRA.Mods.RA/Buildable.cs +++ b/OpenRA.Mods.RA/Buildable.cs @@ -24,7 +24,7 @@ namespace OpenRA.Mods.RA public readonly bool Hidden = false; public readonly int BuildLimit = 0; - // todo: UI fluff; doesn't belong here + // TODO: UI fluff; doesn't belong here public readonly int BuildPaletteOrder = 9999; public readonly string Hotkey = null; } diff --git a/OpenRA.Mods.RA/Buildings/Building.cs b/OpenRA.Mods.RA/Buildings/Building.cs index 8f45f853cd..7be8e16994 100755 --- a/OpenRA.Mods.RA/Buildings/Building.cs +++ b/OpenRA.Mods.RA/Buildings/Building.cs @@ -28,7 +28,7 @@ namespace OpenRA.Mods.RA.Buildings 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).")] + [Desc("x means space it blocks, _ is a part that is passable by actors.")] public readonly string Footprint = "x"; public readonly int2 Dimensions = new int2(1, 1); diff --git a/OpenRA.Mods.RA/Cargo.cs b/OpenRA.Mods.RA/Cargo.cs index 31c57b432a..d51aed6f03 100644 --- a/OpenRA.Mods.RA/Cargo.cs +++ b/OpenRA.Mods.RA/Cargo.cs @@ -96,7 +96,7 @@ namespace OpenRA.Mods.RA if (move != null && move.Altitude > info.minimalUnloadAltitude) return false; - // Todo: Check if there is a free tile to unload to + // TODO: Check if there is a free tile to unload to return true; } diff --git a/OpenRA.Mods.RA/CarpetBomb.cs b/OpenRA.Mods.RA/CarpetBomb.cs index e452477dc5..58e7ab098f 100644 --- a/OpenRA.Mods.RA/CarpetBomb.cs +++ b/OpenRA.Mods.RA/CarpetBomb.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA public readonly int Range = 3; } - class CarpetBomb : ITick, ISync // todo: maybe integrate this better with the normal weapons system? + class CarpetBomb : ITick, ISync // TODO: maybe integrate this better with the normal weapons system? { [Sync] CPos Target; [Sync] int dropDelay; diff --git a/OpenRA.Mods.RA/Chronoshiftable.cs b/OpenRA.Mods.RA/Chronoshiftable.cs index 88670890e9..9721cda4ab 100755 --- a/OpenRA.Mods.RA/Chronoshiftable.cs +++ b/OpenRA.Mods.RA/Chronoshiftable.cs @@ -38,7 +38,7 @@ namespace OpenRA.Mods.RA if (chronoshiftReturnTicks == 0) { self.CancelActivity(); - // Todo: need a new Teleport method that will move to the closest available cell + // TODO: need a new Teleport method that will move to the closest available cell self.QueueActivity(new Teleport(chronosphere, chronoshiftOrigin, killCargo)); } } @@ -46,7 +46,7 @@ namespace OpenRA.Mods.RA // Can't be used in synced code, except with ignoreVis. public virtual bool CanChronoshiftTo(Actor self, CPos targetLocation) { - // Todo: Allow enemy units to be chronoshifted into bad terrain to kill them + // TODO: Allow enemy units to be chronoshifted into bad terrain to kill them return (self.HasTrait() && self.Trait().CanEnterCell(targetLocation)); } diff --git a/OpenRA.Mods.RA/ConquestVictoryConditions.cs b/OpenRA.Mods.RA/ConquestVictoryConditions.cs index 32750b10ed..0334fba8f8 100644 --- a/OpenRA.Mods.RA/ConquestVictoryConditions.cs +++ b/OpenRA.Mods.RA/ConquestVictoryConditions.cs @@ -9,13 +9,15 @@ #endregion using System.Linq; +using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA { public class ConquestVictoryConditionsInfo : ITraitInfo { - public int NotificationDelay = 1500; // Milliseconds + [Desc("Milliseconds")] + public int NotificationDelay = 1500; public object Create(ActorInitializer init) { return new ConquestVictoryConditions(this); } } @@ -85,13 +87,12 @@ namespace OpenRA.Mods.RA } } - /* tag trait for things that must be destroyed for a short game to end */ - + [Desc("Tag trait for things that must be destroyed for a short game to end.")] public class MustBeDestroyedInfo : TraitInfo { } public class MustBeDestroyed { } - // Provides game mode information for players/observers - // Goes on WorldActor - observers don't have a player it can live on + [Desc("Provides game mode information for players/observers.", + "Goes on WorldActor - observers don't have a player it can live on.")] public class ConquestObjectivesPanelInfo : ITraitInfo { public string ObjectivesPanel = null; diff --git a/OpenRA.Mods.RA/CrateAction.cs b/OpenRA.Mods.RA/CrateAction.cs index fbd684f325..a2da2c8c2b 100644 --- a/OpenRA.Mods.RA/CrateAction.cs +++ b/OpenRA.Mods.RA/CrateAction.cs @@ -10,14 +10,18 @@ using System.Linq; using OpenRA.Mods.RA.Effects; +using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA { public class CrateActionInfo : ITraitInfo { + [Desc("Chance of getting this crate, assuming the collector is compatible.")] public int SelectionShares = 10; + [Desc("An animation defined in sequence yaml(s) to draw.")] public string Effect = null; + [Desc("Audio clip to play when the crate is collected.")] public string Notification = null; [ActorReference] public string[] ExcludedActorTypes = { }; diff --git a/OpenRA.Mods.RA/CrateDrop.cs b/OpenRA.Mods.RA/CrateDrop.cs index 7be813ba3c..ee8bbd2d5d 100644 --- a/OpenRA.Mods.RA/CrateDrop.cs +++ b/OpenRA.Mods.RA/CrateDrop.cs @@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA if (--ticks <= 0) { - ticks = Info.SpawnInterval * 25; // todo: randomize + ticks = Info.SpawnInterval * 25; // TODO: randomize crates.RemoveAll(x => !x.IsInWorld); // BUG: this removes crates that are cargo of a BADR! diff --git a/OpenRA.Mods.RA/CrateSpawner.cs b/OpenRA.Mods.RA/CrateSpawner.cs index 164aa2ec16..a30adf9d08 100644 --- a/OpenRA.Mods.RA/CrateSpawner.cs +++ b/OpenRA.Mods.RA/CrateSpawner.cs @@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA if (--ticks <= 0) { var info = self.Info.Traits.Get(); - ticks = info.SpawnInterval * 25; // todo: randomize + ticks = info.SpawnInterval * 25; // TODO: randomize crates.RemoveAll(x => !x.IsInWorld); diff --git a/OpenRA.Mods.RA/Effects/Bullet.cs b/OpenRA.Mods.RA/Effects/Bullet.cs index 3677b07aef..0aa706e911 100755 --- a/OpenRA.Mods.RA/Effects/Bullet.cs +++ b/OpenRA.Mods.RA/Effects/Bullet.cs @@ -12,6 +12,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; @@ -22,8 +23,10 @@ namespace OpenRA.Mods.RA.Effects { public readonly int Speed = 1; public readonly string Trail = null; - public readonly float Inaccuracy = 0; // pixels at maximum range + [Desc("Pixels at maximum range")] + public readonly float Inaccuracy = 0; public readonly string Image = null; + [Desc("Check for whether an actor with Wall: trait blocks fire")] public readonly bool High = false; public readonly int RangeLimit = 0; public readonly int Arm = 0; diff --git a/OpenRA.Mods.RA/Effects/LaserZap.cs b/OpenRA.Mods.RA/Effects/LaserZap.cs index de0589ebd1..f5f3b6b82d 100755 --- a/OpenRA.Mods.RA/Effects/LaserZap.cs +++ b/OpenRA.Mods.RA/Effects/LaserZap.cs @@ -13,10 +13,12 @@ using System.Drawing; using OpenRA.Effects; using OpenRA.GameRules; using OpenRA.Graphics; +using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA.Effects { + [Desc("Not a sprite, but an engine effect.")] class LaserZapInfo : IProjectileInfo { public readonly int BeamRadius = 1; diff --git a/OpenRA.Mods.RA/Effects/Missile.cs b/OpenRA.Mods.RA/Effects/Missile.cs index 457230315d..06047a09f9 100755 --- a/OpenRA.Mods.RA/Effects/Missile.cs +++ b/OpenRA.Mods.RA/Effects/Missile.cs @@ -24,6 +24,7 @@ namespace OpenRA.Mods.RA.Effects { public readonly int Speed = 1; public readonly int Arm = 0; + [Desc("Check for whether an actor with Wall: trait blocks fire")] public readonly bool High = false; public readonly bool Shadow = true; public readonly bool Proximity = false; @@ -32,6 +33,7 @@ namespace OpenRA.Mods.RA.Effects public readonly string Image = null; [Desc("Rate of Turning")] public readonly int ROT = 5; + [Desc("Explode when following the target longer than this.")] public readonly int RangeLimit = 0; public readonly bool TurboBoost = false; public readonly int TrailInterval = 2; diff --git a/OpenRA.Mods.RA/EmitCargoOnSell.cs b/OpenRA.Mods.RA/EmitCargoOnSell.cs index 73975b2aa8..79eb0b83a6 100644 --- a/OpenRA.Mods.RA/EmitCargoOnSell.cs +++ b/OpenRA.Mods.RA/EmitCargoOnSell.cs @@ -14,7 +14,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { - // for some reason i get yelled at for pbox.e1 not having Cargo, but that's a lie? + // for some reason I get yelled at for pbox.e1 not having Cargo, but that's a lie? class EmitCargoOnSellInfo : TraitInfo//, Requires { } @@ -23,8 +23,7 @@ namespace OpenRA.Mods.RA { void Emit(Actor self) { - // todo. - // would like to spill all actors out similar to how we call Unload + // TODO: would like to spill all actors out similar to how we call Unload } public void Selling(Actor self) { Emit(self); } diff --git a/OpenRA.Mods.RA/FogPalette.cs b/OpenRA.Mods.RA/FogPalette.cs index 642bb4e684..92ee39cee6 100644 --- a/OpenRA.Mods.RA/FogPalette.cs +++ b/OpenRA.Mods.RA/FogPalette.cs @@ -15,8 +15,10 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { + [Desc("Adds the hard-coded fog palette to the game")] class FogPaletteInfo : ITraitInfo { + [Desc("internal palette name")] public readonly string Name = "fog"; public object Create(ActorInitializer init) { return new FogPalette(this); } } diff --git a/OpenRA.Mods.RA/InvisibleToEnemy.cs b/OpenRA.Mods.RA/InvisibleToEnemy.cs index 248f7d7cd9..8739fcaef9 100644 --- a/OpenRA.Mods.RA/InvisibleToEnemy.cs +++ b/OpenRA.Mods.RA/InvisibleToEnemy.cs @@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA public Color RadarColorOverride(Actor self) { - // todo: why is making this half-opaque conflated with hiding the actor from non-allies? + // TODO: why is making this half-opaque conflated with hiding the actor from non-allies? return Color.FromArgb(128, self.Owner.ColorRamp.GetColor(0)); } diff --git a/OpenRA.Mods.RA/LightPaletteRotator.cs b/OpenRA.Mods.RA/LightPaletteRotator.cs index ba32a4f8d5..f92f05c75e 100644 --- a/OpenRA.Mods.RA/LightPaletteRotator.cs +++ b/OpenRA.Mods.RA/LightPaletteRotator.cs @@ -15,6 +15,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { + [Desc("Palette effect used for blinking \"animations\" on actors.")] class LightPaletteRotatorInfo : ITraitInfo { public readonly string[] ExcludePalettes = {}; diff --git a/OpenRA.Mods.RA/Minelayer.cs b/OpenRA.Mods.RA/Minelayer.cs index 8890d335c4..37b940e853 100644 --- a/OpenRA.Mods.RA/Minelayer.cs +++ b/OpenRA.Mods.RA/Minelayer.cs @@ -76,7 +76,7 @@ namespace OpenRA.Mods.RA var mins = CPos.Min(start, end); var maxs = CPos.Max(start, end); - /* todo: proper endcaps, if anyone cares (which won't happen unless depth is large) */ + /* TODO: proper endcaps, if anyone cares (which won't happen unless depth is large) */ var p = end - start; var q = new float2(p.Y, -p.X); @@ -140,7 +140,7 @@ namespace OpenRA.Mods.RA public void RenderBeforeWorld(WorldRenderer wr, World world) { } - public string GetCursor(World world, CPos xy, MouseInput mi) { lastMousePos = xy; return "ability"; } /* todo */ + public string GetCursor(World world, CPos xy, MouseInput mi) { lastMousePos = xy; return "ability"; } /* TODO */ } public void RenderAfterWorld(WorldRenderer wr) diff --git a/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs b/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs index 8c045aef07..59072acb04 100644 --- a/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs +++ b/OpenRA.Mods.RA/PaletteFromCurrentTileset.cs @@ -13,9 +13,12 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { + [Desc("Loads the palette specified in the tileset definition")] class PaletteFromCurrentTilesetInfo : ITraitInfo { + [Desc("internal palette name")] public readonly string Name = null; + [Desc("Map listed indices to shadow. Ignores previous color.")] public readonly int[] ShadowIndex = { }; public readonly bool AllowModifiers = true; diff --git a/OpenRA.Mods.RA/PaletteFromFile.cs b/OpenRA.Mods.RA/PaletteFromFile.cs index 6a60aa8d67..fc1642eda7 100644 --- a/OpenRA.Mods.RA/PaletteFromFile.cs +++ b/OpenRA.Mods.RA/PaletteFromFile.cs @@ -16,9 +16,13 @@ namespace OpenRA.Mods.RA { class PaletteFromFileInfo : ITraitInfo { + [Desc("internal palette name")] public readonly string Name = null; + [Desc("If defined, load the palette only for this tileset.")] public readonly string Tileset = null; + [Desc("filename to load")] public readonly string Filename = null; + [Desc("Map listed indices to shadow. Ignores previous color.")] public readonly int[] ShadowIndex = { }; public readonly bool AllowModifiers = true; diff --git a/OpenRA.Mods.RA/PaletteFromRGBA.cs b/OpenRA.Mods.RA/PaletteFromRGBA.cs index 4f8a33c14f..b7ead89448 100644 --- a/OpenRA.Mods.RA/PaletteFromRGBA.cs +++ b/OpenRA.Mods.RA/PaletteFromRGBA.cs @@ -15,13 +15,20 @@ using OpenRA.Graphics; namespace OpenRA.Mods.RA { + [Desc("Creates a single color palette without any base palette file.")] class PaletteFromRGBAInfo : ITraitInfo { + [Desc("internal palette name")] public readonly string Name = null; + [Desc("If defined, load the palette only for this tileset.")] public readonly string Tileset = null; + [Desc("red color component")] public readonly int R = 0; + [Desc("green color component")] public readonly int G = 0; + [Desc("blue color component")] public readonly int B = 0; + [Desc("alpha channel (transparency)")] public readonly int A = 255; public readonly bool AllowModifiers = true; diff --git a/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs b/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs index a28fac7522..33d62fd07a 100644 --- a/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs +++ b/OpenRA.Mods.RA/PlayerPaletteFromCurrentTileset.cs @@ -15,8 +15,11 @@ namespace OpenRA.Mods.RA { class PlayerPaletteFromCurrentTilesetInfo : ITraitInfo { + [Desc("internal palette name")] public readonly string Name = null; + [Desc("Map listed indices to shadow.")] public readonly int[] ShadowIndex = { }; + [Desc("Apply palette rotatotors or not.")] public readonly bool AllowModifiers = true; public object Create(ActorInitializer init) { return new PlayerPaletteFromCurrentTileset(init.world, this); } diff --git a/OpenRA.Mods.RA/Production.cs b/OpenRA.Mods.RA/Production.cs index 1f72be3454..e94d4dbbd8 100755 --- a/OpenRA.Mods.RA/Production.cs +++ b/OpenRA.Mods.RA/Production.cs @@ -98,7 +98,7 @@ namespace OpenRA.Mods.RA return rp.rallyPoint; } - // todo: don't talk about HeliFly here. + // TODO: don't talk about HeliFly here. var helicopter = newUnit.TraitOrDefault(); if (helicopter != null) { diff --git a/OpenRA.Mods.RA/Render/RenderUnitReload.cs b/OpenRA.Mods.RA/Render/RenderUnitReload.cs index e7ca29c48c..0d76cdc0e0 100755 --- a/OpenRA.Mods.RA/Render/RenderUnitReload.cs +++ b/OpenRA.Mods.RA/Render/RenderUnitReload.cs @@ -33,7 +33,7 @@ namespace OpenRA.Mods.RA.Render } } - /* todo: native elevation support on turrets, and this dies? */ + /* TODO: native elevation support on turrets, and this dies? */ class RenderUnitTurretedAimInfo : RenderUnitTurretedInfo { diff --git a/OpenRA.Mods.RA/Scripting/Media.cs b/OpenRA.Mods.RA/Scripting/Media.cs index 0edf362863..8fbc1cca66 100644 --- a/OpenRA.Mods.RA/Scripting/Media.cs +++ b/OpenRA.Mods.RA/Scripting/Media.cs @@ -36,7 +36,7 @@ namespace OpenRA.Scripting // Mute world sounds var oldModifier = Sound.SoundVolumeModifier; - // Todo: this also modifies vqa audio + // TODO: this also modifies vqa audio //Sound.SoundVolumeModifier = 0f; // Stop music while fmv plays diff --git a/OpenRA.Mods.RA/ShroudPalette.cs b/OpenRA.Mods.RA/ShroudPalette.cs index 5437a1987f..3fed81a6eb 100644 --- a/OpenRA.Mods.RA/ShroudPalette.cs +++ b/OpenRA.Mods.RA/ShroudPalette.cs @@ -15,8 +15,10 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { + [Desc("Adds the hard-coded shroud palette to the game")] class ShroudPaletteInfo : ITraitInfo { + [Desc("internal palette name")] public readonly string Name = "shroud"; public object Create(ActorInitializer init) { return new ShroudPalette(this); } } diff --git a/OpenRA.Mods.RA/Turreted.cs b/OpenRA.Mods.RA/Turreted.cs index f9c305f755..8f910df26f 100755 --- a/OpenRA.Mods.RA/Turreted.cs +++ b/OpenRA.Mods.RA/Turreted.cs @@ -10,6 +10,7 @@ using System.Collections.Generic; using OpenRA.Mods.RA.Render; +using OpenRA.FileFormats; using OpenRA.Traits; namespace OpenRA.Mods.RA @@ -17,6 +18,7 @@ namespace OpenRA.Mods.RA public class TurretedInfo : ITraitInfo, UsesInit { public readonly string Turret = "primary"; + [Desc("Rate of Turning")] public readonly int ROT = 255; public readonly int InitialFacing = 128; public readonly int[] Offset = {0,0}; diff --git a/OpenRA.Mods.RA/WaterPaletteRotation.cs b/OpenRA.Mods.RA/WaterPaletteRotation.cs index a8a24127c1..74bab088fe 100644 --- a/OpenRA.Mods.RA/WaterPaletteRotation.cs +++ b/OpenRA.Mods.RA/WaterPaletteRotation.cs @@ -15,6 +15,7 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { + [Desc("Palette effect used for sprinkle \"animations\" on terrain tiles.")] class WaterPaletteRotationInfo : ITraitInfo { public readonly string[] ExcludePalettes = {}; diff --git a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs index 0ec408ecf6..7f88479712 100755 --- a/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs +++ b/OpenRA.Mods.RA/Widgets/BuildPaletteWidget.cs @@ -186,7 +186,7 @@ namespace OpenRA.Mods.RA.Widgets public override void Draw() { if (!IsVisible()) return; - // todo: fix + // TODO: fix int paletteHeight = DrawPalette(CurrentQueue); DrawBuildTabs(world, paletteHeight); diff --git a/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs index c98b86a752..016bd4a27d 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/OrderButtonsChromeLogic.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic [ObjectCreator.UseCtor] public OrderButtonsChromeLogic(World world) { - /* todo: attach this to the correct widget, to remove the lookups below */ + /* TODO: attach this to the correct widget, to remove the lookups below */ var r = Ui.Root; var gameRoot = r.Get("INGAME_ROOT"); diff --git a/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs b/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs index 915cb04abe..ae9a5e992d 100644 --- a/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs +++ b/OpenRA.Mods.RA/Widgets/Logic/ReplayBrowserLogic.cs @@ -71,7 +71,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic currentMap = currentReplay.Map(); panel.Get("DURATION").GetText = - () => WidgetUtils.FormatTime(currentReplay.Duration * 3 /* todo: 3:1 ratio isnt always true. */); + () => WidgetUtils.FormatTime(currentReplay.Duration * 3 /* TODO: 3:1 ratio isnt always true. */); panel.Get("MAP_PREVIEW").Map = () => currentMap; panel.Get("MAP_TITLE").GetText = () => currentMap != null ? currentMap.Title : "(Unknown Map)"; diff --git a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs index 32e3b65e4e..add93bc5cb 100644 --- a/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs +++ b/OpenRA.Mods.RA/Widgets/WorldCommandWidget.cs @@ -75,7 +75,7 @@ namespace OpenRA.Mods.RA.Widgets return false; } - // todo: take ALL this garbage and route it through the OrderTargeter stuff. + // TODO: take ALL this garbage and route it through the OrderTargeter stuff. bool PerformAttackMove() { diff --git a/OpenRA.Renderer.Gl/Shader.cs b/OpenRA.Renderer.Gl/Shader.cs index f4731d0074..069f15d536 100644 --- a/OpenRA.Renderer.Gl/Shader.cs +++ b/OpenRA.Renderer.Gl/Shader.cs @@ -121,7 +121,7 @@ namespace OpenRA.Renderer.Glsl /* configure blend state */ ErrorHandler.CheckGlError(); - // Todo: Only enable alpha blending if we need it + // TODO: Only enable alpha blending if we need it Gl.glEnable(Gl.GL_BLEND); ErrorHandler.CheckGlError(); Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA); diff --git a/OpenRA.TilesetBuilder/frmBuilder.cs b/OpenRA.TilesetBuilder/frmBuilder.cs index b7db7e0dad..2eafa1c68a 100644 --- a/OpenRA.TilesetBuilder/frmBuilder.cs +++ b/OpenRA.TilesetBuilder/frmBuilder.cs @@ -300,7 +300,7 @@ namespace OpenRA.TilesetBuilder } else for (var x = 0; x < TileSize * TileSize; x++) - bw.Write((byte)0); /* todo: don't fill with air */ + bw.Write((byte)0); /* TODO: don't fill with air */ } } @@ -351,7 +351,7 @@ namespace OpenRA.TilesetBuilder if (tilesetPalette.Length < 1) { tilesetPalette = "temperat"; } if (tilesetExt.Length < 1) { tilesetExt = ".tem,.shp"; } // Create a Tileset definition - // Todo: Pull this info from the GUI + // TODO: Pull this info from the GUI var tilesetFile = ""; //var mixFile = ""; tilesetFile = tilesetName.ToLower(); diff --git a/OpenRA.Utility/Command.cs b/OpenRA.Utility/Command.cs index b357c122c2..96097dfb75 100644 --- a/OpenRA.Utility/Command.cs +++ b/OpenRA.Utility/Command.cs @@ -493,10 +493,10 @@ namespace OpenRA.Utility Console.WriteLine("## Documentation"); Console.WriteLine( - "This documentation is aimed at modders and contributers of OpenRA. It displays all traits with default values and developer commentary. " + + "This documentation is aimed at modders and contributors of OpenRA. It displays all traits with default values and developer commentary. " + "Please do not edit it directly, but add new `[Desc(\"String\")]` tags to the source code. This file has been automatically generated on {0}. " + - "Type `make docs` to create a new one and put it on https://github.com/OpenRA/OpenRA/wiki/Traits afterwards. " + - "A copy of this is compiled to HTML and shipped with every release during the automated packaging process.", DateTime.Now); + "Type `make docs` to create a new one. A copy of this is uploaded to https://github.com/OpenRA/OpenRA/wiki/Traits " + + "as well as compiled to HTML and shipped with every release during the automated packaging process.", DateTime.Now); Console.WriteLine("```yaml"); Console.WriteLine();