Skip to content

Deprecate the LSL list functions with a direct replacement#72

Open
tapple wants to merge 5 commits intosecondlife:mainfrom
tapple:deprecate-lsl-list
Open

Deprecate the LSL list functions with a direct replacement#72
tapple wants to merge 5 commits intosecondlife:mainfrom
tapple:deprecate-lsl-list

Conversation

@tapple
Copy link
Contributor

@tapple tapple commented Mar 13, 2026

@@ -730,13 +730,13 @@ declare ll: {
List2Float: (ListVariable: list, Index: number) -> number,
List2Integer: (ListVariable: list, Index: number) -> number,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I avoided marking ll.List2Integer and ll.List2Float as deprecated due to https://feedback.secondlife.com/slua-alpha/p/slua-functions-to-replicate-lsls-integer-and-float-casts

Copy link
Contributor Author

@tapple tapple Mar 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After further testing, I decided to go ahead and deprecate them: e6aa192

GetLinkSitFlags: (LinkNumber: number) -> number,
GetListEntryType: (ListVariable: list, Index: number) -> number,
GetListLength: (ListVariable: list) -> number,
GetListLength: @[deprecated {use='#', reason='Metatable support.'}](ListVariable: list) -> number,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or use rawlen()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added: 1cc7c10

List2String: (ListVariable: list, Index: number) -> string,
List2Vector: (ListVariable: list, Index: number) -> vector,
ListFindList: (ListVariable: list, Find: list) -> number?,
List2Rot: @[deprecated {use='[]'}](ListVariable: list, Index: number) -> quaternion,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use='[]' and torotation()

Copy link
Contributor Author

@tapple tapple Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ll.List2Rot does not convert strings to quaternions:

print(ll.List2Rot({"<1, 2, 3, 4>"}, 1)) -- <0, 0, 0, 1>

ListFindList: (ListVariable: list, Find: list) -> number?,
List2Rot: @[deprecated {use='[]'}](ListVariable: list, Index: number) -> quaternion,
List2String: @[deprecated {reason="Use '[]' and 'tostring' instead."}](ListVariable: list, Index: number) -> string,
List2Vector: @[deprecated {use='[]'}](ListVariable: list, Index: number) -> vector,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use='[]' and tovector()

Copy link
Contributor Author

@tapple tapple Mar 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ll.List2Vector does not convert strings to vectors:

print(ll.List2Vector({"<1, 2, 3>"}, 1)) -- <0, 0, 0>

@tapple tapple changed the title Deprecate the LSL list functions that have a direct replacement Deprecate the LSL list functions with a direct replacement Mar 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants