mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
Instead of passing separate engine, part and item components to script APIs, pass down IScriptInstance instead.
This is to allow the future co-operative script thread terminate feature to detect and act upon termination requests. This splits the assembly and state loading out from the ScriptInstance() constructor to a separate Load() method in order to facilititate continued script logic regression testing.
This commit is contained in:
@@ -61,10 +61,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
internal bool m_LSFunctionsEnabled = false;
|
||||
internal IScriptModuleComms m_comms = null;
|
||||
|
||||
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
||||
public void Initialize(IScriptInstance scriptInstance)
|
||||
{
|
||||
m_ScriptEngine = ScriptEngine;
|
||||
m_host = host;
|
||||
m_ScriptEngine = scriptInstance.Engine;
|
||||
m_host = scriptInstance.Part;
|
||||
|
||||
if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false))
|
||||
m_LSFunctionsEnabled = true;
|
||||
@@ -92,10 +92,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
get { return m_ScriptEngine.World; }
|
||||
}
|
||||
|
||||
//
|
||||
//Dumps an error message on the debug console.
|
||||
//
|
||||
|
||||
/// <summary>
|
||||
/// Dumps an error message on the debug console.
|
||||
/// </summary>
|
||||
internal void LSShoutError(string message)
|
||||
{
|
||||
if (message.Length > 1023)
|
||||
|
||||
Reference in New Issue
Block a user