pass all command parameters to load/save oar, not just the filename
unfortunately, these commands cannot yet be properly relocated to the region modules due to deficiencies in the region module infrastructure0.6.8-post-fixes
parent
52952a75ca
commit
88ead9ee63
|
@ -1294,14 +1294,7 @@ namespace OpenSim
|
|||
{
|
||||
try
|
||||
{
|
||||
if (cmdparams.Length > 2)
|
||||
{
|
||||
m_sceneManager.LoadArchiveToCurrentScene(cmdparams[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sceneManager.LoadArchiveToCurrentScene(DEFAULT_OAR_BACKUP_FILENAME);
|
||||
}
|
||||
m_sceneManager.LoadArchiveToCurrentScene(cmdparams);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
@ -1315,14 +1308,7 @@ namespace OpenSim
|
|||
/// <param name="cmdparams"></param>
|
||||
protected void SaveOar(string module, string[] cmdparams)
|
||||
{
|
||||
if (cmdparams.Length > 2)
|
||||
{
|
||||
m_sceneManager.SaveCurrentSceneToArchive(cmdparams[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_sceneManager.SaveCurrentSceneToArchive(DEFAULT_OAR_BACKUP_FILENAME);
|
||||
}
|
||||
m_sceneManager.SaveCurrentSceneToArchive(cmdparams);
|
||||
}
|
||||
|
||||
private static string CombineParams(string[] commandParams, int pos)
|
||||
|
|
|
@ -75,11 +75,6 @@ namespace OpenSim
|
|||
/// </value>
|
||||
protected const string DEFAULT_PRIM_BACKUP_FILENAME = "prim-backup.xml";
|
||||
|
||||
/// <value>
|
||||
/// The file used to load and save an opensimulator archive if no filename has been specified
|
||||
/// </value>
|
||||
protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar";
|
||||
|
||||
public ConfigSettings ConfigurationSettings
|
||||
{
|
||||
get { return m_configSettings; }
|
||||
|
|
|
@ -45,6 +45,11 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
|
||||
private Scene m_scene;
|
||||
|
||||
/// <value>
|
||||
/// The file used to load and save an opensimulator archive if no filename has been specified
|
||||
/// </value>
|
||||
protected const string DEFAULT_OAR_BACKUP_FILENAME = "region.oar";
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "RegionArchiverModule"; }
|
||||
|
@ -80,6 +85,38 @@ namespace OpenSim.Region.CoreModules.World.Archiver
|
|||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load a whole region from an opensimulator archive.
|
||||
/// </summary>
|
||||
/// <param name="cmdparams"></param>
|
||||
public void HandleLoadOarConsoleCommand(string module, string[] cmdparams)
|
||||
{
|
||||
if (cmdparams.Length > 2)
|
||||
{
|
||||
DearchiveRegion(cmdparams[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
DearchiveRegion(DEFAULT_OAR_BACKUP_FILENAME);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Save a region to a file, including all the assets needed to restore it.
|
||||
/// </summary>
|
||||
/// <param name="cmdparams"></param>
|
||||
public void HandleSaveOarConsoleCommand(string module, string[] cmdparams)
|
||||
{
|
||||
if (cmdparams.Length > 2)
|
||||
{
|
||||
ArchiveRegion(cmdparams[2]);
|
||||
}
|
||||
else
|
||||
{
|
||||
ArchiveRegion(DEFAULT_OAR_BACKUP_FILENAME);
|
||||
}
|
||||
}
|
||||
|
||||
public void ArchiveRegion(string savePath)
|
||||
{
|
||||
ArchiveRegion(savePath, Guid.Empty);
|
||||
|
|
|
@ -34,7 +34,10 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// Interface to region archive functionality
|
||||
/// </summary>
|
||||
public interface IRegionArchiverModule
|
||||
{
|
||||
{
|
||||
void HandleLoadOarConsoleCommand(string module, string[] cmdparams);
|
||||
void HandleSaveOarConsoleCommand(string module, string[] cmdparams);
|
||||
|
||||
/// <summary>
|
||||
/// Archive the region to the given path
|
||||
/// </summary>
|
||||
|
|
|
@ -241,24 +241,24 @@ namespace OpenSim.Region.Framework.Scenes
|
|||
/// Save the current scene to an OpenSimulator archive. This archive will eventually include the prim's assets
|
||||
/// as well as the details of the prims themselves.
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
public void SaveCurrentSceneToArchive(string filename)
|
||||
/// <param name="cmdparams"></param>
|
||||
public void SaveCurrentSceneToArchive(string[] cmdparams)
|
||||
{
|
||||
IRegionArchiverModule archiver = CurrentOrFirstScene.RequestModuleInterface<IRegionArchiverModule>();
|
||||
if (archiver != null)
|
||||
archiver.ArchiveRegion(filename);
|
||||
archiver.HandleSaveOarConsoleCommand(string.Empty, cmdparams);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Load an OpenSim archive into the current scene. This will load both the shapes of the prims and upload
|
||||
/// their assets to the asset service.
|
||||
/// </summary>
|
||||
/// <param name="filename"></param>
|
||||
public void LoadArchiveToCurrentScene(string filename)
|
||||
/// <param name="cmdparams"></param>
|
||||
public void LoadArchiveToCurrentScene(string[] cmdparams)
|
||||
{
|
||||
IRegionArchiverModule archiver = CurrentOrFirstScene.RequestModuleInterface<IRegionArchiverModule>();
|
||||
if (archiver != null)
|
||||
archiver.DearchiveRegion(filename);
|
||||
archiver.HandleLoadOarConsoleCommand(string.Empty, cmdparams);
|
||||
}
|
||||
|
||||
public string SaveCurrentSceneMapToXmlString()
|
||||
|
|
Loading…
Reference in New Issue