當前位置: 首頁>>代碼示例>>C#>>正文


C# Scene.RequestModuleInterface方法代碼示例

本文整理匯總了C#中OpenSim.Region.Framework.Scenes.Scene.RequestModuleInterface方法的典型用法代碼示例。如果您正苦於以下問題:C# Scene.RequestModuleInterface方法的具體用法?C# Scene.RequestModuleInterface怎麽用?C# Scene.RequestModuleInterface使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在OpenSim.Region.Framework.Scenes.Scene的用法示例。


在下文中一共展示了Scene.RequestModuleInterface方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: Initialize

        public void Initialize(Scene scene, IConfigSource config)
        {
            if (config.Configs["Messaging"] != null)
            {
                // Allow disabling this module in config
                //
                if (config.Configs["Messaging"].GetString(
                        "InventoryTransferModule", "InventoryTransferModule") !=
                        "InventoryTransferModule")
                    return;
            }

            if (!m_Scenelist.Contains(scene))
            {
                if (m_Scenelist.Count == 0)
                {
                    m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
                    if (m_TransferModule == null)
                        m_log.Error("[INVENTORY TRANSFER]: No Message transfer module found, transfers will be local only");
                }

                m_Scenelist.Add(scene);

                scene.RegisterModuleInterface<IInventoryTransferModule>(this);

                scene.EventManager.OnNewClient += OnNewClient;
                scene.EventManager.OnClientClosed += ClientLoggedOut;
                scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;

                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
            }
        }
開發者ID:emperorstarfinder,項目名稱:halcyon,代碼行數:32,代碼來源:InventoryTransferModule.cs

示例2: Initialise

 public void Initialise(Scene scene, IConfigSource source)
 {
     m_scene = scene;
     m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
     m_scene.RegisterModuleInterface<IGodsModule>(this);
     m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
 }
開發者ID:BackupTheBerlios,項目名稱:seleon,代碼行數:7,代碼來源:GodsModule.cs

示例3: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;
			
            if (m_TransferModule == null)
            {
                m_TransferModule =
                    scene.RequestModuleInterface<IMessageTransferModule>();

                if (m_TransferModule == null)
                {
                    m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
                    "lures will not work!");

                    m_Enabled = false;
                    m_scenes.Clear();
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -=
                            OnGridInstantMessage;
                }
            }

        }
開發者ID:rknop,項目名稱:Aurora-Sim,代碼行數:25,代碼來源:LureModule.cs

示例4: RegionLoaded

 public void RegionLoaded(Scene scene)
 {
     m_scriptModule = scene.RequestModuleInterface<IScriptModule>();
     
     if (m_scriptModule != null)
         m_log.Info("[MODULE COMMANDS]: Script engine found, module active");
 }
開發者ID:openmetaversefoundation,項目名稱:fortis-opensim,代碼行數:7,代碼來源:ScriptModuleCommsModule.cs

示例5: AddRegion

 public void AddRegion(Scene scene)
 {
     m_scene = scene;
     m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>();
     m_scene.RegisterModuleInterface<IAttachmentsModule>(this);
     m_scene.EventManager.OnNewClient += SubscribeToClientEvents;
     // TODO: Should probably be subscribing to CloseClient too, but this doesn't yet give us IClientAPI
 }
開發者ID:NovaGrid,項目名稱:opensim,代碼行數:8,代碼來源:AttachmentsModule.cs

示例6: RegionLoaded

 public void RegionLoaded(Scene scene)
 {
     if (m_cache == null)
     {
         IImprovedAssetCache cache = scene.RequestModuleInterface<IImprovedAssetCache>();
         if (cache is ISharedRegionModule)
             m_cache = cache;
     }
 }
開發者ID:AlexRa,項目名稱:opensim-mods-Alex,代碼行數:9,代碼來源:SimianAssetServiceConnector.cs

示例7: RemoveRegion

 public void RemoveRegion(Scene scene)
 {
     ISyncMessagePosterService syncMessage = scene.RequestModuleInterface<ISyncMessagePosterService>();
     if (syncMessage != null)
         syncMessage.Post(SyncMessageHelper.LogoutRegionAgents(scene.RegionInfo.RegionHandle), scene.RegionInfo.RegionHandle);
     scene.EventManager.OnNewClient -= OnNewClient;
     scene.EventManager.OnClosingClient -= OnClosingClient;
     m_scenes.Remove (scene);
 }
開發者ID:rknop,項目名稱:Aurora-Sim,代碼行數:9,代碼來源:ActivityDetector.cs

示例8: AddRegion

 public void AddRegion(Scene scene)
 {
     if (ENABLED)
     {
         m_scene = scene;
         m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
         m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
     }
 }
開發者ID:hippie-b,項目名稱:opensim,代碼行數:9,代碼來源:DAExampleModule.cs

