add debug

master
Christopher 2020-06-28 13:33:42 +02:00
parent 6b8cf3bb71
commit b112562dfb
1 changed files with 8 additions and 1 deletions

View File

@ -1,4 +1,5 @@
using Mono.Addins;
using log4net;
using Mono.Addins;
using Nini.Config;
using OpenMetaverse;
using OpenSim.Framework;
@ -55,6 +56,8 @@ namespace OpenSim.Modules.TextureFetcher
scene.EventManager.OnIncomingSceneObject += AddObject;
scene.EventManager.OnSceneObjectPartUpdated += UpdateObject;
scene.EventManager.OnSceneObjectPartCopy += CopyObject;
m_log.Info("[" + Name + "] Region '" + scene.Name + "' loaded.");
}
private void CopyObject(SceneObjectPart copy, SceneObjectPart original, bool userExposed)
@ -78,6 +81,8 @@ namespace OpenSim.Modules.TextureFetcher
if (part.ParentGroup.IsAttachment)
return;
m_log.Info("[" + Name + "] Process part '" + part.Name + "'");
List<UUID> allTextures = new List<UUID>();
List<TaskInventoryItem> inventoryItems = new List<TaskInventoryItem>();
@ -88,6 +93,7 @@ namespace OpenSim.Modules.TextureFetcher
if (textures.FaceTextures[i] != null)
allTextures.Add(textures.FaceTextures[i].TextureID);
//Convert texture uuid list to inventar items.
foreach (UUID texture in allTextures)
{
@ -112,6 +118,7 @@ namespace OpenSim.Modules.TextureFetcher
{
updateNeeded = true;
part.Inventory.AddInventoryItem(item, false);
m_log.Info("[" + Name + "] Add item '" + item.Name + "' to '" + part.Name + "'.");
}
}