Collection of debug functions.
General debug messages.
--- Utils object
utils.debug.log('General debug log.')
--- Direct export
exports.boii_utils:debug_log('General debug log.')
Information debug messages.
--- Utils object
utils.debug.info('Information debug log.')
--- Direct export
exports.boii_utils:debug_info('Information debug log.')
Warning debug messages.
--- Utils object
utils.debug.warn('Warning debug log.')
--- Direct export
exports.boii_utils:debug_warn('Warning debug log.')
Error debug messages.
--- Utils object
utils.debug.err('Warning debug log.')
--- Direct export
exports.boii_utils:debug_err('Warning debug log.')
Log a message based on condition.
Below is a example of checking a players balance against a required amount.
--- Specify conditions
local player_balance = 500
local required_balance = 1000
-- Condition to check if the player has insufficient funds
local condition = player_balance < required_balance
local message = string.format("Player has insufficient funds. Balance: $%d, Required: $%d", player_balance, required_balance)
--- Utils object
utils.debug.conditional(condition, message)
--- Direct export
exports.boii_utils:debug_conditional(condition, message)
Custom debug message.
For colours use ^1 - ^9.
--- Utils object
utils.debug.custom(1, 'CUSTOM', 'Custom debug log')
--- Direct export
exports.boii_utils:debug_custom(1, 'CUSTOM', 'Custom debug log')