* Added support for serialising objects to ExportSerialisationModule via SerialiseObjects.cs
* Cleaned up using tags on SerialiseTerrain.cs * Minor tweaks to ExportSerialisationModule.cs0.6.0-stable
parent
682f4e9257
commit
0bec9f0551
|
@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser
|
|||
TextWriter regionInfoWriter = new StreamWriter(saveDir + "README.TXT");
|
||||
regionInfoWriter.WriteLine("Region Name: " + scene.RegionInfo.RegionName);
|
||||
regionInfoWriter.WriteLine("Region ID: " + scene.RegionInfo.RegionID.ToString());
|
||||
regionInfoWriter.WriteLine("Backup Time: " + Util.UnixTimeSinceEpoch().ToString());
|
||||
regionInfoWriter.WriteLine("Backup Time: UTC " + DateTime.UtcNow.ToString());
|
||||
regionInfoWriter.WriteLine("Serialise Version: 0.1");
|
||||
regionInfoWriter.Close();
|
||||
|
||||
|
@ -117,6 +117,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser
|
|||
lock (m_serialisers)
|
||||
{
|
||||
m_serialisers.Add(new SerialiseTerrain());
|
||||
m_serialisers.Add(new SerialiseObjects());
|
||||
}
|
||||
|
||||
LoadCommanderCommands();
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
using OpenSim.Region.Environment.Scenes;
|
||||
|
||||
namespace OpenSim.Region.Environment.Modules.ExportSerialiser
|
||||
{
|
||||
class SerialiseObjects : IFileSerialiser
|
||||
{
|
||||
#region IFileSerialiser Members
|
||||
|
||||
public string WriteToFile(Scene scene, string dir)
|
||||
{
|
||||
string targetFileName = dir + "objects.xml";
|
||||
|
||||
scene.SavePrimsToXml2(targetFileName);
|
||||
|
||||
return "objects.xml";
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -1,13 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using libsecondlife;
|
||||
using Nini.Config;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Region.Environment.Interfaces;
|
||||
using OpenSim.Region.Environment.Modules.Terrain;
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
using OpenSim.Region.Environment.Modules.ModuleFramework;
|
||||
using OpenSim.Region.Environment.Modules.Terrain;
|
||||
|
||||
namespace OpenSim.Region.Environment.Modules.ExportSerialiser
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue