Last night's work
This commit is contained in:
parent
a260c4a33a
commit
1708e2d461
45 changed files with 1359 additions and 1347 deletions
|
@ -1,4 +1,5 @@
|
|||
-- Vox Structural System
|
||||
vox_structural = {} -- Initialize the global table for the mod
|
||||
|
||||
local structural_shapes = {}
|
||||
|
||||
|
@ -14,10 +15,16 @@ function vox_structural.register_block_with_shapes(modname, base_block, options)
|
|||
local shape_node_name = modname .. ":" .. base_block .. "_" .. shape_name
|
||||
|
||||
-- Create the new node definition
|
||||
local new_node_def = table.copy(minetest.registered_nodes[base_node_name])
|
||||
new_node_def.description = new_node_def.description .. " (" .. shape_name:gsub("_", " ") .. ")"
|
||||
new_node_def.tiles = shape_def.tiles or new_node_def.tiles
|
||||
new_node_def.groups = table.copy(new_node_def.groups or {})
|
||||
local base_def = minetest.registered_nodes[base_node_name]
|
||||
if not base_def then
|
||||
minetest.log("error", "[vox_structural] Base node not found: " .. base_node_name)
|
||||
return
|
||||
end
|
||||
|
||||
local new_node_def = table.copy(base_def)
|
||||
new_node_def.description = base_def.description .. " (" .. shape_name:gsub("_", " ") .. ")"
|
||||
new_node_def.tiles = shape_def.tiles or base_def.tiles
|
||||
new_node_def.groups = table.copy(base_def.groups or {})
|
||||
new_node_def.groups.shape = 1 -- Add a "shape" group
|
||||
|
||||
-- Apply shape-specific overrides
|
||||
|
@ -75,13 +82,7 @@ vox_structural.register_shape("pressure_plate", {
|
|||
},
|
||||
})
|
||||
|
||||
-- Button
|
||||
|
||||
-- Post
|
||||
|
||||
|
||||
-- ------------------
|
||||
-- Register door shapes with variants
|
||||
-- ---------------------------- Doors and Variants -------------------------- --
|
||||
vox_structural.register_shape("door_flush", {
|
||||
override = {
|
||||
drawtype = "mesh",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue