You can now substitute %name% in the filename argument for terrain save & load commands to input the sims name. Useful for sugilite regions where you are running multiple sims in a single instance and need to get them to load or save in a pattern. (Needs cleaning & expansion)
parent
96dfb33bca
commit
315a49e7fd
|
@ -429,7 +429,7 @@ namespace OpenSim
|
||||||
string result = "";
|
string result = "";
|
||||||
for (int i = 0; i < m_localWorld.Count; i++)
|
for (int i = 0; i < m_localWorld.Count; i++)
|
||||||
{
|
{
|
||||||
if (!((Scene)m_localWorld[i]).Terrain.RunTerrainCmd(cmdparams, ref result))
|
if (!((Scene)m_localWorld[i]).Terrain.RunTerrainCmd(cmdparams, ref result,m_localWorld[i].RegionInfo.RegionName))
|
||||||
{
|
{
|
||||||
m_log.Error(result);
|
m_log.Error(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -178,7 +178,7 @@ namespace OpenSim.Region.Terrain
|
||||||
/// <param name="args">Commandline arguments (space seperated)</param>
|
/// <param name="args">Commandline arguments (space seperated)</param>
|
||||||
/// <param name="resultText">Reference that returns error or help text if returning false</param>
|
/// <param name="resultText">Reference that returns error or help text if returning false</param>
|
||||||
/// <returns>If the operation was successful (if not, the error is placed into resultText)</returns>
|
/// <returns>If the operation was successful (if not, the error is placed into resultText)</returns>
|
||||||
public bool RunTerrainCmd(string[] args, ref string resultText)
|
public bool RunTerrainCmd(string[] args, ref string resultText, string simName)
|
||||||
{
|
{
|
||||||
string command = args[0];
|
string command = args[0];
|
||||||
|
|
||||||
|
@ -248,6 +248,7 @@ namespace OpenSim.Region.Terrain
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "load":
|
case "load":
|
||||||
|
args[2].Replace("%name%", simName);
|
||||||
switch (args[1].ToLower())
|
switch (args[1].ToLower())
|
||||||
{
|
{
|
||||||
case "f32":
|
case "f32":
|
||||||
|
@ -273,6 +274,7 @@ namespace OpenSim.Region.Terrain
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "save":
|
case "save":
|
||||||
|
args[2].Replace("%name%", simName);
|
||||||
switch (args[1].ToLower())
|
switch (args[1].ToLower())
|
||||||
{
|
{
|
||||||
case "f32":
|
case "f32":
|
||||||
|
|
Loading…
Reference in New Issue