Slope box fixes. From Bas080.
| | |
| | | ---------------------------------------- |
| | | technic_cnc_api.detail_level = 16 -- 16; 1-32 |
| | | |
| | | -- HERE YOU CAN DE/ACTIVATE BACKGROUND FOR CNC MENU: |
| | | -------------------------------------------------------- |
| | | technic_cnc_api.allow_menu_background = false |
| | | |
| | | -- REGISTER NONCUBIC FORMS, CREATE MODELS AND RECIPES: |
| | | ------------------------------------------------------ |
| | | |
| | |
| | | -- SLOPE INNER EDGE |
| | | ------------------- |
| | | function technic_cnc_api.register_slope_inner_edge(recipeitem, groups, images, description) |
| | | local slopeboxedge = {} |
| | | local detail = technic_cnc_api.detail_level |
| | | for i = 0, detail-1 do |
| | | slopeboxedge[i+1]={(i/detail)-0.5, -0.5, -0.5, 0.5, (i/detail)-0.5+(1/detail), 0.5} |
| | | slopeboxedge[i+detail+1]={-0.5, -0.5, (i/detail)-0.5, 0.5, (i/detail)-0.5+(1/detail), 0.5} |
| | | end |
| | | |
| | | minetest.register_node(":" .. recipeitem .. "_technic_cnc_slope_inner_edge", { |
| | | description = description, |
| | |
| | | fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, |
| | | }, |
| | | node_box = { |
| | | type = "fixed", |
| | | fixed = { |
| | | -- PART 1 |
| | | {-0.5, -0.5, -0.5, 0.5, -0.45, 0.5}, |
| | | {-0.45, -0.5, -0.5, 0.5, -0.4, 0.5}, |
| | | {-0.4, -0.5, -0.5, 0.5, -0.35, 0.5}, |
| | | {-0.35, -0.5, -0.5, 0.5, -0.3, 0.5}, |
| | | {-0.3, -0.5, -0.5, 0.5, -0.25, 0.5}, |
| | | {-0.25, -0.5, -0.5, 0.5, -0.2, 0.5}, |
| | | {-0.2, -0.5, -0.5, 0.5, -0.15, 0.5}, |
| | | {-0.15, -0.5, -0.5, 0.5, -0.1, 0.5}, |
| | | {-0.1, -0.5, -0.5, 0.5, -0.05, 0.5}, |
| | | {-0.05, -0.5, -0.5, 0.5, 0, 0.5}, |
| | | {0, -0.5, -0.5, 0.5, 0.05, 0.5}, |
| | | {0.05, -0.5, -0.5, 0.5, 0.1, 0.5}, |
| | | {0.1, -0.5, -0.5, 0.5, 0.15, 0.5}, |
| | | {0.15, -0.5, -0.5, 0.5, 0.2, 0.5}, |
| | | {0.2, -0.5, -0.5, 0.5, 0.25, 0.5}, |
| | | {0.25, -0.5, -0.5, 0.5, 0.3, 0.5}, |
| | | {0.3, -0.5, -0.5, 0.5, 0.35, 0.5}, |
| | | {0.35, -0.5, -0.5, 0.5, 0.4, 0.5}, |
| | | {0.4, -0.5, -0.5, 0.5, 0.45, 0.5}, |
| | | {0.45, -0.5, -0.5, 0.5, 0.5, 0.5}, |
| | | -- PART 2 |
| | | {-0.5, -0.5, -0.45, 0.5, -0.45, 0.5}, |
| | | {-0.5, -0.5, -0.4, 0.5, -0.4, 0.5}, |
| | | {-0.5, -0.5, -0.35, 0.5, -0.35, 0.5}, |
| | | {-0.5, -0.5, -0.3, 0.5, -0.3, 0.5}, |
| | | {-0.5, -0.5, -0.25, 0.5, -0.25, 0.5}, |
| | | {-0.5, -0.5, -0.2, 0.5, -0.2, 0.5}, |
| | | {-0.5, -0.5, -0.15, 0.5, -0.15, 0.5}, |
| | | {-0.5, -0.5, -0.1, 0.5, -0.1, 0.5}, |
| | | {-0.5, -0.5, -0.05, 0.5, -0.05, 0.5}, |
| | | {-0.5, -0.5, 0, 0.5, 0, 0.5}, |
| | | {-0.5, -0.5, 0.05, 0.5, 0.05, 0.5}, |
| | | {-0.5, -0.5, 0.1, 0.5, 0.1, 0.5}, |
| | | {-0.5, -0.5, 0.15, 0.5, 0.15, 0.5}, |
| | | {-0.5, -0.5, 0.2, 0.5, 0.2, 0.5}, |
| | | {-0.5, -0.5, .25, 0.5, 0.25, 0.5}, |
| | | {-0.5, -0.5, 0.3, 0.5, 0.3, 0.5}, |
| | | {-0.5, -0.5, 0.35, 0.5, 0.35, 0.5}, |
| | | {-0.5, -0.5, 0.4, 0.5, 0.4, 0.5}, |
| | | {-0.5, -0.5, 0.45, 0.5, 0.45, 0.5}, |
| | | {-0.5, -0.5, 0.5, 0.5, 0.5, 0.5}, |
| | | }, |
| | | type = "fixed", |
| | | fixed = slopeboxedge, |
| | | }, |
| | | groups = groups, |
| | | }) |
| | |
| | | return |
| | | end |
| | | |
| | | local slopeboxedge = {} |
| | | local detail = technic_cnc_api.detail_level |
| | | for i = 0, detail-1 do |
| | | slopeboxedge[i+1]={0.5-(i/detail)-(1/detail), (i/detail)-0.5, -0.5, 0.5, (i/detail)-0.5+(1/detail), 0.5} |
| | | slopeboxedge[i+detail+1]={-0.5, (i/detail)-0.5, 0.5-(i/detail)-(1/detail), 0.5, (i/detail)-0.5+(1/detail), 0.5} |
| | | end |
| | | |
| | | minetest.register_node(":" .. recipeitem .. "_technic_cnc_slope_inner_edge_upsdown", { |
| | | description = description, |
| | | drawtype = "nodebox", |
| | |
| | | }, |
| | | node_box = { |
| | | type = "fixed", |
| | | fixed = { |
| | | {0.45, -0.5, -0.5, 0.5, -0.45, 0.5}, |
| | | {0.4, -0.45, -0.5, 0.5, -0.4, 0.5}, |
| | | {0.35, -0.4, -0.5, 0.5, -0.35, 0.5}, |
| | | {0.3, -0.35, -0.5, 0.5, -0.3, 0.5}, |
| | | {0.25, -0.3, -0.5, 0.5, -0.25, 0.5}, |
| | | {0.2, -0.25, -0.5, 0.5, -0.2, 0.5}, |
| | | {0.15, -0.2, -0.5, 0.5, -0.15, 0.5}, |
| | | {0.1, -0.15, -0.5, 0.5, -0.1, 0.5}, |
| | | {0.05, -0.1, -0.5, 0.5, -0.05, 0.5}, |
| | | {0, -0.05, -0.5, 0.5, 0, 0.5}, |
| | | {-0.05, 0, -0.5, 0.5, 0.05, 0.5}, |
| | | {-0.1, 0.05, -0.5, 0.5, 0.1, 0.5}, |
| | | {-0.15, 0.1, -0.5, 0.5, 0.15, 0.5}, |
| | | {-0.2, 0.15, -0.5, 0.5, 0.2, 0.5}, |
| | | {-0.25, 0.2, -0.5, 0.5, 0.25, 0.5}, |
| | | {-0.3, 0.25, -0.5, 0.5, 0.3, 0.5}, |
| | | {-0.35, 0.3, -0.5, 0.5, 0.35, 0.5}, |
| | | {-0.4, 0.35, -0.5, 0.5, 0.4, 0.5}, |
| | | {-0.45, 0.4, -0.5, 0.5, 0.45, 0.5}, |
| | | {-0.5, 0.45, -0.5, 0.5, 0.5, 0.5}, |
| | | |
| | | {-0.5, -0.5, 0.45, 0.5, -0.45, 0.5}, |
| | | {-0.5, -0.45, 0.4, 0.5, -0.4, 0.5}, |
| | | {-0.5, -0.4, 0.35, 0.5, -0.35, 0.5}, |
| | | {-0.5, -0.35, 0.3, 0.5, -0.3, 0.5}, |
| | | {-0.5, -0.3, 0.25, 0.5, -0.25, 0.5}, |
| | | {-0.5, -0.25, 0.2, 0.5, -0.2, 0.5}, |
| | | {-0.5, -0.2, 0.15, 0.5, -0.15, 0.5}, |
| | | {-0.5, -0.15, 0.1, 0.5, -0.1, 0.5}, |
| | | {-0.5, -0.1, 0.05, 0.5, -0.05, 0.5}, |
| | | {-0.5, -0.05, 0, 0.5, 0, 0.5}, |
| | | {-0.5, 0, -0.05, 0.5, 0.05, 0.5}, |
| | | {-0.5, 0.05, -0.1, 0.5, 0.1, 0.5}, |
| | | {-0.5, 0.1, -0.15, 0.5, 0.15, 0.5}, |
| | | {-0.5, 0.15, -0.2, 0.5, 0.2, 0.5}, |
| | | {-0.5, 0.2, -0.25, 0.5, 0.25, 0.5}, |
| | | {-0.5, 0.25, -0.3, 0.5, 0.3, 0.5}, |
| | | {-0.5, 0.3, -0.35, 0.5, 0.35, 0.5}, |
| | | {-0.5, 0.35, -0.4, 0.5, 0.4, 0.5}, |
| | | {-0.5, 0.4, -0.45, 0.5, 0.45, 0.5}, |
| | | {-0.5, 0.45, -0.5, 0.5, 0.5, 0.5}, |
| | | |
| | | }, |
| | | fixed = slopeboxedge, |
| | | }, |
| | | groups = groups, |
| | | }) |