add slat support

This commit is contained in:
BuckarooBanzay
2024-01-29 17:26:15 +01:00
parent 3c3ad75e6d
commit 89876b23e7
4 changed files with 28 additions and 8 deletions

View File

@ -1,5 +1,6 @@
local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
local has_moreblocks_mod = minetest.get_modpath("moreblocks")
local has_slats_mod = minetest.get_modpath("slats")
--nodes
@ -616,4 +617,15 @@ for name, def in pairs(nodes) do
sounds = sounds,
})
end
if has_slats_mod and def.slat then
slats.register_slat(
name,
"scifi_nodes:" .. name,
node_def.groups,
"scifi_nodes_" .. name .. ".png^slats_slat_overlay.png^[makealpha:255,126,126",
def.description .. " Slat",
sounds
)
end
end