mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 08:55:56 +08:00
* Introduced IScriptHost as an interface to fetching object data from scripts.
* This meant introducing AbsolutePosition on all objects (since SimChat wants that)
This commit is contained in:
14
OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs
Normal file
14
OpenSim/Region/Environment/Scenes/Scripting/IScriptHost.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
{
|
||||
public interface IScriptHost
|
||||
{
|
||||
string Name { get; }
|
||||
LLUUID UUID { get; }
|
||||
LLVector3 AbsolutePosition { get; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using libsecondlife;
|
||||
|
||||
namespace OpenSim.Region.Environment.Scenes.Scripting
|
||||
{
|
||||
public class NullScriptHost : IScriptHost
|
||||
{
|
||||
LLVector3 m_pos = new LLVector3( 128, 128, 30 );
|
||||
public string Name
|
||||
{
|
||||
get { return "Object"; }
|
||||
}
|
||||
|
||||
public LLUUID UUID
|
||||
{
|
||||
get { return LLUUID.Zero; }
|
||||
}
|
||||
|
||||
public LLVector3 AbsolutePosition
|
||||
{
|
||||
get { return m_pos; }
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -74,7 +74,7 @@ namespace OpenSim.Region.Scripting
|
||||
[Obsolete("Unimplemented")]
|
||||
public void osAddToLandPassList(Key avatar, float hours)
|
||||
{
|
||||
Vector myPosition = Task.Pos;
|
||||
Vector myPosition = Task.AbsolutePosition;
|
||||
Land myParcel = Scene.LandManager.getLandObject(myPosition.X, myPosition.Y);
|
||||
|
||||
OpenSim.Framework.Console.MainLog.Instance.Warn("script", "Unimplemented function called by script: osAddToLandPassList(Key avatar, float hours)");
|
||||
|
||||
Reference in New Issue
Block a user