mirror of
https://github.com/opensim/opensim.git
synced 2026-07-30 13:16:33 +08:00
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
This commit is contained in:
@@ -122,6 +122,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
/// <param name="fname">The name of the function to invoke</param>
|
||||
/// <param name="parms">List of parameters</param>
|
||||
/// <returns>string result of the invocation</returns>
|
||||
public void modInvokeN(string fname, params object[] parms)
|
||||
{
|
||||
Type returntype = m_comms.LookupReturnType(fname);
|
||||
if (returntype != typeof(string))
|
||||
MODError(String.Format("return type mismatch for {0}",fname));
|
||||
|
||||
modInvoke(fname,parms);
|
||||
}
|
||||
|
||||
public LSL_String modInvokeS(string fname, params object[] parms)
|
||||
{
|
||||
Type returntype = m_comms.LookupReturnType(fname);
|
||||
@@ -243,7 +252,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||
// non-null but don't trust it completely
|
||||
try
|
||||
{
|
||||
object result = m_comms.InvokeOperation(m_itemID,fname,convertedParms);
|
||||
object result = m_comms.InvokeOperation(m_host.UUID, m_itemID, fname, convertedParms);
|
||||
if (result != null)
|
||||
return result;
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||
public interface IMOD_Api
|
||||
{
|
||||
// Invocation functions
|
||||
void modInvokeN(string fname, params object[] parms);
|
||||
LSL_String modInvokeS(string fname, params object[] parms);
|
||||
LSL_Integer modInvokeI(string fname, params object[] parms);
|
||||
LSL_Float modInvokeF(string fname, params object[] parms);
|
||||
|
||||
@@ -62,6 +62,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||
m_MOD_Functions = (IMOD_Api)api;
|
||||
}
|
||||
|
||||
public void modInvokeN(string fname, params object[] parms)
|
||||
{
|
||||
m_MOD_Functions.modInvokeN(fname, parms);
|
||||
}
|
||||
|
||||
public LSL_String modInvokeS(string fname, params object[] parms)
|
||||
{
|
||||
return m_MOD_Functions.modInvokeS(fname, parms);
|
||||
|
||||
Reference in New Issue
Block a user