Add some OSSL functions related to child prims inventory manipulations

Add functions:

+ osGiveLinkInventory(integer linkNumber, key destination, string inventory)
Give an item located in a child prim inventory.

+ osGetInventoryNames(integer type)
Return a list of items names by type (or INVENTORY_ALL) located in the prim inventory.

+ osGetLinkInventoryNames(integer linkNumber, integer type)
Return a list of items names by type (or INVENTORY_ALL) located in a child prim inventory.

+ osGetInventoryKeys(integer type)
Return a list of the items UUIDs by type (or INVENTORY_ALL) located in the prim inventory.

+ osGetLinkInventoryKeys(integer linkNumber, integer type)
Return a list of the items UUIDs by type (or INVENTORY_ALL) located in a child prim inventory.

+ osGetLinkInventoryKey(integer linkNumber, string name)
Return the UUID of the specified item name located in a child prim inventory.

+ osGetLinkInventoryDesc(integer linkNumber, string itemNameorid)
Return the description of an item located in a child prim inventory.

+ osGetLinkInventoryName(integer linkNumber, key itemId)
Return the name of an item located in a child prim inventory.

Note: the LinkInventory functions don't have access to the root prim contents. This may change if requested by the community...
This commit is contained in:
Adil El Farissi
2024-02-20 17:36:33 +00:00
parent cf27093ee9
commit ca722ecdd8
4 changed files with 322 additions and 1 deletions

View File

@@ -1460,18 +1460,61 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return m_OSSL_Functions.osGetInventoryItemKey(name);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_Key osGetLinkInventoryKey(LSL_Integer linkNumber, LSL_String name)
{
return m_OSSL_Functions.osGetLinkInventoryKey(linkNumber, name);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_List osGetInventoryKeys(LSL_Integer type)
{
return m_OSSL_Functions.osGetInventoryKeys(type);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_List osGetLinkInventoryKeys(LSL_Integer linkNumber, LSL_Integer type)
{
return m_OSSL_Functions.osGetLinkInventoryKeys(linkNumber, type);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_String osGetInventoryName(LSL_Key itemId)
{
return m_OSSL_Functions.osGetInventoryName(itemId);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_String osGetLinkInventoryName(LSL_Integer linkNumber, LSL_Key itemId)
{
return m_OSSL_Functions.osGetLinkInventoryName(linkNumber, itemId);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_List osGetLinkInventoryNames(LSL_Integer linkNumber, LSL_Integer type)
{
return m_OSSL_Functions.osGetLinkInventoryNames(linkNumber, type);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_String osGetInventoryDesc(LSL_String itemNameOrId)
{
return m_OSSL_Functions.osGetInventoryDesc(itemNameOrId);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_String osGetLinkInventoryDesc(LSL_Integer linkNumber, LSL_String itemNameOrId)
{
return m_OSSL_Functions.osGetLinkInventoryDesc(linkNumber, itemNameOrId);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void osGiveLinkInventory(LSL_Integer linkNumber, LSL_Key destination, LSL_String inventory)
{
m_OSSL_Functions.osGiveLinkInventory(linkNumber, destination, inventory);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_Key osGetLastChangedEventKey()
{