diff options
author | Adam Frisby | 2008-04-15 09:55:47 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-15 09:55:47 +0000 |
commit | 0bec9f055105e323b46e87067e05ec10b1563bd5 (patch) | |
tree | 99f5e14fe9386d88823fb1e0e7acb61e55932624 /OpenSim/Region/Environment/Modules/ExportSerialiser | |
parent | * Fixes an issue with the BaseHttpServer in Linux (diff) | |
download | opensim-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
Diffstat (limited to '')
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 @@ | |||
1 | using OpenSim.Region.Environment.Scenes; | ||
2 | |||
3 | namespace 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 @@ | |||
1 | using System; | 1 | using OpenSim.Region.Environment.Modules.Terrain; |
2 | using System.Collections.Generic; | ||
3 | using System.Drawing; | ||
4 | using libsecondlife; | ||
5 | using Nini.Config; | ||
6 | using OpenSim.Framework; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | using OpenSim.Region.Environment.Scenes; | 2 | using OpenSim.Region.Environment.Scenes; |
9 | using OpenSim.Region.Environment.Modules.ModuleFramework; | ||
10 | using OpenSim.Region.Environment.Modules.Terrain; | ||
11 | 3 | ||
12 | namespace OpenSim.Region.Environment.Modules.ExportSerialiser | 4 | namespace OpenSim.Region.Environment.Modules.ExportSerialiser |
13 | { | 5 | { |