From 69e3ed8035ef6f412f42c14c918f6d66d129eb6d Mon Sep 17 00:00:00 2001 From: Aaron Suen Date: Mon, 5 Jun 2023 07:15:01 -0400 Subject: [PATCH] Fix API when used by downstream mods --- node.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/node.lua b/node.lua index 36b6511..20f0d15 100644 --- a/node.lua +++ b/node.lua @@ -147,7 +147,7 @@ function myapi.register_cat(id, basetiles, basedef) end end }) - minetest.register_node(modname .. ":cat_" .. id, nodecore.underride( + minetest.register_node(":" .. modname .. ":cat_" .. id, nodecore.underride( nodecore.underride({ groups = { [modname .. "_face"] = 1 @@ -155,7 +155,7 @@ function myapi.register_cat(id, basetiles, basedef) }, basedef), { [modname .. "_spawn_probability"] = catspawn })) - minetest.register_node(modname .. ":longcat_front_" .. id, + minetest.register_node(":" .. modname .. ":longcat_front_" .. id, nodecore.underride({ description = "LongCat", tiles = fuzztiles({ @@ -173,7 +173,7 @@ function myapi.register_cat(id, basetiles, basedef) }, drop = modname .. ":cat_" .. id }, basedef)) - minetest.register_node(modname .. ":longcat_mid_" .. id, + minetest.register_node(":" .. modname .. ":longcat_mid_" .. id, nodecore.underride({ description = "LongCat", tiles = fuzztiles({ @@ -190,7 +190,7 @@ function myapi.register_cat(id, basetiles, basedef) }, drop = modname .. ":cat_" .. id }, basedef)) - minetest.register_node(modname .. ":longcat_back_" .. id, + minetest.register_node(":" .. modname .. ":longcat_back_" .. id, nodecore.underride({ description = "LongCat", tiles = fuzztiles({ @@ -209,12 +209,12 @@ function myapi.register_cat(id, basetiles, basedef) }, basedef)) end -local function reg(id, base, spot) +local function reg(id, base, spot, ...) local txr = "nc_cats_base.png^[multiply:" .. base if base ~= spot then txr = txr .. "^(nc_cats_spots.png^[multiply:" .. spot .. ")" end - return myapi.register_cat(id, {txr}) + return myapi.register_cat(id, {txr}, ...) end myapi.register_cat_spots = reg