From 047270bdc83d029486215a418fada27b225dbab0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 12 Dec 2012 23:13:34 +0000 Subject: Add "debug script log" command to allow setting a numeric debug level on individual IScriptInstances for debugging purposes. Current, state changes and event fires can be logged for individual scripts. See command help for more details. --- OpenSim/Framework/Console/ConsoleUtil.cs | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/ConsoleUtil.cs b/OpenSim/Framework/Console/ConsoleUtil.cs index 16a63e0..dff956a 100644 --- a/OpenSim/Framework/Console/ConsoleUtil.cs +++ b/OpenSim/Framework/Console/ConsoleUtil.cs @@ -97,7 +97,7 @@ namespace OpenSim.Framework.Console if (!UUID.TryParse(rawUuid, out uuid)) { if (console != null) - console.OutputFormat("{0} is not a valid uuid", rawUuid); + console.OutputFormat("ERROR: {0} is not a valid uuid", rawUuid); return false; } @@ -110,7 +110,7 @@ namespace OpenSim.Framework.Console if (!uint.TryParse(rawLocalId, out localId)) { if (console != null) - console.OutputFormat("{0} is not a valid local id", localId); + console.OutputFormat("ERROR: {0} is not a valid local id", localId); return false; } @@ -118,7 +118,7 @@ namespace OpenSim.Framework.Console if (localId == 0) { if (console != null) - console.OutputFormat("{0} is not a valid local id - it must be greater than 0", localId); + console.OutputFormat("ERROR: {0} is not a valid local id - it must be greater than 0", localId); return false; } @@ -150,10 +150,30 @@ namespace OpenSim.Framework.Console } if (console != null) - console.OutputFormat("{0} is not a valid UUID or local id", rawId); + console.OutputFormat("ERROR: {0} is not a valid UUID or local id", rawId); return false; } + + /// + /// Convert a minimum vector input from the console to an OpenMetaverse.Vector3 + /// + /// Can be null if no console is available. + /// /param> + /// + /// + public static bool TryParseConsoleInt(ICommandConsole console, string rawConsoleInt, out int i) + { + if (!int.TryParse(rawConsoleInt, out i)) + { + if (console != null) + console.OutputFormat("ERROR: {0} is not a valid integer", rawConsoleInt); + + return false; + } + + return true; + } /// /// Convert a minimum vector input from the console to an OpenMetaverse.Vector3 -- cgit v1.1 From addab1244ecc586b0a6fc8560b94c871567b78da Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 2 Jan 2013 21:38:00 +0000 Subject: Add "show animations" console command for debug purposes. This shows the current animation sequence and default anims for avatars. --- OpenSim/Framework/Console/ConsoleDisplayTable.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/ConsoleDisplayTable.cs b/OpenSim/Framework/Console/ConsoleDisplayTable.cs index c620dfe..c6f2272 100644 --- a/OpenSim/Framework/Console/ConsoleDisplayTable.cs +++ b/OpenSim/Framework/Console/ConsoleDisplayTable.cs @@ -139,16 +139,16 @@ namespace OpenSim.Framework.Console public struct ConsoleDisplayTableRow { - public List Cells { get; private set; } + public List Cells { get; private set; } - public ConsoleDisplayTableRow(List cells) : this() + public ConsoleDisplayTableRow(List cells) : this() { Cells = cells; } - public ConsoleDisplayTableRow(params string[] cells) : this() + public ConsoleDisplayTableRow(params object[] cells) : this() { - Cells = new List(cells); + Cells = new List(cells); } } } \ No newline at end of file -- cgit v1.1 From 6b55f5183787fb719c7bd4547e5894096a7aed51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 2 Jan 2013 22:11:13 +0000 Subject: minor: Allow objects to be added directly to a row on a ConsoleDisplayTable rather than having to ToString() them first --- OpenSim/Framework/Console/ConsoleDisplayTable.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/ConsoleDisplayTable.cs b/OpenSim/Framework/Console/ConsoleDisplayTable.cs index c6f2272..0d22206 100644 --- a/OpenSim/Framework/Console/ConsoleDisplayTable.cs +++ b/OpenSim/Framework/Console/ConsoleDisplayTable.cs @@ -84,7 +84,7 @@ namespace OpenSim.Framework.Console Columns.Add(new ConsoleDisplayTableColumn(name, width)); } - public void AddRow(params string[] cells) + public void AddRow(params object[] cells) { Rows.Add(new ConsoleDisplayTableRow(cells)); } -- cgit v1.1 From 8f31649faddfc2f7a28131f592b1e79ae75b863f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 2 Jan 2013 22:37:50 +0000 Subject: Fix indenting on ConsoleDisplayTable, align indenting on "show animations" console command --- OpenSim/Framework/Console/ConsoleDisplayTable.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/ConsoleDisplayTable.cs b/OpenSim/Framework/Console/ConsoleDisplayTable.cs index 0d22206..711a337 100644 --- a/OpenSim/Framework/Console/ConsoleDisplayTable.cs +++ b/OpenSim/Framework/Console/ConsoleDisplayTable.cs @@ -56,7 +56,7 @@ namespace OpenSim.Framework.Console public List Rows { get; private set; } /// - /// Number of spaces to indent the table. + /// Number of spaces to indent the whole table. /// public int Indent { get; set; } @@ -113,7 +113,8 @@ namespace OpenSim.Framework.Console for (int i = 0; i < Columns.Count; i++) { - formatSb.Append(' ', TableSpacing); + if (i != 0) + formatSb.Append(' ', TableSpacing); // Can only do left formatting for now formatSb.AppendFormat("{{{0},-{1}}}", i, Columns[i].Width); -- cgit v1.1 From c28a2f05caae50590e64e61d8b7358ee92a7fca3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 9 Jan 2013 00:54:28 +0000 Subject: minor: make spacing consistent in console help output --- OpenSim/Framework/Console/CommandConsole.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index de30414..f9c9307 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -110,10 +110,11 @@ namespace OpenSim.Framework.Console // Remove initial help keyword helpParts.RemoveAt(0); + help.Add(""); // Will become a newline. + // General help if (helpParts.Count == 0) { - help.Add(""); // Will become a newline. help.Add(GeneralHelpText); help.Add(ItemHelpText); help.AddRange(CollectModulesHelp(tree)); @@ -127,6 +128,8 @@ namespace OpenSim.Framework.Console help.AddRange(CollectHelp(helpParts)); } + help.Add(""); // Will become a newline. + return help; } @@ -200,8 +203,8 @@ namespace OpenSim.Framework.Console help.Add(commandInfo.descriptive_help); - if (descriptiveHelp != string.Empty) - help.Add(string.Empty); +// if (descriptiveHelp != string.Empty) +// help.Add(string.Empty); } else { -- cgit v1.1 From 290dc274ec0860e96f0c19479c8da512779cdab3 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 9 Jan 2013 01:04:43 +0000 Subject: minor: Remove unnecessary commented out code from last commit c28a2f05 and fix up code comment --- OpenSim/Framework/Console/CommandConsole.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index f9c9307..b9f402a 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -197,14 +197,11 @@ namespace OpenSim.Framework.Console string descriptiveHelp = commandInfo.descriptive_help; - // If we do have some descriptive help then insert a spacing line before and after for readability. + // If we do have some descriptive help then insert a spacing line before for readability. if (descriptiveHelp != string.Empty) help.Add(string.Empty); help.Add(commandInfo.descriptive_help); - -// if (descriptiveHelp != string.Empty) -// help.Add(string.Empty); } else { -- cgit v1.1 From 1f1da230976451d30d920c237d53c699ba96b9d9 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 5 Feb 2013 00:23:17 +0000 Subject: Bump version and assembly version numbers from 0.7.5 to 0.7.6 This is mostly Bluewall's work but I am also bumping the general version number OpenSimulator 0.7.5 remains in the release candidate stage. I'm doing this because master is significantly adding things that will not be in 0.7.5 This update should not cause issues with existing external binary DLLs because our DLLs do not have strong names and so the exact version match requirement is not in force. --- OpenSim/Framework/Console/AssemblyInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/AssemblyInfo.cs b/OpenSim/Framework/Console/AssemblyInfo.cs index 37c7304..c618454 100644 --- a/OpenSim/Framework/Console/AssemblyInfo.cs +++ b/OpenSim/Framework/Console/AssemblyInfo.cs @@ -55,4 +55,4 @@ using System.Runtime.InteropServices; // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly : AssemblyVersion("0.7.5.*")] +[assembly : AssemblyVersion("0.7.6.*")] -- cgit v1.1 From a671c06ee59e17a6ae7be9740e8e045ae9ac224c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 20 Feb 2013 22:09:33 +0000 Subject: Correct mistake in parsing 'show object pos' and similar pos commands where the 'to' text would be treat as the end vector rather than discarded. Before this, the commands still work but the help text is wrong - one has to leave out the 'to' in stating the vectors --- OpenSim/Framework/Console/ConsoleUtil.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework/Console') diff --git a/OpenSim/Framework/Console/ConsoleUtil.cs b/OpenSim/Framework/Console/ConsoleUtil.cs index dff956a..97a86a8 100644 --- a/OpenSim/Framework/Console/ConsoleUtil.cs +++ b/OpenSim/Framework/Console/ConsoleUtil.cs @@ -49,14 +49,14 @@ namespace OpenSim.Framework.Console = @"Each component of the coord is comma separated. There must be no spaces between the commas. If you don't care about the z component you can simply omit it. If you don't care about the x or y components then you can leave them blank (though a comma is still required) - If you want to specify the maxmimum value of a component then you can use ~ instead of a number + If you want to specify the maximum value of a component then you can use ~ instead of a number If you want to specify the minimum value of a component then you can use -~ instead of a number e.g. - delete object pos 20,20,20 to 40,40,40 + show object pos 20,20,20 to 40,40,40 delete object pos 20,20 to 40,40 - delete object pos ,20,20 to ,40,40 + show object pos ,20,20 to ,40,40 delete object pos ,,30 to ,,~ - delete object pos ,,-~ to ,,30"; + show object pos ,,-~ to ,,30"; public const string MinRawConsoleVectorValue = "-~"; public const string MaxRawConsoleVectorValue = "~"; -- cgit v1.1