当前位置: 首页>>代码示例>>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;未经允许,请勿转载。