aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Common
diff options
context:
space:
mode:
authorCharles Krinke2008-06-26 02:46:29 +0000
committerCharles Krinke2008-06-26 02:46:29 +0000
commit1cd6b71b60d093b451ba03881ee31efd3eb29a50 (patch)
tree71e51114e772d9d9121a449a684e9c7f8a8e5a16 /OpenSim/Region/ScriptEngine/Common
parentMinor refactoring of POS. Adds a Util.Clamp(x, min, max) function. (diff)
downloadopensim-SC_OLD-1cd6b71b60d093b451ba03881ee31efd3eb29a50.zip
opensim-SC_OLD-1cd6b71b60d093b451ba03881ee31efd3eb29a50.tar.gz
opensim-SC_OLD-1cd6b71b60d093b451ba03881ee31efd3eb29a50.tar.bz2
opensim-SC_OLD-1cd6b71b60d093b451ba03881ee31efd3eb29a50.tar.xz
Mantis#1594. Thank you, Melanie for a patch that:
Fixes: - Wearable icon and name sreset to default on copy/paste - Cache is not updated when renaming/moving folders - Partial refactor to make inventory less dependen on AssetBase having a "Name" field - Add llGiveInventoryList() function
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Common')
-rw-r--r--OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs37
1 files changed, 36 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
index a9d1309..366b20c 100644
--- a/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
+++ b/OpenSim/Region/ScriptEngine/Common/LSL_BuiltIn_Commands.cs
@@ -4374,10 +4374,45 @@ namespace OpenSim.Region.ScriptEngine.Common
4374 NotImplemented("llGroundRepel"); 4374 NotImplemented("llGroundRepel");
4375 } 4375 }
4376 4376
4377 private LLUUID GetTaskInventoryItem(string name)
4378 {
4379 foreach (KeyValuePair<LLUUID, TaskInventoryItem> inv in m_host.TaskInventory)
4380 {
4381 if(inv.Value.Name == name)
4382 return inv.Key;
4383 }
4384 return LLUUID.Zero;
4385 }
4386
4377 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory) 4387 public void llGiveInventoryList(string destination, string category, LSL_Types.list inventory)
4378 { 4388 {
4379 m_host.AddScriptLPS(1); 4389 m_host.AddScriptLPS(1);
4380 NotImplemented("llGiveInventoryList"); 4390
4391 LLUUID destID;
4392 if(!LLUUID.TryParse(destination, out destID))
4393 return;
4394
4395 List<LLUUID> itemList = new List<LLUUID>();
4396
4397 foreach (Object item in inventory.Data)
4398 {
4399 LLUUID itemID;
4400 if(LLUUID.TryParse(item.ToString(), out itemID))
4401 {
4402 itemList.Add(itemID);
4403 }
4404 else
4405 {
4406 itemID = GetTaskInventoryItem(item.ToString());
4407 if(itemID != LLUUID.Zero)
4408 itemList.Add(itemID);
4409 }
4410 }
4411
4412 if(itemList.Count == 0)
4413 return;
4414
4415 m_ScriptEngine.World.MoveTaskInventoryItems(destID, category, m_host, itemList);
4381 } 4416 }
4382 4417
4383 public void llSetVehicleType(int type) 4418 public void llSetVehicleType(int type)