Skip to content

Commit

Permalink
Stone Blocks: add walls for bricks&blocks from rocks. Closes #1714
Browse files Browse the repository at this point in the history
  • Loading branch information
alek13 committed Oct 5, 2024
1 parent 6252b8e commit 4c41cf7
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions mods/lord/Blocks/lord_walls/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,24 @@ for node_name, registration in pairs(rocks.get_lord_nodes()) do
--- @type string
local sub_name = node_name:split(":")[2]

local walls_node = ":walls:" .. sub_name
local wall_name = ":walls:" .. sub_name
local description = registration.original_description
local texture = registration.definition.tiles
walls.register(walls_node, S(description), texture, node_name, default.node_sound_stone_defaults())
walls.register(wall_name, S(description), texture, node_name, default.node_sound_stone_defaults())

-- For `lord_bricks` nodes.
-- TODO: use an API of `lord_bricks` (`bricks.get_lord_nodes()`, not `rocks.get_lord_nodes()`)
local brick_name = 'lord_bricks:' .. sub_name .. '_brick'
local brick = minetest.registered_nodes[brick_name]
wall_name = ':walls:' .. sub_name .. '_brick'
texture = brick.tiles
walls.register(wall_name, S(description .. ' Brick'), texture, brick_name, default.node_sound_stone_defaults())

local block_name = 'lord_bricks:' .. sub_name .. '_block'
local block = minetest.registered_nodes[block_name]
wall_name = ':walls:' .. sub_name .. '_block'
texture = block.tiles
walls.register(wall_name, S(description .. ' Block'), texture, block_name, default.node_sound_stone_defaults())
end


Expand Down

0 comments on commit 4c41cf7

Please sign in to comment.