diff options
3 files changed, 35 insertions, 3 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs index 875de50..9b9d686 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Heightmap.cs | |||
@@ -44,7 +44,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
44 | set { Set(x, y, value); } | 44 | set { Set(x, y, value); } |
45 | } | 45 | } |
46 | 46 | ||
47 | public int Height | 47 | public int Length |
48 | { | 48 | { |
49 | get { return m_scene.Heightmap.Height; } | 49 | get { return m_scene.Heightmap.Height; } |
50 | } | 50 | } |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IHeightmap.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IHeightmap.cs index afea12b..93cbc5b 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IHeightmap.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IHeightmap.cs | |||
@@ -39,6 +39,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
39 | /// <param name="x">X Coordinate</param> | 39 | /// <param name="x">X Coordinate</param> |
40 | /// <param name="y">Y Coordinate</param> | 40 | /// <param name="y">Y Coordinate</param> |
41 | /// <returns>A value in meters representing height. Can be negative. Value correlates with Z parameter in world coordinates</returns> | 41 | /// <returns>A value in meters representing height. Can be negative. Value correlates with Z parameter in world coordinates</returns> |
42 | /// <example> | ||
43 | /// double heightVal = World.Heightmap[128,128]; | ||
44 | /// World.Heightmap[128,128] *= 5.0; | ||
45 | /// World.Heightmap[128,128] = 25; | ||
46 | /// </example> | ||
42 | double this[int x, int y] | 47 | double this[int x, int y] |
43 | { | 48 | { |
44 | get; | 49 | get; |
@@ -46,13 +51,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
46 | } | 51 | } |
47 | 52 | ||
48 | /// <summary> | 53 | /// <summary> |
49 | /// The maximum height of the region (Y axis), exclusive. (eg Height = 256, max Y = 255). Minimum is always 0 inclusive. | 54 | /// The maximum length of the region (Y axis), exclusive. (eg Height = 256, max Y = 255). Minimum is always 0 inclusive. |
50 | /// </summary> | 55 | /// </summary> |
51 | int Height { get; } | 56 | /// <example> |
57 | /// Host.Console.Info("The terrain length of this region is " + World.Heightmap.Length); | ||
58 | /// </example> | ||
59 | int Length { get; } | ||
52 | 60 | ||
53 | /// <summary> | 61 | /// <summary> |
54 | /// The maximum width of the region (X axis), exclusive. (eg Width = 256, max X = 255). Minimum is always 0 inclusive. | 62 | /// The maximum width of the region (X axis), exclusive. (eg Width = 256, max X = 255). Minimum is always 0 inclusive. |
55 | /// </summary> | 63 | /// </summary> |
64 | /// <example> | ||
65 | /// Host.Console.Info("The terrain width of this region is " + World.Heightmap.Width); | ||
66 | /// </example> | ||
56 | int Width { get; } | 67 | int Width { get; } |
57 | } | 68 | } |
58 | } | 69 | } |
diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs index 223d764..0308079 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/IObject.cs | |||
@@ -40,6 +40,27 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule | |||
40 | /// exception. 'Exists' allows you to check the object is still | 40 | /// exception. 'Exists' allows you to check the object is still |
41 | /// in play before utilizing it. | 41 | /// in play before utilizing it. |
42 | /// </summary> | 42 | /// </summary> |
43 | /// <example> | ||
44 | /// IObject deleteMe = World.Objects[0]; | ||
45 | /// | ||
46 | /// if(deleteMe.Exists) { | ||
47 | /// deleteMe.Say("Hello, I still exist!"); | ||
48 | /// } | ||
49 | /// | ||
50 | /// World.Objects.Remove(deleteMe); | ||
51 | /// | ||
52 | /// if(!deleteMe.Exists) { | ||
53 | /// Host.Console.Info("I was deleted"); | ||
54 | /// } | ||
55 | /// </example> | ||
56 | /// <remarks> | ||
57 | /// Objects should be near-guarunteed to exist for any event which | ||
58 | /// passes them as an argument. Storing an object for a longer period | ||
59 | /// of time however will limit their reliability. | ||
60 | /// | ||
61 | /// It is a good practice to use Try/Catch blocks handling for | ||
62 | /// NullReferenceException, when accessing remote objects. | ||
63 | /// </remarks> | ||
43 | bool Exists { get; } | 64 | bool Exists { get; } |
44 | 65 | ||
45 | /// <summary> | 66 | /// <summary> |