diff options
author | Melanie Thielker | 2008-09-21 22:16:17 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-09-21 22:16:17 +0000 |
commit | 1602ba61759ce90c38a589d017108c132881d953 (patch) | |
tree | f51b4c0716224718d8a1b69b184ab038578aa2e5 /OpenSim | |
parent | Change the scirpt engine loading mechanism. Script engines are now (diff) | |
download | opensim-SC-1602ba61759ce90c38a589d017108c132881d953.zip opensim-SC-1602ba61759ce90c38a589d017108c132881d953.tar.gz opensim-SC-1602ba61759ce90c38a589d017108c132881d953.tar.bz2 opensim-SC-1602ba61759ce90c38a589d017108c132881d953.tar.xz |
Allows to use the new script engine feature. Begin your script with
//XEngine: or //DotNetEnine: , optionally followed by a language
like //XEngine:lsl, and it will be run on the chosen engine.
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs index 4a4e808..9999d9c 100644 --- a/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs +++ b/OpenSim/Region/ScriptEngine/Common/ScriptEngineBase/EventManager.cs | |||
@@ -194,6 +194,15 @@ namespace OpenSim.Region.ScriptEngine.Common.ScriptEngineBase | |||
194 | 194 | ||
195 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) | 195 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) |
196 | { | 196 | { |
197 | if (script.Length > 15) | ||
198 | { | ||
199 | if (script.Substring(0, 15) == "//DotNetEngine:") | ||
200 | { | ||
201 | script = "//" + script.Substring(15); | ||
202 | engine = "DotNetEngine"; | ||
203 | } | ||
204 | } | ||
205 | |||
197 | if (engine != "DotNetEngine") | 206 | if (engine != "DotNetEngine") |
198 | return; | 207 | return; |
199 | 208 | ||
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs index c72d281..161fd8c 100644 --- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs +++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | |||
@@ -341,6 +341,15 @@ namespace OpenSim.Region.ScriptEngine.XEngine | |||
341 | 341 | ||
342 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) | 342 | public void OnRezScript(uint localID, UUID itemID, string script, int startParam, bool postOnRez, string engine) |
343 | { | 343 | { |
344 | if (script.Length > 10) | ||
345 | { | ||
346 | if (script.Substring(0, 10) == "//XEngine:") | ||
347 | { | ||
348 | script = "//" + script.Substring(10); | ||
349 | engine = "XEngine"; | ||
350 | } | ||
351 | } | ||
352 | |||
344 | if (engine != "XEngine") | 353 | if (engine != "XEngine") |
345 | return; | 354 | return; |
346 | 355 | ||