mirror of
https://github.com/opensim/opensim.git
synced 2026-07-31 13:55:35 +08:00
**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.
This commit is contained in:
@@ -146,6 +146,12 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
//
|
||||
// They are only forwarders to LSL_BuiltIn_Commands.cs
|
||||
//
|
||||
|
||||
public OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name)
|
||||
{
|
||||
return m_LSL_Functions.GetCommander(name);
|
||||
}
|
||||
|
||||
public double llSin(double f)
|
||||
{
|
||||
return m_LSL_Functions.llSin(f);
|
||||
|
||||
@@ -105,6 +105,12 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
get { return m_ScriptEngine.World; }
|
||||
}
|
||||
|
||||
// Extension commands use this:
|
||||
public ICommander GetCommander(string name)
|
||||
{
|
||||
return World.GetCommander(name);
|
||||
}
|
||||
|
||||
//These are the implementations of the various ll-functions used by the LSL scripts.
|
||||
//starting out, we use the System.Math library for trig functions. - ckrinke 8-14-07
|
||||
public double llSin(double f)
|
||||
|
||||
@@ -35,6 +35,8 @@ namespace OpenSim.Region.ScriptEngine.Common
|
||||
|
||||
string State { get; set; }
|
||||
|
||||
OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name);
|
||||
|
||||
double llSin(double f);
|
||||
double llCos(double f);
|
||||
double llTan(double f);
|
||||
|
||||
@@ -268,6 +268,24 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
l = enumCompileType.cs;
|
||||
}
|
||||
|
||||
// Insert additional assemblies here
|
||||
|
||||
//ADAM: Disabled for the moment until it's working right.
|
||||
bool enableCommanderLSL = false;
|
||||
|
||||
if (enableCommanderLSL == true && l == enumCompileType.cs)
|
||||
{
|
||||
foreach (KeyValuePair<string,
|
||||
OpenSim.Region.Environment.Interfaces.ICommander> com
|
||||
in m_scriptEngine.World.GetCommanders())
|
||||
{
|
||||
compileScript = com.Value.GenerateRuntimeAPI() + compileScript;
|
||||
}
|
||||
}
|
||||
|
||||
// End of insert
|
||||
|
||||
|
||||
switch (l)
|
||||
{
|
||||
case enumCompileType.cs:
|
||||
@@ -280,6 +298,11 @@ namespace OpenSim.Region.ScriptEngine.DotNetEngine.Compiler.LSL
|
||||
compileScript = CreateJSCompilerScript(compileScript);
|
||||
break;
|
||||
}
|
||||
|
||||
Console.WriteLine("\n\n\n");
|
||||
Console.WriteLine(compileScript);
|
||||
Console.WriteLine("\n\n\n");
|
||||
|
||||
return CompileFromDotNetText(compileScript, l);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user