diff --git a/.luacheckrc b/.luacheckrc index f0423c2..e1c1bc6 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -23,5 +23,6 @@ read_globals = { "mesecon", "unifieddyes", "letters", - "stealthnode" + "stealthnode", + "slats" } diff --git a/mod.conf b/mod.conf index 58220d6..5570676 100644 --- a/mod.conf +++ b/mod.conf @@ -13,5 +13,6 @@ basic_materials, dye, unifieddyes, letters, -mesecons_stealthnode +mesecons_stealthnode, +slats """ diff --git a/nodes.json b/nodes.json index 4261078..50a75b4 100644 --- a/nodes.json +++ b/nodes.json @@ -38,7 +38,8 @@ "description": "rough metal" }, "lighttop": { - "description": "metal block" + "description": "metal block", + "slat": true }, "red": { "description": "red lines" @@ -50,7 +51,8 @@ "description": "vent" }, "stripes": { - "description": "hazard stripes" + "description": "hazard stripes", + "slat": true }, "rust": { "description": "rusty metal" @@ -83,7 +85,8 @@ "description": "blue metal" }, "bluetile": { - "description": "blue tile" + "description": "blue tile", + "slat": true }, "greytile": { "description": "grey tile" @@ -106,7 +109,8 @@ }, "whitetile": { "description": "white tile 2", - "colorable": true + "colorable": true, + "slat": true }, "black_detail": { "description": "black detail" @@ -206,7 +210,8 @@ "description": "Doom wall 4.4" }, "blackdmg": { - "description": "Damaged black wall" + "description": "Damaged black wall", + "slat": true }, "blackdmgstripe": { "description": "Damaged black wall(stripes)" @@ -252,7 +257,8 @@ "description": "Purple wall 4" }, "pplblk": { - "description": "Purple tile" + "description": "Purple tile", + "slat": true }, "purple": { "description": "Purple node" diff --git a/nodes.lua b/nodes.lua index fe2e733..ceb0563 100644 --- a/nodes.lua +++ b/nodes.lua @@ -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