checkpoint. stairsplus is done, excluding the circular saw, and testing

This commit is contained in:
flux
2022-06-13 16:11:20 -07:00
parent 9465870690
commit 687de31632
33 changed files with 1792 additions and 1950 deletions

View File

@ -0,0 +1,5 @@
stairsplus.dofile("shapes", "micros")
stairsplus.dofile("shapes", "panels")
stairsplus.dofile("shapes", "slabs")
stairsplus.dofile("shapes", "slopes")
stairsplus.dofile("shapes", "stairs")

View File

@ -0,0 +1,85 @@
stairsplus.api.register_shape("micro_1", {
name_format = "micro_%s_1",
description = "@1 1/16 Microblock",
shape_groups = {micro = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5},
},
})
stairsplus.api.register_shape("micro_2", {
name_format = "micro_%s_2",
description = "@1 1/8 Microblock",
shape_groups = {micro = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5},
},
})
stairsplus.api.register_shape("micro_4", {
name_format = "micro_%s_4",
description = "@1 1/4 Microblock",
shape_groups = {micro = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5},
},
})
stairsplus.api.register_shape("micro_8", {
name_format = "micro_%s_8",
aliases = {"micro_%s", "micro_%s_bottom"},
description = "@1 Microblock", -- leave out the 1/2 to not confuse people too much...
shape_groups = {micro = 1, obligatory = 1, common = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
},
})
stairsplus.api.register_shape("micro_12", {
name_format = "micro_%s_12",
description = "@1 3/4 Microblock",
shape_groups = {micro = 1},
eighths = 2,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5},
},
})
stairsplus.api.register_shape("micro_14", {
name_format = "micro_%s_14",
description = "@1 7/8 Microblock",
shape_groups = {micro = 1},
eighths = 2,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5},
},
})
stairsplus.api.register_shape("micro_15", {
name_format = "micro_%s_5",
description = "@1 15/16 Microblock",
shape_groups = {micro = 1},
eighths = 2,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
},
})

View File

@ -0,0 +1,85 @@
stairsplus.api.register_shape("panel_1", {
name_format = "panel_%s_1",
description = "@1 1/16 Panel",
shape_groups = {panel = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
},
})
stairsplus.api.register_shape("panel_2", {
name_format = "panel_%s_2",
description = "@1 1/8 Panel",
shape_groups = {panel = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
},
})
stairsplus.api.register_shape("panel_4", {
name_format = "panel_%s_4",
description = "@1 1/4 Panel",
shape_groups = {panel = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
},
})
stairsplus.api.register_shape("panel_8", {
name_format = "panel_%s_8",
aliases = {"panel_%s", "panel_bottom_%s"},
description = "@1 1/2 Panel",
shape_groups = {panel = 1, common = 1},
eighths = 2,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
},
})
stairsplus.api.register_shape("panel_12", {
name_format = "panel_%s_12",
description = "@1 3/4 Panel",
shape_groups = {panel = 1},
eighths = 3,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
},
})
stairsplus.api.register_shape("panel_14", {
name_format = "panel_%s_14",
description = "@1 7/8 Panel",
shape_groups = {panel = 1},
eighths = 4,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
},
})
stairsplus.api.register_shape("panel_15", {
name_format = "panel_%s_15",
description = "@1 15/16 Panel",
shape_groups = {panel = 1},
eighths = 4,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
},
})

136
stairsplus/shapes/slabs.lua Normal file
View File

