From 42af93c7333e53ea352d543dbd9070c18b3fe634 Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Fri, 3 Jul 2026 15:27:11 +0200 Subject: [PATCH 1/8] Add function-variant structure to schema --- slua_definitions.schema.json | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/slua_definitions.schema.json b/slua_definitions.schema.json index 76d3402f..00777a85 100644 --- a/slua_definitions.schema.json +++ b/slua_definitions.schema.json @@ -147,6 +147,22 @@ "required": [], "type": "object" }, + "function-variant": { + "markdownDescription": "An alternative structure or shape for a function.", + "additionalProperties": false, + "properties": { + "comment": { + "markdownDescription": "A brief description of this variant.", + "type": "string" + }, + "parameters": { + "items": { "$ref": "#/$defs/function-parameter" }, + "type": "array" + }, + "return-type": { "$ref": "#/$defs/type" } + }, + "type": "object" + }, "function": { "markdownDescription": "A full function signature.", "additionalProperties": false, @@ -168,6 +184,10 @@ "items": { "$ref": "#/$defs/function-anon" }, "type": "array" }, + "variants": { + "items": { "$ref": "#/$defs/function-variant" }, + "type": "array" + }, "deprecated": { "$ref": "#/$defs/deprecated" }, "local-only": { "const": true, From 37463ca2f6b19a8472c568fc9e7548ed4aa060c3 Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Fri, 3 Jul 2026 15:28:24 +0200 Subject: [PATCH 2/8] Update slua_definitions.yaml --- slua_definitions.yaml | 347 +++++++++++++++++++++++++----------------- 1 file changed, 206 insertions(+), 141 deletions(-) diff --git a/slua_definitions.yaml b/slua_definitions.yaml index 05071fd2..0d64470b 100644 --- a/slua_definitions.yaml +++ b/slua_definitions.yaml @@ -50,12 +50,16 @@ base-classes: properties: - name: x type: number + comment: X component of the rotation/quaternion. - name: "y" type: number + comment: Y component of the rotation/quaternion. - name: z type: number + comment: Z component of the rotation/quaternion. - name: s type: number + comment: S component of the rotation/quaternion (equivalent to the W component in other notations). - name: uuid comment: A 128‑bit unique identifier formatted as 36 hexadecimal characters (8‑4‑4‑4‑12), e.g. "A822FF2B-FF02-461D-B45D-DCD10A2DE0C2". methods: @@ -122,10 +126,13 @@ base-classes: properties: - name: x type: number + comment: "X coordinate component of the vector (typically represents red color, forward position, or pitch)." - name: "y" type: number + comment: "Y coordinate component of the vector (typically represents green color, left/right position, or roll)." - name: z type: number + comment: "Z coordinate component of the vector (typically represents blue color, altitude/upward position, or yaw)." - name: DetectedEvent comment: Event detection class providing access to detected object/avatar information # auto-generated from lsl_definitions.yaml @@ -133,10 +140,13 @@ base-classes: properties: - name: index type: number + comment: "Index of the detected entity." - name: valid type: boolean + comment: "Returns true if the detected index is valid and contains active data." - name: canAdjustDamage type: boolean + comment: "Returns true if the detected object or avatar can have its damage adjusted." type-aliases: - name: rotation comment: '''rotation'' is an alias for ''quaternion''' @@ -254,82 +264,93 @@ type-aliases: selene-type: table classes: - name: LLEvents - comment: Event registration and management class for Second Life events + comment: Event registration and management class for Second Life events. Supports adding multiple handlers per event and dynamic registration. # auto-generated from lsl_definitions.yaml properties: [] methods: - name: 'on' - comment: Registers a callback for an event. Returns the callback. + comment: "Registers a handler function to run whenever the specified event occurs. Multiple handlers can be attached to the same event and will run in the order they were added. Returns the same function passed in so it can be used later with LLEvents:off()." # auto-generated from lsl_definitions.yaml overloads: [] parameters: - name: self - name: event + comment: "The name of the event to handle." type: LLEventName - name: callback + comment: "The function to execute when the event happens." type: LLEventHandler return-type: LLEventHandler - name: 'off' - comment: Unregisters a callback. Returns true if found and removed. + comment: "Removes an event handler. If the function was added multiple times via LLEvents:on(), only the last one added is removed. Returns true if the function was found and removed, false otherwise." # auto-generated from lsl_definitions.yaml overloads: [] parameters: - name: self - name: event + comment: "The name of the event to remove." type: LLEventName - name: callback + comment: "The function to remove. Note: To remove a handler added via LLEvents:once(), you must pass the specific wrapper function it returned." type: LLEventHandler return-type: boolean - name: once - comment: Registers a one-time callback. Returns the wrapper function. + comment: "Registers a one-time event handler. The function runs only once and is automatically removed afterward. Returns a newly generated wrapper function, which MUST be used if you want to manually remove the handler early using LLEvents:off()." # auto-generated from lsl_definitions.yaml overloads: [] parameters: - name: self - name: event + comment: "The name of the event to handle." type: LLEventName - name: callback + comment: "The function to execute once when the event happens." type: LLEventHandler return-type: LLEventHandler - name: handlers - comment: Returns a list of all handlers for a specific event. + comment: "Returns an array table containing all the functions currently handling the specified event. Useful for debugging or for iterating to remove all functions handling an event." parameters: - name: self - name: event + comment: "The name of the event to query." type: LLEventName return-type: '{LLEventHandler}' - name: eventNames - comment: Returns a list of all event names that have handlers. + comment: "Returns an array table of all event names that currently have active handler functions attached." parameters: - name: self return-type: '{string}' - name: LLTimers - comment: Timer management class for scheduling periodic and one-time callbacks + comment: "Timer management class for scheduling periodic and one-time callbacks. Note: Do not mix LLTimers with old LSL timer functions (e.g., llcompat.SetTimerEvent), as they share the same underlying event and will interfere with each other." methods: - name: every - comment: Registers a callback to be called every N seconds. Returns the callback. + comment: "Registers a repeating timer. The callback receives (expected_time, interval). Returns the same function passed in so it can be removed later." parameters: - name: self - name: seconds + comment: "The interval in seconds. Minimum practical interval is ~0.022s (one server frame). An interval of 0 schedules the timer for the next frame." type: number - name: callback + comment: "The function to execute when the time arrives." type: LLTimerEveryCallback return-type: LLTimerCallback - name: once - comment: Registers a callback to be called once after N seconds. Returns the - callback. + comment: "Registers a one-time timer. The timer runs only once and is automatically removed afterward. The callback receives (expected_time, nil). Returns the same function passed in, which can be used to cancel it early via LLTimers:off()." parameters: - name: self - name: seconds + comment: "The time in seconds to wait before triggering. A value of 0 schedules it for the next frame." type: number - name: callback + comment: "The function to execute once when the time arrives." type: LLTimerOnceCallback return-type: LLTimerCallback - name: 'off' - comment: Unregisters a timer callback. Returns true if found and removed. + comment: "Stops and removes a timer. If the same function was added multiple times, only the last one added is removed, regardless of its interval. Returns true if the timer was found and removed, false otherwise." parameters: - name: self - name: callback + comment: "The function reference to remove." type: LLTimerCallback return-type: boolean - name: PrimParamsSetterType @@ -363,7 +384,7 @@ global-variables: type: LLTimers functions: - name: assert - comment: Checks if the value is truthy; if not, raises an error with the optional message. + comment: Checks if the value is truthy; if not, raises an error with the optional message. Returns the value upon success. type-parameters: [T] parameters: - name: value @@ -397,14 +418,14 @@ functions: type: (...any) -> ...any return-type: '...any' - name: error - comment: Raises an error with the specified object and optional call stack level. + comment: Raises an error with the specified object. The optional level determines which call stack level is blamed for the error. type-parameters: [T] parameters: - name: message - comment: Error message to raise. + comment: Error message (or object) to raise. Does not have to be a string. type: T - name: level - comment: Level to attribute the error to in the call stack. + comment: Level to attribute the error to in the call stack. Level 1 is the current function, level 2 is its caller and so on. type: number? default-value: 1 return-type: never @@ -420,7 +441,7 @@ functions: return-type: '{[string]: any}' slua-removed: true - name: getmetatable - comment: Returns the metatable for the specified object. + comment: Returns the metatable for the specified object. If the metatable has a '__metatable' field, returns its value instead. type-parameters: [T] parameters: - name: obj @@ -445,7 +466,7 @@ functions: type: string local-only: true - name: ipairs - comment: Returns an iterator for numeric key-value pairs in the table. + comment: Returns an iterator for sequential integer key-value pairs in the table. Iteration halts at the first nil value. type-parameters: [V] parameters: - name: tab @@ -471,14 +492,14 @@ functions: default-value: false return-type: any - name: next - comment: Returns the next key-value pair in the table traversal order. + comment: Returns the next key-value pair in the table traversal order. If the index is nil or omitted, returns the first pair. type-parameters: [K, V] parameters: - name: t comment: Table to traverse. type: "{[K]: V}" - name: i - comment: Key to start traversal after. + comment: Key to start traversal after. Omit or pass nil to fetch the first key-value pair. type: K? default-value: nil return-type: (K?, V) @@ -493,7 +514,7 @@ functions: return-type: "(({[K]: V}, K?) -> (K?, V), {[K]: V}, K)" typechecker: {builtin: true} # builtin due to FFlag::LuauStorePolarityInline - name: pcall - comment: Calls function f with parameters args, returning success and function results or an error. + comment: Executes a function in protected mode. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message. type-parameters: [A..., R...] parameters: - name: f @@ -568,11 +589,11 @@ functions: return-type: any typechecker: {magic: true} - name: select - comment: Returns a subset of arguments or the number of arguments. + comment: Returns a subset of arguments starting from the specified index (supports negative indexing). If index is '#' returns the number of arguments. type-parameters: [A...] parameters: - name: i - comment: Index or '#' to count arguments. + comment: An index number starting from 1 (or negative starting from the end), or '#' to return the total arguments count type: string | number - name: ... comment: Arguments to select from. @@ -592,7 +613,7 @@ functions: return-type: ((T...) -> R...)? slua-removed: true - name: setmetatable - comment: Changes the metatable for the given table. + comment: Changes the metatable for the given table. Raises an error if the table already has a protected metatable (with a '__metatable' field). type-parameters: [T, MT] parameters: - name: t @@ -607,14 +628,14 @@ functions: fastcall: true typechecker: {builtin: true, magic: true} # builtin due to FFlag::LuauSolverV2 - name: tonumber - comment: Converts the input string to a number in the specified base. + comment: Converts the input string to a number in the specified base. Returns nil if the conversion fails. parameters: - name: value comment: String to convert to a number. type: string? | number selene-type: string - name: base - comment: Base for the conversion. + comment: Base for the conversion, supporting values from 2 to 36. type: number? default-value: 10 return-type: number? @@ -624,6 +645,7 @@ functions: comment: Converts a string to a quaternion, returns nil if invalid parameters: - name: value + comment: String to convert to a quaternion. type: string? | quaternion selene-type: string return-type: quaternion? @@ -632,12 +654,13 @@ functions: comment: Converts a string to a rotation (quaternion), returns nil if invalid parameters: - name: value + comment: String to convert to a rotation. type: string? | quaternion selene-type: string return-type: quaternion? must-use: true - name: tostring - comment: Converts the input object to a string. + comment: Converts the input object to a string. Calls the metatable's '__tostring' metamethod if present. type-parameters: [T] parameters: - name: value @@ -651,6 +674,7 @@ functions: shorter than 16 bytes. parameters: - name: val + comment: String to convert to an uuid. type: string? | buffer | uuid selene-type: string return-type: uuid? @@ -659,6 +683,7 @@ functions: comment: Converts a string to a vector, returns nil if invalid parameters: - name: val + comment: String to convert to a vector. type: string? | vector selene-type: string return-type: vector? @@ -722,6 +747,7 @@ modules: comment: |- Shifts n by i bits to the right. If i is negative, a left shift is performed. Does an arithmetic shift: The most significant bit of n is propagated during the shift. + Returns 0 if i < -31, or all sign bits if i > 31. parameters: - name: "n" comment: Number to shift. @@ -780,13 +806,16 @@ modules: must-use: true fastcall: true - name: extract - comment: Extracts bits from n at position field with width + comment: Extracts bits from n at position field with width. Raises an error if the selected bit range goes outside [0, 31]. parameters: - name: "n" + comment: Number to extract from. type: number - name: field + comment: Starting index. type: number - name: width + comment: Number of bits to extract. type: number? default-value: 1 return-type: number @@ -805,7 +834,7 @@ modules: must-use: true fastcall: true - name: lshift - comment: Shifts n by i bits to the left. If i is negative, a right shift is performed. + comment: Shifts n by i bits to the left. If i is negative, a right shift is performed. Returns 0 if i is outside the [-31, 31] range. parameters: - name: "n" comment: Number to shift. @@ -817,15 +846,19 @@ modules: must-use: true fastcall: true - name: replace - comment: Replaces bits in n at position field with width using value v + comment: Replaces bits in n at position field with width using value v. Raises an error if the selected bit range goes outside [0, 31]. parameters: - name: "n" + comment: Number to replace in. type: number - name: v + comment: Value containing the new bits to insert. type: number - name: field + comment: Starting index. type: number - name: width + comment: Number of bits to replace. type: number? default-value: 1 return-type: number @@ -844,7 +877,7 @@ modules: must-use: true fastcall: true - name: rshift - comment: Shifts n by i bits to the right. If i is negative, a left shift is performed. + comment: Shifts n by i bits to the right. If i is negative, a left shift is performed. Returns 0 if i is outside the [-31, 31] range. parameters: - name: "n" comment: Number to shift. @@ -877,25 +910,28 @@ modules: return-type: number must-use: true - name: countlz - comment: Count leading zeros + comment: Count leading zeros. parameters: - name: "n" + comment: Number whose leading zeros will be counted. type: number return-type: number must-use: true fastcall: true - name: countrz - comment: Count trailing zeros + comment: Count trailing zeros. parameters: - name: "n" + comment: Number whose trailing zeros will be counted. type: number return-type: number must-use: true fastcall: true - name: byteswap - comment: Swap byte order + comment: Swap byte order. parameters: - name: "n" + comment: Number whose byte order will be swapped. type: number return-type: number must-use: true @@ -934,7 +970,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -946,7 +982,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -958,7 +994,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -970,7 +1006,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -982,7 +1018,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -994,7 +1030,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -1006,7 +1042,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -1018,7 +1054,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to read from. + comment: 0-based byte offset to read from. type: number return-type: number must-use: true @@ -1031,7 +1067,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1046,7 +1082,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1061,7 +1097,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1076,7 +1112,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1091,7 +1127,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1106,7 +1142,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1121,7 +1157,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1136,7 +1172,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: Value to write. @@ -1150,7 +1186,7 @@ modules: comment: Buffer to read from. type: buffer - name: offset - comment: Byte offset to start reading. + comment: 0-based byte offset to start reading. type: number - name: count comment: Number of bytes to read. @@ -1165,7 +1201,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to write at. + comment: 0-based byte offset to write at. type: number - name: value comment: String to write. @@ -1191,19 +1227,19 @@ modules: type: buffer observes: write - name: targetOffset - comment: Offset in target buffer. + comment: 0-based offset in target buffer. type: number - name: source comment: Source buffer to copy from. type: buffer - name: sourceOffset - comment: Offset in source buffer. + comment: 0-based offset in source buffer. type: number? default-value: 0 - name: count comment: Number of bytes to copy. type: number? - default-value: 'buffer.len(b) - sourceOffset' + default-value: 'buffer.len(source) - sourceOffset' return-type: () - name: fill comment: Fills the buffer with the specified value starting at the given offset. @@ -1213,7 +1249,7 @@ modules: type: buffer observes: write - name: offset - comment: Byte offset to start filling. + comment: 0-based byte offset to start filling. type: number - name: value comment: Value to fill with. @@ -1266,7 +1302,7 @@ modules: return-type: thread must-use: true - name: resume - comment: Resumes a coroutine, returning true and results if successful, or false and an error. + comment: Resumes a coroutine. Returns true followed by any values passed to coroutine.yield() or returned by the function. If an error occurs, returns false and the error message. parameters: - name: co comment: Coroutine to resume. @@ -1357,7 +1393,7 @@ modules: overloads: - comment: Returns a string with a traceback of the current call stack parameters: - - name: message + - name: msg comment: Message prepended to the traceback. type: string? default-value: nil @@ -1388,6 +1424,7 @@ modules: comment: Encodes a string or buffer to base64 parameters: - name: data + comment: "String or buffer to encode to base64 format." type: string | buffer selene-type: string return-type: string @@ -1399,14 +1436,18 @@ modules: - comment: Decodes a base64 string to a buffer if asBuffer is true parameters: - name: data + comment: "Base64 encoded string to decode." type: string - name: asBuffer + comment: "If true, decodes the payload into a buffer instead of a string." type: "true" return-type: buffer parameters: - name: data + comment: "Base64 encoded string to decode." type: string - name: asBuffer + comment: "Decodes the payload as a string." type: false? selene-type: bool default-value: false @@ -1420,8 +1461,10 @@ modules: Raises an error if value contains unsupported types. parameters: - name: value + comment: "Value (table, string, number, etc.) to serialize into JSON." type: any - name: options + comment: "Optional configuration settings and replacer function to customize serialization formatting." type: LLJsonEncodeOptions? default-value: '{allow_sparse=false, skip_tojson=false, replacer=nil}' return-type: string @@ -1431,8 +1474,10 @@ modules: Raises an error if JSON is invalid. parameters: - name: json + comment: "JSON string to deserialize into a table or value." type: string - name: options + comment: "Optional configuration settings and reviver function to apply during parsing." type: LLJsonDecodeOptions? default-value: '{track_path=false, reviver=nil}' return-type: any @@ -1442,8 +1487,10 @@ modules: more compactly. Raises an error if value contains unsupported types. parameters: - name: value + comment: "Value to serialize into SL-typed JSON." type: any - name: options + comment: "Optional configuration settings to customize serialization formatting." type: LLJsonEncodeOptions? default-value: '{allow_sparse=false, skip_tojson=false, tight=false, replacer=nil}' return-type: string @@ -1453,8 +1500,10 @@ modules: Raises an error if JSON is invalid. parameters: - name: json + comment: "SL-typed JSON string to deserialize." type: string - name: options + comment: "Optional configuration settings to apply during parsing." type: LLJsonDecodeOptions? default-value: '{track_path=false, reviver=nil}' return-type: any @@ -1563,8 +1612,7 @@ modules: must-use: true fastcall: true - name: atan2 - comment: Returns the arc tangent of y/x in radians, using the signs to determine - the quadrant. + comment: "Returns the arc tangent of y/x in radians, using the signs to determine the quadrant. Note the argument order: Y is the first parameter, X is the second parameter." parameters: - name: "y" comment: Y-coordinate. @@ -1585,7 +1633,7 @@ modules: must-use: true fastcall: true - name: clamp - comment: Returns n clamped between min and max. + comment: Returns n clamped between min and max. Raises an error if min is greater than max. parameters: - name: "n" comment: Value to be clamped. @@ -1718,19 +1766,19 @@ modules: comment: Maps n from input range to output range. parameters: - name: "n" - comment: A number. + comment: Number to map. type: number - name: inMin - comment: A number. + comment: Lower bound of the input range. type: number - name: inMax - comment: A number. + comment: Upper bound of the input range. type: number - name: outMin - comment: A number. + comment: Lower bound of the output range. type: number - name: outMax - comment: A number. + comment: Upper bound of the output range. type: number return-type: number must-use: true @@ -1738,7 +1786,7 @@ modules: comment: Returns the maximum value from the given numbers. parameters: - name: "n" - comment: A number. + comment: A number to find the maximum from. type: number - name: ... comment: Numbers to find the maximum from. @@ -1751,7 +1799,7 @@ modules: comment: Returns the minimum value from the given numbers. parameters: - name: "n" - comment: A number. + comment: A number to find the minimum from. type: number - name: ... comment: Numbers to find the minimum from. @@ -1770,7 +1818,7 @@ modules: must-use: true fastcall: true - name: noise - comment: Returns Perlin noise value for the point (x, y, z). + comment: Returns Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]. parameters: - name: x comment: X coordinate for the noise function. @@ -1819,6 +1867,24 @@ modules: default-value: nil return-type: number must-use: true + variants: + - comment: "Returns a random float number in the [0, 1] range (exclusive of 1)." + return-type: number + - comment: "Returns a random integer number in [1, n] range. Input is truncated to integer." + parameters: + - name: n + comment: Maximum value of the range. + type: number + return-type: number + - comment: "Returns a random integer number in [min, max] range. Inputs are truncated to integers." + parameters: + - name: min + comment: Minimum value of the range. + type: number + - name: max + comment: Maximum value of the range. + type: number + return-type: number - name: randomseed comment: Sets the seed for the random number generator. parameters: @@ -1832,7 +1898,7 @@ modules: comment: Rounds n to the nearest integer. parameters: - name: "n" - comment: A number to round to the nearest integer. + comment: A number to round to the nearest integer. Halfway values are rounded away from zero. type: number return-type: number must-use: true @@ -1895,7 +1961,7 @@ modules: comment: Returns true if n is NaN. parameters: - name: "n" - comment: A number. + comment: Number to check as NAN. type: number return-type: boolean must-use: true @@ -1904,7 +1970,7 @@ modules: comment: Returns true if n is infinite. parameters: - name: "n" - comment: A number. + comment: Number to check as infinite. type: number return-type: boolean must-use: true @@ -1913,7 +1979,7 @@ modules: comment: Returns true if n is finite. parameters: - name: "n" - comment: A number. + comment: Number to check as finite. type: number return-type: boolean must-use: true @@ -1983,7 +2049,8 @@ modules: optional: true return-type: number? overloads: - - parameters: [] + - comment: Returns the current Unix timestamp. + parameters: [] return-type: number must-use: true - name: quaternion @@ -2136,7 +2203,7 @@ modules: fastcall: true typechecker: {builtin: true} - name: find - comment: Finds the first instance of the pattern in the string. + comment: Finds the first instance of the pattern in the string. Returns the start and end indices of the first match, followed by any captured substrings. Returns nil if no match is found. parameters: - name: s comment: Input string. @@ -2145,11 +2212,11 @@ modules: comment: Pattern to search for. type: string - name: init - comment: Starting index. + comment: Index to start the search from (supports negative indexing). type: number? default-value: 1 - name: plain - comment: Perform raw search. + comment: Perform raw search. If true, turns off pattern matching and performs a raw, case-sensitive substring match. type: boolean? default-value: false return-type: (number?, number?, ...string) @@ -2169,7 +2236,7 @@ modules: must-use: true typechecker: {builtin: true, magic: true} - name: gmatch - comment: Returns an iterator function for pattern matches + comment: Returns an iterator function for pattern matches. parameters: - name: s comment: Input string. @@ -2181,7 +2248,7 @@ modules: must-use: true typechecker: {builtin: true, magic: true} - name: gsub - comment: Performs pattern-based substitution in a string. + comment: Performs pattern-based substitution in a string. Returns a copy of the string with substitutions made, followed by the total number of substitutions that occurred. parameters: - name: s comment: Input string. @@ -2200,7 +2267,7 @@ modules: must-use: true typechecker: {builtin: true} - name: len - comment: "Returns the number of bytes in the string. Identical to #s" + comment: "Returns the number of bytes in the string. Identical to #s." parameters: - name: s comment: Input string. @@ -2256,7 +2323,7 @@ modules: must-use: true typechecker: {builtin: true} - name: rep - comment: Returns the input string repeated a given number of times. + comment: Returns the input string repeated n times. Returns an empty string if n is zero or negative. parameters: - name: s comment: Input string. @@ -2277,13 +2344,13 @@ modules: must-use: true typechecker: {builtin: true} - name: split - comment: Splits a string by separator. Returns a list of substrings. + comment: Splits a string by separator. Returns a list of substrings. If the separator is empty, the string is split into individual one-byte substrings. parameters: - name: s comment: Input string. type: string - name: separator - comment: Separator to split on. + comment: Separator to split on. If empty, the string is split into individual bytes. type: string? default-value: '","' return-type: '{string}' @@ -2296,10 +2363,10 @@ modules: comment: Input string. type: string - name: i - comment: Starting index. + comment: Starting index (supports negative indexing). type: number - name: j - comment: Ending index. + comment: Ending index (supports negative indexing). type: number? default-value: '#s' return-type: string @@ -2401,10 +2468,9 @@ modules: return-type: number must-use: true - name: insert - comment: Inserts an element at the specified index, - or at the end of the array. + comment: Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, #a]. overloads: - - comment: Inserts an element at the end of a list + - comment: Appends an element to the end of the array (equivalent to a[#a+1] = value). type-parameters: [V] parameters: - name: a @@ -2422,7 +2488,7 @@ modules: type: '{V}' observes: write - name: i - comment: "Index to insert at (default: at the end)." + comment: "Index to insert at. Elements at or above this index will shift up by 1." type: number optional: true - name: v @@ -2431,7 +2497,7 @@ modules: return-type: () fastcall: true - name: append - comment: Appends one or more an elements to end of the array. + comment: Appends one or more elements to the end of the array. type-parameters: [V] parameters: - name: a @@ -2456,8 +2522,7 @@ modules: type: '{V}' return-type: '{V}' - name: remove - comment: Removes and returns the element at the specified index from the array, - or from the end of the array. + comment: Removes and returns the element at index i (defaulting to the end of the array), shifting subsequent elements down by 1. Returns nil if no element was removed. type-parameters: [V] parameters: - name: a @@ -2465,7 +2530,7 @@ modules: type: '{V}' observes: write - name: i - comment: "Index to remove." + comment: "Index of the element to remove. Subsequent elements will shift down by 1." type: number? default-value: '#a' return-type: V? @@ -2483,7 +2548,7 @@ modules: default-value: nil return-type: () - name: pack - comment: Packs multiple arguments into a new array with length field n. + comment: Packs arguments into a table and sets an 'n' field with the total count. This is the safest way to pack varargs (...) that might contain nil values. type-parameters: [V] parameters: - name: ... @@ -2533,7 +2598,7 @@ modules: observes: write return-type: '{V}' - name: create - comment: Creates a new table with pre-allocated array capacity, optionally filled. + comment: Creates a new table with pre-allocated array capacity, optionally filled. Preallocation only benefits array portions and is counter-productive for dictionaries. type-parameters: [V] parameters: - name: "n" @@ -2546,7 +2611,7 @@ modules: return-type: '{V}' must-use: true - name: find - comment: Finds the first occurrence of a value in the array and returns its index. + comment: Finds the first occurrence of a value in the array and returns its index. Traversal stops at the first nil. type-parameters: [V] parameters: - name: t @@ -2562,7 +2627,7 @@ modules: return-type: number? must-use: true - name: clear - comment: Clears all elements from a table while keeping its capacity. + comment: Clears all elements from a table while keeping its capacity to avoid memory reallocations during future assignments. parameters: - name: t comment: Table to clear. @@ -2582,7 +2647,7 @@ modules: default-value: false return-type: '{V}' - name: freeze - comment: Freezes a table, making it read-only. + comment: Freezes a table, making it read-only. The freeze is shallow and does not affect nested tables. Raises an error if the table is already frozen or has a protected metatable. type-parameters: [table] parameters: - name: t @@ -2600,7 +2665,7 @@ modules: return-type: boolean must-use: true - name: clone - comment: Creates a shallow copy of the table. + comment: Creates a shallow copy of the table, copying its keys, values, and metatable. The clone is always unfrozen even if the source was frozen. type-parameters: [table] parameters: - name: t @@ -2706,7 +2771,7 @@ modules: return-type: uuid must-use: true - name: vector - comment: Vector manipuluation library. + comment: Vector manipulation library. callable: name: vector comment: Creates a new vector with the given component values. @@ -2930,7 +2995,7 @@ controls: end: tooltip: "Lua end keyword: closes control structures like if, do, while, for, and function." for: - tooltip: "Lua for loop: for var = start, end, step do ... end" + tooltip: "Lua for loop (numeric, generic or generalized): for var = start, end, step do ... end OR for key, val in iterator do ... end OR for key, val in tab do ... end" return: tooltip: "Lua return statement: returns a value from a function." while: @@ -2944,11 +3009,11 @@ controls: break: tooltip: "Lua break statement: exits the nearest loop." continue: - tooltip: "Luau continue statement: skip to the next loop iteration." + tooltip: "Luau continue statement: skips to the next loop iteration." local: tooltip: "Lua local keyword: declares a local variable or function." export: - tooltip: "Luau export keyword: declares a type that can be used in outside this module." + tooltip: "Luau export keyword: declares a type that can be used outside this module." in: tooltip: "Lua in keyword: used in generic for loops to iterate over elements." not: @@ -2994,10 +3059,10 @@ metamethods: parameters: - name: left type: any - comment: "The left operand of the addition." + comment: "Left operand of the addition." - name: right type: any - comment: "The right operand of the addition." + comment: "Right operand of the addition." return-type: any - name: __call comment: "Called when the table or object is called as if it were a function." @@ -3006,10 +3071,10 @@ metamethods: parameters: - name: self type: '{}' - comment: "The table being invoked." + comment: "Table being invoked." - name: ... type: "A..." - comment: "The arguments passed to the call." + comment: "Arguments passed to the call." return-type: "R..." - name: __concat comment: "Defines behavior for the concatenation (..) operator." @@ -3017,10 +3082,10 @@ metamethods: parameters: - name: left type: any - comment: "The left operand or object to concatenate." + comment: "Left operand or object to concatenate." - name: right type: any - comment: "The right operand or object to concatenate." + comment: "Right operand or object to concatenate." return-type: any - name: __div comment: "Defines behavior for the division (/) operator." @@ -3028,10 +3093,10 @@ metamethods: parameters: - name: left type: any - comment: "The left operand of the division (dividend)." + comment: "Left operand of the division (dividend)." - name: right type: any - comment: "The right operand of the division (divisor)." + comment: "Right operand of the division (divisor)." return-type: any - name: __eq comment: "Defines behavior for the equality (==) operator." @@ -3039,10 +3104,10 @@ metamethods: parameters: - name: left type: '{}' - comment: "The first value to compare." + comment: "First value to compare." - name: right type: '{}' - comment: "The second value to compare." + comment: "Second value to compare." return-type: boolean - name: __idiv comment: "Defines behavior for the floor division (//) operator." @@ -3050,10 +3115,10 @@ metamethods: parameters: - name: left type: any - comment: "The left operand of the floor division." + comment: "Left operand of the floor division." - name: right type: any - comment: "The right operand of the floor division." + comment: "Right operand of the floor division." return-type: any - name: __index comment: "Called when looking up a key that does not exist in the table." @@ -3061,10 +3126,10 @@ metamethods: parameters: - name: self type: '{}' - comment: "The table being accessed." + comment: "Table being accessed." - name: key type: any - comment: "The key that was not found in the table." + comment: "Key that was not found in the table." return-type: any variants: - comment: "Called as a function fallback when looking up a key that does not exist in the table." @@ -3072,10 +3137,10 @@ metamethods: parameters: - name: self type: '{}' - comment: "The table being accessed." + comment: "Table being accessed." - name: key type: any - comment: "The key that was not found in the table." + comment: "Key that was not found in the table." return-type: any - comment: "A fallback dictionary/table used to search for missing keys." type: "{ [any]: any }" @@ -3087,7 +3152,7 @@ metamethods: parameters: - name: self type: '{}' - comment: "The table or object being iterated." + comment: "Table or object being iterated." return-type: "((state: S, index: K) -> (K?, V...), S, K)" - name: __jsonhint comment: "String property used by lljson.encode to enforce table formatting rules." @@ -3098,10 +3163,10 @@ metamethods: parameters: - name: left type: '{}' - comment: "The left operand of the comparison." + comment: "Left operand of the comparison." - name: right type: '{}' - comment: "The right operand of the comparison." + comment: "Right operand of the comparison." return-type: boolean - name: __len comment: "Defines behavior for the length (#) operator." @@ -3109,7 +3174,7 @@ metamethods: parameters: - name: self type: '{}' - comment: "The object whose length is being measured." + comment: "Object whose length is being measured." return-type: number - name: __lt comment: "Defines behavior for the less-than (<) operator." @@ -3117,10 +3182,10 @@ metamethods: parameters: - name: left type: '{}' - comment: "The left operand of the comparison." + comment: "Left operand of the comparison." - name: right type: '{}' - comment: "The right operand of the comparison." + comment: "Right operand of the comparison." return-type: boolean - name: __metatable comment: "Protects the metatable. If present, getmetatable returns this value, and setmetatable will raise an error." @@ -3131,10 +3196,10 @@ metamethods: parameters: - name: left type: any - comment: "The left operand (dividend)." + comment: "Left operand (dividend)." - name: right type: any - comment: "The right operand (divisor)." + comment: "Right operand (divisor)." return-type: any - name: __mode comment: "Controls weak mapping of table elements. Valid values are 'k' (weak keys), 'v' (weak values), or 'kv' (both)." @@ -3145,10 +3210,10 @@ metamethods: parameters: - name: left type: any - comment: "The left operand of the multiplication." + comment: "Left operand of the multiplication." - name: right type: any - comment: "The right operand of the multiplication." + comment: "Right operand of the multiplication." return-type: any - name: __newindex comment: "Called when assigning a value to a key that does not exist in the table." @@ -3156,13 +3221,13 @@ metamethods: parameters: - name: self type: '{}' - comment: "The table being assigned." + comment: "Table being assigned." - name: key type: any - comment: "The key being created." + comment: "Key being assigned." - name: value type: any - comment: "The value being assigned to the key." + comment: "Value being assigned to the key." return-type: "()" variants: - comment: "Called as a function fallback when assigning a value to a key that does not exist in the table." @@ -3170,13 +3235,13 @@ metamethods: parameters: - name: self type: '{}' - comment: "The table being assigned." + comment: "Table being assigned." - name: key type: any - comment: "The key being created." + comment: "Key being created." - name: value type: any - comment: "The value being assigned to the key." + comment: "Value being assigned to the key." return-type: "()" - comment: "A fallback dictionary/table where new key-value assignments are forwarded." type: "{ [any]: any }" @@ -3187,10 +3252,10 @@ metamethods: parameters: - name: left type: any - comment: "The base value." + comment: "Base value." - name: right type: any - comment: "The exponent value." + comment: "Exponent value." return-type: any - name: __sub comment: "Defines behavior for the subtraction (-) operator." @@ -3198,10 +3263,10 @@ metamethods: parameters: - name: left type: any - comment: "The left operand of the subtraction (minuend)." + comment: "Left operand of the subtraction (minuend)." - name: right type: any - comment: "The right operand of the subtraction (subtrahend)." + comment: "Right operand of the subtraction (subtrahend)." return-type: any - name: __tojson comment: "Called during JSON serialization (with lljson.encode or lljson.slencode). Returns an alternative representation of the table to be serialized in its place." @@ -3209,7 +3274,7 @@ metamethods: parameters: - name: self type: '{}' - comment: "The table being serialized." + comment: "Table being serialized." - name: ctx type: '{ mode: "json" | "sljson", tight: boolean }' comment: "Context table containing metadata about the current serialization process, including 'mode' ('json' or 'sljson') and 'tight' (boolean)." @@ -3220,7 +3285,7 @@ metamethods: parameters: - name: self type: '{}' - comment: "The object being converted to a string." + comment: "Object being converted to a string." return-type: string - name: __unm comment: "Defines behavior for the unary negation (-) operator." @@ -3228,5 +3293,5 @@ metamethods: parameters: - name: self type: '{}' - comment: "The value being negated." + comment: "Value being negated." return-type: any From ebbaae9729618cb67fc14c641f5c560b91197938 Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Fri, 3 Jul 2026 13:43:20 +0000 Subject: [PATCH 3/8] update generated files --- generated/lua_keywords_pretty.xml | 225 +++++++++++++++--------------- generated/secondlife.d.luau | 2 +- generated/secondlife.docs.json | 74 +++++----- generated/secondlife_selene.yml | 164 +++++++++++++++------- 4 files changed, 263 insertions(+), 202 deletions(-) diff --git a/generated/lua_keywords_pretty.xml b/generated/lua_keywords_pretty.xml index c430b157..9a07e695 100644 --- a/generated/lua_keywords_pretty.xml +++ b/generated/lua_keywords_pretty.xml @@ -38,7 +38,7 @@ This file is auto-generated by https://github.com/secondlife/lsl-definitions. -- for tooltip - Lua for loop: for var = start, end, step do ... end + Lua for loop (numeric, generic or generalized): for var = start, end, step do ... end OR for key, val in iterator do ... end OR for key, val in tab do ... end return @@ -73,7 +73,7 @@ This file is auto-generated by https://github.com/secondlife/lsl-definitions. -- continue tooltip - Luau continue statement: skip to the next loop iteration. + Luau continue statement: skips to the next loop iteration. local @@ -83,7 +83,7 @@ This file is auto-generated by https://github.com/secondlife/lsl-definitions. -- export tooltip - Luau export keyword: declares a type that can be used in outside this module. + Luau export keyword: declares a type that can be used outside this module. in @@ -227,12 +227,12 @@ export type rotation = quaternion LLEvents tooltip - Event registration and management class for Second Life events + Event registration and management class for Second Life events. Supports adding multiple handlers per event and dynamic registration. LLTimers tooltip - Timer management class for scheduling periodic and one-time callbacks + Timer management class for scheduling periodic and one-time callbacks. Note: Do not mix LLTimers with old LSL timer functions (e.g., llcompat.SetTimerEvent), as they share the same underlying event and will interfere with each other. PrimParamsSetterType @@ -10603,7 +10603,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Checks if the value is truthy; if not, raises an error with the optional message. + Checks if the value is truthy; if not, raises an error with the optional message. Returns the value upon success. dangerouslyexecuterequiredmodule @@ -10640,7 +10640,7 @@ float falloff – ranges from 0.01 to 2.0 message tooltip - Error message to raise. + Error message (or object) to raise. Does not have to be a string. type T @@ -10649,7 +10649,7 @@ float falloff – ranges from 0.01 to 2.0 level tooltip - Level to attribute the error to in the call stack (optional, defaults to 1). + Level to attribute the error to in the call stack. Level 1 is the current function, level 2 is its caller and so on (optional, defaults to 1). type number? @@ -10662,7 +10662,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Raises an error with the specified object and optional call stack level. + Raises an error with the specified object. The optional level determines which call stack level is blamed for the error. gcinfo @@ -10703,7 +10703,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns the metatable for the specified object. + Returns the metatable for the specified object. If the metatable has a '__metatable' field, returns its value instead. ipairs @@ -10730,7 +10730,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns an iterator for numeric key-value pairs in the table. + Returns an iterator for sequential integer key-value pairs in the table. Iteration halts at the first nil value. newproxy @@ -10777,7 +10777,7 @@ float falloff – ranges from 0.01 to 2.0 i tooltip - Key to start traversal after (optional, defaults to nil). + Key to start traversal after. Omit or pass nil to fetch the first key-value pair (optional, defaults to nil). type K? @@ -10790,7 +10790,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns the next key-value pair in the table traversal order. + Returns the next key-value pair in the table traversal order. If the index is nil or omitted, returns the first pair. pairs @@ -10855,7 +10855,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Calls function f with parameters args, returning success and function results or an error. + Executes a function in protected mode. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message. print @@ -11067,7 +11067,7 @@ float falloff – ranges from 0.01 to 2.0 i tooltip - Index or '#' to count arguments. + An index number starting from 1 (or negative starting from the end), or '#' to return the total arguments count type string | number @@ -11089,7 +11089,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns a subset of arguments or the number of arguments. + Returns a subset of arguments starting from the specified index (supports negative indexing). If index is '#' returns the number of arguments. setmetatable @@ -11126,7 +11126,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Changes the metatable for the given table. + Changes the metatable for the given table. Raises an error if the table already has a protected metatable (with a '__metatable' field). tonumber @@ -11145,7 +11145,7 @@ float falloff – ranges from 0.01 to 2.0 base tooltip - Base for the conversion (optional, defaults to 10). + Base for the conversion, supporting values from 2 to 36 (optional, defaults to 10). type number? @@ -11158,7 +11158,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Converts the input string to a number in the specified base. + Converts the input string to a number in the specified base. Returns nil if the conversion fails. toquaternion @@ -11168,7 +11168,7 @@ float falloff – ranges from 0.01 to 2.0 value tooltip - + String to convert to a quaternion. type string? | quaternion @@ -11191,7 +11191,7 @@ float falloff – ranges from 0.01 to 2.0 value tooltip - + String to convert to a rotation. type string? | quaternion @@ -11231,7 +11231,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Converts the input object to a string. + Converts the input object to a string. Calls the metatable's '__tostring' metamethod if present. touuid @@ -11241,7 +11241,7 @@ float falloff – ranges from 0.01 to 2.0 val tooltip - + String to convert to an uuid. type string? | buffer | uuid @@ -11264,7 +11264,7 @@ float falloff – ranges from 0.01 to 2.0 val tooltip - + String to convert to a vector. type string? | vector @@ -11464,7 +11464,8 @@ float falloff – ranges from 0.01 to 2.0 0.0 tooltip Shifts n by i bits to the right. If i is negative, a left shift is performed. -Does an arithmetic shift: The most significant bit of n is propagated during the shift. +Does an arithmetic shift: The most significant bit of n is propagated during the shift. +Returns 0 if i < -31, or all sign bits if i > 31. bit32.band @@ -11590,7 +11591,7 @@ Returns true if result is non-zero. n tooltip - + Number whose byte order will be swapped. type number @@ -11603,7 +11604,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Swap byte order + Swap byte order. bit32.countlz @@ -11613,7 +11614,7 @@ Returns true if result is non-zero. n tooltip - + Number whose leading zeros will be counted. type number @@ -11626,7 +11627,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Count leading zeros + Count leading zeros. bit32.countrz @@ -11636,7 +11637,7 @@ Returns true if result is non-zero. n tooltip - + Number whose trailing zeros will be counted. type number @@ -11649,7 +11650,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Count trailing zeros + Count trailing zeros. bit32.extract @@ -11659,7 +11660,7 @@ Returns true if result is non-zero. n tooltip - + Number to extract from. type number @@ -11668,7 +11669,7 @@ Returns true if result is non-zero. field tooltip - + Starting index. type number @@ -11677,7 +11678,7 @@ Returns true if result is non-zero. width tooltip - (optional, defaults to 1). + Number of bits to extract (optional, defaults to 1). type number? @@ -11690,7 +11691,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Extracts bits from n at position field with width + Extracts bits from n at position field with width. Raises an error if the selected bit range goes outside [0, 31]. bit32.lrotate @@ -11754,7 +11755,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Shifts n by i bits to the left. If i is negative, a right shift is performed. + Shifts n by i bits to the left. If i is negative, a right shift is performed. Returns 0 if i is outside the [-31, 31] range. bit32.replace @@ -11764,7 +11765,7 @@ Returns true if result is non-zero. n tooltip - + Number to replace in. type number @@ -11773,7 +11774,7 @@ Returns true if result is non-zero. v tooltip - + Value containing the new bits to insert. type number @@ -11782,7 +11783,7 @@ Returns true if result is non-zero. field tooltip - + Starting index. type number @@ -11791,7 +11792,7 @@ Returns true if result is non-zero. width tooltip - (optional, defaults to 1). + Number of bits to replace (optional, defaults to 1). type number? @@ -11804,7 +11805,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Replaces bits in n at position field with width using value v + Replaces bits in n at position field with width using value v. Raises an error if the selected bit range goes outside [0, 31]. bit32.rrotate @@ -11868,7 +11869,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Shifts n by i bits to the right. If i is negative, a left shift is performed. + Shifts n by i bits to the right. If i is negative, a left shift is performed. Returns 0 if i is outside the [-31, 31] range. bit32.s32 @@ -11949,7 +11950,7 @@ Returns true if result is non-zero. targetOffset tooltip - Offset in target buffer. + 0-based offset in target buffer. type number @@ -11967,7 +11968,7 @@ Returns true if result is non-zero. sourceOffset tooltip - Offset in source buffer (optional, defaults to 0). + 0-based offset in source buffer (optional, defaults to 0). type number? @@ -11976,7 +11977,7 @@ Returns true if result is non-zero. count tooltip - Number of bytes to copy (optional, defaults to buffer.len(b) - sourceOffset). + Number of bytes to copy (optional, defaults to buffer.len(source) - sourceOffset). type number? @@ -12031,7 +12032,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to start filling. + 0-based byte offset to start filling. type number @@ -12168,7 +12169,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12200,7 +12201,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12232,7 +12233,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12264,7 +12265,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12296,7 +12297,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12328,7 +12329,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to start reading. + 0-based byte offset to start reading. type number @@ -12369,7 +12370,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12401,7 +12402,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12433,7 +12434,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to read from. + 0-based byte offset to read from. type number @@ -12538,7 +12539,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12579,7 +12580,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12620,7 +12621,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12661,7 +12662,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12702,7 +12703,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12743,7 +12744,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12793,7 +12794,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12834,7 +12835,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12875,7 +12876,7 @@ Returns true if result is non-zero. offset tooltip - Byte offset to write at. + 0-based byte offset to write at. type number @@ -12996,7 +12997,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Resumes a coroutine, returning true and results if successful, or false and an error. + Resumes a coroutine. Returns true followed by any values passed to coroutine.yield() or returned by the function. If an error occurs, returns false and the error message. coroutine.running @@ -13185,7 +13186,7 @@ Returns true if result is non-zero. data tooltip - + Base64 encoded string to decode. type string @@ -13194,7 +13195,7 @@ Returns true if result is non-zero. asBuffer tooltip - (optional, defaults to false). + Decodes the payload as a string (optional, defaults to false). type false? @@ -13217,7 +13218,7 @@ Returns true if result is non-zero. data tooltip - + String or buffer to encode to base64 format. type string | buffer @@ -13295,7 +13296,7 @@ Returns true if result is non-zero. json tooltip - + JSON string to deserialize into a table or value. type string @@ -13304,7 +13305,7 @@ Returns true if result is non-zero. options tooltip - (optional, defaults to {track_path=false, reviver=nil}). + Optional configuration settings and reviver function to apply during parsing (optional, defaults to {track_path=false, reviver=nil}). type LLJsonDecodeOptions? @@ -13327,7 +13328,7 @@ Returns true if result is non-zero. value tooltip - + Value (table, string, number, etc.) to serialize into JSON. type any @@ -13336,7 +13337,7 @@ Returns true if result is non-zero. options tooltip - (optional, defaults to {allow_sparse=false, skip_tojson=false, replacer=nil}). + Optional configuration settings and replacer function to customize serialization formatting (optional, defaults to {allow_sparse=false, skip_tojson=false, replacer=nil}). type LLJsonEncodeOptions? @@ -13359,7 +13360,7 @@ Returns true if result is non-zero. json tooltip - + SL-typed JSON string to deserialize. type string @@ -13368,7 +13369,7 @@ Returns true if result is non-zero. options tooltip - (optional, defaults to {track_path=false, reviver=nil}). + Optional configuration settings to apply during parsing (optional, defaults to {track_path=false, reviver=nil}). type LLJsonDecodeOptions? @@ -13391,7 +13392,7 @@ Returns true if result is non-zero. value tooltip - + Value to serialize into SL-typed JSON. type any @@ -13400,7 +13401,7 @@ Returns true if result is non-zero. options tooltip - (optional, defaults to {allow_sparse=false, skip_tojson=false, tight=false, replacer=nil}). + Optional configuration settings to customize serialization formatting (optional, defaults to {allow_sparse=false, skip_tojson=false, tight=false, replacer=nil}). type LLJsonEncodeOptions? @@ -13624,7 +13625,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns the arc tangent of y/x in radians, using the signs to determine the quadrant. + Returns the arc tangent of y/x in radians, using the signs to determine the quadrant. Note the argument order: Y is the first parameter, X is the second parameter. math.ceil @@ -13688,7 +13689,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns n clamped between min and max. + Returns n clamped between min and max. Raises an error if min is greater than max. math.cos @@ -13868,7 +13869,7 @@ Returns true if result is non-zero. n tooltip - A number. + Number to check as finite. type number @@ -13891,7 +13892,7 @@ Returns true if result is non-zero. n tooltip - A number. + Number to check as infinite. type number @@ -13914,7 +13915,7 @@ Returns true if result is non-zero. n tooltip - A number. + Number to check as NAN. type number @@ -14065,7 +14066,7 @@ Returns true if result is non-zero. n tooltip - A number. + Number to map. type number @@ -14074,7 +14075,7 @@ Returns true if result is non-zero. inMin tooltip - A number. + Lower bound of the input range. type number @@ -14083,7 +14084,7 @@ Returns true if result is non-zero. inMax tooltip - A number. + Upper bound of the input range. type number @@ -14092,7 +14093,7 @@ Returns true if result is non-zero. outMin tooltip - A number. + Lower bound of the output range. type number @@ -14101,7 +14102,7 @@ Returns true if result is non-zero. outMax tooltip - A number. + Upper bound of the output range. type number @@ -14124,7 +14125,7 @@ Returns true if result is non-zero. n tooltip - A number. + A number to find the maximum from. type number @@ -14156,7 +14157,7 @@ Returns true if result is non-zero. n tooltip - A number. + A number to find the minimum from. type number @@ -14242,7 +14243,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns Perlin noise value for the point (x, y, z). + Returns Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]. math.pow @@ -14364,7 +14365,7 @@ Returns true if result is non-zero. n tooltip - A number to round to the nearest integer. + A number to round to the nearest integer. Halfway values are rounded away from zero. type number @@ -15035,7 +15036,7 @@ Returns true if result is non-zero. init tooltip - Starting index (optional, defaults to 1). + Index to start the search from (supports negative indexing) (optional, defaults to 1). type number? @@ -15044,7 +15045,7 @@ Returns true if result is non-zero. plain tooltip - Perform raw search (optional, defaults to false). + Perform raw search. If true, turns off pattern matching and performs a raw, case-sensitive substring match (optional, defaults to false). type boolean? @@ -15057,7 +15058,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Finds the first instance of the pattern in the string. + Finds the first instance of the pattern in the string. Returns the start and end indices of the first match, followed by any captured substrings. Returns nil if no match is found. string.format @@ -15121,7 +15122,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns an iterator function for pattern matches + Returns an iterator function for pattern matches. string.gsub @@ -15171,7 +15172,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Performs pattern-based substitution in a string. + Performs pattern-based substitution in a string. Returns a copy of the string with substitutions made, followed by the total number of substitutions that occurred. string.len @@ -15194,7 +15195,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns the number of bytes in the string. Identical to #s + Returns the number of bytes in the string. Identical to #s. string.lower @@ -15345,7 +15346,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns the input string repeated a given number of times. + Returns the input string repeated n times. Returns an empty string if n is zero or negative. string.reverse @@ -15387,7 +15388,7 @@ Returns true if result is non-zero. separator tooltip - Separator to split on (optional, defaults to ","). + Separator to split on. If empty, the string is split into individual bytes (optional, defaults to ","). type string? @@ -15400,7 +15401,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Splits a string by separator. Returns a list of substrings. + Splits a string by separator. Returns a list of substrings. If the separator is empty, the string is split into individual one-byte substrings. string.sub @@ -15419,7 +15420,7 @@ Returns true if result is non-zero. i tooltip - Starting index. + Starting index (supports negative indexing). type number @@ -15428,7 +15429,7 @@ Returns true if result is non-zero. j tooltip - Ending index (optional, defaults to #s). + Ending index (supports negative indexing) (optional, defaults to #s). type number? @@ -15548,7 +15549,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Appends one or more an elements to end of the array. + Appends one or more elements to the end of the array. table.clear @@ -15571,7 +15572,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Clears all elements from a table while keeping its capacity. + Clears all elements from a table while keeping its capacity to avoid memory reallocations during future assignments. table.clone @@ -15598,7 +15599,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Creates a shallow copy of the table. + Creates a shallow copy of the table, copying its keys, values, and metatable. The clone is always unfrozen even if the source was frozen. table.concat @@ -15684,7 +15685,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Creates a new table with pre-allocated array capacity, optionally filled. + Creates a new table with pre-allocated array capacity, optionally filled. Preallocation only benefits array portions and is counter-productive for dictionaries. table.extend @@ -15765,7 +15766,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Finds the first occurrence of a value in the array and returns its index. + Finds the first occurrence of a value in the array and returns its index. Traversal stops at the first nil. table.foreach @@ -15871,7 +15872,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Freezes a table, making it read-only. + Freezes a table, making it read-only. The freeze is shallow and does not affect nested tables. Raises an error if the table is already frozen or has a protected metatable. table.getn @@ -15919,7 +15920,7 @@ Returns true if result is non-zero. i tooltip - Index to insert at (default: at the end). + Index to insert at. Elements at or above this index will shift up by 1. type number @@ -15941,7 +15942,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Inserts an element at the specified index, or at the end of the array. + Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, table.isfrozen @@ -16077,7 +16078,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Packs multiple arguments into a new array with length field n. + Packs arguments into a table and sets an 'n' field with the total count. This is the safest way to pack varargs (...) that might contain nil values. table.remove @@ -16100,7 +16101,7 @@ Returns true if result is non-zero. i tooltip - Index to remove (optional, defaults to #a). + Index of the element to remove. Subsequent elements will shift down by 1 (optional, defaults to #a). type number? @@ -16113,7 +16114,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Removes and returns the element at the specified index from the array, or from the end of the array. + Removes and returns the element at index i (defaulting to the end of the array), shifting subsequent elements down by 1. Returns nil if no element was removed. table.shrink diff --git a/generated/secondlife.d.luau b/generated/secondlife.d.luau index 09b87455..2f16545b 100644 --- a/generated/secondlife.d.luau +++ b/generated/secondlife.d.luau @@ -414,7 +414,7 @@ declare debug: { & ((level: number, s: string) -> ...any) & ((func: (...any) -> ...any, s: string) -> ...any), traceback: ((co: thread, msg: string?, level: number?) -> string) - & ((message: string?, level: number?) -> string), + & ((msg: string?, level: number?) -> string), } diff --git a/generated/secondlife.docs.json b/generated/secondlife.docs.json index 65ecc7bd..f241d6d8 100644 --- a/generated/secondlife.docs.json +++ b/generated/secondlife.docs.json @@ -1,33 +1,33 @@ { "@sl-slua/global/assert": { - "documentation": "Checks if the value is truthy; if not, raises an error with the optional message." + "documentation": "Checks if the value is truthy; if not, raises an error with the optional message. Returns the value upon success." }, "@sl-slua/global/dangerouslyexecuterequiredmodule": { "documentation": "Dangerously executes a required module function" }, "@sl-slua/global/error": { - "documentation": "Raises an error with the specified object and optional call stack level." + "documentation": "Raises an error with the specified object. The optional level determines which call stack level is blamed for the error." }, "@sl-slua/global/gcinfo": { "documentation": "Returns the total heap size in kilobytes." }, "@sl-slua/global/getmetatable": { - "documentation": "Returns the metatable for the specified object." + "documentation": "Returns the metatable for the specified object. If the metatable has a '__metatable' field, returns its value instead." }, "@sl-slua/global/ipairs": { - "documentation": "Returns an iterator for numeric key-value pairs in the table." + "documentation": "Returns an iterator for sequential integer key-value pairs in the table. Iteration halts at the first nil value." }, "@sl-slua/global/newproxy": { "documentation": "Creates a new untyped userdata object with an optional metatable." }, "@sl-slua/global/next": { - "documentation": "Returns the next key-value pair in the table traversal order." + "documentation": "Returns the next key-value pair in the table traversal order. If the index is nil or omitted, returns the first pair." }, "@sl-slua/global/pairs": { "documentation": "Returns an iterator for all key-value pairs in the table." }, "@sl-slua/global/pcall": { - "documentation": "Calls function f with parameters args, returning success and function results or an error." + "documentation": "Executes a function in protected mode. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message." }, "@sl-slua/global/print": { "documentation": "Prints all arguments to standard output using Tab as a separator." @@ -48,13 +48,13 @@ "documentation": "Execute the named external module." }, "@sl-slua/global/select": { - "documentation": "Returns a subset of arguments or the number of arguments." + "documentation": "Returns a subset of arguments starting from the specified index (supports negative indexing). If index is '#' returns the number of arguments." }, "@sl-slua/global/setmetatable": { - "documentation": "Changes the metatable for the given table." + "documentation": "Changes the metatable for the given table. Raises an error if the table already has a protected metatable (with a '__metatable' field)." }, "@sl-slua/global/tonumber": { - "documentation": "Converts the input string to a number in the specified base." + "documentation": "Converts the input string to a number in the specified base. Returns nil if the conversion fails." }, "@sl-slua/global/toquaternion": { "documentation": "Converts a string to a quaternion, returns nil if invalid" @@ -63,7 +63,7 @@ "documentation": "Converts a string to a rotation (quaternion), returns nil if invalid" }, "@sl-slua/global/tostring": { - "documentation": "Converts the input object to a string." + "documentation": "Converts the input object to a string. Calls the metatable's '__tostring' metamethod if present." }, "@sl-slua/global/touuid": { "documentation": "Creates a new uuid from a string, buffer, or existing uuid. Returns nil if the string is not a valid UUID, or the buffer is shorter than 16 bytes." @@ -88,7 +88,7 @@ "learn_more_link": "https://luau.org/library/#bit32-library" }, "@sl-slua/global/bit32.arshift": { - "documentation": "Shifts n by i bits to the right. If i is negative, a left shift is performed.
Does an arithmetic shift: The most significant bit of n is propagated during the shift.", + "documentation": "Shifts n by i bits to the right. If i is negative, a left shift is performed.
Does an arithmetic shift: The most significant bit of n is propagated during the shift.
Returns 0 if i < -31, or all sign bits if i > 31.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#arshift" }, "@sl-slua/global/bit32.band": { @@ -112,7 +112,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#btest" }, "@sl-slua/global/bit32.extract": { - "documentation": "Extracts bits from n at position field with width", + "documentation": "Extracts bits from n at position field with width. Raises an error if the selected bit range goes outside [0, 31].", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#extract" }, "@sl-slua/global/bit32.lrotate": { @@ -120,11 +120,11 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#lrotate" }, "@sl-slua/global/bit32.lshift": { - "documentation": "Shifts n by i bits to the left. If i is negative, a right shift is performed.", + "documentation": "Shifts n by i bits to the left. If i is negative, a right shift is performed. Returns 0 if i is outside the [-31, 31] range.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#lshift" }, "@sl-slua/global/bit32.replace": { - "documentation": "Replaces bits in n at position field with width using value v", + "documentation": "Replaces bits in n at position field with width using value v. Raises an error if the selected bit range goes outside [0, 31].", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#replace" }, "@sl-slua/global/bit32.rrotate": { @@ -132,7 +132,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#rrotate" }, "@sl-slua/global/bit32.rshift": { - "documentation": "Shifts n by i bits to the right. If i is negative, a left shift is performed.", + "documentation": "Shifts n by i bits to the right. If i is negative, a left shift is performed. Returns 0 if i is outside the [-31, 31] range.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#rshift" }, "@sl-slua/global/bit32.s32": { @@ -144,15 +144,15 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#smul" }, "@sl-slua/global/bit32.countlz": { - "documentation": "Count leading zeros", + "documentation": "Count leading zeros.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#countlz" }, "@sl-slua/global/bit32.countrz": { - "documentation": "Count trailing zeros", + "documentation": "Count trailing zeros.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#countrz" }, "@sl-slua/global/bit32.byteswap": { - "documentation": "Swap byte order", + "documentation": "Swap byte order.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/bit32#byteswap" }, "@sl-slua/global/buffer": { @@ -272,7 +272,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/coroutine#create" }, "@sl-slua/global/coroutine.resume": { - "documentation": "Resumes a coroutine, returning true and results if successful, or false and an error.", + "documentation": "Resumes a coroutine. Returns true followed by any values passed to coroutine.yield() or returned by the function. If an error occurs, returns false and the error message.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/coroutine#resume" }, "@sl-slua/global/coroutine.running": { @@ -411,7 +411,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#atan" }, "@sl-slua/global/math.atan2": { - "documentation": "Returns the arc tangent of y/x in radians, using the signs to determine the quadrant.", + "documentation": "Returns the arc tangent of y/x in radians, using the signs to determine the quadrant. Note the argument order: Y is the first parameter, X is the second parameter.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#atan2" }, "@sl-slua/global/math.ceil": { @@ -419,7 +419,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#ceil" }, "@sl-slua/global/math.clamp": { - "documentation": "Returns n clamped between min and max.", + "documentation": "Returns n clamped between min and max. Raises an error if min is greater than max.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#clamp" }, "@sl-slua/global/math.cos": { @@ -483,7 +483,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#modf" }, "@sl-slua/global/math.noise": { - "documentation": "Returns Perlin noise value for the point (x, y, z).", + "documentation": "Returns Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0].", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#noise" }, "@sl-slua/global/math.pow": { @@ -658,7 +658,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#char" }, "@sl-slua/global/string.find": { - "documentation": "Finds the first instance of the pattern in the string.", + "documentation": "Finds the first instance of the pattern in the string. Returns the start and end indices of the first match, followed by any captured substrings. Returns nil if no match is found.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#find" }, "@sl-slua/global/string.format": { @@ -666,15 +666,15 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#format" }, "@sl-slua/global/string.gmatch": { - "documentation": "Returns an iterator function for pattern matches", + "documentation": "Returns an iterator function for pattern matches.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#gmatch" }, "@sl-slua/global/string.gsub": { - "documentation": "Performs pattern-based substitution in a string.", + "documentation": "Performs pattern-based substitution in a string. Returns a copy of the string with substitutions made, followed by the total number of substitutions that occurred.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#gsub" }, "@sl-slua/global/string.len": { - "documentation": "Returns the number of bytes in the string. Identical to #s", + "documentation": "Returns the number of bytes in the string. Identical to #s.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#len" }, "@sl-slua/global/string.lower": { @@ -694,7 +694,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#packsize" }, "@sl-slua/global/string.rep": { - "documentation": "Returns the input string repeated a given number of times.", + "documentation": "Returns the input string repeated n times. Returns an empty string if n is zero or negative.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#rep" }, "@sl-slua/global/string.reverse": { @@ -702,7 +702,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#reverse" }, "@sl-slua/global/string.split": { - "documentation": "Splits a string by separator. Returns a list of substrings.", + "documentation": "Splits a string by separator. Returns a list of substrings. If the separator is empty, the string is split into individual one-byte substrings.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#split" }, "@sl-slua/global/string.sub": { @@ -742,11 +742,11 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#maxn" }, "@sl-slua/global/table.insert": { - "documentation": "Inserts an element at the specified index, or at the end of the array.", + "documentation": "Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1,", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#insert" }, "@sl-slua/global/table.append": { - "documentation": "Appends one or more an elements to end of the array.", + "documentation": "Appends one or more elements to the end of the array.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#append" }, "@sl-slua/global/table.extend": { @@ -754,7 +754,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#extend" }, "@sl-slua/global/table.remove": { - "documentation": "Removes and returns the element at the specified index from the array, or from the end of the array.", + "documentation": "Removes and returns the element at index i (defaulting to the end of the array), shifting subsequent elements down by 1. Returns nil if no element was removed.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#remove" }, "@sl-slua/global/table.sort": { @@ -762,7 +762,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#sort" }, "@sl-slua/global/table.pack": { - "documentation": "Packs multiple arguments into a new array with length field n.", + "documentation": "Packs arguments into a table and sets an 'n' field with the total count. This is the safest way to pack varargs (...) that might contain nil values.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#pack" }, "@sl-slua/global/table.unpack": { @@ -774,15 +774,15 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#move" }, "@sl-slua/global/table.create": { - "documentation": "Creates a new table with pre-allocated array capacity, optionally filled.", + "documentation": "Creates a new table with pre-allocated array capacity, optionally filled. Preallocation only benefits array portions and is counter-productive for dictionaries.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#create" }, "@sl-slua/global/table.find": { - "documentation": "Finds the first occurrence of a value in the array and returns its index.", + "documentation": "Finds the first occurrence of a value in the array and returns its index. Traversal stops at the first nil.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#find" }, "@sl-slua/global/table.clear": { - "documentation": "Clears all elements from a table while keeping its capacity.", + "documentation": "Clears all elements from a table while keeping its capacity to avoid memory reallocations during future assignments.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#clear" }, "@sl-slua/global/table.shrink": { @@ -790,7 +790,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#shrink" }, "@sl-slua/global/table.freeze": { - "documentation": "Freezes a table, making it read-only.", + "documentation": "Freezes a table, making it read-only. The freeze is shallow and does not affect nested tables. Raises an error if the table is already frozen or has a protected metatable.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#freeze" }, "@sl-slua/global/table.isfrozen": { @@ -798,7 +798,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#isfrozen" }, "@sl-slua/global/table.clone": { - "documentation": "Creates a shallow copy of the table.", + "documentation": "Creates a shallow copy of the table, copying its keys, values, and metatable. The clone is always unfrozen even if the source was frozen.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#clone" }, "@sl-slua/global/utf8": { diff --git a/generated/secondlife_selene.yml b/generated/secondlife_selene.yml index 64872e86..5bab7e91 100644 --- a/generated/secondlife_selene.yml +++ b/generated/secondlife_selene.yml @@ -4909,7 +4909,7 @@ globals: - type: string required: false description: Checks if the value is truthy; if not, raises an error with the optional - message. + message. Returns the value upon success. dangerouslyexecuterequiredmodule: args: - type: function @@ -4919,8 +4919,8 @@ globals: - type: any - type: number required: false - description: Raises an error with the specified object and optional call stack - level. + description: Raises an error with the specified object. The optional level determines + which call stack level is blamed for the error. gcinfo: args: [] description: Returns the total heap size in kilobytes. @@ -4930,11 +4930,13 @@ globals: getmetatable: args: - type: table - description: Returns the metatable for the specified object. + description: Returns the metatable for the specified object. If the metatable + has a '__metatable' field, returns its value instead. ipairs: args: - type: table - description: Returns an iterator for numeric key-value pairs in the table. + description: Returns an iterator for sequential integer key-value pairs in the + table. Iteration halts at the first nil value. loadstring: removed: true description: loadstring is removed in SLua. @@ -4948,7 +4950,8 @@ globals: - type: table - type: any required: false - description: Returns the next key-value pair in the table traversal order. + description: Returns the next key-value pair in the table traversal order. If + the index is nil or omitted, returns the first pair. pairs: args: - type: table @@ -4957,8 +4960,9 @@ globals: args: - type: function - type: '...' - description: Calls function f with parameters args, returning success and function - results or an error. + description: Executes a function in protected mode. Returns a boolean indicating + success. If true, it also returns the function's results. If false, it returns + the error message. print: args: - type: '...' @@ -4991,7 +4995,8 @@ globals: args: - type: any - type: '...' - description: Returns a subset of arguments or the number of arguments. + description: Returns a subset of arguments starting from the specified index (supports + negative indexing). If index is '#' returns the number of arguments. setfenv: removed: true description: setfenv is removed in SLua. @@ -4999,14 +5004,16 @@ globals: args: - type: table - type: table - description: Changes the metatable for the given table. + description: Changes the metatable for the given table. Raises an error if the + table already has a protected metatable (with a '__metatable' field). tonumber: args: - type: string - type: number required: false must_use: true - description: Converts the input string to a number in the specified base. + description: Converts the input string to a number in the specified base. Returns + nil if the conversion fails. toquaternion: args: - type: string @@ -5020,7 +5027,8 @@ globals: tostring: args: - type: any - description: Converts the input object to a string. + description: Converts the input object to a string. Calls the metatable's '__tostring' + metamethod if present. touuid: args: - type: string @@ -5066,7 +5074,9 @@ globals: is performed. Does an arithmetic shift: The most significant bit of n is propagated during - the shift.' + the shift. + + Returns 0 if i < -31, or all sign bits if i > 31.' bit32.band: args: - type: '...' @@ -5101,7 +5111,8 @@ globals: - type: number required: false must_use: true - description: Extracts bits from n at position field with width + description: Extracts bits from n at position field with width. Raises an error + if the selected bit range goes outside [0, 31]. bit32.lrotate: args: - type: number @@ -5115,7 +5126,7 @@ globals: - type: number must_use: true description: Shifts n by i bits to the left. If i is negative, a right shift is - performed. + performed. Returns 0 if i is outside the [-31, 31] range. bit32.replace: args: - type: number @@ -5124,7 +5135,8 @@ globals: - type: number required: false must_use: true - description: Replaces bits in n at position field with width using value v + description: Replaces bits in n at position field with width using value v. Raises + an error if the selected bit range goes outside [0, 31]. bit32.rrotate: args: - type: number @@ -5138,7 +5150,7 @@ globals: - type: number must_use: true description: Shifts n by i bits to the right. If i is negative, a left shift is - performed. + performed. Returns 0 if i is outside the [-31, 31] range. bit32.s32: args: - type: number @@ -5157,17 +5169,17 @@ globals: args: - type: number must_use: true - description: Count leading zeros + description: Count leading zeros. bit32.countrz: args: - type: number must_use: true - description: Count trailing zeros + description: Count trailing zeros. bit32.byteswap: args: - type: number must_use: true - description: Swap byte order + description: Swap byte order. buffer.create: args: - type: number @@ -5384,8 +5396,9 @@ globals: - type: display: thread - type: '...' - description: Resumes a coroutine, returning true and results if successful, or - false and an error. + description: Resumes a coroutine. Returns true followed by any values passed to + coroutine.yield() or returned by the function. If an error occurs, returns false + and the error message. coroutine.running: args: [] must_use: true @@ -5568,8 +5581,9 @@ globals: - type: number - type: number must_use: true - description: Returns the arc tangent of y/x in radians, using the signs to determine - the quadrant. + description: 'Returns the arc tangent of y/x in radians, using the signs to determine + the quadrant. Note the argument order: Y is the first parameter, X is the second + parameter.' math.ceil: args: - type: number @@ -5581,7 +5595,8 @@ globals: - type: number - type: number must_use: true - description: Returns n clamped between min and max. + description: Returns n clamped between min and max. Raises an error if min is + greater than max. math.cos: args: - type: number @@ -5679,7 +5694,8 @@ globals: - type: number required: false must_use: true - description: Returns Perlin noise value for the point (x, y, z). + description: Returns Perlin noise value for the point (x, y, z). The return value + is in the range [-1.0, 1.0]. math.pow: args: - type: number @@ -5960,7 +5976,9 @@ globals: - type: bool required: false must_use: true - description: Finds the first instance of the pattern in the string. + description: Finds the first instance of the pattern in the string. Returns the + start and end indices of the first match, followed by any captured substrings. + Returns nil if no match is found. string.format: args: - type: string @@ -5973,7 +5991,7 @@ globals: - type: string - type: string must_use: true - description: Returns an iterator function for pattern matches + description: Returns an iterator function for pattern matches. string.gsub: args: - type: string @@ -5982,12 +6000,14 @@ globals: - type: number required: false must_use: true - description: Performs pattern-based substitution in a string. + description: Performs pattern-based substitution in a string. Returns a copy of + the string with substitutions made, followed by the total number of substitutions + that occurred. string.len: args: - type: string must_use: true - description: 'Returns the number of bytes in the string. Identical to #s' + description: 'Returns the number of bytes in the string. Identical to #s.' string.lower: args: - type: string @@ -6018,7 +6038,8 @@ globals: - type: string - type: number must_use: true - description: Returns the input string repeated a given number of times. + description: Returns the input string repeated n times. Returns an empty string + if n is zero or negative. string.reverse: args: - type: string @@ -6030,7 +6051,8 @@ globals: - type: string required: false must_use: true - description: Splits a string by separator. Returns a list of substrings. + description: Splits a string by separator. Returns a list of substrings. If the + separator is empty, the string is split into individual one-byte substrings. string.sub: args: - type: string @@ -6101,13 +6123,14 @@ globals: - type: number required: false - type: any - description: Inserts an element at the specified index, or at the end of the array. + description: Inserts an element at index i, shifting subsequent elements up by + 1. The index must be within the range [1, table.append: args: - type: table observes: write - type: '...' - description: Appends one or more an elements to end of the array. + description: Appends one or more elements to the end of the array. table.extend: args: - type: table @@ -6121,8 +6144,9 @@ globals: observes: write - type: number required: false - description: Removes and returns the element at the specified index from the array, - or from the end of the array. + description: Removes and returns the element at index i (defaulting to the end + of the array), shifting subsequent elements down by 1. Returns nil if no element + was removed. table.sort: args: - type: table @@ -6134,7 +6158,8 @@ globals: args: - type: '...' must_use: true - description: Packs multiple arguments into a new array with length field n. + description: Packs arguments into a table and sets an 'n' field with the total + count. This is the safest way to pack varargs (...) that might contain nil values. table.unpack: args: - type: table @@ -6161,7 +6186,8 @@ globals: required: false must_use: true description: Creates a new table with pre-allocated array capacity, optionally - filled. + filled. Preallocation only benefits array portions and is counter-productive + for dictionaries. table.find: args: - type: table @@ -6170,12 +6196,13 @@ globals: required: false must_use: true description: Finds the first occurrence of a value in the array and returns its - index. + index. Traversal stops at the first nil. table.clear: args: - type: table observes: write - description: Clears all elements from a table while keeping its capacity. + description: Clears all elements from a table while keeping its capacity to avoid + memory reallocations during future assignments. table.shrink: args: - type: table @@ -6185,7 +6212,9 @@ globals: table.freeze: args: - type: table - description: Freezes a table, making it read-only. + description: Freezes a table, making it read-only. The freeze is shallow and does + not affect nested tables. Raises an error if the table is already frozen or + has a protected metatable. table.isfrozen: args: - type: table @@ -6195,7 +6224,8 @@ globals: args: - type: table must_use: true - description: Creates a shallow copy of the table. + description: Creates a shallow copy of the table, copying its keys, values, and + metatable. The clone is always unfrozen even if the source was frozen. utf8.charpattern: property: read-only type: string @@ -15492,15 +15522,20 @@ structs: x: property: read-only type: number + description: X component of the rotation/quaternion. y: property: read-only type: number + description: Y component of the rotation/quaternion. z: property: read-only type: number + description: Z component of the rotation/quaternion. s: property: read-only type: number + description: S component of the rotation/quaternion (equivalent to the W component + in other notations). uuid: __tostring: method: true @@ -15554,12 +15589,18 @@ structs: x: property: read-only type: number + description: X coordinate component of the vector (typically represents red + color, forward position, or pitch). y: property: read-only type: number + description: Y coordinate component of the vector (typically represents green + color, left/right position, or roll). z: property: read-only type: number + description: Z coordinate component of the vector (typically represents blue + color, altitude/upward position, or yaw). DetectedEvent: adjustDamage: method: true @@ -15694,12 +15735,17 @@ structs: index: property: read-only type: number + description: Index of the detected entity. valid: property: read-only type: bool + description: Returns true if the detected index is valid and contains active + data. canAdjustDamage: property: read-only type: bool + description: Returns true if the detected object or avatar can have its damage + adjusted. LLEvents: 'on': method: true @@ -15747,7 +15793,10 @@ structs: - timer - transaction_result - type: function - description: Registers a callback for an event. Returns the callback. + description: Registers a handler function to run whenever the specified event + occurs. Multiple handlers can be attached to the same event and will run in + the order they were added. Returns the same function passed in so it can be + used later with LLEvents:off(). 'off': method: true args: @@ -15794,7 +15843,9 @@ structs: - timer - transaction_result - type: function - description: Unregisters a callback. Returns true if found and removed. + description: Removes an event handler. If the function was added multiple times + via LLEvents:on(), only the last one added is removed. Returns true if the + function was found and removed, false otherwise. once: method: true args: @@ -15841,7 +15892,10 @@ structs: - timer - transaction_result - type: function - description: Registers a one-time callback. Returns the wrapper function. + description: Registers a one-time event handler. The function runs only once + and is automatically removed afterward. Returns a newly generated wrapper + function, which MUST be used if you want to manually remove the handler early + using LLEvents:off(). handlers: method: true args: @@ -15887,11 +15941,14 @@ structs: - run_time_permissions - timer - transaction_result - description: Returns a list of all handlers for a specific event. + description: Returns an array table containing all the functions currently handling + the specified event. Useful for debugging or for iterating to remove all functions + handling an event. eventNames: method: true args: [] - description: Returns a list of all event names that have handlers. + description: Returns an array table of all event names that currently have active + handler functions attached. at_rot_target: property: override-fields type: function @@ -16120,20 +16177,23 @@ structs: args: - type: number - type: function - description: Registers a callback to be called every N seconds. Returns the - callback. + description: Registers a repeating timer. The callback receives (expected_time, + interval). Returns the same function passed in so it can be removed later. once: method: true args: - type: number - type: function - description: Registers a callback to be called once after N seconds. Returns - the callback. + description: Registers a one-time timer. The timer runs only once and is automatically + removed afterward. The callback receives (expected_time, nil). Returns the + same function passed in, which can be used to cancel it early via LLTimers:off(). 'off': method: true args: - type: function - description: Unregisters a timer callback. Returns true if found and removed. + description: Stops and removes a timer. If the same function was added multiple + times, only the last one added is removed, regardless of its interval. Returns + true if the timer was found and removed, false otherwise. PrimParamsSetterType: apply: method: true From c373b7853eab28058fabc16db0058cfe209ef378 Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Fri, 3 Jul 2026 14:29:21 +0000 Subject: [PATCH 4/8] Removing all the "The"s --- slua_definitions.yaml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/slua_definitions.yaml b/slua_definitions.yaml index 0d64470b..5b9e3810 100644 --- a/slua_definitions.yaml +++ b/slua_definitions.yaml @@ -275,10 +275,10 @@ classes: parameters: - name: self - name: event - comment: "The name of the event to handle." + comment: "Name of the event to handle." type: LLEventName - name: callback - comment: "The function to execute when the event happens." + comment: "Function to execute when the event happens." type: LLEventHandler return-type: LLEventHandler - name: 'off' @@ -288,10 +288,10 @@ classes: parameters: - name: self - name: event - comment: "The name of the event to remove." + comment: "Name of the event to remove." type: LLEventName - name: callback - comment: "The function to remove. Note: To remove a handler added via LLEvents:once(), you must pass the specific wrapper function it returned." + comment: "Function to remove. Note: To remove a handler added via LLEvents:once(), you must pass the specific wrapper function it returned." type: LLEventHandler return-type: boolean - name: once @@ -301,10 +301,10 @@ classes: parameters: - name: self - name: event - comment: "The name of the event to handle." + comment: "Name of the event to handle." type: LLEventName - name: callback - comment: "The function to execute once when the event happens." + comment: "Function to execute once when the event happens." type: LLEventHandler return-type: LLEventHandler - name: handlers @@ -312,7 +312,7 @@ classes: parameters: - name: self - name: event - comment: "The name of the event to query." + comment: "Name of the event to query." type: LLEventName return-type: '{LLEventHandler}' - name: eventNames @@ -328,10 +328,10 @@ classes: parameters: - name: self - name: seconds - comment: "The interval in seconds. Minimum practical interval is ~0.022s (one server frame). An interval of 0 schedules the timer for the next frame." + comment: "Interval in seconds. Minimum practical interval is ~0.022s (one server frame). An interval of 0 schedules the timer for the next frame." type: number - name: callback - comment: "The function to execute when the time arrives." + comment: "Function to execute when the time arrives." type: LLTimerEveryCallback return-type: LLTimerCallback - name: once @@ -339,10 +339,10 @@ classes: parameters: - name: self - name: seconds - comment: "The time in seconds to wait before triggering. A value of 0 schedules it for the next frame." + comment: "Time in seconds to wait before triggering. A value of 0 schedules it for the next frame." type: number - name: callback - comment: "The function to execute once when the time arrives." + comment: "Function to execute once when the time arrives." type: LLTimerOnceCallback return-type: LLTimerCallback - name: 'off' @@ -350,7 +350,7 @@ classes: parameters: - name: self - name: callback - comment: "The function reference to remove." + comment: "Function reference to remove." type: LLTimerCallback return-type: boolean - name: PrimParamsSetterType From b7823d9e1abc2557359ef89727cae197d8075262 Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Fri, 3 Jul 2026 14:45:21 +0000 Subject: [PATCH 5/8] Changing ipairs() tooltip --- generated/lua_keywords_pretty.xml | 2 +- generated/secondlife.docs.json | 2 +- generated/secondlife_selene.yml | 2 +- slua_definitions.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/generated/lua_keywords_pretty.xml b/generated/lua_keywords_pretty.xml index 9a07e695..8259fc63 100644 --- a/generated/lua_keywords_pretty.xml +++ b/generated/lua_keywords_pretty.xml @@ -10730,7 +10730,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns an iterator for sequential integer key-value pairs in the table. Iteration halts at the first nil value. + Returns an iterator for sequential integer key-value pairs in the table. Iteration starts at 1 and halts at the first nil value.
newproxy diff --git a/generated/secondlife.docs.json b/generated/secondlife.docs.json index f241d6d8..d54472b6 100644 --- a/generated/secondlife.docs.json +++ b/generated/secondlife.docs.json @@ -15,7 +15,7 @@ "documentation": "Returns the metatable for the specified object. If the metatable has a '__metatable' field, returns its value instead." }, "@sl-slua/global/ipairs": { - "documentation": "Returns an iterator for sequential integer key-value pairs in the table. Iteration halts at the first nil value." + "documentation": "Returns an iterator for sequential integer key-value pairs in the table. Iteration starts at 1 and halts at the first nil value." }, "@sl-slua/global/newproxy": { "documentation": "Creates a new untyped userdata object with an optional metatable." diff --git a/generated/secondlife_selene.yml b/generated/secondlife_selene.yml index 5bab7e91..f935f79b 100644 --- a/generated/secondlife_selene.yml +++ b/generated/secondlife_selene.yml @@ -4936,7 +4936,7 @@ globals: args: - type: table description: Returns an iterator for sequential integer key-value pairs in the - table. Iteration halts at the first nil value. + table. Iteration starts at 1 and halts at the first nil value. loadstring: removed: true description: loadstring is removed in SLua. diff --git a/slua_definitions.yaml b/slua_definitions.yaml index 5b9e3810..a47660de 100644 --- a/slua_definitions.yaml +++ b/slua_definitions.yaml @@ -466,7 +466,7 @@ functions: type: string local-only: true - name: ipairs - comment: Returns an iterator for sequential integer key-value pairs in the table. Iteration halts at the first nil value. + comment: Returns an iterator for sequential integer key-value pairs in the table. Iteration starts at 1 and halts at the first nil value. type-parameters: [V] parameters: - name: tab From c97468aca2f93c3ed557946df9db76624f800dbb Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Fri, 3 Jul 2026 15:29:47 +0000 Subject: [PATCH 6/8] Removing () and some other changes --- generated/lua_keywords_pretty.xml | 26 ++++++++++----------- generated/secondlife.docs.json | 14 ++++++------ generated/secondlife_selene.yml | 35 ++++++++++++++-------------- slua_definitions.yaml | 38 +++++++++++++++---------------- 4 files changed, 56 insertions(+), 57 deletions(-) diff --git a/generated/lua_keywords_pretty.xml b/generated/lua_keywords_pretty.xml index 8259fc63..01ac16c3 100644 --- a/generated/lua_keywords_pretty.xml +++ b/generated/lua_keywords_pretty.xml @@ -10640,7 +10640,7 @@ float falloff – ranges from 0.01 to 2.0 message tooltip - Error message (or object) to raise. Does not have to be a string. + Error message, or object, to raise. Does not have to be a string. type T @@ -11067,7 +11067,7 @@ float falloff – ranges from 0.01 to 2.0 i tooltip - An index number starting from 1 (or negative starting from the end), or '#' to return the total arguments count + Index integer, or '#' to return the total arguments count. Supports negative indexing. type string | number @@ -11089,7 +11089,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns a subset of arguments starting from the specified index (supports negative indexing). If index is '#' returns the number of arguments. + Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#' returns the number of arguments. setmetatable @@ -11126,7 +11126,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Changes the metatable for the given table. Raises an error if the table already has a protected metatable (with a '__metatable' field). + Changes the metatable for the given table. Raises an error if the table already has a protected metatable (it has a '__metatable' field). tonumber @@ -11145,7 +11145,7 @@ float falloff – ranges from 0.01 to 2.0 base tooltip - Base for the conversion, supporting values from 2 to 36 (optional, defaults to 10). + Base for the conversion. Valid range is [2, 36] (optional, defaults to 10). type number? @@ -13712,7 +13712,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns the cosine of n (n is in radians). + Returns the cosine of n. n is in radians. math.cosh @@ -14033,7 +14033,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns the logarithm of n in the given base (default e). + Returns the logarithm of n in the given base, defaults to e. math.log10 @@ -14424,7 +14424,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns the sine of n (n is in radians). + Returns the sine of n. n is in radians. math.sinh @@ -14493,7 +14493,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns the tangent of n (n is in radians). + Returns the tangent of n. n is in radians. math.tanh @@ -15036,7 +15036,7 @@ Returns true if result is non-zero. init tooltip - Index to start the search from (supports negative indexing) (optional, defaults to 1). + Index to start the search from. Supports negative indexing (optional, defaults to 1). type number? @@ -15420,7 +15420,7 @@ Returns true if result is non-zero. i tooltip - Starting index (supports negative indexing). + Starting index. Supports negative indexing. type number @@ -15429,7 +15429,7 @@ Returns true if result is non-zero. j tooltip - Ending index (supports negative indexing) (optional, defaults to #s). + Ending index. Supports negative indexing (optional, defaults to #s). type number? @@ -16114,7 +16114,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Removes and returns the element at index i (defaulting to the end of the array), shifting subsequent elements down by 1. Returns nil if no element was removed. + Removes and returns the element at index i, shifting subsequent elements down by 1. Defaults to the end of the array. Returns nil if no element was removed. table.shrink diff --git a/generated/secondlife.docs.json b/generated/secondlife.docs.json index d54472b6..25475ad5 100644 --- a/generated/secondlife.docs.json +++ b/generated/secondlife.docs.json @@ -48,10 +48,10 @@ "documentation": "Execute the named external module." }, "@sl-slua/global/select": { - "documentation": "Returns a subset of arguments starting from the specified index (supports negative indexing). If index is '#' returns the number of arguments." + "documentation": "Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#' returns the number of arguments." }, "@sl-slua/global/setmetatable": { - "documentation": "Changes the metatable for the given table. Raises an error if the table already has a protected metatable (with a '__metatable' field)." + "documentation": "Changes the metatable for the given table. Raises an error if the table already has a protected metatable (it has a '__metatable' field)." }, "@sl-slua/global/tonumber": { "documentation": "Converts the input string to a number in the specified base. Returns nil if the conversion fails." @@ -423,7 +423,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#clamp" }, "@sl-slua/global/math.cos": { - "documentation": "Returns the cosine of n (n is in radians).", + "documentation": "Returns the cosine of n. n is in radians.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#cos" }, "@sl-slua/global/math.cosh": { @@ -459,7 +459,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#lerp" }, "@sl-slua/global/math.log": { - "documentation": "Returns the logarithm of n in the given base (default e).", + "documentation": "Returns the logarithm of n in the given base, defaults to e.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#log" }, "@sl-slua/global/math.log10": { @@ -511,7 +511,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#sign" }, "@sl-slua/global/math.sin": { - "documentation": "Returns the sine of n (n is in radians).", + "documentation": "Returns the sine of n. n is in radians.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#sin" }, "@sl-slua/global/math.sinh": { @@ -523,7 +523,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#sqrt" }, "@sl-slua/global/math.tan": { - "documentation": "Returns the tangent of n (n is in radians).", + "documentation": "Returns the tangent of n. n is in radians.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#tan" }, "@sl-slua/global/math.tanh": { @@ -754,7 +754,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#extend" }, "@sl-slua/global/table.remove": { - "documentation": "Removes and returns the element at index i (defaulting to the end of the array), shifting subsequent elements down by 1. Returns nil if no element was removed.", + "documentation": "Removes and returns the element at index i, shifting subsequent elements down by 1. Defaults to the end of the array. Returns nil if no element was removed.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#remove" }, "@sl-slua/global/table.sort": { diff --git a/generated/secondlife_selene.yml b/generated/secondlife_selene.yml index f935f79b..f1424775 100644 --- a/generated/secondlife_selene.yml +++ b/generated/secondlife_selene.yml @@ -4995,8 +4995,8 @@ globals: args: - type: any - type: '...' - description: Returns a subset of arguments starting from the specified index (supports - negative indexing). If index is '#' returns the number of arguments. + description: Returns a subset of arguments starting from the specified index. + Supports negative indexing. If index is '#' returns the number of arguments. setfenv: removed: true description: setfenv is removed in SLua. @@ -5005,7 +5005,7 @@ globals: - type: table - type: table description: Changes the metatable for the given table. Raises an error if the - table already has a protected metatable (with a '__metatable' field). + table already has a protected metatable (it has a '__metatable' field). tonumber: args: - type: string @@ -5601,7 +5601,7 @@ globals: args: - type: number must_use: true - description: Returns the cosine of n (n is in radians). + description: Returns the cosine of n. n is in radians. math.cosh: args: - type: number @@ -5652,7 +5652,7 @@ globals: - type: number required: false must_use: true - description: Returns the logarithm of n in the given base (default e). + description: Returns the logarithm of n in the given base, defaults to e. math.log10: args: - type: number @@ -5735,7 +5735,7 @@ globals: args: - type: number must_use: true - description: Returns the sine of n (n is in radians). + description: Returns the sine of n. n is in radians. math.sinh: args: - type: number @@ -5750,7 +5750,7 @@ globals: args: - type: number must_use: true - description: Returns the tangent of n (n is in radians). + description: Returns the tangent of n. n is in radians. math.tanh: args: - type: number @@ -6144,9 +6144,8 @@ globals: observes: write - type: number required: false - description: Removes and returns the element at index i (defaulting to the end - of the array), shifting subsequent elements down by 1. Returns nil if no element - was removed. + description: Removes and returns the element at index i, shifting subsequent elements + down by 1. Defaults to the end of the array. Returns nil if no element was removed. table.sort: args: - type: table @@ -15534,8 +15533,8 @@ structs: s: property: read-only type: number - description: S component of the rotation/quaternion (equivalent to the W component - in other notations). + description: S component of the rotation/quaternion. Equivalent to the W component + in other notations. uuid: __tostring: method: true @@ -15589,18 +15588,18 @@ structs: x: property: read-only type: number - description: X coordinate component of the vector (typically represents red - color, forward position, or pitch). + description: X coordinate component of the vector. Typically represents red + color, forward position, or pitch. y: property: read-only type: number - description: Y coordinate component of the vector (typically represents green - color, left/right position, or roll). + description: Y coordinate component of the vector. Typically represents green + color, left/right position, or roll. z: property: read-only type: number - description: Z coordinate component of the vector (typically represents blue - color, altitude/upward position, or yaw). + description: Z coordinate component of the vector. Typically represents blue + color, altitude/upward position, or yaw. DetectedEvent: adjustDamage: method: true diff --git a/slua_definitions.yaml b/slua_definitions.yaml index a47660de..b25fb1e3 100644 --- a/slua_definitions.yaml +++ b/slua_definitions.yaml @@ -59,7 +59,7 @@ base-classes: comment: Z component of the rotation/quaternion. - name: s type: number - comment: S component of the rotation/quaternion (equivalent to the W component in other notations). + comment: S component of the rotation/quaternion. Equivalent to the W component in other notations. - name: uuid comment: A 128‑bit unique identifier formatted as 36 hexadecimal characters (8‑4‑4‑4‑12), e.g. "A822FF2B-FF02-461D-B45D-DCD10A2DE0C2". methods: @@ -126,13 +126,13 @@ base-classes: properties: - name: x type: number - comment: "X coordinate component of the vector (typically represents red color, forward position, or pitch)." + comment: "X coordinate component of the vector. Typically represents red color, forward position, or pitch." - name: "y" type: number - comment: "Y coordinate component of the vector (typically represents green color, left/right position, or roll)." + comment: "Y coordinate component of the vector. Typically represents green color, left/right position, or roll." - name: z type: number - comment: "Z coordinate component of the vector (typically represents blue color, altitude/upward position, or yaw)." + comment: "Z coordinate component of the vector. Typically represents blue color, altitude/upward position, or yaw." - name: DetectedEvent comment: Event detection class providing access to detected object/avatar information # auto-generated from lsl_definitions.yaml @@ -422,7 +422,7 @@ functions: type-parameters: [T] parameters: - name: message - comment: Error message (or object) to raise. Does not have to be a string. + comment: Error message, or object, to raise. Does not have to be a string. type: T - name: level comment: Level to attribute the error to in the call stack. Level 1 is the current function, level 2 is its caller and so on. @@ -589,11 +589,11 @@ functions: return-type: any typechecker: {magic: true} - name: select - comment: Returns a subset of arguments starting from the specified index (supports negative indexing). If index is '#' returns the number of arguments. + comment: Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#' returns the number of arguments. type-parameters: [A...] parameters: - name: i - comment: An index number starting from 1 (or negative starting from the end), or '#' to return the total arguments count + comment: Index integer, or '#' to return the total arguments count. Supports negative indexing. type: string | number - name: ... comment: Arguments to select from. @@ -613,7 +613,7 @@ functions: return-type: ((T...) -> R...)? slua-removed: true - name: setmetatable - comment: Changes the metatable for the given table. Raises an error if the table already has a protected metatable (with a '__metatable' field). + comment: Changes the metatable for the given table. Raises an error if the table already has a protected metatable (it has a '__metatable' field). type-parameters: [T, MT] parameters: - name: t @@ -635,7 +635,7 @@ functions: type: string? | number selene-type: string - name: base - comment: Base for the conversion, supporting values from 2 to 36. + comment: Base for the conversion. Valid range is [2, 36]. type: number? default-value: 10 return-type: number? @@ -1648,7 +1648,7 @@ modules: must-use: true fastcall: true - name: cos - comment: Returns the cosine of n (n is in radians). + comment: Returns the cosine of n. n is in radians. parameters: - name: "n" comment: An angle in radians. @@ -1741,7 +1741,7 @@ modules: must-use: true fastcall: true - name: log - comment: Returns the logarithm of n in the given base (default e). + comment: Returns the logarithm of n in the given base, defaults to e. parameters: - name: "n" comment: A number to compute logarithm. @@ -1868,7 +1868,7 @@ modules: return-type: number must-use: true variants: - - comment: "Returns a random float number in the [0, 1] range (exclusive of 1)." + - comment: "Returns a random float number in the [0, 1) range (exclusive of 1)." return-type: number - comment: "Returns a random integer number in [1, n] range. Input is truncated to integer." parameters: @@ -1913,7 +1913,7 @@ modules: must-use: true fastcall: true - name: sin - comment: Returns the sine of n (n is in radians). + comment: Returns the sine of n. n is in radians. parameters: - name: "n" comment: An angle in radians. @@ -1940,7 +1940,7 @@ modules: must-use: true fastcall: true - name: tan - comment: Returns the tangent of n (n is in radians). + comment: Returns the tangent of n. n is in radians. parameters: - name: "n" comment: An angle in radians. @@ -2212,7 +2212,7 @@ modules: comment: Pattern to search for. type: string - name: init - comment: Index to start the search from (supports negative indexing). + comment: Index to start the search from. Supports negative indexing. type: number? default-value: 1 - name: plain @@ -2363,10 +2363,10 @@ modules: comment: Input string. type: string - name: i - comment: Starting index (supports negative indexing). + comment: Starting index. Supports negative indexing. type: number - name: j - comment: Ending index (supports negative indexing). + comment: Ending index. Supports negative indexing. type: number? default-value: '#s' return-type: string @@ -2470,7 +2470,7 @@ modules: - name: insert comment: Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, #a]. overloads: - - comment: Appends an element to the end of the array (equivalent to a[#a+1] = value). + - comment: Appends an element to the end of the array. Equivalent to a[#a+1] = value. type-parameters: [V] parameters: - name: a @@ -2522,7 +2522,7 @@ modules: type: '{V}' return-type: '{V}' - name: remove - comment: Removes and returns the element at index i (defaulting to the end of the array), shifting subsequent elements down by 1. Returns nil if no element was removed. + comment: Removes and returns the element at index i, shifting subsequent elements down by 1. Defaults to the end of the array. Returns nil if no element was removed. type-parameters: [V] parameters: - name: a From b05ef0717c71f3fd459ca919f5cf570f901bf4e3 Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Fri, 3 Jul 2026 20:22:15 +0000 Subject: [PATCH 7/8] myscellaneous changes --- generated/lua_keywords_pretty.xml | 24 ++++++++++++------------ generated/secondlife.docs.json | 12 ++++++------ generated/secondlife_selene.yml | 17 +++++++++-------- slua_definitions.yaml | 28 ++++++++++++++-------------- 4 files changed, 41 insertions(+), 40 deletions(-) diff --git a/generated/lua_keywords_pretty.xml b/generated/lua_keywords_pretty.xml index 01ac16c3..13c35cad 100644 --- a/generated/lua_keywords_pretty.xml +++ b/generated/lua_keywords_pretty.xml @@ -272,7 +272,7 @@ export type rotation = quaternion lljson.array_mt tooltip - Metatable for declaring table as an array for json encode. + Metatable for declaring a table as an array for json encode. type {__jsonhint: string} value @@ -306,7 +306,7 @@ export type rotation = quaternion lljson.object_mt tooltip - Metatable for declaring table as an object for json encode. + Metatable for declaring a table as an object for json encode. type {__jsonhint: string} value @@ -315,7 +315,7 @@ export type rotation = quaternion lljson.remove tooltip - A constant to return from a reviver/replacer replacer function to omit this item. + A constant to return from a reviver/replacer function to omit this item. type any @@ -10649,7 +10649,7 @@ float falloff – ranges from 0.01 to 2.0 level tooltip - Level to attribute the error to in the call stack. Level 1 is the current function, level 2 is its caller and so on (optional, defaults to 1). + Level to attribute the error to in the call stack. Level 1 is the current function, level 2 is its caller, and so on (optional, defaults to 1). type number? @@ -11089,7 +11089,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#' returns the number of arguments. + Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#', returns the number of arguments. setmetatable @@ -11241,7 +11241,7 @@ float falloff – ranges from 0.01 to 2.0 val tooltip - String to convert to an uuid. + String to convert to a uuid. type string? | buffer | uuid @@ -11950,7 +11950,7 @@ Returns true if result is non-zero. targetOffset tooltip - 0-based offset in target buffer. + 0-based byte offset in target buffer. type number @@ -11968,7 +11968,7 @@ Returns true if result is non-zero. sourceOffset tooltip - 0-based offset in source buffer (optional, defaults to 0). + 0-based byte offset in source buffer (optional, defaults to 0). type number? @@ -13915,7 +13915,7 @@ Returns true if result is non-zero. n tooltip - Number to check as NAN. + Number to check as NaN. type number @@ -14243,7 +14243,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Returns Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]. + Returns a Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]. math.pow @@ -15388,7 +15388,7 @@ Returns true if result is non-zero. separator tooltip - Separator to split on. If empty, the string is split into individual bytes (optional, defaults to ","). + Separator to split on. If nil, splits at commas (","). If empty, splits into individual bytes (optional, defaults to ","). type string? @@ -15401,7 +15401,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Splits a string by separator. Returns a list of substrings. If the separator is empty, the string is split into individual one-byte substrings. + Splits a string by separator. Returns a list of substrings. If the separator is nil, splits at commas (","). If the separator is empty, splits into individual one-byte substrings. string.sub diff --git a/generated/secondlife.docs.json b/generated/secondlife.docs.json index 25475ad5..41cb6c51 100644 --- a/generated/secondlife.docs.json +++ b/generated/secondlife.docs.json @@ -48,7 +48,7 @@ "documentation": "Execute the named external module." }, "@sl-slua/global/select": { - "documentation": "Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#' returns the number of arguments." + "documentation": "Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#', returns the number of arguments." }, "@sl-slua/global/setmetatable": { "documentation": "Changes the metatable for the given table. Raises an error if the table already has a protected metatable (it has a '__metatable' field)." @@ -335,15 +335,15 @@ "learn_more_link": "https://create.secondlife.com/script/learn-slua/json/" }, "@sl-slua/global/lljson.remove": { - "documentation": "A constant to return from a reviver/replacer replacer function to omit this item.", + "documentation": "A constant to return from a reviver/replacer function to omit this item.", "learn_more_link": "https://create.secondlife.com/script/learn-slua/json/" }, "@sl-slua/global/lljson.array_mt": { - "documentation": "Value: {__jsonhint = \"array\"}
Metatable for declaring table as an array for json encode.", + "documentation": "Value: {__jsonhint = \"array\"}
Metatable for declaring a table as an array for json encode.", "learn_more_link": "https://create.secondlife.com/script/learn-slua/json/" }, "@sl-slua/global/lljson.object_mt": { - "documentation": "Value: {__jsonhint = \"object\"}
Metatable for declaring table as an object for json encode.", + "documentation": "Value: {__jsonhint = \"object\"}
Metatable for declaring a table as an object for json encode.", "learn_more_link": "https://create.secondlife.com/script/learn-slua/json/" }, "@sl-slua/global/lljson.empty_array": { @@ -483,7 +483,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#modf" }, "@sl-slua/global/math.noise": { - "documentation": "Returns Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0].", + "documentation": "Returns a Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0].", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#noise" }, "@sl-slua/global/math.pow": { @@ -702,7 +702,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#reverse" }, "@sl-slua/global/string.split": { - "documentation": "Splits a string by separator. Returns a list of substrings. If the separator is empty, the string is split into individual one-byte substrings.", + "documentation": "Splits a string by separator. Returns a list of substrings. If the separator is nil, splits at commas (\",\"). If the separator is empty, splits into individual one-byte substrings.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#split" }, "@sl-slua/global/string.sub": { diff --git a/generated/secondlife_selene.yml b/generated/secondlife_selene.yml index f1424775..0b10d010 100644 --- a/generated/secondlife_selene.yml +++ b/generated/secondlife_selene.yml @@ -4996,7 +4996,7 @@ globals: - type: any - type: '...' description: Returns a subset of arguments starting from the specified index. - Supports negative indexing. If index is '#' returns the number of arguments. + Supports negative indexing. If index is '#', returns the number of arguments. setfenv: removed: true description: setfenv is removed in SLua. @@ -5478,16 +5478,16 @@ globals: description: A constant to pass for null to json encode. lljson.remove: property: read-only - description: A constant to return from a reviver/replacer replacer function to - omit this item. + description: A constant to return from a reviver/replacer function to omit this + item. lljson.array_mt: property: read-only type: table - description: Metatable for declaring table as an array for json encode. + description: Metatable for declaring a table as an array for json encode. lljson.object_mt: property: read-only type: table - description: Metatable for declaring table as an object for json encode. + description: Metatable for declaring a table as an object for json encode. lljson.empty_array: property: read-only type: table @@ -5694,8 +5694,8 @@ globals: - type: number required: false must_use: true - description: Returns Perlin noise value for the point (x, y, z). The return value - is in the range [-1.0, 1.0]. + description: Returns a Perlin noise value for the point (x, y, z). The return + value is in the range [-1.0, 1.0]. math.pow: args: - type: number @@ -6052,7 +6052,8 @@ globals: required: false must_use: true description: Splits a string by separator. Returns a list of substrings. If the - separator is empty, the string is split into individual one-byte substrings. + separator is nil, splits at commas (","). If the separator is empty, splits + into individual one-byte substrings. string.sub: args: - type: string diff --git a/slua_definitions.yaml b/slua_definitions.yaml index b25fb1e3..4156254c 100644 --- a/slua_definitions.yaml +++ b/slua_definitions.yaml @@ -425,7 +425,7 @@ functions: comment: Error message, or object, to raise. Does not have to be a string. type: T - name: level - comment: Level to attribute the error to in the call stack. Level 1 is the current function, level 2 is its caller and so on. + comment: Level to attribute the error to in the call stack. Level 1 is the current function, level 2 is its caller, and so on. type: number? default-value: 1 return-type: never @@ -589,7 +589,7 @@ functions: return-type: any typechecker: {magic: true} - name: select - comment: Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#' returns the number of arguments. + comment: Returns a subset of arguments starting from the specified index. Supports negative indexing. If index is '#', returns the number of arguments. type-parameters: [A...] parameters: - name: i @@ -674,7 +674,7 @@ functions: shorter than 16 bytes. parameters: - name: val - comment: String to convert to an uuid. + comment: String to convert to a uuid. type: string? | buffer | uuid selene-type: string return-type: uuid? @@ -1227,13 +1227,13 @@ modules: type: buffer observes: write - name: targetOffset - comment: 0-based offset in target buffer. + comment: 0-based byte offset in target buffer. type: number - name: source comment: Source buffer to copy from. type: buffer - name: sourceOffset - comment: 0-based offset in source buffer. + comment: 0-based byte offset in source buffer. type: number? default-value: 0 - name: count @@ -1513,14 +1513,14 @@ modules: comment: A constant to pass for null to json encode. type: any - name: remove - comment: A constant to return from a reviver/replacer replacer function to omit this item. + comment: A constant to return from a reviver/replacer function to omit this item. type: any - name: array_mt - comment: Metatable for declaring table as an array for json encode. + comment: Metatable for declaring a table as an array for json encode. type: '{__jsonhint: string}' value: '{__jsonhint = "array"}' - name: object_mt - comment: Metatable for declaring table as an object for json encode. + comment: Metatable for declaring a table as an object for json encode. type: '{__jsonhint: string}' value: '{__jsonhint = "object"}' - name: empty_array @@ -1818,7 +1818,7 @@ modules: must-use: true fastcall: true - name: noise - comment: Returns Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]. + comment: Returns a Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]. parameters: - name: x comment: X coordinate for the noise function. @@ -1870,13 +1870,13 @@ modules: variants: - comment: "Returns a random float number in the [0, 1) range (exclusive of 1)." return-type: number - - comment: "Returns a random integer number in [1, n] range. Input is truncated to integer." + - comment: "Returns a random integer number in the [1, n] range. Input is truncated to integer." parameters: - name: n comment: Maximum value of the range. type: number return-type: number - - comment: "Returns a random integer number in [min, max] range. Inputs are truncated to integers." + - comment: "Returns a random integer number in the [min, max] range. Inputs are truncated to integers." parameters: - name: min comment: Minimum value of the range. @@ -1961,7 +1961,7 @@ modules: comment: Returns true if n is NaN. parameters: - name: "n" - comment: Number to check as NAN. + comment: Number to check as NaN. type: number return-type: boolean must-use: true @@ -2344,13 +2344,13 @@ modules: must-use: true typechecker: {builtin: true} - name: split - comment: Splits a string by separator. Returns a list of substrings. If the separator is empty, the string is split into individual one-byte substrings. + comment: Splits a string by separator. Returns a list of substrings. If the separator is nil, splits at commas (","). If the separator is empty, splits into individual one-byte substrings. parameters: - name: s comment: Input string. type: string - name: separator - comment: Separator to split on. If empty, the string is split into individual bytes. + comment: Separator to split on. If nil, splits at commas (","). If empty, splits into individual bytes. type: string? default-value: '","' return-type: '{string}' From 652097134b5195435a21f3425af0646a37b4390a Mon Sep 17 00:00:00 2001 From: Suzanna Linn Date: Sun, 5 Jul 2026 08:18:55 +0000 Subject: [PATCH 8/8] some fixes --- generated/lua_keywords_pretty.xml | 38 +++++++------- generated/secondlife.d.luau | 4 +- generated/secondlife.docs.json | 34 ++++++------- generated/secondlife_selene.yml | 49 +++++++++--------- slua_definitions.yaml | 85 ++++++++++++++++--------------- 5 files changed, 107 insertions(+), 103 deletions(-) diff --git a/generated/lua_keywords_pretty.xml b/generated/lua_keywords_pretty.xml index 13c35cad..95354745 100644 --- a/generated/lua_keywords_pretty.xml +++ b/generated/lua_keywords_pretty.xml @@ -331,7 +331,7 @@ export type rotation = quaternion math.huge tooltip - A value larger than any other numeric value (infinity) + A value larger than any other numeric value (infinity). type number value @@ -340,7 +340,7 @@ export type rotation = quaternion math.pi tooltip - Value of pi + Value of pi. type number value @@ -358,7 +358,7 @@ export type rotation = quaternion utf8.charpattern tooltip - Pattern that matches exactly one UTF-8 byte sequence + Pattern that matches exactly one UTF-8 byte sequence. type string value @@ -10855,7 +10855,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Executes a function in protected mode. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message. + Executes function f in protected mode, calling it with the provided arguments. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message. print @@ -10919,7 +10919,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns true if a and b have the same type and value. + Returns true if a and b have the same type and value or reference, bypassing the __eq metamethod.. rawget @@ -10956,7 +10956,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Performs a table lookup bypassing metatables. + Performs a table lookup, bypassing the __index metamethod.. rawlen @@ -10984,7 +10984,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Returns the length of a table or string bypassing metatables. + Returns the length of a table or string, bypassing the __len metamethod.. rawset @@ -11030,7 +11030,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Assigns a value to a table field bypassing metatables. + Assigns a value to a table field, bypassing the __newindex metamethod.. require @@ -11181,7 +11181,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Converts a string to a quaternion, returns nil if invalid + Converts a string to a quaternion, returns nil if invalid. torotation @@ -11204,7 +11204,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Converts a string to a rotation (quaternion), returns nil if invalid + Converts a string to a rotation (quaternion), returns nil if invalid. tostring @@ -11277,7 +11277,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Converts a string to a vector, returns nil if invalid + Converts a string to a vector, returns nil if invalid. type @@ -11424,7 +11424,7 @@ float falloff – ranges from 0.01 to 2.0 sleep 0.0 tooltip - Calls function f with parameters args, handling errors with err if they occur. + Calls function f with the provided arguments, handling errors with err if they occur. bit32 @@ -13231,7 +13231,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Encodes a string or buffer to base64 + Encodes a string or buffer to base64. llhttp @@ -15255,11 +15255,11 @@ Returns true if result is non-zero. energy 10.0 return - ...string + ...string? sleep 0.0 tooltip - Finds and returns matches for a pattern in the input string. + Finds and returns matches for a pattern in the input string. Returns nil if no match is found. string.pack @@ -15721,7 +15721,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Appends all elements from one array to the end of another. Shorthand for table.move(b, 1, #b, #a+1, a) + Appends all elements from one array to the end of another. Shorthand for table.move(b, 1, #b, #a+1, a). table.find @@ -15926,7 +15926,7 @@ Returns true if result is non-zero. - v + value tooltip Value to insert. @@ -15942,7 +15942,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, + Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, #a]. table.isfrozen @@ -16051,7 +16051,7 @@ Returns true if result is non-zero. sleep 0.0 tooltip - Inserts elements [i..j] from src array into dest array at [d]. + Copies elements [i..j] from src array into dest array starting at [d], overwriting existing elements. table.pack diff --git a/generated/secondlife.d.luau b/generated/secondlife.d.luau index 2f16545b..1f99b322 100644 --- a/generated/secondlife.d.luau +++ b/generated/secondlife.d.luau @@ -560,7 +560,7 @@ declare string: { gsub: (s: string, pattern: string, repl: string | { [string]: string } | (...string) -> string, maxn: number?) -> (string, number), -- builtin len: (s: string) -> number, -- builtin lower: (s: string) -> string, -- builtin - match: (s: string, pattern: string, init: number?) -> ...string, -- builtin, magic type + match: (s: string, pattern: string, init: number?) -> ...string?, -- builtin, magic type pack: (fmt: string, ...any) -> string, -- builtin packsize: (fmt: string) -> number, -- builtin rep: (s: string, n: number) -> string, -- builtin @@ -583,7 +583,7 @@ declare table: { foreachi: @[deprecated {reason='Use a for loop instead'}](a: {V}, f: (index: number, value: V) -> R?) -> R?, getn: @[deprecated {use='#'}](a: {any}) -> number, maxn: (t: {any}) -> number, - insert: ((a: {V}, i: number, v: V) -> ()) + insert: ((a: {V}, i: number, value: V) -> ()) & ((a: {V}, value: V) -> ()), append: (a: {V}, ...V) -> (), extend: (a: {V}, b: {V}) -> {V}, diff --git a/generated/secondlife.docs.json b/generated/secondlife.docs.json index 41cb6c51..3a7538ae 100644 --- a/generated/secondlife.docs.json +++ b/generated/secondlife.docs.json @@ -27,22 +27,22 @@ "documentation": "Returns an iterator for all key-value pairs in the table." }, "@sl-slua/global/pcall": { - "documentation": "Executes a function in protected mode. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message." + "documentation": "Executes function f in protected mode, calling it with the provided arguments. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message." }, "@sl-slua/global/print": { "documentation": "Prints all arguments to standard output using Tab as a separator." }, "@sl-slua/global/rawequal": { - "documentation": "Returns true if a and b have the same type and value." + "documentation": "Returns true if a and b have the same type and value or reference, bypassing the __eq metamethod.." }, "@sl-slua/global/rawget": { - "documentation": "Performs a table lookup bypassing metatables." + "documentation": "Performs a table lookup, bypassing the __index metamethod.." }, "@sl-slua/global/rawlen": { - "documentation": "Returns the length of a table or string bypassing metatables." + "documentation": "Returns the length of a table or string, bypassing the __len metamethod.." }, "@sl-slua/global/rawset": { - "documentation": "Assigns a value to a table field bypassing metatables." + "documentation": "Assigns a value to a table field, bypassing the __newindex metamethod.." }, "@sl-slua/global/require": { "documentation": "Execute the named external module." @@ -57,10 +57,10 @@ "documentation": "Converts the input string to a number in the specified base. Returns nil if the conversion fails." }, "@sl-slua/global/toquaternion": { - "documentation": "Converts a string to a quaternion, returns nil if invalid" + "documentation": "Converts a string to a quaternion, returns nil if invalid." }, "@sl-slua/global/torotation": { - "documentation": "Converts a string to a rotation (quaternion), returns nil if invalid" + "documentation": "Converts a string to a rotation (quaternion), returns nil if invalid." }, "@sl-slua/global/tostring": { "documentation": "Converts the input object to a string. Calls the metatable's '__tostring' metamethod if present." @@ -69,7 +69,7 @@ "documentation": "Creates a new uuid from a string, buffer, or existing uuid. Returns nil if the string is not a valid UUID, or the buffer is shorter than 16 bytes." }, "@sl-slua/global/tovector": { - "documentation": "Converts a string to a vector, returns nil if invalid" + "documentation": "Converts a string to a vector, returns nil if invalid." }, "@sl-slua/global/type": { "documentation": "Returns the type of the object as a string." @@ -81,7 +81,7 @@ "documentation": "Returns values from an array in the specified index range." }, "@sl-slua/global/xpcall": { - "documentation": "Calls function f with parameters args, handling errors with err if they occur." + "documentation": "Calls function f with the provided arguments, handling errors with err if they occur." }, "@sl-slua/global/bit32": { "documentation": "Bitwise operations library.", @@ -315,7 +315,7 @@ "documentation": "Base64 encoding/decoding library." }, "@sl-slua/global/llbase64.encode": { - "documentation": "Encodes a string or buffer to base64" + "documentation": "Encodes a string or buffer to base64." }, "@sl-slua/global/llbase64.decode": { "documentation": "Decodes a base64 string to a string, or buffer if asBuffer is true. The output is truncated at the first decoding error." @@ -387,11 +387,11 @@ "learn_more_link": "https://luau.org/library/#math-library" }, "@sl-slua/global/math.pi": { - "documentation": "Value: 3.141592653589793
Value of pi", + "documentation": "Value: 3.141592653589793
Value of pi.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#pi" }, "@sl-slua/global/math.huge": { - "documentation": "Value: inf
A value larger than any other numeric value (infinity)", + "documentation": "Value: inf
A value larger than any other numeric value (infinity).", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/math#huge" }, "@sl-slua/global/math.abs": { @@ -682,7 +682,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#lower" }, "@sl-slua/global/string.match": { - "documentation": "Finds and returns matches for a pattern in the input string.", + "documentation": "Finds and returns matches for a pattern in the input string. Returns nil if no match is found.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/string#match" }, "@sl-slua/global/string.pack": { @@ -742,7 +742,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#maxn" }, "@sl-slua/global/table.insert": { - "documentation": "Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1,", + "documentation": "Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, #a].", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#insert" }, "@sl-slua/global/table.append": { @@ -750,7 +750,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#append" }, "@sl-slua/global/table.extend": { - "documentation": "Appends all elements from one array to the end of another. Shorthand for table.move(b, 1, #b, #a+1, a)", + "documentation": "Appends all elements from one array to the end of another. Shorthand for table.move(b, 1, #b, #a+1, a).", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#extend" }, "@sl-slua/global/table.remove": { @@ -770,7 +770,7 @@ "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#unpack" }, "@sl-slua/global/table.move": { - "documentation": "Inserts elements [i..j] from src array into dest array at [d].", + "documentation": "Copies elements [i..j] from src array into dest array starting at [d], overwriting existing elements.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/table#move" }, "@sl-slua/global/table.create": { @@ -806,7 +806,7 @@ "learn_more_link": "https://luau.org/library/#utf8-library" }, "@sl-slua/global/utf8.charpattern": { - "documentation": "Value: \"[\\x00-\\x7F\\xC2-\\xF4][\\x80-\\xBF]*\"
Pattern that matches exactly one UTF-8 byte sequence", + "documentation": "Value: \"[\\x00-\\x7F\\xC2-\\xF4][\\x80-\\xBF]*\"
Pattern that matches exactly one UTF-8 byte sequence.", "learn_more_link": "https://create.roblox.com/docs/reference/engine/libraries/utf8#charpattern" }, "@sl-slua/global/utf8.char": { diff --git a/generated/secondlife_selene.yml b/generated/secondlife_selene.yml index 0b10d010..acfecb17 100644 --- a/generated/secondlife_selene.yml +++ b/generated/secondlife_selene.yml @@ -4960,9 +4960,9 @@ globals: args: - type: function - type: '...' - description: Executes a function in protected mode. Returns a boolean indicating - success. If true, it also returns the function's results. If false, it returns - the error message. + description: Executes function f in protected mode, calling it with the provided + arguments. Returns a boolean indicating success. If true, it also returns the + function's results. If false, it returns the error message. print: args: - type: '...' @@ -4971,22 +4971,23 @@ globals: args: - type: any - type: any - description: Returns true if a and b have the same type and value. + description: Returns true if a and b have the same type and value or reference, + bypassing the __eq metamethod.. rawget: args: - type: table - type: any - description: Performs a table lookup bypassing metatables. + description: Performs a table lookup, bypassing the __index metamethod.. rawlen: args: - type: any - description: Returns the length of a table or string bypassing metatables. + description: Returns the length of a table or string, bypassing the __len metamethod.. rawset: args: - type: table - type: any - type: any - description: Assigns a value to a table field bypassing metatables. + description: Assigns a value to a table field, bypassing the __newindex metamethod.. require: args: - type: any @@ -5018,12 +5019,12 @@ globals: args: - type: string must_use: true - description: Converts a string to a quaternion, returns nil if invalid + description: Converts a string to a quaternion, returns nil if invalid. torotation: args: - type: string must_use: true - description: Converts a string to a rotation (quaternion), returns nil if invalid + description: Converts a string to a rotation (quaternion), returns nil if invalid. tostring: args: - type: any @@ -5039,7 +5040,7 @@ globals: args: - type: string must_use: true - description: Converts a string to a vector, returns nil if invalid + description: Converts a string to a vector, returns nil if invalid. type: args: - type: any @@ -5063,8 +5064,8 @@ globals: - type: function - type: function - type: '...' - description: Calls function f with parameters args, handling errors with err if - they occur. + description: Calls function f with the provided arguments, handling errors with + err if they occur. bit32.arshift: args: - type: number @@ -5454,7 +5455,7 @@ globals: args: - type: string must_use: true - description: Encodes a string or buffer to base64 + description: Encodes a string or buffer to base64. llbase64.decode: args: - type: string @@ -5551,11 +5552,11 @@ globals: math.pi: property: read-only type: number - description: Value of pi + description: Value of pi. math.huge: property: read-only type: number - description: A value larger than any other numeric value (infinity) + description: A value larger than any other numeric value (infinity). math.abs: args: - type: number @@ -6021,7 +6022,8 @@ globals: - type: number required: false must_use: true - description: Finds and returns matches for a pattern in the input string. + description: Finds and returns matches for a pattern in the input string. Returns + nil if no match is found. string.pack: args: - type: string @@ -6124,8 +6126,8 @@ globals: - type: number required: false - type: any - description: Inserts an element at index i, shifting subsequent elements up by - 1. The index must be within the range [1, + description: 'Inserts an element at index i, shifting subsequent elements up by + 1. The index must be within the range [1, #a].' table.append: args: - type: table @@ -6138,7 +6140,7 @@ globals: observes: write - type: table description: 'Appends all elements from one array to the end of another. Shorthand - for table.move(b, 1, #b, #a+1, a)' + for table.move(b, 1, #b, #a+1, a).' table.remove: args: - type: table @@ -6178,7 +6180,8 @@ globals: - type: table required: false observes: write - description: Inserts elements [i..j] from src array into dest array at [d]. + description: Copies elements [i..j] from src array into dest array starting at + [d], overwriting existing elements. table.create: args: - type: number @@ -6229,7 +6232,7 @@ globals: utf8.charpattern: property: read-only type: string - description: Pattern that matches exactly one UTF-8 byte sequence + description: Pattern that matches exactly one UTF-8 byte sequence. utf8.char: args: - type: '...' @@ -15543,11 +15546,11 @@ structs: istruthy: property: read-only type: bool - description: Returns true if the UUID is not the null UUID (all zeros) + description: Returns true if the UUID is not the null UUID (all zeros). bytes: property: read-only type: string - description: Returns the raw 16-byte binary string of the UUID + description: Returns the raw 16-byte binary string of the UUID. vector: __add: method: true diff --git a/slua_definitions.yaml b/slua_definitions.yaml index 4156254c..c35d866e 100644 --- a/slua_definitions.yaml +++ b/slua_definitions.yaml @@ -61,7 +61,7 @@ base-classes: type: number comment: S component of the rotation/quaternion. Equivalent to the W component in other notations. - name: uuid - comment: A 128‑bit unique identifier formatted as 36 hexadecimal characters (8‑4‑4‑4‑12), e.g. "A822FF2B-FF02-461D-B45D-DCD10A2DE0C2". + comment: 'A 128‑bit unique identifier formatted as 36 hexadecimal characters (8‑4‑4‑4‑12), e.g. "A822FF2B-FF02-461D-B45D-DCD10A2DE0C2".' methods: - name: __tostring parameters: @@ -69,10 +69,10 @@ base-classes: return-type: string properties: - name: istruthy - comment: Returns true if the UUID is not the null UUID (all zeros) + comment: Returns true if the UUID is not the null UUID (all zeros). type: boolean - name: bytes - comment: Returns the raw 16-byte binary string of the UUID + comment: Returns the raw 16-byte binary string of the UUID. type: string - name: vector comment: A set of three float values. Used to represent colors (RGB), positions, directions, and velocities. @@ -441,7 +441,7 @@ functions: return-type: '{[string]: any}' slua-removed: true - name: getmetatable - comment: Returns the metatable for the specified object. If the metatable has a '__metatable' field, returns its value instead. + comment: "Returns the metatable for the specified object. If the metatable has a '__metatable' field, returns its value instead." type-parameters: [T] parameters: - name: obj @@ -514,7 +514,7 @@ functions: return-type: "(({[K]: V}, K?) -> (K?, V), {[K]: V}, K)" typechecker: {builtin: true} # builtin due to FFlag::LuauStorePolarityInline - name: pcall - comment: Executes a function in protected mode. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message. + comment: Executes function f in protected mode, calling it with the provided arguments. Returns a boolean indicating success. If true, it also returns the function's results. If false, it returns the error message. type-parameters: [A..., R...] parameters: - name: f @@ -533,7 +533,7 @@ functions: type: T... return-type: () - name: rawequal - comment: Returns true if a and b have the same type and value. + comment: Returns true if a and b have the same type and value or reference, bypassing the __eq metamethod.. type-parameters: [T1, T2] parameters: - name: a @@ -545,7 +545,7 @@ functions: return-type: boolean fastcall: true - name: rawget - comment: Performs a table lookup bypassing metatables. + comment: Performs a table lookup, bypassing the __index metamethod.. type-parameters: [K, V] parameters: - name: t @@ -557,7 +557,7 @@ functions: return-type: V? fastcall: true - name: rawlen - comment: Returns the length of a table or string bypassing metatables. + comment: Returns the length of a table or string, bypassing the __len metamethod.. type-parameters: [K, V] parameters: - name: t @@ -566,7 +566,7 @@ functions: return-type: number fastcall: true - name: rawset - comment: Assigns a value to a table field bypassing metatables. + comment: Assigns a value to a table field, bypassing the __newindex metamethod.. type-parameters: [K, V] parameters: - name: t @@ -613,7 +613,7 @@ functions: return-type: ((T...) -> R...)? slua-removed: true - name: setmetatable - comment: Changes the metatable for the given table. Raises an error if the table already has a protected metatable (it has a '__metatable' field). + comment: "Changes the metatable for the given table. Raises an error if the table already has a protected metatable (it has a '__metatable' field)." type-parameters: [T, MT] parameters: - name: t @@ -635,14 +635,14 @@ functions: type: string? | number selene-type: string - name: base - comment: Base for the conversion. Valid range is [2, 36]. + comment: "Base for the conversion. Valid range is [2, 36]." type: number? default-value: 10 return-type: number? fastcall: true must-use: true - name: toquaternion - comment: Converts a string to a quaternion, returns nil if invalid + comment: Converts a string to a quaternion, returns nil if invalid. parameters: - name: value comment: String to convert to a quaternion. @@ -651,7 +651,7 @@ functions: return-type: quaternion? must-use: true - name: torotation - comment: Converts a string to a rotation (quaternion), returns nil if invalid + comment: Converts a string to a rotation (quaternion), returns nil if invalid. parameters: - name: value comment: String to convert to a rotation. @@ -660,7 +660,7 @@ functions: return-type: quaternion? must-use: true - name: tostring - comment: Converts the input object to a string. Calls the metatable's '__tostring' metamethod if present. + comment: "Converts the input object to a string. Calls the metatable's '__tostring' metamethod if present." type-parameters: [T] parameters: - name: value @@ -680,7 +680,7 @@ functions: return-type: uuid? must-use: true - name: tovector - comment: Converts a string to a vector, returns nil if invalid + comment: Converts a string to a vector, returns nil if invalid. parameters: - name: val comment: String to convert to a vector. @@ -726,7 +726,7 @@ functions: return-type: ...V fastcall: true - name: xpcall - comment: Calls function f with parameters args, handling errors with err if they occur. + comment: Calls function f with the provided arguments, handling errors with err if they occur. type-parameters: [E, A..., R1..., R2...] parameters: - name: f @@ -806,7 +806,7 @@ modules: must-use: true fastcall: true - name: extract - comment: Extracts bits from n at position field with width. Raises an error if the selected bit range goes outside [0, 31]. + comment: "Extracts bits from n at position field with width. Raises an error if the selected bit range goes outside [0, 31]." parameters: - name: "n" comment: Number to extract from. @@ -834,7 +834,7 @@ modules: must-use: true fastcall: true - name: lshift - comment: Shifts n by i bits to the left. If i is negative, a right shift is performed. Returns 0 if i is outside the [-31, 31] range. + comment: "Shifts n by i bits to the left. If i is negative, a right shift is performed. Returns 0 if i is outside the [-31, 31] range." parameters: - name: "n" comment: Number to shift. @@ -846,7 +846,7 @@ modules: must-use: true fastcall: true - name: replace - comment: Replaces bits in n at position field with width using value v. Raises an error if the selected bit range goes outside [0, 31]. + comment: "Replaces bits in n at position field with width using value v. Raises an error if the selected bit range goes outside [0, 31]." parameters: - name: "n" comment: Number to replace in. @@ -877,7 +877,7 @@ modules: must-use: true fastcall: true - name: rshift - comment: Shifts n by i bits to the right. If i is negative, a left shift is performed. Returns 0 if i is outside the [-31, 31] range. + comment: "Shifts n by i bits to the right. If i is negative, a left shift is performed. Returns 0 if i is outside the [-31, 31] range." parameters: - name: "n" comment: Number to shift. @@ -1269,7 +1269,7 @@ modules: comment: Bit offset to read at. type: number - name: bitCount - comment: Number of bits to read. Must be in [0, 32] range. + comment: "Number of bits to read. Must be in [0, 32] range." type: number return-type: number must-use: true @@ -1284,7 +1284,7 @@ modules: comment: Bit offset to write at. type: number - name: bitCount - comment: Number of bits to write. Must be in [0, 32] range. + comment: "Number of bits to write. Must be in [0, 32] range." type: number - name: value comment: Source of bits to write. @@ -1357,7 +1357,7 @@ modules: - name: info comment: Returns information about a stack frame or function based on specified format. overloads: - - comment: Returns information about a stack level + - comment: Returns information about a stack level. parameters: - name: level comment: Stack level or function reference for inspection. @@ -1366,7 +1366,7 @@ modules: comment: String specifying requested information. type: string return-type: '...any' - - comment: Returns information about a function + - comment: Returns information about a function. parameters: - name: func comment: Function reference. @@ -1391,7 +1391,7 @@ modules: - name: traceback comment: Returns a human-readable call stack starting from the specified level. overloads: - - comment: Returns a string with a traceback of the current call stack + - comment: Returns a string with a traceback of the current call stack. parameters: - name: msg comment: Message prepended to the traceback. @@ -1421,7 +1421,7 @@ modules: comment: Base64 encoding/decoding library. functions: - name: encode - comment: Encodes a string or buffer to base64 + comment: Encodes a string or buffer to base64. parameters: - name: data comment: "String or buffer to encode to base64 format." @@ -1433,7 +1433,7 @@ modules: comment: Decodes a base64 string to a string, or buffer if asBuffer is true. The output is truncated at the first decoding error. overloads: - - comment: Decodes a base64 string to a buffer if asBuffer is true + - comment: Decodes a base64 string to a buffer if asBuffer is true. parameters: - name: data comment: "Base64 encoded string to decode." @@ -1588,7 +1588,7 @@ modules: comment: Returns the arc cosine of n in radians. parameters: - name: "n" - comment: A number in the range [-1, 1]. + comment: "A number in the range [-1, 1]." type: number return-type: number must-use: true @@ -1597,7 +1597,7 @@ modules: comment: Returns the arc sine of n in radians. parameters: - name: "n" - comment: A number in the range [-1, 1]. + comment: "A number in the range [-1, 1]." type: number return-type: number must-use: true @@ -1818,7 +1818,7 @@ modules: must-use: true fastcall: true - name: noise - comment: Returns a Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]. + comment: "Returns a Perlin noise value for the point (x, y, z). The return value is in the range [-1.0, 1.0]." parameters: - name: x comment: X coordinate for the noise function. @@ -1869,6 +1869,7 @@ modules: must-use: true variants: - comment: "Returns a random float number in the [0, 1) range (exclusive of 1)." + parameters: [] return-type: number - comment: "Returns a random integer number in the [1, n] range. Input is truncated to integer." parameters: @@ -1986,11 +1987,11 @@ modules: fastcall: true constants: - name: pi - comment: Value of pi + comment: Value of pi. type: number value: 3.141592653589793 - name: huge - comment: A value larger than any other numeric value (infinity) + comment: A value larger than any other numeric value (infinity). type: number value: inf - name: os @@ -2286,7 +2287,7 @@ modules: must-use: true typechecker: {builtin: true} - name: match - comment: Finds and returns matches for a pattern in the input string. + comment: Finds and returns matches for a pattern in the input string. Returns nil if no match is found. parameters: - name: s comment: Input string. @@ -2298,7 +2299,7 @@ modules: comment: Starting index. type: number? default-value: 1 - return-type: '...string' + return-type: '...string?' must-use: true typechecker: {builtin: true, magic: true} - name: pack @@ -2344,13 +2345,13 @@ modules: must-use: true typechecker: {builtin: true} - name: split - comment: Splits a string by separator. Returns a list of substrings. If the separator is nil, splits at commas (","). If the separator is empty, splits into individual one-byte substrings. + comment: 'Splits a string by separator. Returns a list of substrings. If the separator is nil, splits at commas (","). If the separator is empty, splits into individual one-byte substrings.' parameters: - name: s comment: Input string. type: string - name: separator - comment: Separator to split on. If nil, splits at commas (","). If empty, splits into individual bytes. + comment: 'Separator to split on. If nil, splits at commas (","). If empty, splits into individual bytes.' type: string? default-value: '","' return-type: '{string}' @@ -2468,9 +2469,9 @@ modules: return-type: number must-use: true - name: insert - comment: Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, #a]. + comment: "Inserts an element at index i, shifting subsequent elements up by 1. The index must be within the range [1, #a]." overloads: - - comment: Appends an element to the end of the array. Equivalent to a[#a+1] = value. + - comment: "Appends an element to the end of the array. Equivalent to a[#a+1] = value." type-parameters: [V] parameters: - name: a @@ -2491,7 +2492,7 @@ modules: comment: "Index to insert at. Elements at or above this index will shift up by 1." type: number optional: true - - name: v + - name: value comment: Value to insert. type: V return-type: () @@ -2510,7 +2511,7 @@ modules: return-type: () - name: extend comment: "Appends all elements from one array to the end of another. - Shorthand for table.move(b, 1, #b, #a+1, a)" + Shorthand for table.move(b, 1, #b, #a+1, a)." type-parameters: [V] parameters: - name: a @@ -2576,7 +2577,7 @@ modules: must-use: true fastcall: true - name: move - comment: Inserts elements [i..j] from src array into dest array at [d]. + comment: "Copies elements [i..j] from src array into dest array starting at [d], overwriting existing elements." type-parameters: [V] parameters: - name: src @@ -2745,7 +2746,7 @@ modules: must-use: true constants: - name: charpattern - comment: Pattern that matches exactly one UTF-8 byte sequence + comment: Pattern that matches exactly one UTF-8 byte sequence. type: string value: '"[\x00-\x7F\xC2-\xF4][\x80-\xBF]*"' - name: uuid