* Added support for serialising objects to ExportSerialisationModule via SerialiseObjects.cs

* Cleaned up using tags on SerialiseTerrain.cs
* Minor tweaks to ExportSerialisationModule.cs
0.6.0-stable
Adam Frisby 2008-04-15 09:55:47 +00:00
parent 682f4e9257
commit 0bec9f0551
3 changed files with 23 additions and 10 deletions

View File

@ -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();

View File

@ -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
}
}

View File

@ -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
{