aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
diff options
context:
space:
mode:
authorubit2012-08-02 18:21:08 +0200
committerubit2012-08-02 18:21:08 +0200
commit254d3e1ad31f99770074abb49fec03c90d99b246 (patch)
treefe2d2337f0fffec0f44a9f35442d73c8fe78fda3 /OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
parenti local libs commit (diff)
parentMerge branch 'master' into careminster (diff)
downloadopensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.zip
opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.gz
opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.bz2
opensim-SC-254d3e1ad31f99770074abb49fec03c90d99b246.tar.xz
merge crap gerge branch 'ubitwork' of ssh://3dhosting.de/var/git/careminster into ubitwork
Conflicts: bin/Regions/Regions.ini.example bin/lib32/BulletSim.dll bin/lib32/libBulletSim.so bin/lib64/BulletSim.dll bin/lib64/libBulletSim.so
Diffstat (limited to 'OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs')
-rw-r--r--OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index 74a85e2..705a847 100644
--- a/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/OptionalModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -46,6 +46,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms
46 private static readonly ILog m_log = 46 private static readonly ILog m_log =
47 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 47 LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
48 48
49 private Dictionary<string,object> m_constants = new Dictionary<string,object>();
50
49#region ScriptInvocation 51#region ScriptInvocation
50 protected class ScriptInvocationData 52 protected class ScriptInvocationData
51 { 53 {
@@ -269,6 +271,37 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms
269 Delegate fn = LookupScriptInvocation(fname); 271 Delegate fn = LookupScriptInvocation(fname);
270 return fn.DynamicInvoke(olist.ToArray()); 272 return fn.DynamicInvoke(olist.ToArray());
271 } 273 }
274
275 /// <summary>
276 /// Operation to for a region module to register a constant to be used
277 /// by the script engine
278 /// </summary>
279 public void RegisterConstant(string cname, object value)
280 {
281 m_log.DebugFormat("[MODULE COMMANDS] register constant <{0}> with value {1}",cname,value.ToString());
282 lock (m_constants)
283 {
284 m_constants.Add(cname,value);
285 }
286 }
287
288 /// <summary>
289 /// Operation to check for a registered constant
290 /// </summary>
291 public object LookupModConstant(string cname)
292 {
293 // m_log.DebugFormat("[MODULE COMMANDS] lookup constant <{0}>",cname);
294
295 lock (m_constants)
296 {
297 object value = null;
298 if (m_constants.TryGetValue(cname,out value))
299 return value;
300 }
301
302 return null;
303 }
304
272#endregion 305#endregion
273 306
274 } 307 }