From 3de534896efe4014f50b03624d3b9db82cd92cae Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 30 Jan 2012 16:22:21 +0000 Subject: [PATCH] Add ParcelImageID to RegionSettings so we can have that overlay. Warning: Contains a Migration. Warning: May contain nuts. --- OpenSim/Data/MySQL/MySQLSimulationData.cs | 6 ++++-- OpenSim/Data/MySQL/Resources/RegionStore.migrations | 6 ++++++ OpenSim/Framework/RegionSettings.cs | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/OpenSim/Data/MySQL/MySQLSimulationData.cs b/OpenSim/Data/MySQL/MySQLSimulationData.cs index 31d17f1a29..3123edfe7b 100644 --- a/OpenSim/Data/MySQL/MySQLSimulationData.cs +++ b/OpenSim/Data/MySQL/MySQLSimulationData.cs @@ -997,7 +997,7 @@ namespace OpenSim.Data.MySQL "covenant, Sandbox, sunvectorx, sunvectory, " + "sunvectorz, loaded_creation_datetime, " + "loaded_creation_id, map_tile_ID, " + - "TelehubObject) " + + "TelehubObject, parcel_tile_ID) " + "values (?RegionUUID, ?BlockTerraform, " + "?BlockFly, ?AllowDamage, ?RestrictPushing, " + "?AllowLandResell, ?AllowLandJoinDivide, " + @@ -1013,7 +1013,7 @@ namespace OpenSim.Data.MySQL "?SunPosition, ?Covenant, ?Sandbox, " + "?SunVectorX, ?SunVectorY, ?SunVectorZ, " + "?LoadedCreationDateTime, ?LoadedCreationID, " + - "?TerrainImageID, ?TelehubObject) "; + "?TerrainImageID, ?TelehubObject, ?ParcelImageID) "; FillRegionSettingsCommand(cmd, rs); @@ -1301,6 +1301,7 @@ namespace OpenSim.Data.MySQL newSettings.LoadedCreationID = (String) row["loaded_creation_id"]; newSettings.TerrainImageID = DBGuid.FromDB(row["map_tile_ID"]); + newSettings.ParcelImageID = DBGuid.FromDB(row["parcel_tile_ID"]); newSettings.TelehubObject = DBGuid.FromDB(row["TelehubObject"]); return newSettings; @@ -1632,6 +1633,7 @@ namespace OpenSim.Data.MySQL cmd.Parameters.AddWithValue("LoadedCreationDateTime", settings.LoadedCreationDateTime); cmd.Parameters.AddWithValue("LoadedCreationID", settings.LoadedCreationID); cmd.Parameters.AddWithValue("TerrainImageID", settings.TerrainImageID); + cmd.Parameters.AddWithValue("ParcelImageID", settings.ParcelImageID); cmd.Parameters.AddWithValue("TelehubObject", settings.TelehubObject); } diff --git a/OpenSim/Data/MySQL/Resources/RegionStore.migrations b/OpenSim/Data/MySQL/Resources/RegionStore.migrations index 720e200310..f9b5737c78 100644 --- a/OpenSim/Data/MySQL/Resources/RegionStore.migrations +++ b/OpenSim/Data/MySQL/Resources/RegionStore.migrations @@ -857,3 +857,9 @@ CREATE TABLE IF NOT EXISTS `spawn_points` ( ALTER TABLE `regionsettings` ADD COLUMN `TelehubObject` varchar(36) NOT NULL; COMMIT; +:VERSION 40 #---------------- Parcels for sale + +BEGIN; +ALTER TABLE `regionsettings` ADD COLUMN `parcel_tile_ID` char(36) NOT NULL DEFAULT '00000000-0000-0000-0000-000000000000'; +COMMIT; + diff --git a/OpenSim/Framework/RegionSettings.cs b/OpenSim/Framework/RegionSettings.cs index e115432baa..91e07df678 100644 --- a/OpenSim/Framework/RegionSettings.cs +++ b/OpenSim/Framework/RegionSettings.cs @@ -373,6 +373,14 @@ namespace OpenSim.Framework set { m_SunVector = value; } } + private UUID m_ParcelImageID; + + public UUID ParcelImageID + { + get { return m_ParcelImageID; } + set { m_ParcelImageID = value; } + } + private UUID m_TerrainImageID; public UUID TerrainImageID