Module script.helpers.g_functions
Shared extension module for Advanced Roleplay Environment.
Functions
LogInformation (...) | Logs a information |
LogWarning (...) | Logs a warning |
LogError (...) | Logs a error |
LogDebug (condition, ...) | Logs a debug message |
GetValidColorCode (testCondition) | Returns green color code when testCondition is true otherwise red |
DumpTableToJson (table, customName) | Dumps table to console |
ValidateBodyPart (bodyPart) | Returns true if the bodypart is valid |
RoundValue (num, numDecimalPlaces) | Rounds a value |
LinearConversion (oldMin, oldMax, oldValue, newMin, newMax) | Calculates linear conversion |
TableContains (table, element) | Returns true if the specified table contains the element |
PairsByKeys (t, f) | Sorts by keys |
string.starts (string, start) | Returns true if the string starts by start |
Functions
- LogInformation (...)
-
Logs a information
Parameters:
- ... unknown
- LogWarning (...)
-
Logs a warning
Parameters:
- ... unknown
- LogError (...)
-
Logs a error
Parameters:
- ...
- LogDebug (condition, ...)
-
Logs a debug message
Parameters:
- condition
- ...
- GetValidColorCode (testCondition)
-
Returns green color code when testCondition is true otherwise red
Parameters:
- testCondition
- DumpTableToJson (table, customName)
-
Dumps table to console
Parameters:
- table any
- customName any
- ValidateBodyPart (bodyPart)
-
Returns true if the bodypart is valid
Parameters:
- bodyPart any
Returns:
-
boolean
- RoundValue (num, numDecimalPlaces)
-
Rounds a value
Parameters:
- num any
- numDecimalPlaces any
Returns:
-
number
- LinearConversion (oldMin, oldMax, oldValue, newMin, newMax)
-
Calculates linear conversion
Parameters:
- oldMin any
- oldMax any
- oldValue any
- newMin any
- newMax any
Returns:
-
number
- TableContains (table, element)
-
Returns true if the specified table contains the element
Parameters:
- table any
- element any
Returns:
-
boolean
- PairsByKeys (t, f)
-
Sorts by keys
Parameters:
- t any
- f any
Returns:
-
function
- string.starts (string, start)
-
Returns true if the string starts by start
Parameters:
- string any
- start any
Returns:
-
boolean