diff options
author | Adam Frisby | 2007-07-17 23:04:46 +0000 |
---|---|---|
committer | Adam Frisby | 2007-07-17 23:04:46 +0000 |
commit | c287ee17ad72f2fb38fd8f779566a672664349d4 (patch) | |
tree | 1ca9f149f2522c4cb27964993f740457f5b18ff8 | |
parent | * Added exception handler to deal with RemotingExceptions for Child Agents. (diff) | |
download | opensim-SC-c287ee17ad72f2fb38fd8f779566a672664349d4.zip opensim-SC-c287ee17ad72f2fb38fd8f779566a672664349d4.tar.gz opensim-SC-c287ee17ad72f2fb38fd8f779566a672664349d4.tar.bz2 opensim-SC-c287ee17ad72f2fb38fd8f779566a672664349d4.tar.xz |
* Working more on the Interpreted Script API (for use in scripts which have to occupy something [Hello LSL])
-rw-r--r-- | OpenSim/Region/Environment/Scenes/scripting/ScriptInterpretedAPI.cs | 49 |
1 files changed, 49 insertions, 0 deletions
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; | |||
7 | using LSLList = System.Collections.Generic.List<string>; | 7 | using LSLList = System.Collections.Generic.List<string>; |
8 | 8 | ||
9 | using OpenSim.Region.Environment.Scenes; | 9 | using OpenSim.Region.Environment.Scenes; |
10 | using OpenSim.Region.Environment.LandManagement; | ||
10 | 11 | ||
11 | namespace OpenSim.Region.Scripting | 12 | namespace OpenSim.Region.Scripting |
12 | { | 13 | { |
@@ -16,6 +17,49 @@ namespace OpenSim.Region.Scripting | |||
16 | /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> | 17 | /// <remarks>Avoid at all costs. This should ONLY be used for LSL.</remarks> |
17 | class ScriptInterpretedAPI | 18 | class ScriptInterpretedAPI |
18 | { | 19 | { |
20 | protected libsecondlife.LLUUID m_object; | ||
21 | protected Scene m_scene; | ||
22 | |||
23 | /// <summary> | ||
24 | /// The scene in which this script is acting | ||
25 | /// </summary> | ||
26 | public Scene World | ||
27 | { | ||
28 | get { return m_scene; } | ||
29 | } | ||
30 | |||
31 | /// <summary> | ||
32 | /// The id of the object our script is supposed to be acting in | ||
33 | /// </summary> | ||
34 | public Key ObjectID | ||
35 | { | ||
36 | get { return m_object; } | ||
37 | } | ||
38 | |||
39 | /// <summary> | ||
40 | /// The object our script is supposed to be in | ||
41 | /// </summary> | ||
42 | public SceneObject Task | ||
43 | { | ||
44 | get { return World.Objects[ObjectID]; } | ||
45 | } | ||
46 | |||
47 | /// <summary> | ||
48 | /// Creates a new ScriptInterpretedAPI for a specified object | ||
49 | /// </summary> | ||
50 | /// <param name="world">The scene the object is located in</param> | ||
51 | /// <param name="member">The specific member being 'occupied' by the script</param> | ||
52 | public ScriptInterpretedAPI(Scene world, libsecondlife.LLUUID member) | ||
53 | { | ||
54 | m_object = world; | ||
55 | m_object = member; | ||
56 | } | ||
57 | |||
58 | /// <summary> | ||
59 | /// Returns the absolute number of a integer value. | ||
60 | /// </summary> | ||
61 | /// <param name="val">Input</param> | ||
62 | /// <returns>Absolute number of input</returns> | ||
19 | public int osAbs(int val) | 63 | public int osAbs(int val) |
20 | { | 64 | { |
21 | return Math.Abs(val); | 65 | return Math.Abs(val); |
@@ -29,6 +73,11 @@ namespace OpenSim.Region.Scripting | |||
29 | [Obsolete("Unimplemented")] | 73 | [Obsolete("Unimplemented")] |
30 | public void osAddToLandPassList(Key avatar, float hours) | 74 | public void osAddToLandPassList(Key avatar, float hours) |
31 | { | 75 | { |
76 | int parcelID = 0; | ||
77 | |||
78 | Vector myPosition = Task.Pos; | ||
79 | Land myParcel = World.LandManager.getLandObject(myPosition.X, myPosition.Y, myPosition.Z); | ||
80 | |||
32 | OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); | 81 | OpenSim.Framework.Console.MainLog.Instance.Warn("Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); |
33 | return; | 82 | return; |
34 | } | 83 | } |