aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
authorMelanie2012-11-04 22:01:34 +0100
committerMelanie2012-11-04 22:39:15 +0000
commitf391d028de3aff0cc49d024d855555253eb8c02c (patch)
tree1124ccaa60a3df9e69cc0234923e074da77d48f3 /OpenSim
parentBulletSim: update the DLLs and SOs (diff)
downloadopensim-SC-f391d028de3aff0cc49d024d855555253eb8c02c.zip
opensim-SC-f391d028de3aff0cc49d024d855555253eb8c02c.tar.gz
opensim-SC-f391d028de3aff0cc49d024d855555253eb8c02c.tar.bz2
opensim-SC-f391d028de3aff0cc49d024d855555253eb8c02c.tar.xz
Add a method to query all registered script constants to allow non-XEngine
script engines to use them.
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs16
-rw-r--r--OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs2
2 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
index 98396ff..dc54c3f 100644
--- a/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/ScriptModuleComms/ScriptModuleCommsModule.cs
@@ -361,6 +361,22 @@ namespace OpenSim.Region.OptionalModules.Scripting.ScriptModuleComms
361 return null; 361 return null;
362 } 362 }
363 363
364 /// <summary>
365 /// Get all registered constants
366 /// </summary>
367 public Dictionary<string, object> GetConstants()
368 {
369 Dictionary<string, object> ret = new Dictionary<string, object>();
370
371 lock (m_constants)
372 {
373 foreach (KeyValuePair<string, object> kvp in m_constants)
374 ret[kvp.Key] = kvp.Value;
375 }
376
377 return ret;
378 }
379
364#endregion 380#endregion
365 381
366 } 382 }
diff --git a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
index 93930ce..70ff954 100644
--- a/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
+++ b/OpenSim/Region/Framework/Interfaces/IScriptModuleComms.cs
@@ -27,6 +27,7 @@
27 27
28using System; 28using System;
29using System.Reflection; 29using System.Reflection;
30using System.Collections.Generic;
30using OpenMetaverse; 31using OpenMetaverse;
31 32
32namespace OpenSim.Region.Framework.Interfaces 33namespace OpenSim.Region.Framework.Interfaces
@@ -131,6 +132,7 @@ namespace OpenSim.Region.Framework.Interfaces
131 /// <param name="cname">Name of constant</param> 132 /// <param name="cname">Name of constant</param>
132 /// <returns>Value of constant or null if none found.</returns> 133 /// <returns>Value of constant or null if none found.</returns>
133 object LookupModConstant(string cname); 134 object LookupModConstant(string cname);
135 Dictionary<string, object> GetConstants();
134 136
135 // For use ONLY by the script API 137 // For use ONLY by the script API
136 void RaiseEvent(UUID script, string id, string module, string command, string key); 138 void RaiseEvent(UUID script, string id, string module, string command, string key);