From fadd19f3140107d7c09e7a82a97dfb490146ccb9 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 30 Mar 2008 09:03:38 +0000 Subject: **Big ass update warning** * Renamed plugin console message, to send a message to a plugin, use either "plugin ", or any unrecognised message will be sent ("plugin" sends explicitly) This replaces the old "script ". * Terrain commands - "terrain " now works again. "Script terrain " 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. --- OpenSim/Region/ScriptEngine/Common/BuiltIn_Commands_BaseClass.cs | 6 ++++++ OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs | 6 ++++++ .../Region/ScriptEngine/Common/LSL_BuiltIn_Commands_Interface.cs | 2 ++ 3 files changed, 14 insertions(+) (limited to 'OpenSim/Region/ScriptEngine/Common') 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 // // 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); 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 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) 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 string State { get; set; } + OpenSim.Region.Environment.Interfaces.ICommander GetCommander(string name); + double llSin(double f); double llCos(double f); double llTan(double f); -- cgit v1.1