@ -0,0 +1,136 @@
stairsplus.api.register_shape("slab_1", {
name_format = "slab_%s_1",
description = "@1 1/16 Slab",
shape_groups = {slab = 1, common = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
},
})
stairsplus.api.register_shape("slab_2", {
name_format = "slab_%s_2",
description = "@1 1/8 Slab",
shape_groups = {slab = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
},
})
stairsplus.api.register_shape("slab_4", {
name_format = "slab_%s_4",
aliases = {"slab_%s_quarter"},
description = "@1 1/4 Slab",
shape_groups = {slab = 1},
eighths = 2,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
},
})
stairsplus.api.register_shape("slab_8", {
name_format = "slab_%s_8",
aliases = {"slab_%s"},
description = "@1 1/2 Slab",
shape_groups = {slab = 1, common = 1},
eighths = 4,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
},
})
stairsplus.api.register_shape("slab_12", {
name_format = "slab_%s_12",
aliases = {"slab_%s_three_quarter"},
description = "@1 3/4 Slab",
shape_groups = {slab = 1},
eighths = 6,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
},
})
stairsplus.api.register_shape("slab_14", {
name_format = "slab_%s_14",
description = "@1 7/8 Slab",
shape_groups = {slab = 1},
eighths = 7,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5},
},
})
stairsplus.api.register_shape("slab_15", {
name_format = "slab_%s_15",
description = "@1 15/16 Slab",
shape_groups = {slab = 1},
eighths = 7,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5},
},
})
--- these terrible things
stairsplus.api.register_shape("slab_two_sides", {
name_format = "slab_%s_two_sides",
description = "@1 1/16 Slab Two Sides",
shape_groups = {slab = 1},
eighths = 2,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -7 / 16, 7 / 16},
{-0.5, -0.5, 7 / 16, 0.5, 0.5, 0.5}
},
},
})
stairsplus.api.register_shape("slab_three_sides", {
name_format = "slab_%s_three_sides",
description = "@1 1/16 Slab Three Sides",
shape_groups = {slab = 1},
eighths = 3,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-7 / 16, -0.5, -0.5, 0.5, -7 / 16, 7 / 16},
{-7 / 16, -0.5, 7 / 16, 0.5, 0.5, 0.5},
{-0.5, -0.5, -0.5, -7 / 16, 0.5, 0.5}
},
},
})
stairsplus.api.register_shape("slab_three_sides_u", {
name_format = "slab_%s_three_sides_u",
description = "@1 1/16 Slab Three Sides U",
shape_groups = {slab = 1},
eighths = 3,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.5, -7 / 16},
{-0.5, -0.5, -7 / 16, 0.5, -7 / 16, 7 / 16},
{-0.5, -0.5, 7 / 16, 0.5, 0.5, 0.5}
},
},
})

View File

