From f0ea8eb53463fe7e228537779f3f700bc6ecb74d Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Tue, 30 Dec 2008 19:00:19 +0000 Subject: * 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 --- OpenSim/Framework/RegionInfo.cs | 2 -- OpenSim/Framework/RegionSettings.cs | 24 ++++++++++++++++-------- 2 files changed, 16 insertions(+), 10 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index a53bfbe..dc00059 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs @@ -200,8 +200,6 @@ namespace OpenSim.Framework private EstateSettings m_estateSettings; private RegionSettings m_regionSettings; -// public bool m_allow_alternate_ports; - public UUID MasterAvatarAssignedUUID = UUID.Zero; public string MasterAvatarFirstName = String.Empty; public string MasterAvatarLastName = String.Empty; diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index e1e747a..0e09fa1 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -38,6 +38,14 @@ namespace OpenSim.Framework public delegate void SaveDelegate(RegionSettings rs); public event SaveDelegate OnSave; + + /// + /// These appear to be terrain textures that are shipped with the client. + /// + public static readonly UUID DEFAULT_TERRAIN_TEXTURE_1 = new UUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); + public static readonly UUID DEFAULT_TERRAIN_TEXTURE_2 = new UUID("abb783e6-3e93-26c0-248a-247666855da3"); + public static readonly UUID DEFAULT_TERRAIN_TEXTURE_3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); + public static readonly UUID DEFAULT_TERRAIN_TEXTURE_4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); public RegionSettings() { @@ -74,19 +82,19 @@ namespace OpenSim.Framework configMember.addConfigurationOption("terrain_base_0", ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, "b8d3965a-ad78-bf43-699b-bff8eca6c975",true); + String.Empty, DEFAULT_TERRAIN_TEXTURE_1.ToString(), true); configMember.addConfigurationOption("terrain_base_1", ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, "abb783e6-3e93-26c0-248a-247666855da3",true); + String.Empty, DEFAULT_TERRAIN_TEXTURE_2.ToString(), true); configMember.addConfigurationOption("terrain_base_2", ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, "179cdabd-398a-9b6b-1391-4dc333ba321f",true); + String.Empty, DEFAULT_TERRAIN_TEXTURE_3.ToString(), true); configMember.addConfigurationOption("terrain_base_3", ConfigurationOption.ConfigurationTypes.TYPE_UUID, - String.Empty, "beb169c7-11ea-fff2-efe5-0f24dc881df2",true); + String.Empty, DEFAULT_TERRAIN_TEXTURE_4.ToString(), true); configMember.addConfigurationOption("terrain_start_height_0", ConfigurationOption.ConfigurationTypes.TYPE_DOUBLE, @@ -361,7 +369,7 @@ namespace OpenSim.Framework set { if (value == UUID.Zero) - m_TerrainTexture1 = new UUID("b8d3965a-ad78-bf43-699b-bff8eca6c975"); + m_TerrainTexture1 = DEFAULT_TERRAIN_TEXTURE_1; else m_TerrainTexture1 = value; } @@ -375,7 +383,7 @@ namespace OpenSim.Framework set { if (value == UUID.Zero) - m_TerrainTexture2 = new UUID("abb783e6-3e93-26c0-248a-247666855da3"); + m_TerrainTexture2 = DEFAULT_TERRAIN_TEXTURE_2; else m_TerrainTexture2 = value; } @@ -389,7 +397,7 @@ namespace OpenSim.Framework set { if (value == UUID.Zero) - m_TerrainTexture3 = new UUID("179cdabd-398a-9b6b-1391-4dc333ba321f"); + m_TerrainTexture3 = DEFAULT_TERRAIN_TEXTURE_3; else m_TerrainTexture3 = value; } @@ -403,7 +411,7 @@ namespace OpenSim.Framework set { if (value == UUID.Zero) - m_TerrainTexture4 = new UUID("beb169c7-11ea-fff2-efe5-0f24dc881df2"); + m_TerrainTexture4 = DEFAULT_TERRAIN_TEXTURE_4; else m_TerrainTexture4 = value; } -- cgit v1.1