diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs b/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs index 8613e77..16d7484 100644 --- a/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs +++ b/OpenSim/Region/Environment/Modules/ExportSerialiser/ExportSerialisationModule.cs | |||
@@ -12,19 +12,17 @@ using System.IO; | |||
12 | 12 | ||
13 | namespace OpenSim.Region.Environment.Modules.ExportSerialiser | 13 | namespace OpenSim.Region.Environment.Modules.ExportSerialiser |
14 | { | 14 | { |
15 | public class ExportSerialisationModule : IRegionModule | 15 | public class ExportSerialisationModule : IRegionModule, OpenSim.Region.Environment.Modules.ExportSerialiser.IRegionSerialiser |
16 | { | 16 | { |
17 | private List<Scene> m_regions = new List<Scene>(); | 17 | private List<Scene> m_regions = new List<Scene>(); |
18 | private List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>(); | 18 | private List<IFileSerialiser> m_serialisers = new List<IFileSerialiser>(); |
19 | private Commander m_commander = new Commander("Export"); | 19 | private Commander m_commander = new Commander("Export"); |
20 | private string m_savedir = "exports" + "/"; | 20 | private string m_savedir = "exports" + "/"; |
21 | 21 | ||
22 | private List<string> SerialiseRegion(Scene scene) | 22 | public List<string> SerialiseRegion(Scene scene, string saveDir) |
23 | { | 23 | { |
24 | List<string> results = new List<string>(); | 24 | List<string> results = new List<string>(); |
25 | 25 | ||
26 | string saveDir = m_savedir + scene.RegionInfo.RegionID.ToString() + "/"; | ||
27 | |||
28 | if (!Directory.Exists(saveDir)) | 26 | if (!Directory.Exists(saveDir)) |
29 | { | 27 | { |
30 | Directory.CreateDirectory(saveDir); | 28 | Directory.CreateDirectory(saveDir); |
@@ -62,6 +60,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser | |||
62 | { | 60 | { |
63 | scene.RegisterModuleCommander("Export", m_commander); | 61 | scene.RegisterModuleCommander("Export", m_commander); |
64 | scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; | 62 | scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole; |
63 | scene.RegisterModuleInterface<IRegionSerialiser>(this); | ||
65 | 64 | ||
66 | lock (m_regions) | 65 | lock (m_regions) |
67 | { | 66 | { |
@@ -88,7 +87,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser | |||
88 | { | 87 | { |
89 | if (region.RegionInfo.RegionName == (string)args[0]) | 88 | if (region.RegionInfo.RegionName == (string)args[0]) |
90 | { | 89 | { |
91 | List<string> results = SerialiseRegion(region); | 90 | List<string> results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); |
92 | } | 91 | } |
93 | } | 92 | } |
94 | } | 93 | } |
@@ -97,7 +96,7 @@ namespace OpenSim.Region.Environment.Modules.ExportSerialiser | |||
97 | { | 96 | { |
98 | foreach (Scene region in m_regions) | 97 | foreach (Scene region in m_regions) |
99 | { | 98 | { |
100 | List<string> results = SerialiseRegion(region); | 99 | List<string> results = SerialiseRegion(region, m_savedir + region.RegionInfo.RegionID.ToString() + "/"); |
101 | } | 100 | } |
102 | } | 101 | } |
103 | 102 | ||