Fix API when used by downstream mods
This commit is contained in:
parent
071e656f5a
commit
a56100432f
12
node.lua
12
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user