diff options
author | Justin Clark-Casey (justincc) | 2013-01-15 21:13:22 +0000 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2013-01-15 21:13:22 +0000 |
commit | fccb03227e3f541a4c2f4e0e619074e4c1fb55dd (patch) | |
tree | aa37ee5014fe71bb07d1d4e296a7ac3821c84da4 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |
parent | Print full stacktrace from plugin loading failure to help determine what went... (diff) | |
download | opensim-SC_OLD-fccb03227e3f541a4c2f4e0e619074e4c1fb55dd.zip opensim-SC_OLD-fccb03227e3f541a4c2f4e0e619074e4c1fb55dd.tar.gz opensim-SC_OLD-fccb03227e3f541a4c2f4e0e619074e4c1fb55dd.tar.bz2 opensim-SC_OLD-fccb03227e3f541a4c2f4e0e619074e4c1fb55dd.tar.xz |
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.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs index ceb4660..071c60e 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LS_Api.cs | |||
@@ -61,10 +61,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
61 | internal bool m_LSFunctionsEnabled = false; | 61 | internal bool m_LSFunctionsEnabled = false; |
62 | internal IScriptModuleComms m_comms = null; | 62 | internal IScriptModuleComms m_comms = null; |
63 | 63 | ||
64 | public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item) | 64 | public void Initialize(IScriptInstance scriptInstance) |
65 | { | 65 | { |
66 | m_ScriptEngine = ScriptEngine; | 66 | m_ScriptEngine = scriptInstance.Engine; |
67 | m_host = host; | 67 | m_host = scriptInstance.Part; |
68 | 68 | ||
69 | if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false)) | 69 | if (m_ScriptEngine.Config.GetBoolean("AllowLightShareFunctions", false)) |
70 | m_LSFunctionsEnabled = true; | 70 | m_LSFunctionsEnabled = true; |
@@ -92,10 +92,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
92 | get { return m_ScriptEngine.World; } | 92 | get { return m_ScriptEngine.World; } |
93 | } | 93 | } |
94 | 94 | ||
95 | // | 95 | /// <summary> |
96 | //Dumps an error message on the debug console. | 96 | /// Dumps an error message on the debug console. |
97 | // | 97 | /// </summary> |
98 | |||
99 | internal void LSShoutError(string message) | 98 | internal void LSShoutError(string message) |
100 | { | 99 | { |
101 | if (message.Length > 1023) | 100 | if (message.Length > 1023) |