add functions osListAs*(list src, integer index) identical to llList2*, but a bit faster with no typecast and index only from origin ( ie >= 0)

This commit is contained in:
UbitUmarov
2025-05-09 20:00:19 +01:00
parent ef2fce034f
commit d92940b62b
3 changed files with 119 additions and 0 deletions

View File

@@ -924,5 +924,15 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
/// <returns>a integer with index of match point or -1</returns>
//ApiDesc Returns the nth index of the sublist constrained with start and end count.
LSL_Integer osListFindListNext(LSL_List src, LSL_List test, LSL_Integer start, LSL_Integer end, LSL_Integer instance);
//ApiDesc Returns a string that is at index(>=0) in src or empty string if that is not a string
LSL_String osListAsString(LSL_List src, int index);
//ApiDesc Returns a integer that is at index(>=0) in src or 0 if that is not a integer
LSL_Integer osListAsInteger(LSL_List src, int index);
//ApiDesc Returns a float that is at index(>=0) in src or 0 if that is not a float
LSL_Float osListAsFloat(LSL_List src, int index);
//ApiDesc Returns a vector that is at index(>=0) in src or Zero vector if that is not a vector
vector osListAsVector(LSL_List src, int index);
//ApiDesc Returns a rotation that is at index(>=0) in src or zero rotation if that is not a vector
LSL_Rotation osListAsRotation(LSL_List src, int index);
}
}