Add warning()

This commit is contained in:
jordan4ibanez 2024-04-17 10:54:28 -04:00
parent cfa0a94d35
commit 8433f93d32

View File

@ -99,8 +99,18 @@ namespace utility {
* @param nodeName The node name. * @param nodeName The node name.
* @param definition The node definition. * @param definition The node definition.
*/ */
export function registerNode(nodeName: string, definition: NodeDefinition) { export function registerNode(nodeName: string, definition: NodeDefinition): void {
minetest.register_node(":" + nodeName, definition); minetest.register_node(":" + nodeName, definition);
} }
/**
* Print a warning message instead of an error.
* @param message The warning message.
*/
export function warning(message: string): void {
pcall(function () {
error(message)
})
}
} }