add llListSortStrided and osListSortInPlaceStrided

This commit is contained in:
UbitUmarov
2023-04-26 20:26:01 +01:00
parent f37071ba0c
commit 4c061a0602
7 changed files with 156 additions and 5 deletions

View File

@@ -5407,6 +5407,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
return src.Sort(stride, ascending == 1);
}
public LSL_List llListSortStrided(LSL_List src, int stride, int stride_index, int ascending)
{
return src.Sort(stride, stride_index, ascending == 1);
}
public LSL_Integer llGetListLength(LSL_List src)
{
return src.Length;

View File

@@ -5997,6 +5997,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
src.SortInPlace(stride, ascending == 1);
}
public void osListSortInPlaceStrided(LSL_List src, LSL_Integer stride, LSL_Integer stride_index, LSL_Integer ascending)
{
src.SortInPlace(stride, stride_index, ascending == 1);
}
public LSL_List osGetParcelDetails(LSL_Key id, LSL_List param)
{
if (!UUID.TryParse(id, out UUID parcelID))

View File

@@ -259,6 +259,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_List llListRandomize(LSL_List src, int stride);
LSL_List llListReplaceList(LSL_List dest, LSL_List src, int start, int end);
LSL_List llListSort(LSL_List src, int stride, int ascending);
LSL_List llListSortStrided(LSL_List src, int stride, int stride_index, int ascending);
LSL_Float llListStatistics(int operation, LSL_List src);
void llLoadURL(string avatar_id, string message, string url);
LSL_Float llLog(double val);

View File

@@ -598,7 +598,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
LSL_Integer osAvatarType(LSL_Key avkey);
LSL_Integer osAvatarType(LSL_String sFirstName, LSL_String sLastName);
void osListSortInPlace(LSL_List src, LSL_Integer stride, LSL_Integer ascending);
void osListSortInPlaceStrided(LSL_List src, LSL_Integer stride, LSL_Integer stride_index, LSL_Integer ascending);
LSL_List osGetParcelDetails(LSL_Key id, LSL_List param);
public LSL_List osGetParcelIDs();
public LSL_Key osGetParcelID();

View File

@@ -1280,6 +1280,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
return m_LSL_Functions.llListSort(src, stride, ascending);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_List llListSortStrided(LSL_List src, int stride, int stride_index, int ascending)
{
return m_LSL_Functions.llListSortStrided(src, stride, stride_index, ascending);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_Float llListStatistics(int operation, LSL_List src)
{

View File

@@ -1636,6 +1636,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
m_OSSL_Functions.osListSortInPlace(src, stride, ascending);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public void osListSortInPlaceStrided(LSL_List src, LSL_Integer stride, LSL_Integer stride_index, LSL_Integer ascending)
{
m_OSSL_Functions.osListSortInPlaceStrided(src, stride, stride_index, ascending);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public LSL_List osGetParcelDetails(LSL_Key id, LSL_List param)
{