diff options
author | Justin Clark-Casey (justincc) | 2011-08-23 22:05:22 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-08-23 22:05:22 +0100 |
commit | 97b207240ee79abfec08d2dfaa9385211eb305c8 (patch) | |
tree | 29d5e9b2be525ae6395f07faca267486a0ddebf4 /OpenSim | |
parent | remove mono compiler warnings (diff) | |
download | opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.zip opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.tar.gz opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.tar.bz2 opensim-SC-97b207240ee79abfec08d2dfaa9385211eb305c8.tar.xz |
rename AttachmentsModule.ShowDetachInUserInventory() to DetachSingleAttachmentToInv() for consistency and to reflect it's actual behaviour
Diffstat (limited to 'OpenSim')
4 files changed, 14 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs index 90092ce..a854c11 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/AttachmentsModule.cs | |||
@@ -80,7 +80,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
80 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; | 80 | client.OnRezMultipleAttachmentsFromInv += RezMultipleAttachmentsFromInventory; |
81 | client.OnObjectAttach += AttachObject; | 81 | client.OnObjectAttach += AttachObject; |
82 | client.OnObjectDetach += DetachObject; | 82 | client.OnObjectDetach += DetachObject; |
83 | client.OnDetachAttachmentIntoInv += ShowDetachInUserInventory; | 83 | client.OnDetachAttachmentIntoInv += DetachSingleAttachmentToInv; |
84 | } | 84 | } |
85 | 85 | ||
86 | public void UnsubscribeFromClientEvents(IClientAPI client) | 86 | public void UnsubscribeFromClientEvents(IClientAPI client) |
@@ -89,7 +89,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
89 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; | 89 | client.OnRezMultipleAttachmentsFromInv -= RezMultipleAttachmentsFromInventory; |
90 | client.OnObjectAttach -= AttachObject; | 90 | client.OnObjectAttach -= AttachObject; |
91 | client.OnObjectDetach -= DetachObject; | 91 | client.OnObjectDetach -= DetachObject; |
92 | client.OnDetachAttachmentIntoInv -= ShowDetachInUserInventory; | 92 | client.OnDetachAttachmentIntoInv -= DetachSingleAttachmentToInv; |
93 | } | 93 | } |
94 | 94 | ||
95 | /// <summary> | 95 | /// <summary> |
@@ -269,7 +269,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
269 | if (updateInventoryStatus) | 269 | if (updateInventoryStatus) |
270 | { | 270 | { |
271 | if (att == null) | 271 | if (att == null) |
272 | ShowDetachInUserInventory(itemID, sp.ControllingClient); | 272 | DetachSingleAttachmentToInv(itemID, sp.ControllingClient); |
273 | else | 273 | else |
274 | ShowAttachInUserInventory(att, sp, itemID, AttachmentPt); | 274 | ShowAttachInUserInventory(att, sp, itemID, AttachmentPt); |
275 | } | 275 | } |
@@ -417,12 +417,11 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments | |||
417 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); | 417 | SceneObjectGroup group = m_scene.GetGroupByPrim(objectLocalID); |
418 | if (group != null) | 418 | if (group != null) |
419 | { | 419 | { |
420 | //group.DetachToGround(); | 420 | DetachSingleAttachmentToInv(group.GetFromItemID(), remoteClient); |
421 | ShowDetachInUserInventory(group.GetFromItemID(), remoteClient); | ||
422 | } | 421 | } |
423 | } | 422 | } |
424 | 423 | ||
425 | public void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient) | 424 | public void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient) |
426 | { | 425 | { |
427 | ScenePresence presence; | 426 | ScenePresence presence; |
428 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) | 427 | if (m_scene.TryGetScenePresence(remoteClient.AgentId, out presence)) |
diff --git a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs index 6f242e5..6695a9d 100644 --- a/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs +++ b/OpenSim/Region/CoreModules/Avatar/Attachments/Tests/AttachmentsModuleTests.cs | |||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Attachments.Tests | |||
130 | 130 | ||
131 | m_attMod.RezSingleAttachmentFromInventory( | 131 | m_attMod.RezSingleAttachmentFromInventory( |
132 | presence.ControllingClient, attItemId, (uint)AttachmentPoint.Chest); | 132 | presence.ControllingClient, attItemId, (uint)AttachmentPoint.Chest); |
133 | m_attMod.ShowDetachInUserInventory(attItemId, presence.ControllingClient); | 133 | m_attMod.DetachSingleAttachmentToInv(attItemId, presence.ControllingClient); |
134 | 134 | ||
135 | // Check status on scene presence | 135 | // Check status on scene presence |
136 | Assert.That(presence.HasAttachments(), Is.False); | 136 | Assert.That(presence.HasAttachments(), Is.False); |
diff --git a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs index e012885..0c82411 100644 --- a/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs +++ b/OpenSim/Region/Framework/Interfaces/IAttachmentsModule.cs | |||
@@ -47,7 +47,7 @@ namespace OpenSim.Region.Framework.Interfaces | |||
47 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); | 47 | IClientAPI remoteClient, uint objectLocalID, uint AttachmentPt, bool silent); |
48 | 48 | ||
49 | /// <summary> | 49 | /// <summary> |
50 | /// Attach an object to an avatar. | 50 | /// Attach an object to an avatar |
51 | /// </summary> | 51 | /// </summary> |
52 | /// <param name="remoteClient"></param> | 52 | /// <param name="remoteClient"></param> |
53 | /// <param name="grp"></param> | 53 | /// <param name="grp"></param> |
@@ -110,11 +110,11 @@ namespace OpenSim.Region.Framework.Interfaces | |||
110 | void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient); | 110 | void DetachSingleAttachmentToGround(UUID itemID, IClientAPI remoteClient); |
111 | 111 | ||
112 | /// <summary> | 112 | /// <summary> |
113 | /// Update the user inventory to show a detach. | 113 | /// Detach the given item so that it remains in the user's inventory. |
114 | /// </summary> | 114 | /// </summary> |
115 | /// <param name="itemID">/param> | 115 | /// <param name="itemID">/param> |
116 | /// <param name="remoteClient"></param> | 116 | /// <param name="remoteClient"></param> |
117 | void ShowDetachInUserInventory(UUID itemID, IClientAPI remoteClient); | 117 | void DetachSingleAttachmentToInv(UUID itemID, IClientAPI remoteClient); |
118 | 118 | ||
119 | /// <summary> | 119 | /// <summary> |
120 | /// Update the position of an attachment. | 120 | /// Update the position of an attachment. |
@@ -126,18 +126,10 @@ namespace OpenSim.Region.Framework.Interfaces | |||
126 | /// <summary> | 126 | /// <summary> |
127 | /// Update the user inventory with a changed attachment | 127 | /// Update the user inventory with a changed attachment |
128 | /// </summary> | 128 | /// </summary> |
129 | /// <param name="remoteClient"> | 129 | /// <param name="remoteClient"></param> |
130 | /// A <see cref="IClientAPI"/> | 130 | /// <param name="grp"></param> |
131 | /// </param> | 131 | /// <param name="itemID"></param> |
132 | /// <param name="grp"> | 132 | /// <param name="agentID"></param> |
133 | /// A <see cref="SceneObjectGroup"/> | ||
134 | /// </param> | ||
135 | /// <param name="itemID"> | ||
136 | /// A <see cref="UUID"/> | ||
137 | /// </param> | ||
138 | /// <param name="agentID"> | ||
139 | /// A <see cref="UUID"/> | ||
140 | /// </param> | ||
141 | void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID); | 133 | void UpdateKnownItem(IClientAPI remoteClient, SceneObjectGroup grp, UUID itemID, UUID agentID); |
142 | } | 134 | } |
143 | } | 135 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 24be7d4..ffa0e24 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -3031,7 +3031,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
3031 | 3031 | ||
3032 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; | 3032 | IAttachmentsModule attachmentsModule = m_ScriptEngine.World.AttachmentsModule; |
3033 | if (attachmentsModule != null) | 3033 | if (attachmentsModule != null) |
3034 | attachmentsModule.ShowDetachInUserInventory(itemID, presence.ControllingClient); | 3034 | attachmentsModule.DetachSingleAttachmentToInv(itemID, presence.ControllingClient); |
3035 | } | 3035 | } |
3036 | 3036 | ||
3037 | public void llTakeCamera(string avatar) | 3037 | public void llTakeCamera(string avatar) |