1
0
mirror of https://github.com/pandorabox-io/banners.git synced 2025-01-04 23:20:36 +01:00
banners/nodes.lua
Luke aka SwissalpS c8012c7266 whitespace and minetest. -> core.
- use same whitespace style throughout and fix some indents.
- change from minetest. to core. namespace.
2024-11-27 22:32:24 +01:00

54 lines
1.5 KiB
Lua

-- da wooden banner
core.register_node("banners:wooden_banner", {
drawtype = "mesh",
mesh = "banner_support.x",
tiles = { "banner_support.png" },
description = "Wooden banner",
groups = { choppy = 2, dig_immediate = 2 },
is_ground_content = false,
diggable = true,
stack_max = 1,
paramtype = "light",
paramtype2 = "facedir",
after_place_node = function (pos, player, itemstack, pointed_thing)
banners.banner_after_place(pos, player, itemstack, pointed_thing)
end,
on_destruct = function(pos)
banners.banner_on_destruct(pos)
end,
on_use = function(i, p, pt)
banners.banner_on_use(i, p, pt)
end,
on_dig = function(pos, n, p)
banners.banner_on_dig(pos, n, p)
end
})
-- steel banner
core.register_node("banners:steel_banner", {
drawtype = "mesh",
mesh = "banner_support.x",
tiles = { "steel_support.png" },
description = "Steel banner",
groups = { cracky = 2 },
is_ground_content = false,
diggable = true,
stack_max = 1,
paramtype = "light",
paramtype2 = "facedir",
after_place_node = function (pos, player, itemstack, pointed_thing)
banners.banner_after_place(pos, player, itemstack, pointed_thing)
end,
on_destruct = function(pos)
banners.banner_on_destruct(pos)
end,
on_use = function(i, p, pt)
banners.banner_on_use(i, p, pt)
end,
on_dig = function(pos, n, p)
banners.banner_on_dig(pos, n, p)
end
})