From c182157d4dd41c5ca1ee1f02f54ef5bce4425c3a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 11 Jan 2013 00:08:52 +0000 Subject: Fix a regression in the last few scene commands changes where setting these via the viewer estate dialog stopped working. Forgot to register the new interface. Also removes some code which got included by adpating an existing module. --- .../World/SceneCommands/SceneCommandsModule.cs | 54 +--------------------- 1 file 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 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; -// private IAvatarFactoryModule m_avatarFactory; public string Name { get { return "Scene Commands Module"; } } @@ -77,6 +76,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments // m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); m_scene = scene; + + m_scene.RegisterModuleInterface(this); } public void RemoveRegion(Scene scene) @@ -222,56 +223,5 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments } } } - - private void GetAttachmentsReport(ScenePresence sp, StringBuilder sb) - { - sb.AppendFormat("Attachments for {0}\n", sp.Name); - - ConsoleDisplayTable ct = new ConsoleDisplayTable() { Indent = 2 }; - ct.Columns.Add(new ConsoleDisplayTableColumn("Attachment Name", 50)); - ct.Columns.Add(new ConsoleDisplayTableColumn("Local ID", 10)); - ct.Columns.Add(new ConsoleDisplayTableColumn("Item ID", 36)); - ct.Columns.Add(new ConsoleDisplayTableColumn("Attach Point", 14)); - ct.Columns.Add(new ConsoleDisplayTableColumn("Position", 15)); - -// sb.AppendFormat( -// " {0,-36} {1,-10} {2,-36} {3,-14} {4,-15}\n", -// "Attachment Name", "Local ID", "Item ID", "Attach Point", "Position"); - - List attachmentObjects = sp.GetAttachments(); - foreach (SceneObjectGroup attachmentObject in attachmentObjects) - { -// InventoryItemBase attachmentItem -// = m_scenes[0].InventoryService.GetItem(new InventoryItemBase(attachmentObject.FromItemID)); - -// if (attachmentItem == null) -// { -// sb.AppendFormat( -// "WARNING: Couldn't find attachment for item {0} at point {1}\n", -// attachmentData.ItemID, (AttachmentPoint)attachmentData.AttachPoint); -// continue; -// } -// else -// { -// sb.AppendFormat( -// " {0,-36} {1,-10} {2,-36} {3,-14} {4,-15}\n", -// attachmentObject.Name, attachmentObject.LocalId, attachmentObject.FromItemID, -// (AttachmentPoint)attachmentObject.AttachmentPoint, attachmentObject.RootPart.AttachedPos); - ct.Rows.Add( - new ConsoleDisplayTableRow( - new List() - { - attachmentObject.Name, - attachmentObject.LocalId.ToString(), - attachmentObject.FromItemID.ToString(), - ((AttachmentPoint)attachmentObject.AttachmentPoint).ToString(), - attachmentObject.RootPart.AttachedPos.ToString() - })); -// } - } - - ct.AddToStringBuilder(sb); - sb.Append("\n"); - } } } \ No newline at end of file -- cgit v1.1