From 82d79e3b0bfa73ed3682c61e14b12471631eda93 Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Sat, 20 Sep 2008 20:56:39 +0000 Subject: Partially implement notecard saves in task inventory. Still makes the notecard go read-only, but changes are saved. --- OpenSim/Framework/Communications/Capabilities/Caps.cs | 3 ++- OpenSim/Region/Environment/Scenes/Scene.Inventory.cs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OpenSim/Framework/Communications/Capabilities/Caps.cs b/OpenSim/Framework/Communications/Capabilities/Caps.cs index a0c59ad..a891517 100644 --- a/OpenSim/Framework/Communications/Capabilities/Caps.cs +++ b/OpenSim/Framework/Communications/Capabilities/Caps.cs @@ -168,8 +168,9 @@ namespace OpenSim.Framework.Communications.Capabilities m_capsHandlers["UpdateNotecardAgentInventory"] = new RestStreamHandler("POST", capsBase + m_notecardUpdatePath, NoteCardAgentInventory); m_capsHandlers["UpdateScriptAgentInventory"] = m_capsHandlers["UpdateNotecardAgentInventory"]; - m_capsHandlers["UpdateScriptTaskInventory"] = + m_capsHandlers["UpdateNotecardTaskInventory"] = new RestStreamHandler("POST", capsBase + m_notecardTaskUpdatePath, ScriptTaskInventory); + m_capsHandlers["UpdateScriptTaskInventory"] = m_capsHandlers["UpdateNotecardTaskInventory"]; // justincc: I've disabled the CAPS service for now to fix problems with selecting textures, and // subsequent inventory breakage, in the edit object pane (such as mantis 1085). This requires diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs index 5d55075..f5ac035 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs @@ -254,10 +254,10 @@ namespace OpenSim.Region.Environment.Scenes return; } - AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)AssetType.LSLText, data); + AssetBase asset = CreateAsset(item.Name, item.Description, (sbyte)item.Type, data); AssetCache.AddAsset(asset); - if (isScriptRunning) + if (isScriptRunning && item.Type == 10) { part.RemoveScriptInstance(item.ItemID); } @@ -267,7 +267,7 @@ namespace OpenSim.Region.Environment.Scenes part.GetProperties(remoteClient); // Trigger rerunning of script (use TriggerRezScript event, see RezScript) - if (isScriptRunning) + if (isScriptRunning && item.Type == 10) { part.CreateScriptInstance(item.ItemID, 0, false); } -- cgit v1.1