Skip to content

Commit 1f55d52

Browse files
committed
JSDocs
1 parent 0ec4930 commit 1f55d52

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

scripts/scr_array_functions/scr_array_functions.gml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,12 @@ function array_to_string_order(_strings_array, _use_and = false, _dot_end = true
123123
return result;
124124
}
125125

126-
126+
/// @description Converts two parallel arrays into a formatted string with pluralized counts
127+
/// @param {array} _names_array Array of strings representing item names
128+
/// @param {array} _counts_array Array of integers representing counts for each name
129+
/// @param {bool} _exclude_null Whether to exclude entries with zero count
130+
/// @param {bool} _dot_end Whether to end the string with a period
131+
/// @return {string}
127132
function arrays_to_string_with_counts(_names_array, _counts_array, _exclude_null = false, _dot_end = true) {
128133
var _array_length = array_length(_names_array);
129134
var _result_string = "";
@@ -167,9 +172,10 @@ function fetch_deep_array(array, accessors){
167172
return _array_step;
168173
}
169174

170-
/// @description Choose either `.` or `,` based on the array lengh and current loop iteration.
171-
/// @param {array|real} _array_or_length
172-
/// @param {real} _loop_iteration
175+
/// @description Choose either `.` or `,` based on the array length and current loop iteration.
176+
/// @param {array|real} _array_or_length Array or its length.
177+
/// @param {real} _loop_iteration Current loop iteration.
178+
/// @param {bool} _dot_end Whether to end with a period for the last element
173179
/// @return {string}
174180
function smart_delimeter_sign(_array_or_length, _loop_iteration, _dot_end = true) {
175181
var _delimeter = "";

scripts/scr_string_functions/scr_string_functions.gml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ function base64_encode_advanced(input_string) {
282282
return _encoded_string;
283283
}
284284

285+
/// @description Transforms a verb based on the plurality of a variable.
285286
/// @param {string} _verb The verb to be transformed (e.g., "was", "is", "has", etc.).
286287
/// @param {number} _variable A value determining singular (1) or plural (any value other than 1).
287288
/// @returns {string}

0 commit comments

Comments
 (0)