Add osGetInventoryDesc() as per http://opensimulator.org/mantis/view.php?id=5927
This allows one to get description data for a given prim inventory item. Thanks MarcelEdward and GuduleLapointe!0.7.4.1
parent
1e4180fc93
commit
4a57112f19
|
@ -107,6 +107,7 @@ what it is today.
|
|||
* M.Igarashi
|
||||
* maimedleech
|
||||
* Mana Janus
|
||||
* MarcelEdward
|
||||
* Mic Bowman
|
||||
* Michelle Argus
|
||||
* Michael Cortez (The Flotsam Project, http://osflotsam.org/)
|
||||
|
|
|
@ -2957,5 +2957,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -229,5 +229,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
LSL_List osGetAvatarList();
|
||||
|
||||
LSL_String osUnixTimeToTimestamp(long time);
|
||||
|
||||
LSL_String osGetInventoryDesc(string item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -863,5 +863,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
{
|
||||
return m_OSSL_Functions.osUnixTimeToTimestamp(time);
|
||||
}
|
||||
|
||||
public LSL_String osGetInventoryDesc(string item)
|
||||
{
|
||||
return m_OSSL_Functions.osGetInventoryDesc(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue