LUA and trait documentation fixes

- Typo in documentation ("proximitry").
- Add spaces between sentences.
- Remove most occurrences of "  " (two spaces) unless clearly used as indendation
- Punctuation (although no fullstop after filenames like "notifications.yaml").
This commit is contained in:
clemty
2015-08-24 19:41:15 +02:00
parent 64bbfe4121
commit 2bbc1fcda4
28 changed files with 51 additions and 51 deletions

View File

@@ -25,9 +25,9 @@ namespace OpenRA.Mods.Common.Scripting
radarPings = context.World.WorldActor.TraitOrDefault<RadarPings>();
}
[Desc("Creates a new beacon that stays for the specified time at the specified WPos." +
[Desc("Creates a new beacon that stays for the specified time at the specified WPos. " +
"Does not remove player set beacons, nor gets removed by placing them.")]
public Beacon New(Player owner, WPos position, int duration = 30 * 25, bool showRadarPings = true, string palettePrefix = "player")
public Beacon New(Player owner, WPos position, int duration = 30 * 25, bool showRadarPings = true, string palettePrefix = "player")
{
var playerBeacon = new Beacon(owner, position, duration, palettePrefix);
owner.PlayerActor.World.AddFrameEndTask(w => w.Add(playerBeacon));

View File

@@ -67,7 +67,7 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Create a new WDist.")]
public WDist New(int r) { return new WDist(r); }
[Desc("Create a new WDist by cell distance")]
[Desc("Create a new WDist by cell distance.")]
public WDist FromCells(int numCells) { return WDist.FromCells(numCells); }
}

View File

@@ -26,7 +26,7 @@ namespace OpenRA.Mods.Common.Scripting
get { return DateTime.Today.Month == 10 && DateTime.Today.Day == 31; }
}
[Desc("Get the current game time (in ticks)")]
[Desc("Get the current game time (in ticks).")]
public int GameTime
{
get { return Context.World.WorldTick; }

View File

@@ -63,7 +63,7 @@ namespace OpenRA.Mods.Common.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, " +
"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 Actor[] Reinforce(Player owner, string[] actorTypes, CPos[] entryPath, int interval = 25, LuaFunction actionFunc = null)

View File

@@ -283,8 +283,8 @@ namespace OpenRA.Mods.Common.Scripting
}
}
[Desc("Call a function when a ground-based actor enters this cell footprint." +
"Returns the trigger id for later removal using RemoveFootprintTrigger(int id)." +
[Desc("Call a function when a ground-based actor enters this cell footprint. " +
"Returns the trigger id for later removal using RemoveFootprintTrigger(int id). " +
"The callback function will be called as func(Actor a, int id).")]
public int OnEnteredFootprint(CPos[] cells, LuaFunction func)
{
@@ -309,8 +309,8 @@ namespace OpenRA.Mods.Common.Scripting
return triggerId;
}
[Desc("Call a function when a ground-based actor leaves this cell footprint." +
"Returns the trigger id for later removal using RemoveFootprintTrigger(int id)." +
[Desc("Call a function when a ground-based actor leaves this cell footprint. " +
"Returns the trigger id for later removal using RemoveFootprintTrigger(int id). " +
"The callback function will be called as func(Actor a, int id).")]
public int OnExitedFootprint(CPos[] cells, LuaFunction func)
{
@@ -341,8 +341,8 @@ namespace OpenRA.Mods.Common.Scripting
Context.World.ActorMap.RemoveCellTrigger(id);
}
[Desc("Call a function when an actor enters this range." +
"Returns the trigger id for later removal using RemoveProximityTrigger(int id)." +
[Desc("Call a function when an actor enters this range. " +
"Returns the trigger id for later removal using RemoveProximityTrigger(int id). " +
"The callback function will be called as func(Actor a, int id).")]
public int OnEnteredProximityTrigger(WPos pos, WDist range, LuaFunction func)
{
@@ -367,8 +367,8 @@ namespace OpenRA.Mods.Common.Scripting
return triggerId;
}
[Desc("Call a function when an actor leaves this range." +
"Returns the trigger id for later removal using RemoveProximityTrigger(int id)." +
[Desc("Call a function when an actor leaves this range. " +
"Returns the trigger id for later removal using RemoveProximityTrigger(int id). " +
"The callback function will be called as func(Actor a, int id).")]
public int OnExitedProximityTrigger(WPos pos, WDist range, LuaFunction func)
{
@@ -393,7 +393,7 @@ namespace OpenRA.Mods.Common.Scripting
return triggerId;
}
[Desc("Removes a previously created proximitry trigger.")]
[Desc("Removes a previously created proximity trigger.")]
public void RemoveProximityTrigger(int id)
{
Context.World.ActorMap.RemoveProximityTrigger(id);
@@ -407,20 +407,20 @@ namespace OpenRA.Mods.Common.Scripting
}
[Desc("Call a function when this actor is discovered by an enemy or a player with a Neutral stance. " +
"The callback function will be called as func(Actor discovered, Player discoverer)")]
"The callback function will be called as func(Actor discovered, Player discoverer).")]
public void OnDiscovered(Actor a, LuaFunction func)
{
GetScriptTriggers(a).RegisterCallback(Trigger.OnDiscovered, func, Context);
}
[Desc("Call a function when this player is discovered by an enemy or neutral player. " +
"The callback function will be called as func(Player discovered, Player discoverer, Actor discoveredActor)")]
"The callback function will be called as func(Player discovered, Player discoverer, Actor discoveredActor).")]
public void OnPlayerDiscovered(Player discovered, LuaFunction func)
{
GetScriptTriggers(discovered.PlayerActor).RegisterCallback(Trigger.OnPlayerDiscovered, func, Context);
}
[Desc("Removes all triggers from this actor." +
[Desc("Removes all triggers from this actor. " +
"Note that the removal will only take effect at the end of a tick, " +
"so you must not add new triggers at the same time that you are calling this function.")]
public void ClearAll(Actor a)
@@ -428,7 +428,7 @@ namespace OpenRA.Mods.Common.Scripting
GetScriptTriggers(a).ClearAll();
}
[Desc("Removes the specified trigger from this actor." +
[Desc("Removes the specified trigger from this actor. " +
"Note that the removal will only take effect at the end of a tick, " +
"so you must not add new triggers at the same time that you are calling this function.")]
public void Clear(Actor a, string triggerName)

View File

@@ -49,7 +49,7 @@ namespace OpenRA.Mods.Common.Scripting
}
[ScriptActorPropertyActivity]
[Desc("Patrol along a set of given waypoints. The action is repeated by default, " +
[Desc("Patrol along a set of given waypoints. The action is repeated by default, " +
"and the actor will wait for `wait` ticks at each waypoint.")]
public void Patrol(CPos[] waypoints, bool loop = true, int wait = 0)
{

View File

@@ -108,7 +108,7 @@ namespace OpenRA.Mods.Common.Scripting
}
[ScriptActorPropertyActivity]
[Desc("Returns true if this player has lost all units/actors that have" +
[Desc("Returns true if this player has lost all units/actors that have " +
"the MustBeDestroyed trait (according to the short game option).")]
public bool HasNoRequiredUnits()
{

View File

@@ -42,7 +42,7 @@ namespace OpenRA.Mods.Common.Scripting
}
[ScriptActorPropertyActivity]
[Desc("Moves from outside the world into the cell grid")]
[Desc("Moves from outside the world into the cell grid.")]
public void MoveIntoWorld(CPos cell)
{
Self.QueueActivity(mobile.MoveIntoWorld(Self, cell, mobile.ToSubCell));

View File

@@ -60,7 +60,7 @@ namespace OpenRA.Mods.Common.Scripting
.ToArray();
}
[Desc("Returns all living actors of the specified type of this player")]
[Desc("Returns all living actors of the specified type of this player.")]
public Actor[] GetActorsByType(string type)
{
var result = new List<Actor>();

View File

@@ -54,7 +54,7 @@ namespace OpenRA.Mods.Common.Scripting
rp = self.Trait<RallyPoint>();
}
[Desc("Query or set a factory's rally point")]
[Desc("Query or set a factory's rally point.")]
public CPos RallyPoint
{
get { return rp.Location; }
@@ -73,7 +73,7 @@ namespace OpenRA.Mods.Common.Scripting
pb = self.Trait<PrimaryBuilding>();
}
[Desc("Query or set the factory's primary building status")]
[Desc("Query or set the factory's primary building status.")]
public bool IsPrimaryBuilding
{
get { return pb.IsPrimary; }
@@ -146,7 +146,7 @@ namespace OpenRA.Mods.Common.Scripting
return true;
}
[Desc("Check whether the factory's production queue that builds this type of actor is currently busy." +
[Desc("Check whether the factory's production queue that builds this type of actor is currently busy. " +
"Note: it does not check whether this particular type of actor is being produced.")]
public bool IsProducing(string actorType)
{
@@ -202,9 +202,9 @@ namespace OpenRA.Mods.Common.Scripting
[Desc("Build the specified set of actors using classic (RA-style) production queues. " +
"The function will return true if production could be started, false otherwise. " +
"If an actionFunc is given, it will be called as actionFunc(Actor[] actors) once " +
"production of all actors has been completed. The actors array is guaranteed to " +
"production of all actors has been completed. The actors array is guaranteed to " +
"only contain alive actors. Note: This function will fail to work when called " +
"during the first tick")]
"during the first tick.")]
public bool Build(string[] actorTypes, LuaFunction actionFunc = null)
{
var typeToQueueMap = new Dictionary<string, string>();
@@ -252,7 +252,7 @@ namespace OpenRA.Mods.Common.Scripting
return true;
}
[Desc("Check whether the production queue that builds this type of actor is currently busy." +
[Desc("Check whether the production queue that builds this type of actor is currently busy. " +
"Note: it does not check whether this particular type of actor is being produced.")]
public bool IsProducing(string actorType)
{