diff options
author | Mic Bowman | 2012-03-15 13:16:02 -0700 |
---|---|---|
committer | Mic Bowman | 2012-03-15 13:16:02 -0700 |
commit | 402ff75d781d6f4e38eee8884d7b4411bb756c9b (patch) | |
tree | d51e46418d1edab07c762dc0b7c37bb0c6333177 /OpenSim/Region/Framework/Interfaces | |
parent | Remove property/field duplication in ScriptInstance where it's unnecessary. (diff) | |
download | opensim-SC_OLD-402ff75d781d6f4e38eee8884d7b4411bb756c9b.zip opensim-SC_OLD-402ff75d781d6f4e38eee8884d7b4411bb756c9b.tar.gz opensim-SC_OLD-402ff75d781d6f4e38eee8884d7b4411bb756c9b.tar.bz2 opensim-SC_OLD-402ff75d781d6f4e38eee8884d7b4411bb756c9b.tar.xz |
Adds a new script command 'modInvoke' to invoke registered functions
from region modules. The LSL translator is extended to generate the
modInvoke format of commands for directly inlined function calls.
A region module can register a function Test() with the name "Test".
LSL code can call that function as "Test()". The compiler will translate
that invocation into modInvoke("Test", ...)
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs index d7fa316..bb4c788 100644 --- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs +++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs | |||
@@ -31,6 +31,7 @@ using OpenMetaverse; | |||
31 | namespace OpenSim.Region.Framework.Interfaces | 31 | namespace OpenSim.Region.Framework.Interfaces |
32 | { | 32 | { |
33 | public delegate void ScriptCommand(UUID script, string id, string module, string command, string k); | 33 | public delegate void ScriptCommand(UUID script, string id, string module, string command, string k); |
34 | public delegate object ScriptInvocation(UUID script, object[] parms); | ||
34 | 35 | ||
35 | /// <summary> | 36 | /// <summary> |
36 | /// Interface for communication between OpenSim modules and in-world scripts | 37 | /// Interface for communication between OpenSim modules and in-world scripts |
@@ -45,6 +46,15 @@ namespace OpenSim.Region.Framework.Interfaces | |||
45 | /// </summary> | 46 | /// </summary> |
46 | event ScriptCommand OnScriptCommand; | 47 | event ScriptCommand OnScriptCommand; |
47 | 48 | ||
49 | void RegisterScriptInvocation(string name, ScriptInvocation fn, Type[] csig, Type rsig); | ||
50 | |||
51 | ScriptInvocation LookupScriptInvocation(string fname); | ||
52 | string LookupModInvocation(string fname); | ||
53 | Type[] LookupTypeSignature(string fname); | ||
54 | Type LookupReturnType(string fname); | ||
55 | |||
56 | object InvokeOperation(UUID scriptId, string fname, params object[] parms); | ||
57 | |||
48 | /// <summary> | 58 | /// <summary> |
49 | /// Send a link_message event to an in-world script | 59 | /// Send a link_message event to an in-world script |
50 | /// </summary> | 60 | /// </summary> |