mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 17:55:48 +08:00
Merge branch 'master' into careminster
This commit is contained in:
@@ -126,14 +126,30 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
|
||||
m_scriptModule.PostScriptEvent(script, "link_message", args);
|
||||
}
|
||||
|
||||
public void RegisterScriptInvocation(string fname, ScriptInvocation fcall, Type[] csig, Type rsig)
|
||||
public void RegisterScriptInvocation(ScriptInvocation fcall)
|
||||
{
|
||||
lock (m_scriptInvocation)
|
||||
{
|
||||
m_scriptInvocation[fname] = new ScriptInvocationData(fname,fcall,csig,rsig);
|
||||
ParameterInfo[] parameters = fcall.Method.GetParameters ();
|
||||
Type[] parmTypes = new Type[parameters.Length];
|
||||
for (int i = 0 ; i < parameters.Length ; i++)
|
||||
parmTypes[i] = parameters[i].ParameterType;
|
||||
m_scriptInvocation[fcall.Method.Name] = new ScriptInvocationData(fcall.Method.Name, fcall, parmTypes, fcall.Method.ReturnType);
|
||||
}
|
||||
}
|
||||
|
||||
public ScriptInvocation[] GetScriptInvocationList()
|
||||
{
|
||||
List<ScriptInvocation> ret = new List<ScriptInvocation>();
|
||||
|
||||
lock (m_scriptInvocation)
|
||||
{
|
||||
foreach (ScriptInvocationData d in m_scriptInvocation.Values)
|
||||
ret.Add(d.ScriptInvocationFn);
|
||||
}
|
||||
return ret.ToArray();
|
||||
}
|
||||
|
||||
public string LookupModInvocation(string fname)
|
||||
{
|
||||
lock (m_scriptInvocation)
|
||||
@@ -147,6 +163,14 @@ namespace OpenSim.Region.CoreModules.Scripting.ScriptModuleComms
|
||||
return "modInvokeI";
|
||||
else if (sid.ReturnType == typeof(float))
|
||||
return "modInvokeF";
|
||||
else if (sid.ReturnType == typeof(UUID))
|
||||
return "modInvokeK";
|
||||
else if (sid.ReturnType == typeof(OpenMetaverse.Vector3))
|
||||
return "modInvokeV";
|
||||
else if (sid.ReturnType == typeof(OpenMetaverse.Quaternion))
|
||||
return "modInvokeR";
|
||||
else if (sid.ReturnType == typeof(object[]))
|
||||
return "modInvokeL";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user