mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 22:05:36 +08:00
* minor: method documentation
This commit is contained in:
@@ -149,6 +149,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Main loop for the manager thread
|
||||
/// </summary>
|
||||
private static void CmdHandlerThreadLoop()
|
||||
{
|
||||
while (true)
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// </summary>
|
||||
public class LSL_Api : MarshalByRefObject, ILSL_Api, IScriptApi
|
||||
{
|
||||
// private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
internal IScriptEngine m_ScriptEngine;
|
||||
internal SceneObjectPart m_host;
|
||||
@@ -7925,7 +7925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
}
|
||||
|
||||
public LSL_Types.LSLString llGetNotecardLine(string name, int line)
|
||||
{
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
foreach (TaskInventoryItem item in m_host.TaskInventory.Values)
|
||||
@@ -7935,6 +7935,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
UUID tid = AsyncCommands.
|
||||
DataserverPlugin.RegisterRequest(m_localID,
|
||||
m_itemID, item.AssetID.ToString());
|
||||
|
||||
if (NotecardCache.IsCached(item.AssetID))
|
||||
{
|
||||
AsyncCommands.
|
||||
@@ -7943,6 +7944,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// ScriptSleep(100);
|
||||
return tid.ToString();
|
||||
}
|
||||
|
||||
WithNotecard(item.AssetID, delegate (UUID id, AssetBase a)
|
||||
{
|
||||
System.Text.ASCIIEncoding enc =
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
|
||||
ds.startTime = DateTime.Now;
|
||||
|
||||
DataserverRequests[identifier]=ds;
|
||||
DataserverRequests[identifier] = ds;
|
||||
|
||||
return ds.ID;
|
||||
}
|
||||
@@ -90,7 +90,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
|
||||
if (!DataserverRequests.ContainsKey(identifier))
|
||||
return;
|
||||
|
||||
ds=DataserverRequests[identifier];
|
||||
ds = DataserverRequests[identifier];
|
||||
DataserverRequests.Remove(identifier);
|
||||
}
|
||||
|
||||
|
||||
@@ -161,17 +161,20 @@ namespace OpenSim.Region.ScriptEngine.Shared
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Holds all the data required to execute a scripting event.
|
||||
/// </summary>
|
||||
public class EventParams
|
||||
{
|
||||
public EventParams(string eventName, Object[] eventParams, DetectParams[] detectParams)
|
||||
{
|
||||
EventName=eventName;
|
||||
Params=eventParams;
|
||||
DetectParams=detectParams;
|
||||
EventName = eventName;
|
||||
Params = eventParams;
|
||||
DetectParams = detectParams;
|
||||
}
|
||||
|
||||
public string EventName;
|
||||
public Object[] Params;
|
||||
public DetectParams[] DetectParams;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ using System.Reflection;
|
||||
using System.Globalization;
|
||||
using System.Xml;
|
||||
using OpenMetaverse;
|
||||
using log4net;
|
||||
//using log4net;
|
||||
using Nini.Config;
|
||||
using Amib.Threading;
|
||||
using OpenSim.Framework;
|
||||
@@ -52,8 +52,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
{
|
||||
public class ScriptInstance : IScriptInstance
|
||||
{
|
||||
//private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IScriptEngine m_Engine;
|
||||
private IScriptWorkItem m_CurrentResult=null;
|
||||
private IScriptWorkItem m_CurrentResult = null;
|
||||
private Queue m_EventQueue = new Queue(32);
|
||||
private bool m_RunEvents = false;
|
||||
private UUID m_ItemID;
|
||||
@@ -455,6 +457,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Process the next event queued for this script
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public object EventProcessor()
|
||||
{
|
||||
EventParams data = null;
|
||||
@@ -470,6 +476,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
if (data.EventName == "timer")
|
||||
m_TimerQueued = false;
|
||||
}
|
||||
|
||||
//m_log.DebugFormat("[XENGINE]: Processing event {0} for {1}", data.EventName, this);
|
||||
|
||||
m_DetectParams = data.DetectParams;
|
||||
|
||||
@@ -721,5 +729,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
|
||||
return m_Apis[name];
|
||||
return null;
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return String.Format("{0} {1} on {2}", m_ScriptName, m_ItemID, m_PrimName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user