@ -0,0 +1,277 @@
local box_slope = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
}
}
stairsplus.api.register_shape("slope", {
name_format = "slope_%s",
description = "@1 Slope",
shape_groups = {slope = 1},
eighths = 4,
drawtype = "mesh",
mesh = "moreblocks_slope.obj",
collision_box = box_slope,
selection_box = box_slope,
})
local box_slope_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
}
}
stairsplus.api.register_shape("slope_half", {
name_format = "slope_%s_half",
description = "@1 1/2 Slope",
shape_groups = {slope = 1},
eighths = 2,
drawtype = "mesh",
mesh = "moreblocks_slope_half.obj",
collision_box = box_slope_half,
selection_box = box_slope_half,
})
local box_slope_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
}
}
stairsplus.api.register_shape("slope_half_raised", {
name_format = "slope_%s_half_raised",
description = "@1 1/2 Slope Raised",
shape_groups = {slope = 1},
eighths = 6,
drawtype = "mesh",
mesh = "moreblocks_slope_half_raised.obj",
collision_box = box_slope_half_raised,
selection_box = box_slope_half_raised,
})
local box_slope_inner = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.5, -0.25, 0.5, 0, 0.5},
{-0.5, -0.5, -0.5, 0.25, 0, 0.5},
{-0.5, 0, -0.5, 0, 0.25, 0.5},
{-0.5, 0, 0, 0.5, 0.25, 0.5},
{-0.5, 0.25, 0.25, 0.5, 0.5, 0.5},
{-0.5, 0.25, -0.5, -0.25, 0.5, 0.5},
}
}
stairsplus.api.register_shape("slope_inner", {
name_format = "slope_%s_inner",
description = "@1 Slope Inner",
shape_groups = {slope = 1},
eighths = 6,
drawtype = "mesh",
mesh = "moreblocks_slope_inner.obj",
collision_box = box_slope_inner,
selection_box = box_slope_inner,
})
stairsplus.api.register_shape("slope_inner_cut", {
name_format = "slope_%s_inner_cut",
description = "@1 Slope Inner Cut",
shape_groups = {slope = 1},
eighths = 6,
drawtype = "mesh",
mesh = "moreblocks_slope_inner_cut.obj",
collision_box = box_slope_inner,
selection_box = box_slope_inner,
})
local box_slope_inner_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
{-0.5, -0.375, -0.5, 0.25, -0.25, 0.5},
{-0.5, -0.25, -0.5, 0, -0.125, 0.5},
{-0.5, -0.25, 0, 0.5, -0.125, 0.5},
{-0.5, -0.125, 0.25, 0.5, 0, 0.5},
{-0.5, -0.125, -0.5, -0.25, 0, 0.5},
}
}
stairsplus.api.register_shape("slope_inner_half", {
name_format = "slope_%s_inner_half",
description = "@1 Slope Inner Half",
shape_groups = {slope = 1},
eighths = 3,
drawtype = "mesh",
mesh = "moreblocks_slope_inner_half.obj",
collision_box = box_slope_inner_half,
selection_box = box_slope_inner_half,
})
stairsplus.api.register_shape("slope_inner_cut_half", {
name_format = "slope_%s_inner_cut_half",
description = "@1 Slope Inner Cut Half",
shape_groups = {slope = 1},
eighths = 4,
drawtype = "mesh",
mesh = "moreblocks_slope_inner_cut_half.obj",
collision_box = box_slope_inner_half,
selection_box = box_slope_inner_half,
})
local box_slope_inner_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
{-0.5, 0.125, -0.5, 0.25, 0.25, 0.5},
{-0.5, 0.25, -0.5, 0, 0.375, 0.5},
{-0.5, 0.25, 0, 0.5, 0.375, 0.5},
{-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
{-0.5, 0.375, -0.5, -0.25, 0.5, 0.5},
}
}
stairsplus.api.register_shape("slope_inner_half_raised", {
name_format = "slope_%s_inner_half_raised",
description = "@1 Slope Inner Half Raised",
shape_groups = {slope = 1},
eighths = 6,
drawtype = "mesh",
mesh = "moreblocks_slope_inner_half_raised.obj",
collision_box = box_slope_inner_half_raised,
selection_box = box_slope_inner_half_raised,
})
stairsplus.api.register_shape("slope_inner_cut_half_raised", {
name_format = "slope_%s_inner_cut_half_raised",
description = "@1 Slope Inner Cut Half Raised",
shape_groups = {slope = 1},
eighths = 7,
drawtype = "mesh",
mesh = "moreblocks_slope_inner_cut_half_raised.obj",
collision_box = box_slope_inner_half_raised,
selection_box = box_slope_inner_half_raised,
})
--==============================================================
local box_slope_outer = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
{-0.5, -0.25, -0.25, 0.25, 0, 0.5},
{-0.5, 0, 0, 0, 0.25, 0.5},
{-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
}
}
stairsplus.api.register_shape("slope_outer", {
name_format = "slope_%s_outer",
description = "@1 Slope Outer",
shape_groups = {slope = 1},
eighths = 3,
drawtype = "mesh",
mesh = "moreblocks_slope_outer.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
})
stairsplus.api.register_shape("slope_outer_cut", {
name_format = "slope_%s_outer_cut",
description = "@1 Slope Outer Cut",
shape_groups = {slope = 1},
eighths = 2,
drawtype = "mesh",
mesh = "moreblocks_slope_outer_cut.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
})
stairsplus.api.register_shape("slope_cut", {
name_format = "slope_%s_cut",
description = "@1 Slope Cut",
shape_groups = {slope = 1},
eighths = 4,
drawtype = "mesh",
mesh = "moreblocks_slope_cut.obj",
collision_box = box_slope_outer,
selection_box = box_slope_outer,
})
local box_slope_outer_half = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
{-0.5, -0.375, -0.25, 0.25, -0.25, 0.5},
{-0.5, -0.25, 0, 0, -0.125, 0.5},
{-0.5, -0.125, 0.25, -0.25, 0, 0.5}
}
}
stairsplus.api.register_shape("slope_outer_half", {
name_format = "slope_%s_outer_half",
description = "@1 Slope Outer Half",
shape_groups = {slope = 1},
eighths = 2,
drawtype = "mesh",
mesh = "moreblocks_slope_outer_half.obj",
collision_box = box_slope_outer_half,
selection_box = box_slope_outer_half,
})
stairsplus.api.register_shape("slope_outer_cut_half", {
name_format = "slope_%s_outer_cut_half",
description = "@1 Slope Outer Cut Half",
shape_groups = {slope = 1},
eighths = 1,
drawtype = "mesh",
mesh = "moreblocks_slope_outer_cut_half.obj",
collision_box = box_slope_outer_half,
selection_box = box_slope_outer_half,
})
local box_slope_outer_half_raised = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
{-0.5, 0.125, -0.25, 0.25, 0.25, 0.5},
{-0.5, 0.25, 0, 0, 0.375, 0.5},
{-0.5, 0.375, 0.25, -0.25, 0.5, 0.5}
}
}
stairsplus.api.register_shape("slope_outer_half_raised", {
name_format = "slope_%s_outer_half_raised",
description = "@1 Slope Outer Half Raised",
shape_groups = {slope = 1},
eighths = 6,
drawtype = "mesh",
mesh = "moreblocks_slope_outer_half_raised.obj",
collision_box = box_slope_outer_half_raised,
selection_box = box_slope_outer_half_raised,
})
stairsplus.api.register_shape("slope_outer_cut_half_raised", {
name_format = "slope_%s_outer_cut_half_raised",
description = "@1 Slope Outer Cut Half Raised",
shape_groups = {slope = 1},
eighths = 3,
drawtype = "mesh",
mesh = "moreblocks_slope_outer_cut_half_raised.obj",
collision_box = box_slope_outer_half_raised,
selection_box = box_slope_outer_half_raised,
})

