From 5f5c65e4bae1f2a84d6972697d0413137f6b1da1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 13 Aug 2010 20:34:46 +0100 Subject: refactor: move more map tile generation code from scene to IWorldMapModule --- OpenSim/Region/Application/OpenSimBase.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/Application/OpenSimBase.cs') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index f535fe8..e148cde 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -347,9 +347,13 @@ namespace OpenSim // Prims have to be loaded after module configuration since some modules may be invoked during the load scene.LoadPrimsFromStorage(regionInfo.originRegionID); - // moved these here as the terrain texture has to be created after the modules are initialized + // moved these here as the map texture has to be created after the modules are initialized // and has to happen before the region is registered with the grid. - scene.CreateTerrainTexture(); + IWorldMapModule mapModule = scene.RequestModuleInterface(); + if (mapModule != null) + mapModule.GenerateMaptile(); + else + m_log.WarnFormat("[STARTUP]: No map module available to generate map tile"); // TODO : Try setting resource for region xstats here on scene MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); -- cgit v1.1 From 8eeb3f2fd21c05f0bfd141e333f34c4c69e8865b Mon Sep 17 00:00:00 2001 From: randomhuman Date: Fri, 13 Aug 2010 16:08:43 +0100 Subject: Updated the create_region command in the RemoteAdmin plugin to properly support estates without seeking further input on the console. --- OpenSim/Region/Application/OpenSimBase.cs | 54 +++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'OpenSim/Region/Application/OpenSimBase.cs') diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs index e148cde..eb18e83 100644 --- a/OpenSim/Region/Application/OpenSimBase.cs +++ b/OpenSim/Region/Application/OpenSimBase.cs @@ -790,6 +790,60 @@ namespace OpenSim { regionnum = m_sceneManager.Scenes.Count; } + + /// + /// Load the estate information for the provided RegionInfo object. + /// + /// + /// A + /// + public void PopulateRegionEstateInfo(RegionInfo regInfo) + { + if (m_storageManager.EstateDataStore != null) + { + regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false); + } + + if (regInfo.EstateSettings.EstateID == 0) // No record at all + { + MainConsole.Instance.Output("Your region is not part of an estate."); + while (true) + { + string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List() {"yes", "no"}); + if (response == "no") + { + // Create a new estate + regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true); + + regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName); + //regInfo.EstateSettings.Save(); + break; + } + else + { + response = MainConsole.Instance.CmdPrompt("Estate name to join", "None"); + if (response == "None") + continue; + + List estateIDs = m_storageManager.EstateDataStore.GetEstates(response); + if (estateIDs.Count < 1) + { + MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again"); + continue; + } + + int estateID = estateIDs[0]; + + regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID); + + if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID)) + break; + + MainConsole.Instance.Output("Joining the estate failed. Please try again."); + } + } + } + } } -- cgit v1.1