示例9: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;
            m_Generator = scene.RequestModuleInterface<IMapImageGenerator>();
            if (m_Generator == null)
            {
                m_Enabled = false;
                return;
            }

            m_log.Info("[WORLDVIEW]: Configured and enabled");
            ISimulationBase simulationBase = scene.RequestModuleInterface<ISimulationBase>();
            if (simulationBase != null)
            {
                IHttpServer server = simulationBase.GetHttpServer(0);
                server.AddStreamHandler(new WorldViewRequestHandler(this,
                        scene.RegionInfo.RegionID.ToString()));
            }
        }
開發者ID:kow,項目名稱:Aurora-Sim,代碼行數:20,代碼來源:WorldViewModule.cs

示例10: AddRegion

        public void AddRegion(Scene scene)
        {
            if (ENABLED)
            {
                m_scene = scene;
                m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
                m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();

                m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name);
            }
        }
開發者ID:BogusCurry,項目名稱:arribasim-dev,代碼行數:11,代碼來源:DAExampleModule.cs

示例11: Close

        public void Close(Scene scene)
        {
            //Deregister the interface
            scene.UnregisterModuleInterface<IGridRegisterModule>(this);

            m_log.InfoFormat("[RegisterRegionWithGrid]: Deregistering region {0} from the grid...", scene.RegionInfo.RegionName);

            //Deregister from the grid server
            IGridService GridService = scene.RequestModuleInterface<IGridService>();
            if (!GridService.DeregisterRegion(scene.RegionInfo.RegionID, scene.RegionInfo.GridSecureSessionID))
                m_log.WarnFormat("[RegisterRegionWithGrid]: Deregister from grid failed for region {0}", scene.RegionInfo.RegionName);
        }
開發者ID:mugginsm,項目名稱:Aurora-Sim,代碼行數:12,代碼來源:RegisterRegionWithGrid.cs

示例12: TerrainSyncInfo

        public TerrainSyncInfo(Scene scene, string actorID)
        {
            Scene = scene;
            LastUpdateValue = Scene.Heightmap.SaveToXmlString();
            ActorID = actorID;

            TerrainModule = scene.RequestModuleInterface<ITerrainModule>();
            if (TerrainModule == null)
                throw (new NullReferenceException("Could not get a reference to terrain module for region \"" + Scene.RegionInfo.RegionName + "\""));
            // Initialize time stamp to 0. Any changes anywhere will cause an update after initial load.
            LastUpdateTimeStamp = 0;
        }
開發者ID:QuillLittlefeather,項目名稱:DSG,代碼行數:12,代碼來源:TerrainSyncInfo.cs

示例13: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            m_scene = scene;

            IScriptModuleComms comms = scene.RequestModuleInterface<IScriptModuleComms>();
            if (comms != null)
            {
                comms.RegisterScriptInvocation( this, "llAttachToAvatarTemp");
                m_log.DebugFormat("[TEMP ATTACHS]: Registered script functions");
                m_console = scene.RequestModuleInterface<IRegionConsole>();

                if (m_console != null)
                {
                    m_console.AddCommand("TempAttachModule", false, "set auto_grant_attach_perms", "set auto_grant_attach_perms true|false", "Allow objects owned by the region owner or estate managers to obtain attach permissions without asking the user", SetAutoGrantAttachPerms);
                }
            }
            else
            {
                m_log.ErrorFormat("[TEMP ATTACHS]: Failed to register script functions");
            }
        }
開發者ID:BogusCurry,項目名稱:arribasim-dev,代碼行數:21,代碼來源:TempAttachmentsModule.cs

示例14: AddRegion

 public void AddRegion(Scene scene)
 {
     if (m_enabled)
     {
         scene.EventManager.OnRegisterCaps += delegate(UUID agentID, IHttpServer server)
         {
             return OnRegisterCaps(scene, agentID, server);
         };
         //Add this to the OpenRegionSettings module so we can inform the client about it
         IOpenRegionSettingsModule ORSM = scene.RequestModuleInterface<IOpenRegionSettingsModule>();
         if (ORSM != null)
             ORSM.RegisterGenericValue("Voice", "Mumble");
     }
 }
開發者ID:kow,項目名稱:Aurora-Sim,代碼行數:14,代碼來源:GenericVoiceModule.cs

示例15: RegionLoaded

        public void RegionLoaded(Scene scene)
        {
            if (!m_enabled)
                return;

            m_scene = scene;

            m_scriptModuleComms = scene.RequestModuleInterface<IScriptModuleComms>();

            if (m_scriptModuleComms == null)
            {
                m_log.Error("IScriptModuleComms could not be found, cannot add script functions");
                return;
            }

            m_scriptModuleComms.RegisterScriptInvocations(this);
        }
開發者ID:CCIR,項目名稱:TSU.CCIR.OpenSim.LSL,代碼行數:17,代碼來源:TSU.CCIR.OpenSim.LSL.cs


注:本文中的OpenSim.Region.Framework.Scenes.Scene.RequestModuleInterface方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。