123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394 |
- mymillwork.registered = {}
- mymillwork.nodes = {
- { suffix = "crownmould",
- model = "mymillwork_mach1.obj",
- mdesc = "Crown Mould",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375},
- {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375},
- {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5},
- }
- },
- },
- { suffix = "crownmould_ic",
- model = "mymillwork_mach2.obj",
- mdesc = "Crown Mould IC",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, 0.375, -0.125, 0.375},
- {0.125, -0.375, -0.5, 0.375, -0.125, 0.125},
- {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5},
- {0.375, -0.375, -0.5, 0.5, 0.5, 0.375},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, 0.375, -0.125, 0.375},
- {0.125, -0.375, -0.5, 0.375, -0.125, 0.125},
- {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5},
- {0.375, -0.375, -0.5, 0.5, 0.5, 0.375},
- }
- },
- },
- { suffix = "crownmould_oc",
- model = "mymillwork_mach3.obj",
- mdesc = "Crown Mould OC",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, -0.125, -0.125, 0.5},
- {-0.5, -0.125, 0.375, -0.375, 0.5, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, -0.125, -0.125, 0.5},
- {-0.5, -0.125, 0.375, -0.375, 0.5, 0.5},
- }
- },
- },
- { suffix = "crownmould_beam",
- model = "mymillwork_mach4.obj",
- mdesc = "Crown Mould with Beam",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375},
- {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.125},
- {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.125, 0.5, -0.125, 0.375},
- {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.125},
- {-0.5, -0.375, 0.375, 0.5, 0.5, 0.5},
- }
- },
- },
- { suffix = "column",
- model = "mymillwork_mach5.obj",
- mdesc = "Column",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5},
- }
- },
- },
- { suffix = "column_base",
- model = "mymillwork_mach6.obj",
- mdesc = "Column Base",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,-0.5,0.5,0.5,0.5},
- }
- },
- },
- { suffix = "column_half",
- model = "mymillwork_mach7.obj",
- mdesc = "Half Column",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5},
- }
- },
- },
- { suffix = "column_half_base",
- model = "mymillwork_mach8.obj",
- mdesc = "Half Column Base",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0.0,0.5,0.5,0.5},
- }
- },
- },
- { suffix = "column_half_wbeam",
- model = "mymillwork_mach9.obj",
- mdesc = "Half Column Base With Beam",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.0, 0.5, 0.5, 0.5},
- {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.0},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
- {-0.5, -0.375, 0.0, 0.5, 0.5, 0.5},
- {-0.25, -0.375, -0.5, 0.25, -0.1875, 0.0},
- }
- },
- },
- { suffix = "column_quarter",
- model = "mymillwork_mach10.obj",
- mdesc = "Quarter Column",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- }
- },
- },
- { suffix = "column_quarter_base",
- model = "mymillwork_mach11.obj",
- mdesc = "Quarter Column Base",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- }
- },
- },
- { suffix = "column_quarter_wbase",
- model = "mymillwork_mach12.obj",
- mdesc = "Quarter Column Base Baseboard",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- {0.0, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- {-0.5, -0.5, -0.5, -0.4375, -0.1875, 0.0},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- {0.0, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- {-0.5, -0.5, -0.5, -0.4375, -0.1875, 0.0},
- }
- },
- },
- { suffix = "column_quarter_fancybase",
- model = "mymillwork_mach13.obj",
- mdesc = "Quarter Column Base Fancy Baseboard",
- sbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- {0.0, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.0},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5,-0.5,0,0,0.5,0.5},
- {0.0, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.0},
- }
- },
- },
- { suffix = "ceiling",
- model = "mymillwork_mach14.obj",
- mdesc = "Ceiling",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
- }
- },
- },
- { suffix = "ceiling_post",
- model = "mymillwork_mach15.obj",
- mdesc = "Ceiling with Post",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
- {-0.125, -0.4375, -0.125, 0.125, 0.5, 0.125},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
- {-0.125, -0.4375, -0.125, 0.125, 0.5, 0.125},
- }
- },
- },
- { suffix = "beam",
- model = "mymillwork_mach16.obj",
- mdesc = "Beam",
- sbox = { type = "fixed",
- fixed = {{-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5},
- }
- },
- },
- { suffix = "beam_t",
- model = "mymillwork_mach17.obj",
- mdesc = "Beam T",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.25, -0.25, -0.1875, 0.25},
- {-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5},
- {0.25, -0.5, -0.25, 0.5, -0.1875, 0.25},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.25, -0.25, -0.1875, 0.25},
- {-0.25, -0.5, -0.5, 0.25, -0.1875, 0.5},
- {0.25, -0.5, -0.25, 0.5, -0.1875, 0.25},
- }
- },
- },
- { suffix = "beam_ceiling_t",
- model = "mymillwork_mach18.obj",
- mdesc = "Ceiling with Beam T",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
- {-0.5, -0.4375, -0.25, -0.25, -0.1875, 0.25},
- {-0.25, -0.4375, -0.5, 0.25, -0.1875, 0.5},
- {0.25, -0.4375, -0.25, 0.5, -0.1875, 0.25},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5},
- {-0.5, -0.4375, -0.25, -0.25, -0.1875, 0.25},
- {-0.25, -0.4375, -0.5, 0.25, -0.1875, 0.5},
- {0.25, -0.4375, -0.25, 0.5, -0.1875, 0.25},
- }
- },
- },
- { suffix = "base",
- model = "mymillwork_mach19.obj",
- mdesc = "Baseboard",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- }
- },
- },
- { suffix = "base_ic",
- model = "mymillwork_mach20.obj",
- mdesc = "Baseboard IC",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- {-0.5, -0.5, -0.5, -0.4375, -0.1875, 0.4375},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- }
- },
- },
- { suffix = "base_oc",
- model = "mymillwork_mach21.obj",
- mdesc = "Baseboard OC",
- sbox = { type = "fixed",
- fixed = {{0.4375, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.4375, 0.5, -0.1875, 0.5},
- }
- },
- },
- { suffix = "base_fancy",
- model = "mymillwork_mach22.obj",
- mdesc = "Fancy Baseboard",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- }
- },
- },
- { suffix = "base_fancy_ic",
- model = "mymillwork_mach23.obj",
- mdesc = "Fancy Baseboard IC",
- sbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.3125},
- }
- },
- cbox = { type = "fixed",
- fixed = {{-0.5, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- {-0.5, -0.5, -0.5, -0.3125, 0.1875, 0.3125},
- }
- },
- },
- { suffix = "base_fancy_oc",
- model = "mymillwork_mach24.obj",
- mdesc = "Fancy Baseboard OC",
- sbox = { type = "fixed",
- fixed = {{0.3125, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- }
- },
- cbox = { type = "fixed",
- fixed = {{0.3125, -0.5, 0.3125, 0.5, 0.1875, 0.5},
- }
- },
- },
- }
- function mymillwork.register(material, node_suffix, desc, image, group)
- for __, data in ipairs(mymillwork.nodes) do
- mymillwork.register_all(data.suffix, data.model, data.mdesc, data.sbox, data.cbox,
- node_suffix, material, desc, image, group)
- end
- end
- function mymillwork.register_all(suffix, model, mdesc, sbox, cbox, node_suffix, material, desc, image, group)
- minetest.register_node("mymillwork:" .. suffix .. "_" .. node_suffix, {
- description = desc .. " " .. mdesc,
- drawtype = "mesh",
- mesh = model,
- tiles = { image },
- selection_box = sbox,
- collision_box = cbox,
- paramtype = "light",
- paramtype2 = "facedir",
- groups = group,
- on_place = minetest.rotate_node,
- })
- table.insert(mymillwork.registered, {material, node_suffix})
- end
|