View File

@ -0,0 +1,136 @@
stairsplus.api.register_shape("stair", {
name_format = "stair_%s",
description = "@1 Stair",
shape_groups = {stair = 1, common = 1},
eighths = 6,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
})
stairsplus.api.register_shape("stair_half", {
name_format = "stair_%s_half",
description = "@1 Half Stair",
shape_groups = {stair = 1},
eighths = 3,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0, 0, 0.5},
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
})
stairsplus.api.register_shape("stair_right_half", {
name_format = "stair_%s_right_half",
description = "@1 Right Half Stair",
shape_groups = {stair = 1},
eighths = 3,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{0, -0.5, -0.5, 0.5, 0, 0.5},
{0, 0, 0, 0.5, 0.5, 0.5},
},
},
})
stairsplus.api.register_shape("stair_inner", {
name_format = "stair_%s_inner",
description = "@1 Inner Stair",
shape_groups = {stair = 1, common = 1},
eighths = 5,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
{-0.5, 0, -0.5, 0, 0.5, 0},
},
},
})
stairsplus.api.register_shape("stair_outer", {
name_format = "stair_%s_outer",
description = "@1 Outer Stair",
shape_groups = {stair = 1, common = 1},
eighths = 5,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
})
stairsplus.api.register_shape("stair_alt_1", {
name_format = "stair_%s_alt_1",
description = "@1 1/16 Alt Stair",
shape_groups = {stair = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.0625, -0.5, 0.5, 0, 0},
{-0.5, 0.4375, 0, 0.5, 0.5, 0.5},
},
},
})
stairsplus.api.register_shape("stair_alt_2", {
name_format = "stair_%s_alt_2",
description = "@1 1/8 Alt Stair",
shape_groups = {stair = 1},
eighths = 1,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.125, -0.5, 0.5, 0, 0},
{-0.5, 0.375, 0, 0.5, 0.5, 0.5},
},
},
})
stairsplus.api.register_shape("stair_alt_4", {
name_format = "stair_%s_alt_4",
description = "@1 1/4 Alt Stair",
shape_groups = {stair = 1},
eighths = 2,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.25, -0.5, 0.5, 0, 0},
{-0.5, 0.25, 0, 0.5, 0.5, 0.5},
},
},
})
stairsplus.api.register_shape("stair_alt_8", {
name_format = "stair_%s_alt_8",
aliases = {"stair_%s_alt"},
description = "@1 1/2 Alt Stair",
shape_groups = {stair = 1},
eighths = 4,
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
})