Enforce a line length limit.

This commit is contained in:
RoosterDragon
2015-03-11 23:57:41 +00:00
parent 721ba5e9c3
commit 1515ac54f6
34 changed files with 156 additions and 57 deletions

View File

@@ -33,7 +33,8 @@ namespace OpenRA.Mods.Common.UtilityCommands
"These scripts run in a sandbox that prevents access to unsafe functions (e.g. OS or file access), " +
"and limits the memory and CPU usage of the scripts.");
Console.WriteLine();
Console.WriteLine("You can access this interface by adding the [LuaScript](Traits#luascript) trait to the world actor in your map rules (note, you must replace the spaces in the snippet below with a single tab for each level of indentation):");
Console.WriteLine("You can access this interface by adding the [LuaScript](Traits#luascript) trait to the world actor in your map rules " +
"(note, you must replace the spaces in the snippet below with a single tab for each level of indentation):");
Console.WriteLine("```\nRules:\n\tWorld:\n\t\tLuaScript:\n\t\t\tScripts: myscript.lua\n```");
Console.WriteLine();
Console.WriteLine("Map scripts can interact with the game engine in three ways:\n" +

View File

@@ -793,8 +793,11 @@ namespace OpenRA.Mods.Common.UtilityCommands
// Split out the warheads to individual warhead types.
if (depth == 0)
{
var validTargets = node.Value.Nodes.FirstOrDefault(n => n.Key == "ValidTargets"); // Weapon's ValidTargets need to be copied to the warheads, so find it
var invalidTargets = node.Value.Nodes.FirstOrDefault(n => n.Key == "InvalidTargets"); // Weapon's InvalidTargets need to be copied to the warheads, so find it
// Weapon's ValidTargets need to be copied to the warheads, so find it
var validTargets = node.Value.Nodes.FirstOrDefault(n => n.Key == "ValidTargets");
// Weapon's InvalidTargets need to be copied to the warheads, so find it
var invalidTargets = node.Value.Nodes.FirstOrDefault(n => n.Key == "InvalidTargets");
var warheadCounter = 0;
foreach (var curNode in node.Value.Nodes.ToArray())
@@ -970,7 +973,8 @@ namespace OpenRA.Mods.Common.UtilityCommands
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string> { "Explosion", "ImpactSound", "Delay", "ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
var keywords = new List<string> { "Explosion", "ImpactSound", "Delay",
"ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
foreach (var keyword in keywords)
{
@@ -991,7 +995,8 @@ namespace OpenRA.Mods.Common.UtilityCommands
var newYaml = new List<MiniYamlNode>();
var keywords = new List<string> { "WaterExplosion", "WaterImpactSound", "Delay", "ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
var keywords = new List<string> { "WaterExplosion", "WaterImpactSound", "Delay",
"ValidTargets", "InvalidTargets", "ValidImpactTypes", "InvalidImpactTypes" };
foreach (var keyword in keywords)
{