rename AttachmentsModule.ShowDetachInUserInventory() to DetachSingleAttachmentToInv() for consistency and to reflect it's actual behaviour
parent
014cd4f8bb
commit
97b207240e
|
@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory;
|
||||
client.OnObjectAttach += AttachObject;
|
||||
client.OnObjectDetach += DetachObject;
|
||||
client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory;
|
||||
client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv;
|
||||
}
|
||||
|
||||
public void UnsubscribeFromClientEvents(IClientAPI client)
|
||||
|
@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory;
|
||||
client.OnObjectAttach -= AttachObject;
|
||||
client.OnObjectDetach -= DetachObject;
|
||||
client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory;
|
||||
client.OnDetachAttachmentIntoInv -= DetachSingleAttachmentToInv;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -269,7 +269,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
if (updateInventoryStatus)
|
||||
{
|
||||
if (att == null)
|
||||
ShowDetachInUserInventory(itemID, sp.ControllingClient);
|
||||
DetachSingleAttachmentToInv(itemID, sp.ControllingClient);
|
||||
else
|
||||
ShowAttachInUserInventory(att, sp, itemID, AttachmentPt);
|
||||
}
|
||||
|
@ -417,12 +417,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments
|
|||
SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID);
|
||||
if (group != null)
|
||||
{
|
||||
//group.DetachToGround();
|
||||
ShowDetachInUserInventory(group.GetFromItemID(), remoteClient);
|
||||
DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient);
|
||||
}
|
||||
}
|
||||
|
||||
public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient)
|
||||
public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient)
|
||||
{
|
||||
ScenePresence presence;
|
||||
if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence))
|
||||
|
|
|
@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests
|
|||
|
||||
m_attMod.RezSingleAttachmentFromInventory(
|
||||
presence.ControllingClient, attItemId, (uint)AttachmentPoint.Chest);
|
||||
m_attMod.ShowDetachInUserInventory(attItemId, presence.ControllingClient);
|
||||
m_attMod.DetachSingleAttachmentToInv(attItemId, presence.ControllingClient);
|
||||
|
||||
// Check status on scene presence
|
||||
Assert.That(presence.HasAttachments(), Is.False);
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent);
|
||||
|
||||
/// <summary>
|
||||
/// Attach an object to an avatar.
|
||||
/// Attach an object to an avatar
|
||||
/// </summary>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="grp"></param>
|
||||
|
@ -110,11 +110,11 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient);
|
||||
|
||||
/// <summary>
|
||||
/// Update the user inventory to show a detach.
|
||||
/// Detach the given item so that it remains in the user's inventory.
|
||||
/// </summary>
|
||||
/// <param name="itemID">/param>
|
||||
/// <param name="remoteClient"></param>
|
||||
void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient);
|
||||
void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient);
|
||||
|
||||
/// <summary>
|
||||
/// Update the position of an attachment.
|
||||
|
@ -126,18 +126,10 @@ namespace OpenSim.Region.Framework.Interfaces
|
|||
/// <summary>
|
||||
/// Update the user inventory with a changed attachment
|
||||
/// </summary>
|
||||
/// <param name="remoteClient">
|
||||
/// A <see cref="IClientAPI"/>
|
||||
/// </param>
|
||||
/// <param name="grp">
|
||||
/// A <see cref="SceneObjectGroup"/>
|
||||
/// </param>
|
||||
/// <param name="itemID">
|
||||
/// A <see cref="UUID"/>
|
||||
/// </param>
|
||||
/// <param name="agentID">
|
||||
/// A <see cref="UUID"/>
|
||||
/// </param>
|
||||
/// <param name="remoteClient"></param>
|
||||
/// <param name="grp"></param>
|
||||
/// <param name="itemID"></param>
|
||||
/// <param name="agentID"></param>
|
||||
void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3031,7 +3031,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule;
|
||||
if (attachmentsModule != null)
|
||||
attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient);
|
||||
attachmentsModule.DetachSingleAttachmentToInv(itemID, presence.ControllingClient);
|
||||
}
|
||||
|
||||
public void llTakeCamera(string avatar)
|
||||
|
|
Loading…
Reference in New Issue