This allows one to get description data for a given prim inventory item.
Thanks MarcelEdward and GuduleLapointe!
0.7.4.1
Justin Clark-Casey (justincc) 2012-03-17 04:02:23 +00:00
parent 1e4180fc93
commit 4a57112f19
4 changed files with 31 additions and 0 deletions

View File

@ -107,6 +107,7 @@ what it is today.
* M.Igarashi * M.Igarashi
* maimedleech * maimedleech
* Mana Janus * Mana Janus
* MarcelEdward
* Mic Bowman * Mic Bowman
* Michelle Argus * Michelle Argus
* Michael Cortez (The Flotsam Project, http://osflotsam.org/) * Michael Cortez (The Flotsam Project, http://osflotsam.org/)

View File

@ -2957,5 +2957,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ"); return date.ToString("yyyy-MM-ddTHH:mm:ss.fffffffZ");
} }
/// <summary>
/// Get the description from an inventory item
/// </summary>
/// <param name="inventoryName"></param>
/// <returns>Item description</returns>
public LSL_String osGetInventoryDesc(string item)
{
m_host.AddScriptLPS(1);
lock (m_host.TaskInventory)
{
foreach (KeyValuePair<UUID, TaskInventoryItem> inv in m_host.TaskInventory)
{
if (inv.Value.Name == item)
{
return inv.Value.Description.ToString();
}
}
}
return String.Empty;
}
} }
} }

View File

@ -229,5 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_List osGetAvatarList(); LSL_List osGetAvatarList();
LSL_String osUnixTimeToTimestamp(long time); LSL_String osUnixTimeToTimestamp(long time);
LSL_String osGetInventoryDesc(string item);
} }
} }

View File

@ -863,5 +863,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
{ {
return m_OSSL_Functions.osUnixTimeToTimestamp(time); return m_OSSL_Functions.osUnixTimeToTimestamp(time);
} }
public LSL_String osGetInventoryDesc(string item)
{
return m_OSSL_Functions.osGetInventoryDesc(item);
}
} }
} }