aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-11-03 21:44:39 +1000
committerDavid Walter Seikel2016-11-03 21:44:39 +1000
commit134f86e8d5c414409631b25b8c6f0ee45fbd8631 (patch)
tree216b89d3fb89acfb81be1e440c25c41ab09fa96d /OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
parentMore changing to production grid. Double oops. (diff)
downloadopensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.zip
opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.gz
opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.bz2
opensim-SC_OLD-134f86e8d5c414409631b25b8c6f0ee45fbd8631.tar.xz
Initial update to OpenSim 0.8.2.1 source code.
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs')
-rw-r--r--OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs45
1 files changed, 37 insertions, 8 deletions
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
index 4d49794..702b503 100644
--- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
+++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementCommands.cs
@@ -39,6 +39,7 @@ using OpenSim.Framework.Console;
39using OpenSim.Region.CoreModules.Framework.InterfaceCommander; 39using OpenSim.Region.CoreModules.Framework.InterfaceCommander;
40using OpenSim.Region.Framework.Interfaces; 40using OpenSim.Region.Framework.Interfaces;
41using OpenSim.Region.Framework.Scenes; 41using OpenSim.Region.Framework.Scenes;
42using OpenSim.Services.Interfaces;
42 43
43namespace OpenSim.Region.CoreModules.World.Estate 44namespace OpenSim.Region.CoreModules.World.Estate
44{ 45{
@@ -50,9 +51,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
50 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 51 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
51 52
52 protected EstateManagementModule m_module; 53 protected EstateManagementModule m_module;
53 54
54 protected Commander m_commander = new Commander("estate");
55
56 public EstateManagementCommands(EstateManagementModule module) 55 public EstateManagementCommands(EstateManagementModule module)
57 { 56 {
58 m_module = module; 57 m_module = module;
@@ -60,7 +59,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
60 59
61 public void Initialise() 60 public void Initialise()
62 { 61 {
63 m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName); 62// m_log.DebugFormat("[ESTATE MODULE]: Setting up estate commands for region {0}", m_module.Scene.RegionInfo.RegionName);
64 63
65 m_module.Scene.AddCommand("Regions", m_module, "set terrain texture", 64 m_module.Scene.AddCommand("Regions", m_module, "set terrain texture",
66 "set terrain texture <number> <uuid> [<x>] [<y>]", 65 "set terrain texture <number> <uuid> [<x>] [<y>]",
@@ -76,12 +75,19 @@ namespace OpenSim.Region.CoreModules.World.Estate
76 " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3, all corners = -1.", 75 " that coordinate. Corner # SW = 0, NW = 1, SE = 2, NE = 3, all corners = -1.",
77 consoleSetTerrainHeights); 76 consoleSetTerrainHeights);
78 77
78 m_module.Scene.AddCommand("Regions", m_module, "set water height",
79 "set water height <height> [<x>] [<y>]",
80 "Sets the water height in meters. If <x> and <y> are specified, it will only set it on regions with a matching coordinate. " +
81 "Specify -1 in <x> or <y> to wildcard that coordinate.",
82 consoleSetWaterHeight);
83
79 m_module.Scene.AddCommand( 84 m_module.Scene.AddCommand(
80 "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand); 85 "Estates", m_module, "estate show", "estate show", "Shows all estates on the simulator.", ShowEstatesCommand);
81 } 86 }
82 87
83 public void Close() {} 88 public void Close() {}
84 89
90 #region CommandHandlers
85 protected void consoleSetTerrainTexture(string module, string[] args) 91 protected void consoleSetTerrainTexture(string module, string[] args)
86 { 92 {
87 string num = args[3]; 93 string num = args[3];
@@ -121,7 +127,29 @@ namespace OpenSim.Region.CoreModules.World.Estate
121 } 127 }
122 } 128 }
123 } 129 }
124 130 protected void consoleSetWaterHeight(string module, string[] args)
131 {
132 string heightstring = args[3];
133
134 int x = (args.Length > 4 ? int.Parse(args[4]) : -1);
135 int y = (args.Length > 5 ? int.Parse(args[5]) : -1);
136
137 if (x == -1 || m_module.Scene.RegionInfo.RegionLocX == x)
138 {
139 if (y == -1 || m_module.Scene.RegionInfo.RegionLocY == y)
140 {
141 double selectedheight = double.Parse(heightstring);
142
143 m_log.Debug("[ESTATEMODULE]: Setting water height in " + m_module.Scene.RegionInfo.RegionName + " to " +
144 string.Format(" {0}", selectedheight));
145 m_module.Scene.RegionInfo.RegionSettings.WaterHeight = selectedheight;
146
147 m_module.Scene.RegionInfo.RegionSettings.Save();
148 m_module.TriggerRegionInfoChange();
149 m_module.sendRegionHandshakeToAll();
150 }
151 }
152 }
125 protected void consoleSetTerrainHeights(string module, string[] args) 153 protected void consoleSetTerrainHeights(string module, string[] args)
126 { 154 {
127 string num = args[3]; 155 string num = args[3];
@@ -196,6 +224,7 @@ namespace OpenSim.Region.CoreModules.World.Estate
196 es.EstateName, es.EstateID, m_module.UserManager.GetUserName(es.EstateOwner)); 224 es.EstateName, es.EstateID, m_module.UserManager.GetUserName(es.EstateOwner));
197 225
198 MainConsole.Instance.Output(report.ToString()); 226 MainConsole.Instance.Output(report.ToString());
199 } 227 }
228 #endregion
200 } 229 }
201} \ No newline at end of file 230} \ No newline at end of file