From c287ee17ad72f2fb38fd8f779566a672664349d4 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Tue, 17 Jul 2007 23:04:46 +0000 Subject: * Working more on the Interpreted Script API (for use in scripts which have to occupy something [Hello LSL]) --- .../Scenes/scripting/ScriptInterpretedAPI.cs | 49 ++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'OpenSim/Region/Environment/Scenes') diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs index b4a6019..5153ed3 100644 --- a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs +++ b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs @@ -7,6 +7,7 @@ using Vector = libsecondlife.LLVector3; using LSLList = System.Collections.Generic.List; using OpenSim.Region.Environment.Scenes; +using OpenSim.Region.Environment.LandManagement; namespace OpenSim.Region.Scripting { @@ -16,6 +17,49 @@ namespace OpenSim.Region.Scripting /// Avoid at all costs. This should ONLY be used for LSL. class ScriptInterpretedAPI { + protected libsecondlife.LLUUID m_object; + protected Scene m_scene; + + /// + /// The scene in which this script is acting + /// + public Scene World + { + get { return m_scene; } + } + + /// + /// The id of the object our script is supposed to be acting in + /// + public Key ObjectID + { + get { return m_object; } + } + + /// + /// The object our script is supposed to be in + /// + public SceneObject Task + { + get { return World.Objects[ObjectID]; } + } + + /// + /// Creates a new ScriptInterpretedAPI for a specified object + /// + /// The scene the object is located in + /// The specific member being 'occupied' by the script + public ScriptInterpretedAPI(Scene world, libsecondlife.LLUUID member) + { + m_object = world; + m_object = member; + } + + /// + /// Returns the absolute number of a integer value. + /// + /// Input + /// Absolute number of input public int osAbs(int val) { return Math.Abs(val); @@ -29,6 +73,11 @@ namespace OpenSim.Region.Scripting [Obsolete("Unimplemented")] public void osAddToLandPassList(Key avatar, float hours) { + int parcelID = 0; + + Vector myPosition = Task.Pos; + Land myParcel = World.LandManager.getLandObject(myPosition.X, myPosition.Y, myPosition.Z); + OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); return; } -- cgit v1.1