diff options
author | Justin Clarke Casey | 2008-12-30 19:00:19 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-12-30 19:00:19 +0000 |
commit | f0ea8eb53463fe7e228537779f3f700bc6ecb74d (patch) | |
tree | 33f1a11a0dc4817557fd0578329ee7249c058371 /OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |
parent | OpenUser_Main is now public. Fixes Mantis #2940. Thanks SirKimba (diff) | |
download | opensim-SC_OLD-f0ea8eb53463fe7e228537779f3f700bc6ecb74d.zip opensim-SC_OLD-f0ea8eb53463fe7e228537779f3f700bc6ecb74d.tar.gz opensim-SC_OLD-f0ea8eb53463fe7e228537779f3f700bc6ecb74d.tar.bz2 opensim-SC_OLD-f0ea8eb53463fe7e228537779f3f700bc6ecb74d.tar.xz |
* Implement saving of region settings in OAR files
* This means that you can now save terrain textures, water height, etc.
* Estate settings are not supported
* Older OAR files without these settings can still be loaded
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs index 73fa5d2..b410e55 100644 --- a/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs +++ b/OpenSim/Region/Environment/Modules/World/Archiver/ArchiveWriteRequestExecution.cs | |||
@@ -56,20 +56,20 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
56 | protected ITerrainModule m_terrainModule; | 56 | protected ITerrainModule m_terrainModule; |
57 | protected IRegionSerialiserModule m_serialiser; | 57 | protected IRegionSerialiserModule m_serialiser; |
58 | protected List<SceneObjectGroup> m_sceneObjects; | 58 | protected List<SceneObjectGroup> m_sceneObjects; |
59 | protected string m_sceneName; | 59 | protected RegionInfo m_regionInfo; |
60 | protected string m_savePath; | 60 | protected string m_savePath; |
61 | 61 | ||
62 | public ArchiveWriteRequestExecution( | 62 | public ArchiveWriteRequestExecution( |
63 | List<SceneObjectGroup> sceneObjects, | 63 | List<SceneObjectGroup> sceneObjects, |
64 | ITerrainModule terrainModule, | 64 | ITerrainModule terrainModule, |
65 | IRegionSerialiserModule serialiser, | 65 | IRegionSerialiserModule serialiser, |
66 | string sceneName, | 66 | RegionInfo regionInfo, |
67 | string savePath) | 67 | string savePath) |
68 | { | 68 | { |
69 | m_sceneObjects = sceneObjects; | 69 | m_sceneObjects = sceneObjects; |
70 | m_terrainModule = terrainModule; | 70 | m_terrainModule = terrainModule; |
71 | m_serialiser = serialiser; | 71 | m_serialiser = serialiser; |
72 | m_sceneName = sceneName; | 72 | m_regionInfo = regionInfo; |
73 | m_savePath = savePath; | 73 | m_savePath = savePath; |
74 | } | 74 | } |
75 | 75 | ||
@@ -90,9 +90,13 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
90 | 90 | ||
91 | // Write out control file | 91 | // Write out control file |
92 | archive.AddFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile()); | 92 | archive.AddFile(ArchiveConstants.CONTROL_FILE_PATH, CreateControlFile()); |
93 | |||
94 | // Write out region settings | ||
95 | string settingsPath = String.Format("{0}{1}.xml", ArchiveConstants.SETTINGS_PATH, m_regionInfo.RegionName); | ||
96 | archive.AddFile(settingsPath, RegionSettingsSerializer.Serialize(m_regionInfo.RegionSettings)); | ||
93 | 97 | ||
94 | // Write out terrain | 98 | // Write out terrain |
95 | string terrainPath = String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_sceneName); | 99 | string terrainPath = String.Format("{0}{1}.r32", ArchiveConstants.TERRAINS_PATH, m_regionInfo.RegionName); |
96 | MemoryStream ms = new MemoryStream(); | 100 | MemoryStream ms = new MemoryStream(); |
97 | m_terrainModule.SaveToStream(terrainPath, ms); | 101 | m_terrainModule.SaveToStream(terrainPath, ms); |
98 | archive.AddFile(terrainPath, ms.ToArray()); | 102 | archive.AddFile(terrainPath, ms.ToArray()); |
@@ -137,7 +141,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver | |||
137 | xtw.WriteStartDocument(); | 141 | xtw.WriteStartDocument(); |
138 | xtw.WriteStartElement("archive"); | 142 | xtw.WriteStartElement("archive"); |
139 | xtw.WriteAttributeString("major_version", "0"); | 143 | xtw.WriteAttributeString("major_version", "0"); |
140 | xtw.WriteAttributeString("minor_version", "1"); | 144 | xtw.WriteAttributeString("minor_version", "2"); |
141 | xtw.WriteEndElement(); | 145 | xtw.WriteEndElement(); |
142 | 146 | ||
143 | xtw.Flush(); | 147 | xtw.Flush(); |