本文整理汇总了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>();
}
}
示例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;
}
示例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;
}
}
}
示例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");
}
示例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
}
示例6: RegionLoaded
public void RegionLoaded(Scene scene)
{
if (m_cache == null)
{
IImprovedAssetCache cache = scene.RequestModuleInterface<IImprovedAssetCache>();
if (cache is ISharedRegionModule)
m_cache = cache;
}
}
示例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);
}
示例8: AddRegion
public void AddRegion(Scene scene)
{
if (ENABLED)
{
m_scene = scene;
m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove;
m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>();
}
}
示例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()));
}
}
示例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);
}
}
示例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);
}
示例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;
}
示例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");
}
}
示例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");
}
}
示例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);
}