diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs | 54 |
1 files changed, 2 insertions, 52 deletions
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs index 5552317..8b8758e 100644 --- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs +++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs | |||
@@ -51,7 +51,6 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 51 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
52 | 52 | ||
53 | private Scene m_scene; | 53 | private Scene m_scene; |
54 | // private IAvatarFactoryModule m_avatarFactory; | ||
55 | 54 | ||
56 | public string Name { get { return "Scene Commands Module"; } } | 55 | public string Name { get { return "Scene Commands Module"; } } |
57 | 56 | ||
@@ -77,6 +76,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
77 | // m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); | 76 | // m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); |
78 | 77 | ||
79 | m_scene = scene; | 78 | m_scene = scene; |
79 | |||
80 | m_scene.RegisterModuleInterface<ISceneCommandsModule>(this); | ||
80 | } | 81 | } |
81 | 82 | ||
82 | public void RemoveRegion(Scene scene) | 83 | public void RemoveRegion(Scene scene) |
@@ -222,56 +223,5 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments | |||
222 | } | 223 | } |
223 | } | 224 | } |
224 | } | 225 | } |
225 | |||
226 | private void GetAttachmentsReport(ScenePresence sp, StringBuilder sb) | ||
227 | { | ||
228 | sb.AppendFormat("Attachments for {0}\n", sp.Name); | ||
229 | |||
230 | ConsoleDisplayTable ct = new ConsoleDisplayTable() { Indent = 2 }; | ||
231 | ct.Columns.Add(new ConsoleDisplayTableColumn("Attachment Name", 50)); | ||
232 | ct.Columns.Add(new ConsoleDisplayTableColumn("Local ID", 10)); | ||
233 | ct.Columns.Add(new ConsoleDisplayTableColumn("Item ID", 36)); | ||
234 | ct.Columns.Add(new ConsoleDisplayTableColumn("Attach Point", 14)); | ||
235 | ct.Columns.Add(new ConsoleDisplayTableColumn("Position", 15)); | ||
236 | |||
237 | // sb.AppendFormat( | ||
238 | // " {0,-36} {1,-10} {2,-36} {3,-14} {4,-15}\n", | ||
239 | // "Attachment Name", "Local ID", "Item ID", "Attach Point", "Position"); | ||
240 | |||
241 | List<SceneObjectGroup> attachmentObjects = sp.GetAttachments(); | ||
242 | foreach (SceneObjectGroup attachmentObject in attachmentObjects) | ||
243 | { | ||
244 | // InventoryItemBase attachmentItem | ||
245 | // = m_scenes[0].InventoryService.GetItem(new InventoryItemBase(attachmentObject.FromItemID)); | ||
246 | |||
247 | // if (attachmentItem == null) | ||
248 | // { | ||
249 | // sb.AppendFormat( | ||
250 | // "WARNING: Couldn't find attachment for item {0} at point {1}\n", | ||
251 | // attachmentData.ItemID, (AttachmentPoint)attachmentData.AttachPoint); | ||
252 | // continue; | ||
253 | // } | ||
254 | // else | ||
255 | // { | ||
256 | // sb.AppendFormat( | ||
257 | // " {0,-36} {1,-10} {2,-36} {3,-14} {4,-15}\n", | ||
258 | // attachmentObject.Name, attachmentObject.LocalId, attachmentObject.FromItemID, | ||
259 | // (AttachmentPoint)attachmentObject.AttachmentPoint, attachmentObject.RootPart.AttachedPos); | ||
260 | ct.Rows.Add( | ||
261 | new ConsoleDisplayTableRow( | ||
262 | new List<string>() | ||
263 | { | ||
264 | attachmentObject.Name, | ||
265 | attachmentObject.LocalId.ToString(), | ||
266 | attachmentObject.FromItemID.ToString(), | ||
267 | ((AttachmentPoint)attachmentObject.AttachmentPoint).ToString(), | ||
268 | attachmentObject.RootPart.AttachedPos.ToString() | ||
269 | })); | ||
270 | // } | ||
271 | } | ||
272 | |||
273 | ct.AddToStringBuilder(sb); | ||
274 | sb.Append("\n"); | ||
275 | } | ||
276 | } | 226 | } |
277 | } \ No newline at end of file | 227 | } \ No newline at end of file |