mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-02 16:10:44 +02:00
checkpoint. stairsplus is done, excluding the circular saw, and testing
This commit is contained in:
@ -1,2 +1,14 @@
|
||||
-- register shapes (e.g. 1/16 slab, 1/8 slab, 1/4 slab, etc)
|
||||
-- register shape groups (e.g. slab, stair, etc.)
|
||||
|
||||
stairsplus.api.registered_shapes = {}
|
||||
stairsplus.api.shapes_by_group = {}
|
||||
|
||||
function stairsplus.api.register_shape(name , def)
|
||||
stairsplus.api.registered_shapes[name] = def
|
||||
|
||||
for group in pairs(def.shape_groups or {}) do
|
||||
local shapes = stairsplus.api.shapes_by_group[group] or {}
|
||||
table.insert(shapes, name)
|
||||
stairsplus.api.shapes_by_group[group] = shapes
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user