From 2a4dd34616bdb0641f841766dfd15c4c784d3549 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 2 Feb 2014 12:21:18 -0800 Subject: Change new 'load oar' parameters to be hyphenated to be consistant with existing parameters. ('--forceterrain' becomes '--force-terrain'). The old forms have been kept for downward compatiblity. --- .../CoreModules/World/Archiver/ArchiveReadRequest.cs | 6 +++--- .../Region/CoreModules/World/Archiver/ArchiverModule.cs | 14 +++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/CoreModules/World') diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 6f68966..23008a0 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs @@ -177,13 +177,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver m_errorMessage = String.Empty; m_merge = options.ContainsKey("merge"); - m_forceTerrain = options.ContainsKey("forceTerrain"); - m_forceParcels = options.ContainsKey("forceParcels"); + m_forceTerrain = options.ContainsKey("force-terrain"); + m_forceParcels = options.ContainsKey("force-parcels"); m_skipAssets = options.ContainsKey("skipAssets"); m_requestId = requestId; m_displacement = options.ContainsKey("displacement") ? (Vector3)options["displacement"] : Vector3.Zero; m_rotation = options.ContainsKey("rotation") ? (float)options["rotation"] : 0f; - m_rotationCenter = options.ContainsKey("rotationCenter") ? (Vector3)options["rotationCenter"] + m_rotationCenter = options.ContainsKey("rotation-center") ? (Vector3)options["rotation-center"] : new Vector3(scene.RegionInfo.RegionSizeX / 2f, scene.RegionInfo.RegionSizeY / 2f, 0f); // Zero can never be a valid user id diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs index 6fbac4c..9fa1fbd 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiverModule.cs @@ -113,8 +113,8 @@ namespace OpenSim.Region.CoreModules.World.Archiver OptionSet options = new OptionSet(); options.Add("m|merge", delegate (string v) { mergeOar = (v != null); }); options.Add("s|skip-assets", delegate (string v) { skipAssets = (v != null); }); - options.Add("forceterrain", delegate (string v) { forceTerrain = (v != null); }); - options.Add("forceparcels", delegate (string v) { forceParcels = (v != null); }); + options.Add("force-terrain", delegate (string v) { forceTerrain = (v != null); }); + options.Add("force-parcels", delegate (string v) { forceParcels = (v != null); }); options.Add("displacement=", delegate (string v) { try { @@ -141,7 +141,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver // Convert to radians for internals rotation = Util.Clamp(rotation, -359f, 359f) / 180f * (float)Math.PI; }); - options.Add("rotationcenter=", delegate (string v) { + options.Add("rotation-center=", delegate (string v) { try { rotationCenter = v == null ? Vector3.Zero : Vector3.Parse(v); @@ -149,7 +149,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver catch { m_log.ErrorFormat("[ARCHIVER MODULE] failure parsing rotation displacement"); - m_log.ErrorFormat("[ARCHIVER MODULE] Must be represented as vector3: --rotationcenter \"<128,128,0>\""); + m_log.ErrorFormat("[ARCHIVER MODULE] Must be represented as vector3: --rotation-center \"<128,128,0>\""); return; } }); @@ -174,11 +174,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver Dictionary archiveOptions = new Dictionary(); if (mergeOar) archiveOptions.Add("merge", null); if (skipAssets) archiveOptions.Add("skipAssets", null); - if (forceTerrain) archiveOptions.Add("forceTerrain", null); - if (forceParcels) archiveOptions.Add("forceParcels", null); + if (forceTerrain) archiveOptions.Add("force-terrain", null); + if (forceParcels) archiveOptions.Add("force-parcels", null); archiveOptions.Add("displacement", displacement); archiveOptions.Add("rotation", rotation); - archiveOptions.Add("rotationCenter", rotationCenter); + archiveOptions.Add("rotation-center", rotationCenter); if (mainParams.Count > 2) { -- cgit v1.1