Add a method to query all registered script constants to allow non-XEngine
script engines to use them.0.7.4-extended
parent
96454ddee2
commit
b2b6fd6aad
|
@ -302,6 +302,22 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get all registered constants
|
||||||
|
/// </summary>
|
||||||
|
public Dictionary<string, object> GetConstants()
|
||||||
|
{
|
||||||
|
Dictionary<string, object> ret = new Dictionary<string, object>();
|
||||||
|
|
||||||
|
lock (m_constants)
|
||||||
|
{
|
||||||
|
foreach (KeyValuePair<string, object> kvp in m_constants)
|
||||||
|
ret[kvp.Key] = kvp.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using System.Collections.Generic;
|
||||||
using OpenMetaverse;
|
using OpenMetaverse;
|
||||||
|
|
||||||
namespace OpenSim.Region.Framework.Interfaces
|
namespace OpenSim.Region.Framework.Interfaces
|
||||||
|
@ -92,6 +93,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
/// For constants
|
/// For constants
|
||||||
void RegisterConstant(string cname, object value);
|
void RegisterConstant(string cname, object value);
|
||||||
object LookupModConstant(string cname);
|
object LookupModConstant(string cname);
|
||||||
|
Dictionary<string, object> GetConstants();
|
||||||
|
|
||||||
// For use ONLY by the script API
|
// For use ONLY by the script API
|
||||||
void RaiseEvent(UUID script, string id, string module, string command, string key);
|
void RaiseEvent(UUID script, string id, string module, string command, string key);
|
||||||
|
|
Loading…
Reference in New Issue