aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine
diff options
context:
space:
mode:
authorAdam Frisby2008-03-30 09:03:38 +0000
committerAdam Frisby2008-03-30 09:03:38 +0000
commitfadd19f3140107d7c09e7a82a97dfb490146ccb9 (patch)
tree3ce4581ef1af79d451f0b24ce50128f09482f386 /OpenSim/Region/ScriptEngine
parentThis update has good news and bad news, first the bad. (diff)
downloadopensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.zip
opensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.tar.gz
opensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.tar.bz2
opensim-SC_OLD-fadd19f3140107d7c09e7a82a97dfb490146ccb9.tar.xz
**Big ass update warning**
* Renamed plugin console message, to send a message to a plugin, use either "plugin <message>", or any unrecognised message will be sent ("plugin" sends explicitly) This replaces the old "script <message>". * Terrain commands - "terrain <command>" now works again. "Script terrain <command>" does not. Many of the commands have now been reimplemented, eg load-tile. However some have new syntax. * New console command handler, you can now use things like "terrain help" or "terrain save help". See TerrainModule.cs for an example of how to use the new "Commander" class. * Commander class - advanced processing of console input and also enables a script API to be generated from registered console commands.
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs6
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs2
-rw-r--r--OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs23
4 files changed, 37 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
index 9cb1d12..c878e7c 100644
--- a/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
+++ b/OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs
@@ -146,6 +146,12 @@ namespace OpenSim.Region.ScriptEngine.Common
146 // 146 //
147 // They are only forwarders to LSL_BuiltIn_Commands.cs 147 // They are only forwarders to LSL_BuiltIn_Commands.cs
148 // 148 //
149
150 public OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name)
151 {
152 return m_LSL_Functions.GetCommander(name);
153 }
154
149 public double llSin(double f) 155 public double llSin(double f)
150 { 156 {
151 return m_LSL_Functions.llSin(f); 157 return m_LSL_Functions.llSin(f);
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index c02d869..749761e 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -105,6 +105,12 @@ namespace OpenSim.Region.ScriptEngine.Common
105 get { return m_ScriptEngine.World; } 105 get { return m_ScriptEngine.World; }
106 } 106 }
107 107
108 // Extension commands use this:
109 public ICommander GetCommander(string name)
110 {
111 return World.GetCommander(name);
112 }
113
108 //These are the implementations of the various ll-functions used by the LSL scripts. 114 //These are the implementations of the various ll-functions used by the LSL scripts.
109 //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07 115 //starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07
110 public double llSin(double f) 116 public double llSin(double f)
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
index baa07ba..9708941 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs
@@ -35,6 +35,8 @@ namespace OpenSim.Region.ScriptEngine.Common
35 35
36 string State { get; set; } 36 string State { get; set; }
37 37
38 OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name);
39
38 double llSin(double f); 40 double llSin(double f);
39 double llCos(double f); 41 double llCos(double f);
40 double llTan(double f); 42 double llTan(double f);
diff --git a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
index fefa7ac..fada7aa 100644
--- a/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
+++ b/OpenSim/Region/ScriptEngine/DotNetEngine/Compiler/LSL/Compiler.cs
@@ -268,6 +268,24 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
268 l = enumCompileType.cs; 268 l = enumCompileType.cs;
269 } 269 }
270 270
271 // Insert additional assemblies here
272
273 //ADAM: Disabled for the moment until it's working right.
274 bool enableCommanderLSL = false;
275
276 if (enableCommanderLSL == true && l == enumCompileType.cs)
277 {
278 foreach (KeyValuePair<string,
279 OpenSim.Region.Environment.Interfaces.ICommander> com
280 in m_scriptEngine.World.GetCommanders())
281 {
282 compileScript = com.Value.GenerateRuntimeAPI() + compileScript;
283 }
284 }
285
286 // End of insert
287
288
271 switch (l) 289 switch (l)
272 { 290 {
273 case enumCompileType.cs: 291 case enumCompileType.cs:
@@ -280,6 +298,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
280 compileScript = CreateJSCompilerScript(compileScript); 298 compileScript = CreateJSCompilerScript(compileScript);
281 break; 299 break;
282 } 300 }
301
302 Console.WriteLine("\n\n\n");
303 Console.WriteLine(compileScript);
304 Console.WriteLine("\n\n\n");
305
283 return CompileFromDotNetText(compileScript, l); 306 return CompileFromDotNetText(compileScript, l);
284 } 307 }
285 308