mirror of
https://github.com/opensim/opensim.git
synced 2026-08-11 11:57:03 +08:00
The 'Party Party Groupie Groupie Life is a game' commit:
* Added prototypical MoneyBalance support * Finalized konceptual touch wiring * Turned SimpleApp into a tedious harvesting game.
This commit is contained in:
@@ -91,16 +91,23 @@ namespace OpenSim.Region.Environment
|
||||
|
||||
#region Object Permissions
|
||||
|
||||
protected virtual bool GenericObjectPermission(LLUUID user, LLUUID obj)
|
||||
protected virtual bool GenericObjectPermission(LLUUID user, LLUUID objId)
|
||||
{
|
||||
// Default: deny
|
||||
bool permission = false;
|
||||
|
||||
// If it's not an object, we cant edit it.
|
||||
if (!(m_scene.Entities[obj] is SceneObjectGroup))
|
||||
if( !m_scene.Entities.ContainsKey( objId ))
|
||||
{
|
||||
return false;
|
||||
|
||||
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[obj];
|
||||
}
|
||||
|
||||
// If it's not an object, we cant edit it.
|
||||
if (!(m_scene.Entities[objId] is SceneObjectGroup))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objId];
|
||||
LLUUID taskOwner = null;
|
||||
|
||||
// Object owners should be able to edit their own content
|
||||
|
||||
@@ -752,7 +752,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
}
|
||||
}
|
||||
|
||||
public void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
public virtual void ProcessObjectGrab(uint localID, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
this.EventManager.TriggerObjectGrab(localID, offsetPos, remoteClient);
|
||||
}
|
||||
|
||||
@@ -863,5 +863,28 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
m_rootPart.Text = text;
|
||||
m_rootPart.ScheduleTerseUpdate();
|
||||
}
|
||||
|
||||
public void ObjectGrabHandler(uint localId, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
if( m_rootPart.LocalID == localId )
|
||||
{
|
||||
OnGrabGroup(offsetPos, remoteClient);
|
||||
}
|
||||
else
|
||||
{
|
||||
SceneObjectPart part = GetChildPrim(localId);
|
||||
OnGrabPart(part, offsetPos, remoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnGrabPart(SceneObjectPart part, LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
part.OnGrab(offsetPos, remoteClient);
|
||||
}
|
||||
|
||||
public virtual void OnGrabGroup(LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,6 +566,10 @@ namespace OpenSim.Region.Environment.Scenes
|
||||
public virtual void UpdateMovement()
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnGrab(LLVector3 offsetPos, IClientAPI remoteClient)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user