remove redundant osInventoryDescription() and improve osInventoryDesc() to do the same
parent
6e05695244
commit
d89a089ca2
|
@ -3889,29 +3889,6 @@ 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)
|
||||
{
|
||||
CheckThreatLevel();
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invite user to the group this object is set to
|
||||
/// </summary>
|
||||
|
@ -5439,7 +5416,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
|||
return item.Name;
|
||||
}
|
||||
|
||||
public LSL_String osGetInventoryDescription(LSL_String itemNameorid)
|
||||
public LSL_String osGetInventoryDesc(LSL_String itemNameorid)
|
||||
{
|
||||
m_host.AddScriptLPS(1);
|
||||
|
||||
|
|
|
@ -401,8 +401,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
|
||||
LSL_String osUnixTimeToTimestamp(LSL_Integer time);
|
||||
|
||||
LSL_String osGetInventoryDesc(string item);
|
||||
|
||||
LSL_Integer osInviteToGroup(LSL_Key agentId);
|
||||
LSL_Integer osEjectFromGroup(LSL_Key agentId);
|
||||
|
||||
|
@ -549,7 +547,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
|||
LSL_Integer osApproxEquals(rotation ra, rotation rb, LSL_Float margin);
|
||||
LSL_Key osGetInventoryLastOwner(LSL_String itemNameOrId);
|
||||
LSL_String osGetInventoryName(LSL_Key itemId);
|
||||
LSL_String osGetInventoryDescription(LSL_String itemNameOrId);
|
||||
LSL_String osGetInventoryDesc(LSL_String itemNameOrId);
|
||||
LSL_Key osGetLastChangedEventKey();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1060,11 +1060,6 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_OSSL_Functions.osUnixTimeToTimestamp(time);
|
||||
}
|
||||
|
||||
public LSL_String osGetInventoryDesc(string item)
|
||||
{
|
||||
return m_OSSL_Functions.osGetInventoryDesc(item);
|
||||
}
|
||||
|
||||
public LSL_Integer osInviteToGroup(LSL_Key agentId)
|
||||
{
|
||||
return m_OSSL_Functions.osInviteToGroup(agentId);
|
||||
|
@ -1377,9 +1372,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
|||
return m_OSSL_Functions.osGetInventoryName(itemId);
|
||||
}
|
||||
|
||||
public LSL_String osGetInventoryDescription(LSL_String itemNameOrId)
|
||||
public LSL_String osGetInventoryDesc(LSL_String itemNameOrId)
|
||||
{
|
||||
return m_OSSL_Functions.osGetInventoryDescription(itemNameOrId);
|
||||
return m_OSSL_Functions.osGetInventoryDesc(itemNameOrId);
|
||||
}
|
||||
|
||||
public LSL_Key osGetLastChangedEventKey()
|
||||
|
|
Loading…
Reference in New Issue