* refactor: remove xml serialization wrappers from Scene

0.6.1-post-fixes
Justin Clarke Casey 2008-12-19 19:14:52 +00:00
parent eb6cca4750
commit 667a935fff
2 changed files with 6 additions and 18 deletions

View File

@ -42,8 +42,6 @@ using OpenSim.Framework.Communications.Cache;
using OpenSim.Framework.Servers;
using OpenSim.Region.Environment.Interfaces;
using OpenSim.Region.Interfaces;
using OpenSim.Region.Environment.Modules.World.Archiver;
using OpenSim.Region.Environment.Modules.World.Serialiser;
using OpenSim.Region.Environment.Modules.World.Terrain;
using OpenSim.Region.Environment.Scenes.Scripting;
using OpenSim.Region.Physics.Manager;
@ -1882,20 +1880,6 @@ namespace OpenSim.Region.Environment.Scenes
return false;
}
public void LoadPrimsFromXml(string fileName, bool newIdsFlag, Vector3 loadOffset)
{
m_log.InfoFormat("[SCENE]: Loading prims in xml format to region {0} from {1}", RegionInfo.RegionName, fileName);
m_serialiser.LoadPrimsFromXml(this, fileName, newIdsFlag, loadOffset);
}
public void SavePrimsToXml(string fileName)
{
m_log.InfoFormat("[SCENE]: Saving prims in xml format for region {0} to {1}", RegionInfo.RegionName, fileName);
m_serialiser.SavePrimsToXml(this, fileName);
}
public void LoadPrimsFromXml2(string fileName)
{
m_log.InfoFormat("[SCENE]: Loading prims in xml2 format to region {0} from {1}", RegionInfo.RegionName, fileName);

View File

@ -184,7 +184,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="filename"></param>
public void SaveCurrentSceneToXml(string filename)
{
CurrentOrFirstScene.SavePrimsToXml(filename);
IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
serialiser.SavePrimsToXml(CurrentOrFirstScene, filename);
}
/// <summary>
@ -195,7 +197,9 @@ namespace OpenSim.Region.Environment.Scenes
/// <param name="loadOffset"></param>
public void LoadCurrentSceneFromXml(string filename, bool generateNewIDs, Vector3 loadOffset)
{
CurrentOrFirstScene.LoadPrimsFromXml(filename, generateNewIDs, loadOffset);
IRegionSerialiserModule serialiser = CurrentOrFirstScene.RequestModuleInterface<IRegionSerialiserModule>();
if (serialiser != null)
serialiser.LoadPrimsFromXml(CurrentOrFirstScene, filename, generateNewIDs, loadOffset);
}
/// <summary>