mirror of
https://github.com/opensim/opensim.git
synced 2026-08-01 14:16:07 +08:00
Implementing ability to register script constants and invocations on a region module automatically
This commit is contained in:
@@ -74,6 +74,14 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
/// <param name="methods"></param>
|
||||
void RegisterScriptInvocation(Type target, string[] methods);
|
||||
|
||||
/// <summary>
|
||||
/// Automatically register script invocations by checking for methods
|
||||
/// with <see cref="ScriptInvocationAttribute"/>. Should only check
|
||||
/// public methods.
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
void RegisterScriptInvocations(IRegionModuleBase target);
|
||||
|
||||
/// <summary>
|
||||
/// Returns an array of all registered script calls
|
||||
/// </summary>
|
||||
@@ -98,9 +106,24 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||
|
||||
/// For constants
|
||||
void RegisterConstant(string cname, object value);
|
||||
|
||||
/// <summary>
|
||||
/// Automatically register all constants on a region module by
|
||||
/// checking for fields with <see cref="ScriptConstantAttribute"/>.
|
||||
/// </summary>
|
||||
/// <param name="target"></param>
|
||||
void RegisterConstants(IRegionModuleBase target);
|
||||
object LookupModConstant(string cname);
|
||||
|
||||
// For use ONLY by the script API
|
||||
void RaiseEvent(UUID script, string id, string module, string command, string key);
|
||||
}
|
||||
|
||||
[AttributeUsage(AttributeTargets.Method)]
|
||||
public class ScriptInvocationAttribute : Attribute
|
||||
{ }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Field)]
|
||||
public class ScriptConstantAttribute : Attribute
|
||||
{ }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user