Merge pull request #2817 from Mailaender/radoc-update

Update RADOC
This commit is contained in:
Matthias Mailänder
2013-03-27 01:51:52 -07:00
64 changed files with 116 additions and 75 deletions

View File

@@ -104,7 +104,7 @@ namespace OpenRA.Editor
}
}
/* todo: optimize */
/* TODO: optimize */
foreach (var ch in s.Chunks.Values) ch.Dispose();
s.Chunks.Clear();
}

View File

@@ -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();
}

View File

@@ -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<string,Pair<Color,Color>> namedColorMapping = new Dictionary<string, Pair<Color, Color>>()
{
{"gold",Pair.New(Color.FromArgb(246,214,121),Color.FromArgb(40,32,8))},

View File

@@ -12,15 +12,10 @@ namespace OpenRA.Editor
{
partial class MapSelect
{
/// <summary>
/// TODO
/// </summary>
// TODO:
private System.ComponentModel.IContainer components = null;
/// <summary>
/// TODO
/// </summary>
/// <param name="disposing">TODO</param>
// TODO:
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
@@ -32,9 +27,7 @@ namespace OpenRA.Editor
#region Код, автоматически созданный конструктором форм Windows
/// <summary>
/// TODO
/// </summary>
// TODO:
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();

View File

@@ -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];

View File

@@ -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");

View File

@@ -240,7 +240,7 @@ namespace OpenRA
} );
}
// todo: move elsewhere.
// TODO: move elsewhere.
public void ChangeOwner(Player newOwner)
{
World.AddFrameEndTask(w =>

View File

@@ -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 */
}
}

View File

@@ -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));

View File

@@ -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;

View File

@@ -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

View File

@@ -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.
*/

View File

@@ -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();

View File

@@ -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) {

View File

@@ -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); }

View File

@@ -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;

View File

@@ -8,15 +8,13 @@
*/
#endregion
using OpenRA.FileFormats;
namespace OpenRA.Traits
{
public class FogInfo : TraitInfo<Fog>
{
/*
* 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<Fog> { }
public class Fog { }
}

View File

@@ -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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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") )

View File

@@ -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
}
});
}

View File

@@ -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;

View File

@@ -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
}

View File

@@ -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<Cargo>();

View File

@@ -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;

View File

@@ -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<AttackBaseInfo>
{
[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;

View File

@@ -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);

View File

@@ -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;

View File

@@ -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

View File

@@ -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;
}

View File

@@ -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);

View File

@@ -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;
}

View File

@@ -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;

View File

@@ -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<ITeleportable>() && self.Trait<ITeleportable>().CanEnterCell(targetLocation));
}

View File

@@ -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<MustBeDestroyed> { }
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;

View File

@@ -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 = { };

View File

@@ -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!

View File

@@ -39,7 +39,7 @@ namespace OpenRA.Mods.RA
if (--ticks <= 0)
{
var info = self.Info.Traits.Get<CrateSpawnerInfo>();
ticks = info.SpawnInterval * 25; // todo: randomize
ticks = info.SpawnInterval * 25; // TODO: randomize
crates.RemoveAll(x => !x.IsInWorld);

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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<EmitCargoOnSell>//, Requires<Cargo>
{
}
@@ -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); }

View File

@@ -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); }
}

View File

@@ -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));
}

View File

@@ -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 = {};

View File

@@ -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)

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;

View File

@@ -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); }

View File

@@ -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<Helicopter>();
if (helicopter != null)
{

View File

@@ -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
{

View File

@@ -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

View File

@@ -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); }
}

View File

@@ -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<TurretFacingInit>
{
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};

View File

@@ -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 = {};

View File

@@ -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);

View File

@@ -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");

View File

@@ -71,7 +71,7 @@ namespace OpenRA.Mods.RA.Widgets.Logic
currentMap = currentReplay.Map();
panel.Get<LabelWidget>("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<MapPreviewWidget>("MAP_PREVIEW").Map = () => currentMap;
panel.Get<LabelWidget>("MAP_TITLE").GetText =
() => currentMap != null ? currentMap.Title : "(Unknown Map)";

View File

@@ -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()
{

View File

@@ -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);

View File

@@ -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();

View File

@@ -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();