aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorAdam Frisby2008-04-15 09:55:47 +0000
committerAdam Frisby2008-04-15 09:55:47 +0000
commit0bec9f055105e323b46e87067e05ec10b1563bd5 (patch)
tree99f5e14fe9386d88823fb1e0e7acb61e55932624
parent* Fixes an issue with the BaseHttpServer in Linux (diff)
downloadopensim-SC_OLD-0bec9f055105e323b46e87067e05ec10b1563bd5.zip
opensim-SC_OLD-0bec9f055105e323b46e87067e05ec10b1563bd5.tar.gz
opensim-SC_OLD-0bec9f055105e323b46e87067e05ec10b1563bd5.tar.bz2
opensim-SC_OLD-0bec9f055105e323b46e87067e05ec10b1563bd5.tar.xz
* Added support for serialising objects to ExportSerialisationModule via SerialiseObjects.cs
* Cleaned up using tags on SerialiseTerrain.cs * Minor tweaks to ExportSerialisationModule.cs
-rw-r--r--OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs3
-rw-r--r--OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs10
3 files changed, 23 insertions, 10 deletions
diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs
index 76f7249..adb607a 100644
--- a/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs
+++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs
@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser
41 TextWriter regionInfoWriter = new StreamWriter(saveDir + "README.TXT"); 41 TextWriter regionInfoWriter = new StreamWriter(saveDir + "README.TXT");
42 regionInfoWriter.WriteLine("Region Name: " + scene.RegionInfo.RegionName); 42 regionInfoWriter.WriteLine("Region Name: " + scene.RegionInfo.RegionName);
43 regionInfoWriter.WriteLine("Region ID: " + scene.RegionInfo.RegionID.ToString()); 43 regionInfoWriter.WriteLine("Region ID: " + scene.RegionInfo.RegionID.ToString());
44 regionInfoWriter.WriteLine("Backup Time: " + Util.UnixTimeSinceEpoch().ToString()); 44 regionInfoWriter.WriteLine("Backup Time: UTC " + DateTime.UtcNow.ToString());
45 regionInfoWriter.WriteLine("Serialise Version: 0.1"); 45 regionInfoWriter.WriteLine("Serialise Version: 0.1");
46 regionInfoWriter.Close(); 46 regionInfoWriter.Close();
47 47
@@ -117,6 +117,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser
117 lock (m_serialisers) 117 lock (m_serialisers)
118 { 118 {
119 m_serialisers.Add(new SerialiseTerrain()); 119 m_serialisers.Add(new SerialiseTerrain());
120 m_serialisers.Add(new SerialiseObjects());
120 } 121 }
121 122
122 LoadCommanderCommands(); 123 LoadCommanderCommands();
diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs
new file mode 100644
index 0000000..d8cae6e
--- /dev/null
+++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseObjects.cs
@@ -0,0 +1,20 @@
1using OpenSim.Region.Environment.Scenes;
2
3namespace OpenSim.Region.Environment.Modules.ExportSerialiser
4{
5 class SerialiseObjects : IFileSerialiser
6 {
7 #region IFileSerialiser Members
8
9 public string WriteToFile(Scene scene, string dir)
10 {
11 string targetFileName = dir + "objects.xml";
12
13 scene.SavePrimsToXml2(targetFileName);
14
15 return "objects.xml";
16 }
17
18 #endregion
19 }
20}
diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs
index 2076490..0c79999 100644
--- a/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs
+++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/SerialiseTerrain.cs
@@ -1,13 +1,5 @@
1using System; 1using OpenSim.Region.Environment.Modules.Terrain;
2using System.Collections.Generic;
3using System.Drawing;
4using libsecondlife;
5using Nini.Config;
6using OpenSim.Framework;
7using OpenSim.Region.Environment.Interfaces;
8using OpenSim.Region.Environment.Scenes; 2using OpenSim.Region.Environment.Scenes;
9using OpenSim.Region.Environment.Modules.ModuleFramework;
10using OpenSim.Region.Environment.Modules.Terrain;
11 3
12namespace OpenSim.Region.Environment.Modules.ExportSerialiser 4namespace OpenSim.Region.Environment.Modules.ExportSerialiser
13{ 5{