Merge pull request #6423 from TWaalen/upstream/fix-spelling-luadocs

LuaDocs/Desc attributes spelling fixes
This commit is contained in:
Matthias Mailänder
2014-09-07 08:37:01 +02:00
9 changed files with 27 additions and 27 deletions

View File

@@ -21,7 +21,7 @@ namespace OpenRA.Scripting
{
public ActorGlobal(ScriptContext context) : base(context) { }
[Desc("Create a new actor. initTable specifies a list of key-value pairs that definite initial parameters for the actor's traits.")]
[Desc("Create a new actor. initTable specifies a list of key-value pairs that defines the initial parameters for the actor's traits.")]
public Actor Create(string type, bool addToWorld, LuaTable initTable)
{
var initDict = new TypeDictionary();
@@ -58,7 +58,7 @@ namespace OpenRA.Scripting
return a;
}
[Desc("Returns the build time (in ticks) of the requested unit type")]
[Desc("Returns the build time (in ticks) of the requested unit type.")]
public int BuildTime(string type)
{
ActorInfo ai;
@@ -68,7 +68,7 @@ namespace OpenRA.Scripting
return ai.GetBuildTime();
}
[Desc("Returns the cruise altitude of the requested unit type (zero if it ground-based).")]
[Desc("Returns the cruise altitude of the requested unit type (zero if it is ground-based).")]
public int CruiseAltitude(string type)
{
ActorInfo ai;

View File

@@ -100,7 +100,7 @@ namespace OpenRA.Mods.RA.Scripting
}
[Desc("Returns the actor that was specified with a given name in " +
"the map file (or nil, if the actor is dead or not found")]
"the map file (or nil, if the actor is dead or not found).")]
public Actor NamedActor(string actorName)
{
Actor ret;

View File

@@ -68,10 +68,10 @@ namespace OpenRA.Mods.RA.Scripting
}
[Desc("Send reinforcements consisting of multiple units. Supports ground-based, naval and air units. " +
"The first member of the 'entryPath' array will be the units' spawnpoint, " +
"while the last one will be their destination. If 'actionFunc' is given, " +
"it will be executed once a unit has reached its destination. 'actionFunc' " +
"will be called as 'actionFunc(Actor actor)'")]
"The first member of the entryPath array will be the units' spawnpoint, " +
"while the last one will be their destination. If actionFunc is given, " +
"it will be executed once a unit has reached its destination. actionFunc " +
"will be called as actionFunc(Actor actor)")]
public LuaTable Reinforce(Player owner, LuaTable actorTypes, LuaTable entryPath, int interval = 25, LuaFunction actionFunc = null)
{
var actors = new List<Actor>();
@@ -120,13 +120,13 @@ namespace OpenRA.Mods.RA.Scripting
}
[Desc("Send reinforcements in a transport. A transport can be a ground unit (APC etc.), ships and aircraft. " +
"The first member of the 'entryPath' array will be the spawnpoint for the transport, " +
"while the last one will be its destination. The last member of the 'exitPath' array " +
"The first member of the entryPath array will be the spawnpoint for the transport, " +
"while the last one will be its destination. The last member of the exitPath array " +
"is be the place where the transport will be removed from the game. When the transport " +
"has reached the destination, it will unload its cargo unless a custom 'actionFunc' has " +
"been supplied. Afterwards, the transport will follow the 'exitPath' and leave the map, " +
"unless a custom 'exitFunc' has been supplied. 'actionFunc' will be called as " +
"'actionFunc(Actor transport, Actor[] cargo). 'exitFunc' will be called as 'exitFunc(Actor transport)'.")]
"has reached the destination, it will unload its cargo unless a custom actionFunc has " +
"been supplied. Afterwards, the transport will follow the exitPath and leave the map, " +
"unless a custom exitFunc has been supplied. actionFunc will be called as " +
"actionFunc(Actor transport, Actor[] cargo). exitFunc will be called as exitFunc(Actor transport).")]
public LuaTable ReinforceWithTransport(Player owner, string actorType, LuaTable cargoTypes, LuaTable entryPath, LuaTable exitPath = null,
LuaFunction actionFunc = null, LuaFunction exitFunc = null)
{

View File

@@ -130,14 +130,14 @@ namespace OpenRA.Mods.RA.Scripting
GetScriptTriggers(player.PlayerActor).RegisterCallback(Trigger.OnObjectiveAdded, func, context);
}
[Desc("Call a function when this player completes an objective " +
[Desc("Call a function when this player completes an objective. " +
"The callback function will be called as func(Player player, int objectiveID).")]
public void OnObjectiveCompleted(Player player, LuaFunction func)
{
GetScriptTriggers(player.PlayerActor).RegisterCallback(Trigger.OnObjectiveCompleted, func, context);
}
[Desc("Call a function when this player fails an objective " +
[Desc("Call a function when this player fails an objective. " +
"The callback function will be called as func(Player player, int objectiveID).")]
public void OnObjectiveFailed(Player player, LuaFunction func)
{
@@ -165,13 +165,13 @@ namespace OpenRA.Mods.RA.Scripting
GetScriptTriggers(a).RegisterCallback(Trigger.OnCapture, func, context);
}
[Desc("Removes all triggers from this actor")]
[Desc("Removes all triggers from this actor.")]
public void ClearAll(Actor a)
{
GetScriptTriggers(a).ClearAll();
}
[Desc("Removes the specified trigger from this actor")]
[Desc("Removes the specified trigger from this actor.")]
public void Clear(Actor a, string triggerName)
{
var trigger = (Trigger)Enum.Parse(typeof(Trigger), triggerName);

View File

@@ -58,7 +58,7 @@ namespace OpenRA.Mods.RA.Scripting
return true;
}
[Desc("Skips over the first numElements members of the array and returns the rest")]
[Desc("Skips over the first numElements members of the array and returns the rest.")]
public LuaTable Skip(LuaTable table, int numElements)
{
var t = context.CreateTable();
@@ -75,7 +75,7 @@ namespace OpenRA.Mods.RA.Scripting
return table.Values.Random<LuaValue>(context.World.SharedRandom);
}
[Desc("Expands the given footprint one step along the coordinate axes, and (if requested) diagonals")]
[Desc("Expands the given footprint one step along the coordinate axes, and (if requested) diagonals.")]
public LuaTable ExpandFootprint(LuaTable cells, bool allowDiagonal)
{
var footprint = cells.Values.Select(c =>

View File

@@ -80,7 +80,7 @@ namespace OpenRA.Mods.RA.Scripting
}
[ScriptActorPropertyActivity]
[Desc("Run an arbitrary lua function.")]
[Desc("Run an arbitrary Lua function.")]
public void CallFunc(LuaFunction func)
{
self.QueueActivity(new CallLuaFunc(func));

View File

@@ -44,7 +44,7 @@ namespace OpenRA.Mods.RA.Scripting
[ScriptActorPropertyActivity]
[Desc("Mark an objective as completed. This needs the objective ID returned " +
"by AddObjective as argument. When the player has completed all primary " +
"by AddObjective as argument. When this player has completed all primary " +
"objectives, (s)he has won the game.")]
public void MarkCompletedObjective(int id)
{
@@ -61,7 +61,7 @@ namespace OpenRA.Mods.RA.Scripting
}
[ScriptActorPropertyActivity]
[Desc("Returns true if 'player' has lost all units/actors that have the 'MustBeDestroyed' trait.")]
[Desc("Returns true if this player has lost all units/actors that have the MustBeDestroyed trait.")]
public bool HasNoRequiredUnits()
{
return player.HasNoRequiredUnits();

View File

@@ -27,7 +27,7 @@ namespace OpenRA.Mods.RA.Scripting
}
[ScriptActorPropertyActivity]
[Desc("Build a unit, ignoring the production queue. The activity will wait if the exit is blocked")]
[Desc("Build a unit, ignoring the production queue. The activity will wait if the exit is blocked.")]
public void Produce(string actorType, string raceVariant = null)
{
ActorInfo actorInfo;