From 3456d951d89fbc83f742d40ca8ca2a1a79d414eb Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 28 Jun 2007 13:13:17 +0000 Subject: Imported the scripting changes, so now should be up to date with sugilite. --- .../Environment/Scenes/scripting/ScriptInfo.cs | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs (limited to 'OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs') diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs new file mode 100644 index 0000000..57df4c4 --- /dev/null +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs @@ -0,0 +1,58 @@ +/* +* Copyright (c) Contributors, http://www.openmetaverse.org/ +* See CONTRIBUTORS.TXT for a full list of copyright holders. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* * Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* * Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* * Neither the name of the OpenSim Project nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS AND ANY +* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY +* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* +*/ +using System; +using System.Collections.Generic; +using System.Text; + +using OpenSim.Region.Environment.Scenes; +using OpenSim.Framework.Console; + +namespace OpenSim.Scripting +{ + /// + /// Class which provides access to the world + /// + public class ScriptInfo + { + // Reference to world.eventsManager provided for convenience + public EventManager events; + + // The main world + public Scene world; + + // The console + public LogBase logger; + + public ScriptInfo(Scene scene) + { + world = scene; + events = world.eventManager; + logger = OpenSim.Framework.Console.MainLog.Instance; + } + } +} -- cgit v1.1 From 561db23e5fbfcd110423c6a408ac0a11bebbedac Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 28 Jun 2007 14:10:05 +0000 Subject: Finished removing the old scripting code, Scene.Scripting.cs and OpenSim.Framework.Interfaces.Scripting. --- OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs') diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs index 57df4c4..522a572 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs @@ -32,7 +32,7 @@ using System.Text; using OpenSim.Region.Environment.Scenes; using OpenSim.Framework.Console; -namespace OpenSim.Scripting +namespace OpenSim.Region.Enviorment.Scripting { /// /// Class which provides access to the world -- cgit v1.1 From 9b6b6d05d45cf0f754a0b26bf6240ef50be66563 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 3 Jul 2007 14:37:29 +0000 Subject: * Optimized usings (the 'LL ate my scripts' commit) * added some licensing info --- OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs') diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs index 522a572..d984d60 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs @@ -25,12 +25,8 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ -using System; -using System.Collections.Generic; -using System.Text; - -using OpenSim.Region.Environment.Scenes; using OpenSim.Framework.Console; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Enviorment.Scripting { @@ -52,7 +48,7 @@ namespace OpenSim.Region.Enviorment.Scripting { world = scene; events = world.eventManager; - logger = OpenSim.Framework.Console.MainLog.Instance; + logger = MainLog.Instance; } } } -- cgit v1.1 From 3c46e5b170991e41e8c82e25bae65cf46152b924 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 5 Jul 2007 00:09:45 +0000 Subject: * Added Java support back into Sugilite (although it still needs a calling host to be added). --- OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs') diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs index d984d60..ed6f033 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInfo.cs @@ -28,7 +28,7 @@ using OpenSim.Framework.Console; using OpenSim.Region.Environment.Scenes; -namespace OpenSim.Region.Enviorment.Scripting +namespace OpenSim.Region.Environment.Scripting { /// /// Class which provides access to the world @@ -44,11 +44,15 @@ namespace OpenSim.Region.Enviorment.Scripting // The console public LogBase logger; + // API Access + public ScriptAPI api; + public ScriptInfo(Scene scene) { world = scene; events = world.eventManager; logger = MainLog.Instance; + api = new ScriptAPI(scene); } } } -- cgit v1.1