* Rigged up LSL Script Engine to OpenSim - not quite fully tied yet however, still lacks connection to ScriptInterpretedAPI. (but Hello World should work!)

afrisby
Adam Frisby 2007-07-16 18:06:35 +00:00
parent ac4f8745ba
commit ddf73763db
2 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Region.Scripting;
using OpenSim.Region.Scripting.LSL;
namespace OpenSim.Region.Scripting.LSL
{
class LSLScript : IScript
{
ScriptInfo scriptInfo;
LSL.Engine lindenScriptEngine;
public LSLScript(string filename)
{
lindenScriptEngine = new Engine();
lindenScriptEngine.Start(filename);
}
public void Initialise(ScriptInfo info)
{
scriptInfo = info;
}
public string getName()
{
return "LSL Script";
}
}
}

View File

@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Text;
using OpenSim.Region.Scripting;
using OpenSim.Region.Scripting.LSL;
namespace OpenSim.Region.Scripting
{
public class LSLEngine : IScriptCompiler
{
public string FileExt()
{
return ".lso";
}
public Dictionary<string, IScript> compile(string filename)
{
LSLScript script = new LSLScript(filename);
Dictionary<string, IScript> returns = new Dictionary<string, IScript>();
returns.Add(filename, script);
return returns;
}
}
}