1
0
mirror of https://github.com/D00Med/scifi_nodes.git synced 2024-12-22 16:10:18 +01:00

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

@ -23,5 +23,6 @@ read_globals = {
"mesecon", "mesecon",
"unifieddyes", "unifieddyes",
"letters", "letters",
"stealthnode" "stealthnode",
"slats"
} }

View File

@ -13,5 +13,6 @@ basic_materials,
dye, dye,
unifieddyes, unifieddyes,
letters, letters,
mesecons_stealthnode mesecons_stealthnode,
slats
""" """

View File

@ -38,7 +38,8 @@
"description": "rough metal" "description": "rough metal"
}, },
"lighttop": { "lighttop": {
"description": "metal block" "description": "metal block",
"slat": true
}, },
"red": { "red": {
"description": "red lines" "description": "red lines"
@ -50,7 +51,8 @@
"description": "vent" "description": "vent"
}, },
"stripes": { "stripes": {
"description": "hazard stripes" "description": "hazard stripes",
"slat": true
}, },
"rust": { "rust": {
"description": "rusty metal" "description": "rusty metal"
@ -83,7 +85,8 @@
"description": "blue metal" "description": "blue metal"
}, },
"bluetile": { "bluetile": {
"description": "blue tile" "description": "blue tile",
"slat": true
}, },
"greytile": { "greytile": {
"description": "grey tile" "description": "grey tile"
@ -106,7 +109,8 @@
}, },
"whitetile": { "whitetile": {
"description": "white tile 2", "description": "white tile 2",
"colorable": true "colorable": true,
"slat": true
}, },
"black_detail": { "black_detail": {
"description": "black detail" "description": "black detail"
@ -206,7 +210,8 @@
"description": "Doom wall 4.4" "description": "Doom wall 4.4"
}, },
"blackdmg": { "blackdmg": {
"description": "Damaged black wall" "description": "Damaged black wall",
"slat": true
}, },
"blackdmgstripe": { "blackdmgstripe": {
"description": "Damaged black wall(stripes)" "description": "Damaged black wall(stripes)"
@ -252,7 +257,8 @@
"description": "Purple wall 4" "description": "Purple wall 4"
}, },
"pplblk": { "pplblk": {
"description": "Purple tile" "description": "Purple tile",
"slat": true
}, },
"purple": { "purple": {
"description": "Purple node" "description": "Purple node"

View File

@ -1,5 +1,6 @@
local has_unifieddyes_mod = minetest.get_modpath("unifieddyes") local has_unifieddyes_mod = minetest.get_modpath("unifieddyes")
local has_moreblocks_mod = minetest.get_modpath("moreblocks") local has_moreblocks_mod = minetest.get_modpath("moreblocks")
local has_slats_mod = minetest.get_modpath("slats")
--nodes --nodes
@ -616,4 +617,15 @@ for name, def in pairs(nodes) do
sounds = sounds, sounds = sounds,
}) })
end 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 end