diff --git a/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs b/OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs index b4a6019ba0..5153ed346f 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; }