Ejemplo n.º 1
0
        private void RegionManager_Load(object sender, EventArgs e)
        {
            IOpenRegionSettingsConnector orsc = DataManager.DataManager.RequestPlugin <IOpenRegionSettingsConnector>();

            if (orsc != null)
            {
                string navUrl = orsc.AddOpenRegionSettingsHTMLPage(CurrentRegionID);
                //string navUrl = BuildRegionManagerHTTPPage(CurrentRegionID);
                webBrowser1.Navigate(navUrl);
            }
        }
        public string GetOpenRegionSettingsHTMLPage(UUID regionID)
        {
            object remoteValue = InternalDoRemote(regionID);

            if (remoteValue != null || m_doRemoteOnly)
            {
                return((string)remoteValue);
            }

            IOpenRegionSettingsConnector orsc = DataManager.DataManager.RequestPlugin <IOpenRegionSettingsConnector>();

            if (orsc != null)
            {
                return(orsc.AddOpenRegionSettingsHTMLPage(regionID));
            }
            return("");
        }
Ejemplo n.º 3
0
        public OSD BuildOpenRegionInfo(IScenePresence sp)
        {
            OSDMap map = new OSDMap();

            OSDMap body = new OSDMap();


            IOpenRegionSettingsConnector orsc = DataManager.DataManager.RequestPlugin <IOpenRegionSettingsConnector>();

            if (orsc != null)
            {
                if (sp.Scene.Permissions.CanIssueEstateCommand(sp.UUID, false))
                {
                    body.Add("EditURL", OSD.FromString(orsc.AddOpenRegionSettingsHTMLPage(sp.Scene.RegionInfo.RegionID)));
                }
            }

            if (m_settings.MaxDragDistance != -1)
            {
                body.Add("MaxDragDistance", OSD.FromReal(m_settings.MaxDragDistance));
            }

            if (m_settings.DefaultDrawDistance != -1)
            {
                body.Add("DrawDistance", OSD.FromReal(m_settings.DefaultDrawDistance));
                body.Add("ForceDrawDistance", OSD.FromInteger(m_settings.ForceDrawDistance ? 1 : 0));
            }

            if (m_settings.MaximumPrimScale != -1)
            {
                body.Add("MaxPrimScale", OSD.FromReal(m_settings.MaximumPrimScale));
            }
            if (m_settings.MinimumPrimScale != -1)
            {
                body.Add("MinPrimScale", OSD.FromReal(m_settings.MinimumPrimScale));
            }
            if (m_settings.MaximumPhysPrimScale != -1)
            {
                body.Add("MaxPhysPrimScale", OSD.FromReal(m_settings.MaximumPhysPrimScale));
            }

            if (m_settings.MaximumHollowSize != -1)
            {
                body.Add("MaxHollowSize", OSD.FromReal(m_settings.MaximumHollowSize));
            }
            if (m_settings.MinimumHoleSize != -1)
            {
                body.Add("MinHoleSize", OSD.FromReal(m_settings.MinimumHoleSize));
            }
            body.Add("EnforceMaxBuild", OSD.FromInteger(m_settings.ClampPrimSizes ? 1 : 0));

            if (m_settings.MaximumLinkCount != -1)
            {
                body.Add("MaxLinkCount", OSD.FromInteger(m_settings.MaximumLinkCount));
            }
            if (m_settings.MaximumLinkCountPhys != -1)
            {
                body.Add("MaxLinkCountPhys", OSD.FromInteger(m_settings.MaximumLinkCountPhys));
            }

            body.Add("LSLFunctions", m_settings.LSLCommands);

            body.Add("WhisperDistance", OSD.FromReal(m_settings.WhisperDistance));
            body.Add("SayDistance", OSD.FromReal(m_settings.SayDistance));
            body.Add("ShoutDistance", OSD.FromReal(m_settings.ShoutDistance));

            body.Add("RenderWater", OSD.FromInteger(m_settings.RenderWater ? 1 : 0));

            body.Add("TerrainDetailScale", OSD.FromReal(m_settings.TerrainDetailScale));

            if (m_settings.MaximumInventoryItemsTransfer != -1)
            {
                body.Add("MaxInventoryItemsTransfer", OSD.FromInteger(m_settings.MaximumInventoryItemsTransfer));
            }

            body.Add("AllowMinimap", OSD.FromInteger(m_settings.DisplayMinimap ? 1 : 0));
            body.Add("AllowPhysicalPrims", OSD.FromInteger(m_settings.AllowPhysicalPrims ? 1 : 0));
            body.Add("OffsetOfUTC", OSD.FromInteger(m_settings.OffsetOfUTC));
            body.Add("OffsetOfUTCDST", OSD.FromInteger(m_settings.OffsetOfUTCDST ? 1 : 0));
            body.Add("ToggleTeenMode", OSD.FromInteger(m_settings.EnableTeenMode ? 1 : 0));
            body.Add("SetTeenMode", OSD.FromInteger(m_settings.SetTeenMode ? 1 : 0));

            body.Add("ShowTags", OSD.FromInteger(m_settings.ShowTags));
            if (m_settings.MaxGroups != -1)
            {
                body.Add("MaxGroups", OSD.FromInteger(m_settings.MaxGroups));
            }
            body.Add("AllowParcelWindLight", OSD.FromInteger(m_settings.AllowParcelWindLight ? 1 : 0));

            //Add all the generic ones
            foreach (KeyValuePair <string, string> KVP in additionalKVPs)
            {
                body.Add(KVP.Key, OSD.FromString(KVP.Value));
            }

            map.Add("body", body);
            map.Add("message", OSD.FromString("OpenRegionInfo"));
            return(map);
        }