-local def = { -- Nodebox name, yield, definition.
- {"nanoslab", 16, {-.5,-.5,-.5,0,-.4375,0}},
- {"micropanel", 16, {-.5,-.5,-.5,.5,-.4375,0}},
- {"microslab", 8, {-.5,-.5,-.5,.5,-.4375,.5}},
- {"thinstair", 8, {{-.5,-.0625,-.5,.5,0,0},{-.5,.4375,0,.5,.5,.5}}},
- {"cube", 4, {-.5,-.5,0,0,0,.5}},
- {"panel", 4, {-.5,-.5,-.5,.5,0,0}},
- {"slab", 2, {-.5,-.5,-.5,.5,0,.5}},
- {"doublepanel", 2, {{-.5,-.5,-.5,.5,0,0},{-.5,0,0,.5,.5,.5}}},
- {"halfstair", 2, {{-.5,-.5,-.5,0,0,.5},{-.5,0,0,0,.5,.5}}},
- {"outerstair", 1, {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,0,.5,.5}}},
- {"stair", 1, {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,.5,.5,.5}}},
- {"innerstair", 1, {{-.5,-.5,-.5,.5,0,.5},{-.5,0,0,.5,.5,.5},{-.5,0,-.5,0,.5,0}}}
+-- Nodes allowed to be cut.
+-- Only the regular, solid blocks without formspec or explosivity can be cut.
+function worktable:nodes(def)
+ return (def.drawtype == "normal" or def.drawtype:find("glass")) and
+ (def.groups.cracky or def.groups.choppy) and not
+ def.on_construct and not def.after_place_node and not
+ def.after_place_node and not def.on_rightclick and not
+ def.on_blast and not def.allow_metadata_inventory_take and not
+ (def.groups.not_in_creative_inventory == 1) and not
+ def.groups.wool and not def.description:find("Ore") and
+ def.description and def.description ~= "" and def.light_source == 0
+end
+
+-- Nodeboxes definitions.
+worktable.defs = {
+ -- Name Yield X Y Z W H L
+ {"nanoslab", 16, { 0, 0, 0, 8, 1, 8 }},
+ {"micropanel", 16, { 0, 0, 0, 16, 1, 8 }},
+ {"microslab", 8, { 0, 0, 0, 16, 1, 16 }},
+ {"thinstair", 8, { 0, 7, 0, 16, 1, 8 },
+ { 0, 15, 8, 16, 1, 8 }},
+ {"cube", 4, { 0, 0, 0, 8, 8, 8 }},
+ {"panel", 4, { 0, 0, 0, 16, 8, 8 }},
+ {"slab", 2, nil },
+ {"doublepanel", 2, { 0, 0, 0, 16, 8, 8 },
+ { 0, 8, 8, 16, 8, 8 }},
+ {"halfstair", 2, { 0, 0, 0, 8, 8, 16 },
+ { 0, 8, 8, 8, 8, 8 }},
+ {"outerstair", 1, { 0, 0, 0, 16, 8, 16 },
+ { 0, 8, 8, 8, 8, 8 }},
+ {"stair", 1, nil },
+ {"innerstair", 1, { 0, 0, 0, 16, 8, 16 },
+ { 0, 8, 8, 16, 8, 8 },
+ { 0, 8, 0, 8, 8, 8 }}