diff options
Diffstat (limited to 'OpenSim/Framework/RegionInfo.cs')
-rw-r--r-- | OpenSim/Framework/RegionInfo.cs | 136 |
1 files changed, 15 insertions, 121 deletions
diff --git a/OpenSim/Framework/RegionInfo.cs b/OpenSim/Framework/RegionInfo.cs index 99edd99..ad98816 100644 --- a/OpenSim/Framework/RegionInfo.cs +++ b/OpenSim/Framework/RegionInfo.cs | |||
@@ -38,8 +38,8 @@ using OpenSim.Framework.Console; | |||
38 | 38 | ||
39 | 39 | ||
40 | namespace OpenSim.Framework | 40 | namespace OpenSim.Framework |
41 | { | 41 | { |
42 | public class RegionMeta7WindlightData : ICloneable | 42 | public class RegionLightShareData : ICloneable |
43 | { | 43 | { |
44 | public UUID regionID = UUID.Zero; | 44 | public UUID regionID = UUID.Zero; |
45 | public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f); | 45 | public Vector3 waterColor = new Vector3(4.0f,38.0f,64.0f); |
@@ -80,17 +80,17 @@ namespace OpenSim.Framework | |||
80 | public bool cloudScrollYLock = false; | 80 | public bool cloudScrollYLock = false; |
81 | public bool drawClassicClouds = true; | 81 | public bool drawClassicClouds = true; |
82 | 82 | ||
83 | public delegate void SaveDelegate(RegionMeta7WindlightData wl); | 83 | public delegate void SaveDelegate(RegionLightShareData wl); |
84 | public event SaveDelegate OnSave; | 84 | public event SaveDelegate OnSave; |
85 | public void Save() | 85 | public void Save() |
86 | { | 86 | { |
87 | if (OnSave != null) | 87 | if (OnSave != null) |
88 | OnSave(this); | 88 | OnSave(this); |
89 | } | 89 | } |
90 | public object Clone() | 90 | public object Clone() |
91 | { | 91 | { |
92 | return this.MemberwiseClone(); // call clone method | 92 | return this.MemberwiseClone(); // call clone method |
93 | } | 93 | } |
94 | 94 | ||
95 | } | 95 | } |
96 | 96 | ||
@@ -341,10 +341,6 @@ namespace OpenSim.Framework | |||
341 | private RegionSettings m_regionSettings; | 341 | private RegionSettings m_regionSettings; |
342 | // private IConfigSource m_configSource = null; | 342 | // private IConfigSource m_configSource = null; |
343 | 343 | ||
344 | public UUID MasterAvatarAssignedUUID = UUID.Zero; | ||
345 | public string MasterAvatarFirstName = String.Empty; | ||
346 | public string MasterAvatarLastName = String.Empty; | ||
347 | public string MasterAvatarSandboxPassword = String.Empty; | ||
348 | public UUID originRegionID = UUID.Zero; | 344 | public UUID originRegionID = UUID.Zero; |
349 | public string proxyUrl = ""; | 345 | public string proxyUrl = ""; |
350 | public int ProxyOffset = 0; | 346 | public int ProxyOffset = 0; |
@@ -360,7 +356,7 @@ namespace OpenSim.Framework | |||
360 | private bool m_clampPrimSize = false; | 356 | private bool m_clampPrimSize = false; |
361 | private int m_objectCapacity = 0; | 357 | private int m_objectCapacity = 0; |
362 | private string m_regionType = String.Empty; | 358 | private string m_regionType = String.Empty; |
363 | private RegionMeta7WindlightData m_windlight = new RegionMeta7WindlightData(); | 359 | private RegionLightShareData m_windlight = new RegionLightShareData(); |
364 | protected uint m_httpPort; | 360 | protected uint m_httpPort; |
365 | protected string m_serverURI; | 361 | protected string m_serverURI; |
366 | protected string m_regionName = String.Empty; | 362 | protected string m_regionName = String.Empty; |
@@ -499,13 +495,13 @@ namespace OpenSim.Framework | |||
499 | set { m_regionSettings = value; } | 495 | set { m_regionSettings = value; } |
500 | } | 496 | } |
501 | 497 | ||
502 | public RegionMeta7WindlightData WindlightSettings | 498 | public RegionLightShareData WindlightSettings |
503 | { | 499 | { |
504 | get | 500 | get |
505 | { | 501 | { |
506 | if (m_windlight == null) | 502 | if (m_windlight == null) |
507 | { | 503 | { |
508 | m_windlight = new RegionMeta7WindlightData(); | 504 | m_windlight = new RegionLightShareData(); |
509 | } | 505 | } |
510 | 506 | ||
511 | return m_windlight; | 507 | return m_windlight; |
@@ -658,7 +654,7 @@ namespace OpenSim.Framework | |||
658 | 654 | ||
659 | private void ReadNiniConfig(IConfigSource source, string name) | 655 | private void ReadNiniConfig(IConfigSource source, string name) |
660 | { | 656 | { |
661 | bool creatingNew = false; | 657 | // bool creatingNew = false; |
662 | 658 | ||
663 | if (source.Configs.Count == 0) | 659 | if (source.Configs.Count == 0) |
664 | { | 660 | { |
@@ -675,7 +671,7 @@ namespace OpenSim.Framework | |||
675 | 671 | ||
676 | source.AddConfig(name); | 672 | source.AddConfig(name); |
677 | 673 | ||
678 | creatingNew = true; | 674 | // creatingNew = true; |
679 | } | 675 | } |
680 | 676 | ||
681 | if (name == String.Empty) | 677 | if (name == String.Empty) |
@@ -685,7 +681,7 @@ namespace OpenSim.Framework | |||
685 | { | 681 | { |
686 | source.AddConfig(name); | 682 | source.AddConfig(name); |
687 | 683 | ||
688 | creatingNew = true; | 684 | // creatingNew = true; |
689 | } | 685 | } |
690 | 686 | ||
691 | IConfig config = source.Configs[name]; | 687 | IConfig config = source.Configs[name]; |
@@ -704,15 +700,8 @@ namespace OpenSim.Framework | |||
704 | 700 | ||
705 | RegionID = new UUID(regionUUID); | 701 | RegionID = new UUID(regionUUID); |
706 | originRegionID = RegionID; // What IS this?! | 702 | originRegionID = RegionID; // What IS this?! |
707 | 703 | ||
708 | |||
709 | // Region name | ||
710 | // | ||
711 | RegionName = name; | 704 | RegionName = name; |
712 | |||
713 | |||
714 | // Region location | ||
715 | // | ||
716 | string location = config.GetString("Location", String.Empty); | 705 | string location = config.GetString("Location", String.Empty); |
717 | 706 | ||
718 | if (location == String.Empty) | 707 | if (location == String.Empty) |
@@ -728,12 +717,9 @@ namespace OpenSim.Framework | |||
728 | 717 | ||
729 | 718 | ||
730 | // Datastore (is this implemented? Omitted from example!) | 719 | // Datastore (is this implemented? Omitted from example!) |
731 | // | ||
732 | DataStore = config.GetString("Datastore", String.Empty); | 720 | DataStore = config.GetString("Datastore", String.Empty); |
733 | 721 | ||
734 | |||
735 | // Internal IP | 722 | // Internal IP |
736 | // | ||
737 | IPAddress address; | 723 | IPAddress address; |
738 | 724 | ||
739 | if (config.Contains("InternalAddress")) | 725 | if (config.Contains("InternalAddress")) |
@@ -790,40 +776,6 @@ namespace OpenSim.Framework | |||
790 | else | 776 | else |
791 | m_externalHostName = externalName; | 777 | m_externalHostName = externalName; |
792 | 778 | ||
793 | // Master avatar cruft | ||
794 | // | ||
795 | string masterAvatarUUID; | ||
796 | if (!creatingNew) | ||
797 | { | ||
798 | masterAvatarUUID = config.GetString("MasterAvatarUUID", UUID.Zero.ToString()); | ||
799 | MasterAvatarFirstName = config.GetString("MasterAvatarFirstName", String.Empty); | ||
800 | MasterAvatarLastName = config.GetString("MasterAvatarLastName", String.Empty); | ||
801 | MasterAvatarSandboxPassword = config.GetString("MasterAvatarSandboxPassword", String.Empty); | ||
802 | } | ||
803 | else | ||
804 | { | ||
805 | masterAvatarUUID = MainConsole.Instance.CmdPrompt("Master Avatar UUID", UUID.Zero.ToString()); | ||
806 | if (masterAvatarUUID != UUID.Zero.ToString()) | ||
807 | { | ||
808 | config.Set("MasterAvatarUUID", masterAvatarUUID); | ||
809 | } | ||
810 | else | ||
811 | { | ||
812 | MasterAvatarFirstName = MainConsole.Instance.CmdPrompt("Master Avatar first name (enter for no master avatar)", String.Empty); | ||
813 | if (MasterAvatarFirstName != String.Empty) | ||
814 | { | ||
815 | MasterAvatarLastName = MainConsole.Instance.CmdPrompt("Master Avatar last name", String.Empty); | ||
816 | MasterAvatarSandboxPassword = MainConsole.Instance.CmdPrompt("Master Avatar sandbox password", String.Empty); | ||
817 | |||
818 | config.Set("MasterAvatarFirstName", MasterAvatarFirstName); | ||
819 | config.Set("MasterAvatarLastName", MasterAvatarLastName); | ||
820 | config.Set("MasterAvatarSandboxPassword", MasterAvatarSandboxPassword); | ||
821 | } | ||
822 | } | ||
823 | } | ||
824 | |||
825 | MasterAvatarAssignedUUID = new UUID(masterAvatarUUID); | ||
826 | |||
827 | m_regionType = config.GetString("RegionType", String.Empty); | 779 | m_regionType = config.GetString("RegionType", String.Empty); |
828 | 780 | ||
829 | // Prim stuff | 781 | // Prim stuff |
@@ -866,20 +818,6 @@ namespace OpenSim.Framework | |||
866 | 818 | ||
867 | config.Set("ExternalHostName", m_externalHostName); | 819 | config.Set("ExternalHostName", m_externalHostName); |
868 | 820 | ||
869 | if (MasterAvatarAssignedUUID != UUID.Zero) | ||
870 | { | ||
871 | config.Set("MasterAvatarUUID", MasterAvatarAssignedUUID.ToString()); | ||
872 | } | ||
873 | else if (MasterAvatarFirstName != String.Empty && MasterAvatarLastName != String.Empty) | ||
874 | { | ||
875 | config.Set("MasterAvatarFirstName", MasterAvatarFirstName); | ||
876 | config.Set("MasterAvatarLastName", MasterAvatarLastName); | ||
877 | } | ||
878 | if (MasterAvatarSandboxPassword != String.Empty) | ||
879 | { | ||
880 | config.Set("MasterAvatarSandboxPassword", MasterAvatarSandboxPassword); | ||
881 | } | ||
882 | |||
883 | if (m_nonphysPrimMax != 0) | 821 | if (m_nonphysPrimMax != 0) |
884 | config.Set("NonphysicalPrimMax", m_nonphysPrimMax); | 822 | config.Set("NonphysicalPrimMax", m_nonphysPrimMax); |
885 | if (m_physPrimMax != 0) | 823 | if (m_physPrimMax != 0) |
@@ -953,17 +891,6 @@ namespace OpenSim.Framework | |||
953 | configMember.addConfigurationOption("external_host_name", | 891 | configMember.addConfigurationOption("external_host_name", |
954 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 892 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
955 | "External Host Name", m_externalHostName, true); | 893 | "External Host Name", m_externalHostName, true); |
956 | configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, | ||
957 | "Master Avatar UUID", MasterAvatarAssignedUUID.ToString(), true); | ||
958 | configMember.addConfigurationOption("master_avatar_first", | ||
959 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | ||
960 | "First Name of Master Avatar", MasterAvatarFirstName, true); | ||
961 | configMember.addConfigurationOption("master_avatar_last", | ||
962 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | ||
963 | "Last Name of Master Avatar", MasterAvatarLastName, true); | ||
964 | configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | ||
965 | "(Sandbox Mode Only)Password for Master Avatar account", | ||
966 | MasterAvatarSandboxPassword, true); | ||
967 | configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, | 894 | configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, |
968 | "Last Map UUID", lastMapUUID.ToString(), true); | 895 | "Last Map UUID", lastMapUUID.ToString(), true); |
969 | configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 896 | configMember.addConfigurationOption("lastmap_refresh", ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
@@ -1013,22 +940,6 @@ namespace OpenSim.Framework | |||
1013 | configMember.addConfigurationOption("external_host_name", | 940 | configMember.addConfigurationOption("external_host_name", |
1014 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | 941 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, |
1015 | "External Host Name", "127.0.0.1", false); | 942 | "External Host Name", "127.0.0.1", false); |
1016 | configMember.addConfigurationOption("master_avatar_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, | ||
1017 | "Master Avatar UUID", UUID.Zero.ToString(), true); | ||
1018 | configMember.addConfigurationOption("master_avatar_first", | ||
1019 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | ||
1020 | "First Name of Master Avatar", "Test", false, | ||
1021 | (ConfigurationOption.ConfigurationOptionShouldBeAsked) | ||
1022 | shouldMasterAvatarDetailsBeAsked); | ||
1023 | configMember.addConfigurationOption("master_avatar_last", | ||
1024 | ConfigurationOption.ConfigurationTypes.TYPE_STRING_NOT_EMPTY, | ||
1025 | "Last Name of Master Avatar", "User", false, | ||
1026 | (ConfigurationOption.ConfigurationOptionShouldBeAsked) | ||
1027 | shouldMasterAvatarDetailsBeAsked); | ||
1028 | configMember.addConfigurationOption("master_avatar_pass", ConfigurationOption.ConfigurationTypes.TYPE_STRING, | ||
1029 | "(Sandbox Mode Only)Password for Master Avatar account", "test", false, | ||
1030 | (ConfigurationOption.ConfigurationOptionShouldBeAsked) | ||
1031 | shouldMasterAvatarDetailsBeAsked); | ||
1032 | configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, | 943 | configMember.addConfigurationOption("lastmap_uuid", ConfigurationOption.ConfigurationTypes.TYPE_UUID, |
1033 | "Last Map UUID", lastMapUUID.ToString(), true); | 944 | "Last Map UUID", lastMapUUID.ToString(), true); |
1034 | 945 | ||
@@ -1054,11 +965,6 @@ namespace OpenSim.Framework | |||
1054 | "Region Type", String.Empty, true); | 965 | "Region Type", String.Empty, true); |
1055 | } | 966 | } |
1056 | 967 | ||
1057 | public bool shouldMasterAvatarDetailsBeAsked(string configuration_key) | ||
1058 | { | ||
1059 | return MasterAvatarAssignedUUID == UUID.Zero; | ||
1060 | } | ||
1061 | |||
1062 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) | 968 | public bool handleIncomingConfiguration(string configuration_key, object configuration_result) |
1063 | { | 969 | { |
1064 | switch (configuration_key) | 970 | switch (configuration_key) |
@@ -1099,18 +1005,6 @@ namespace OpenSim.Framework | |||
1099 | m_externalHostName = Util.GetLocalHost().ToString(); | 1005 | m_externalHostName = Util.GetLocalHost().ToString(); |
1100 | } | 1006 | } |
1101 | break; | 1007 | break; |
1102 | case "master_avatar_uuid": | ||
1103 | MasterAvatarAssignedUUID = (UUID) configuration_result; | ||
1104 | break; | ||
1105 | case "master_avatar_first": | ||
1106 | MasterAvatarFirstName = (string) configuration_result; | ||
1107 | break; | ||
1108 | case "master_avatar_last": | ||
1109 | MasterAvatarLastName = (string) configuration_result; | ||
1110 | break; | ||
1111 | case "master_avatar_pass": | ||
1112 | MasterAvatarSandboxPassword = (string)configuration_result; | ||
1113 | break; | ||
1114 | case "lastmap_uuid": | 1008 | case "lastmap_uuid": |
1115 | lastMapUUID = (UUID)configuration_result; | 1009 | lastMapUUID = (UUID)configuration_result; |
1116 | break; | 1010 | break; |