diff options
author | lbsa71 | 2007-08-16 17:08:03 +0000 |
---|---|---|
committer | lbsa71 | 2007-08-16 17:08:03 +0000 |
commit | 25fd8d02738e61e81f93ac784b02ab84697ee528 (patch) | |
tree | db1dda71b3aa86770fa90ae84d4ac361a6fd84c7 /OpenSim/Region/Environment/Scenes/Scripting | |
parent | Deleted old inventoryCache.cs (diff) | |
download | opensim-SC_OLD-25fd8d02738e61e81f93ac784b02ab84697ee528.zip opensim-SC_OLD-25fd8d02738e61e81f93ac784b02ab84697ee528.tar.gz opensim-SC_OLD-25fd8d02738e61e81f93ac784b02ab84697ee528.tar.bz2 opensim-SC_OLD-25fd8d02738e61e81f93ac784b02ab84697ee528.tar.xz |
* Introduced IScriptHost as an interface to fetching object data from scripts.
* This meant introducing AbsolutePosition on all objects (since SimChat wants that)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scripting')
3 files changed, 41 insertions, 1 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs b/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs new file mode 100644 index 0000000..1c14264 --- /dev/null +++ b/OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs | |||
@@ -0,0 +1,14 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | |||
6 | namespace OpenSim.Region.Environment.Scenes.Scripting | ||
7 | { | ||
8 | public interface IScriptHost | ||
9 | { | ||
10 | string Name { get; } | ||
11 | LLUUID UUID { get; } | ||
12 | LLVector3 AbsolutePosition { get; } | ||
13 | } | ||
14 | } | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs b/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs new file mode 100644 index 0000000..a55c87e --- /dev/null +++ b/OpenSim/Region/Environment/Scenes/Scripting/NullScriptHost.cs | |||
@@ -0,0 +1,26 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | using libsecondlife; | ||
5 | |||
6 | namespace OpenSim.Region.Environment.Scenes.Scripting | ||
7 | { | ||
8 | public class NullScriptHost : IScriptHost | ||
9 | { | ||
10 | LLVector3 m_pos = new LLVector3( 128, 128, 30 ); | ||
11 | public string Name | ||
12 | { | ||
13 | get { return "Object"; } | ||
14 | } | ||
15 | |||
16 | public LLUUID UUID | ||
17 | { | ||
18 | get { return LLUUID.Zero; } | ||
19 | } | ||
20 | |||
21 | public LLVector3 AbsolutePosition | ||
22 | { | ||
23 | get { return m_pos; } | ||
24 | } | ||
25 | } | ||
26 | } | ||
diff --git a/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs b/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs index a5898b7..4617feb 100644 --- a/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs +++ b/OpenSim/Region/Environment/Scenes/Scripting/ScriptInterpretedAPI.cs | |||
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Scripting | |||
74 | [Obsolete("Unimplemented")] | 74 | [Obsolete("Unimplemented")] |
75 | public void osAddToLandPassList(Key avatar, float hours) | 75 | public void osAddToLandPassList(Key avatar, float hours) |
76 | { | 76 | { |
77 | Vector myPosition = Task.Pos; | 77 | Vector myPosition = Task.AbsolutePosition; |
78 | Land myParcel = Scene.LandManager.getLandObject(myPosition.X, myPosition.Y); | 78 | Land myParcel = Scene.LandManager.getLandObject(myPosition.X, myPosition.Y); |
79 | 79 | ||
80 | OpenSim.Framework.Console.MainLog.Instance.Warn("script", "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); | 80 | OpenSim.Framework.Console.MainLog.Instance.Warn("script", "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)"); |