Skip to content

Commit

Permalink
register concrete slat if the mod is found (#5)
Browse files Browse the repository at this point in the history
Co-authored-by: BuckarooBanzay <[email protected]>
  • Loading branch information
BuckarooBanzay and BuckarooBanzay authored Jan 28, 2024
1 parent 6e52dea commit 5d4b79a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
1 change: 1 addition & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ read_globals = {
"doors",
"stairsplus",
"unifieddyes",
"slats",
"default"
}
2 changes: 1 addition & 1 deletion mod.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name = prefab
optional_depends = moreblocks, unifieddyes, default, doors
optional_depends = moreblocks, unifieddyes, default, doors, slats
description = Adds pre-fabricated concrete elements.
min_minetest_version = 5.4.0
11 changes: 11 additions & 0 deletions nodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -396,3 +396,14 @@ minetest.register_node("prefab:concrete_catwalk",{
groups={cracky=2},
drop = "prefab:concrete_catwalk",
})

if minetest.get_modpath("slats") and minetest.get_modpath("default") then
slats.register_slat(
"prefab",
"prefab:concrete",
{cracky = 2},
"prefab_concrete.png^slats_slat_overlay.png^[makealpha:255,126,126",
"Prefabe concrete Slat",
default.node_sound_stone_defaults()
)
end

0 comments on commit 5d4b79a

Please sign in to comment.