Shared
get_current_time
Returns the current timestamp as a formatted string.
Returns
string
: Formatted time (YYYY-MM-DD HH:MM:SS)
debug_log
Prints a formatted debug message to the console.
Parameters
level
string
: One of "debug", "info", "success", "warn", "error", "critical", "dev"section
string
: The locale section to pull the message fromkey
string
: The message key in the locale or a raw string...
any
: Format arguments to inject into the message
get
Loads and caches a module file from the BDSC resource.
Parameters
path
string
: Dotted path to the module (e.g., "core.player.factory")
Returns
table|nil
: The loaded module table or nil if not found/errored
wait_for
Waits until a given function returns true or a timeout is reached.
Parameters
fn
function
: The condition function to evaluatetimeout
number|nil
: Time to wait in seconds (default 5)interval
number|nil
: Check interval in ms (default 100)
Returns
boolean
: True if condition met, false if timed out
inject_locale
Injects locale entries into the language map.
Parameters
section
string
: Locale category (e.g., "info", "error")entries
table
: Key-value map of translations
Last updated