aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Application/OpenSimBase.cs
diff options
context:
space:
mode:
authorMelanie2010-08-18 00:59:20 +0100
committerMelanie2010-08-18 00:59:20 +0100
commite74809ff4c7fd67ceb5336e5d8e7811591f6cce3 (patch)
tree3e878fb80be75106631d76a12b8da9e65e98f7b9 /OpenSim/Region/Application/OpenSimBase.cs
parentMerge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/ca... (diff)
parent* Changed a few OSD.FromBinary() calls to the more accurate OSD.FromULong() t... (diff)
downloadopensim-SC_OLD-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.zip
opensim-SC_OLD-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.tar.gz
opensim-SC_OLD-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.tar.bz2
opensim-SC_OLD-e74809ff4c7fd67ceb5336e5d8e7811591f6cce3.tar.xz
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/Application/OpenSimBase.cs')
-rw-r--r--OpenSim/Region/Application/OpenSimBase.cs62
1 files changed, 60 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/OpenSimBase.cs b/OpenSim/Region/Application/OpenSimBase.cs
index fc67f94..c08da18 100644
--- a/OpenSim/Region/Application/OpenSimBase.cs
+++ b/OpenSim/Region/Application/OpenSimBase.cs
@@ -395,9 +395,13 @@ namespace OpenSim
395 scene.SnmpService.BootInfo("Creating region texture", scene); 395 scene.SnmpService.BootInfo("Creating region texture", scene);
396 } 396 }
397 397
398 // moved these here as the terrain texture has to be created after the modules are initialized 398 // moved these here as the map texture has to be created after the modules are initialized
399 // and has to happen before the region is registered with the grid. 399 // and has to happen before the region is registered with the grid.
400 scene.CreateTerrainTexture(); 400 IWorldMapModule mapModule = scene.RequestModuleInterface<IWorldMapModule>();
401 if (mapModule != null)
402 mapModule.GenerateMaptile();
403 else
404 m_log.WarnFormat("[STARTUP]: No map module available to generate map tile");
401 405
402 // TODO : Try setting resource for region xstats here on scene 406 // TODO : Try setting resource for region xstats here on scene
403 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo)); 407 MainServer.Instance.AddStreamHandler(new Region.Framework.Scenes.RegionStatsHandler(regionInfo));
@@ -867,6 +871,60 @@ namespace OpenSim
867 { 871 {
868 regionnum = m_sceneManager.Scenes.Count; 872 regionnum = m_sceneManager.Scenes.Count;
869 } 873 }
874
875 /// <summary>
876 /// Load the estate information for the provided RegionInfo object.
877 /// </summary>
878 /// <param name="regInfo">
879 /// A <see cref="RegionInfo"/>
880 /// </param>
881 public void PopulateRegionEstateInfo(RegionInfo regInfo)
882 {
883 if (m_storageManager.EstateDataStore != null)
884 {
885 regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, false);
886 }
887
888 if (regInfo.EstateSettings.EstateID == 0) // No record at all
889 {
890 MainConsole.Instance.Output("Your region is not part of an estate.");
891 while (true)
892 {
893 string response = MainConsole.Instance.CmdPrompt("Do you wish to join an existing estate?", "no", new List<string>() {"yes", "no"});
894 if (response == "no")
895 {
896 // Create a new estate
897 regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(regInfo.RegionID, true);
898
899 regInfo.EstateSettings.EstateName = MainConsole.Instance.CmdPrompt("New estate name", regInfo.EstateSettings.EstateName);
900 //regInfo.EstateSettings.Save();
901 break;
902 }
903 else
904 {
905 response = MainConsole.Instance.CmdPrompt("Estate name to join", "None");
906 if (response == "None")
907 continue;
908
909 List<int> estateIDs = m_storageManager.EstateDataStore.GetEstates(response);
910 if (estateIDs.Count < 1)
911 {
912 MainConsole.Instance.Output("The name you have entered matches no known estate. Please try again");
913 continue;
914 }
915
916 int estateID = estateIDs[0];
917
918 regInfo.EstateSettings = m_storageManager.EstateDataStore.LoadEstateSettings(estateID);
919
920 if (m_storageManager.EstateDataStore.LinkRegion(regInfo.RegionID, estateID))
921 break;
922
923 MainConsole.Instance.Output("Joining the estate failed. Please try again.");
924 }
925 }
926 }
927 }
870 } 928 }
871 929
872 930