3 Commits

Author SHA1 Message Date
3a7ca33b1d truchet tiles 2025-08-18 14:48:04 +02:00
2eb5841472 Allow Super and Ultra Plastic nodes to be colored (#90)
Add `"colorable": true` to Super and Ultra Plastic nodes to enable unified dyes integration
2025-07-21 09:55:38 +02:00
689a17a80e fix sunlight propagation in transparent mesh3 2025-05-16 07:55:59 +02:00
5 changed files with 21 additions and 5 deletions

View File

@ -35,6 +35,7 @@ dofile(MP.."/octagon_panes.lua")
dofile(MP.."/octagon_glass.lua")
dofile(MP.."/forcefield.lua")
dofile(MP.."/crafts.lua")
dofile(MP.."/tiles.lua")
if minetest.get_modpath("letters") then
-- register letter nodes
@ -48,6 +49,4 @@ end
if minetest.get_modpath("mtt") and mtt.enabled then
dofile(MP .. "/mtt.lua")
end
minetest.log("action", "[scifi_nodes] loaded.")
end

View File

@ -14,12 +14,14 @@
},
"super_white": {
"description": "Super Plastic",
"colorable": true,
"light": 11,
"sounds": "stone",
"texture_name": "white2"
},
"ultra_white": {
"description": "Ultra Plastic",
"colorable": true,
"light": 14,
"sounds": "stone",
"texture_name": "white2"
@ -122,7 +124,8 @@
"description": "transparent metal floormesh",
"texture_name": "mesh",
"texture_modifier": "^[contrast:10:-50^[makealpha:0,0,0",
"drawtype": "glasslike"
"drawtype": "glasslike",
"sunlight_propagates": true
},
"pipe": {
"description": "wall pipe"
@ -322,4 +325,4 @@
"description": "Black plate",
"paramtype2": "none"
}
}
}

View File

@ -520,6 +520,7 @@ for name, def in pairs(nodes) do
local node_def = {
description = def.description,
drawtype = def.drawtype or "normal",
sunlight_propagates = def.sunlight_propagates,
tiles = tiles,
groups = {cracky=1, dig_generic = 3},
is_ground_content = false,

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

13
tiles.lua Normal file
View File

@ -0,0 +1,13 @@
for _, color in ipairs({"purple", "greenmetal", "bluemetal", "grey"}) do
minetest.register_node("scifi_nodes:" .. color .. "_tile", {
description = color .. " tile",
groups = {
cracky = 1
},
is_ground_content = false,
sounds = scifi_nodes.node_sound_metal_defaults(),
paramtype2 = "facedir",
use_texture_alpha = "blend",
tiles = {"scifi_nodes_" .. color .. ".png^scifi_nodes_truchet_tile.png"}
})
end