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

colorable moonstone

This commit is contained in:
BuckarooBanzay 2023-10-26 17:37:30 +02:00
parent 531a0ff257
commit 9177b875d9
2 changed files with 15 additions and 7 deletions

View File

@ -258,11 +258,13 @@
},
"rock": {
"description": "Moonstone",
"sounds": "stone"
"sounds": "stone",
"colorable": true
},
"rock2": {
"description": "Moonstone 2",
"sounds": "stone"
"sounds": "stone",
"colorable": true
},
"blackvnt": {
"description": "Black vent"

View File

@ -533,10 +533,16 @@ for name, def in pairs(nodes) do
sounds = scifi_nodes.node_sound_metal_defaults()
end
-- tiles (default to nodename as texture-name)
local tiles = {"scifi_nodes_" .. name .. ".png"}
if def.texture_name then
tiles = {"scifi_nodes_" .. def.texture_name .. ".png"}
end
-- Node Definition
local node_def = {
description = def.description,
tiles = {"scifi_nodes_"..name..".png"},
tiles = tiles,
groups = {cracky=1, dig_generic = 3},
paramtype = "light",
paramtype2 = "facedir",
@ -558,7 +564,7 @@ for name, def in pairs(nodes) do
if def.colorable and has_unifieddyes_mod then
minetest.register_node("scifi_nodes:"..name.."_colored", {
description = def.description,
tiles = {"scifi_nodes_"..name..".png"},
tiles = tiles,
groups = {
cracky = 1,
ud_param2_colorable = 1,
@ -574,11 +580,11 @@ for name, def in pairs(nodes) do
})
end
-- moreblocks registration
if has_moreblocks_mod then
-- moreblocks registration (default to register all except if "false" encountered)
if has_moreblocks_mod and def.moreblocks ~= false then
stairsplus:register_all("scifi_nodes", name, "scifi_nodes:"..name, {
description = def.description,
tiles = {"scifi_nodes_"..name..".png"},
tiles = tiles,
use_texture_alpha = "clip",
groups = {cracky=1, dig_generic = 3},
paramtype = "light",