123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381 |
- minetest.register_node("morelights_modern:block", {
- description = "Modern Light Block",
- tiles = {"morelights_metal_dark.png^morelights_modern_block.png"},
- paramtype = "light",
- light_source = LIGHT_MAX,
- groups = {cracky = 2, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_glass_defaults(),
- })
- minetest.register_node("morelights_modern:smallblock", {
- description = "Modern Light Block (small)",
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {-1/4, -1/2, -1/4, 1/4, 0, 1/4}
- },
- tiles = {"morelights_metal_dark.png^morelights_modern_smallblock.png",
- "morelights_metal_dark.png^morelights_modern_smallblock.png",
- "[combine:16x16:0,0=morelights_metal_dark.png:0,4=morelights_modern_smallblock.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- light_source = 12,
- groups = {cracky = 3, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_glass_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- return morelights.rotate_and_place(itemstack, placer, pointed_thing)
- end,
- })
- morelights.register_variants({
- {name = "morelights_modern:post_d", description = "Modern Post Light (dark)",
- tiles = {"morelights_metal_dark.png", "morelights_metal_dark.png",
- "morelights_metal_dark.png^morelights_modern_post.png"}},
- {name = "morelights_modern:post_l", description = "Modern Post Light (light)",
- tiles = {"morelights_metal_light.png", "morelights_metal_light.png",
- "morelights_metal_light.png^morelights_modern_post.png"}}
- },
- {
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {{-1/8, -1/2, -1/8, 1/8, 1/2, 1/8}}
- },
- paramtype = "light",
- light_source = LIGHT_MAX,
- groups = {cracky = 3, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_metal_defaults(),
- })
- morelights.register_variants({
- {name = "morelights_modern:streetpost_d",
- description = "Street Lamp Post (dark)--connects to bar lights",
- tiles = {"morelights_metal_dark.png"}},
- {name = "morelights_modern:streetpost_l",
- description = "Street Lamp Post (light)--connects to bar lights",
- tiles = {"morelights_metal_light.png"}}
- },
- {
- drawtype = "nodebox",
- node_box = {
- type = "connected",
- fixed = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
- connect_front = {-1/16, 3/8, -1/2, 1/16, 7/16, -1/16},
- connect_left = {-1/2, 3/8, -1/16, -1/16, 7/16, 1/16},
- connect_back = {-1/16, 3/8, 1/16, 1/16, 7/16, 1/2},
- connect_right = {1/16, 3/8, -1/16, 1/2, 7/16, 1/16},
- },
- connects_to = {"morelights_modern:barlight_c", "morelights_modern:barlight_s"},
- paramtype = "light",
- groups = {cracky = 2, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_metal_defaults(),
- })
- minetest.register_node("morelights_modern:barlight_c", {
- description = "Ceiling Bar Light (connecting)",
- drawtype = "nodebox",
- node_box = {
- type = "connected",
- fixed = {-1/8, 3/8, -1/8, 1/8, 1/2, 1/8},
- connect_front = {-1/8, 3/8, -1/2, 1/8, 1/2, -1/8},
- connect_left = {-1/2, 3/8, -1/8, -1/8, 1/2, 1/8},
- connect_back = {-1/8, 3/8, 1/8, 1/8, 1/2, 1/2},
- connect_right = {1/8, 3/8, -1/8, 1/2, 1/2, 1/8},
- },
- connects_to = {"morelights_modern:barlight_c", "morelights_modern:barlight_s",
- "morelights_modern:streetpost_d", "morelights_modern:streetpost_l"},
- tiles = {"morelights_metal_dark.png", "morelights_modern_barlight.png",
- "morelights_metal_dark.png"},
- paramtype = "light",
- light_source = LIGHT_MAX,
- groups = {cracky = 2, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_glass_defaults(),
- })
- minetest.register_node("morelights_modern:barlight_s", {
- description = "Ceiling Bar Light (straight)",
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {-1/2, 3/8, -1/8, 1/2, 1/2, 1/8},
- },
- tiles = {"morelights_metal_dark.png", "morelights_modern_barlight.png",
- "morelights_metal_dark.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- light_source = LIGHT_MAX,
- groups = {cracky = 2, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_glass_defaults(),
- })
- minetest.register_node("morelights_modern:ceilinglight", {
- description = "Modern Ceiling Light",
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {-1/4, 3/8, -1/4, 1/4, 1/2, 1/4}
- },
- tiles = {"morelights_metal_dark.png",
- "morelights_metal_dark.png^morelights_modern_block.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- light_source = LIGHT_MAX,
- groups = {cracky = 3, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_glass_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- return morelights.rotate_and_place(itemstack, placer, pointed_thing,
- {[0] = 0, 20, 12, 16, 4, 8})
- end,
- })
- morelights.register_variants({
- {name = "morelights_modern:canlight_d",
- description = "Modern Can Light (dark)",
- tiles = {"morelights_metal_dark.png^morelights_modern_canlight.png"}},
- {name = "morelights_modern:canlight_l",
- description = "Modern Can Light (light)",
- tiles = {"morelights_metal_light.png^morelights_modern_canlight.png"}},
- },
- {
- drawtype = "mesh",
- mesh = "morelights_modern_canlight.obj",
- collision_box = {
- type = "fixed",
- fixed = {-1/8, 0, -1/8, 1/8, 1/2, 1/8}
- },
- selection_box = {
- type = "fixed",
- fixed = {-1/8, 0, -1/8, 1/8, 1/2, 1/8}
- },
- paramtype = "light",
- light_source = 12,
- groups = {cracky = 2, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_metal_defaults(),
- })
- minetest.register_node("morelights_modern:walllamp", {
- description = "Modern Wall Lamp",
- drawtype = "mesh",
- mesh = "morelights_modern_walllamp.obj",
- collision_box = {
- type = "fixed",
- fixed = {-1/8, -3/8, 1/8, 1/8, 1/4, 1/2}
- },
- selection_box = {
- type = "fixed",
- fixed = {-1/8, -3/8, 1/8, 1/8, 1/4, 1/2}
- },
- tiles = {"morelights_metal_dark_32.png^morelights_modern_walllamp.png"},
- paramtype = "light",
- paramtype2 = "facedir",
- light_source = 12,
- groups = {cracky = 2, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_glass_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- return morelights.rotate_and_place(itemstack, placer, pointed_thing,
- {[0] = 6, 4, 1, 3, 0, 2})
- end,
- })
- morelights.register_variants({
- {name = "morelights_modern:tablelamp_d",
- description = "Modern Table Lamp (dark)",
- tiles = {"morelights_metal_light_32.png^morelights_modern_tablelamp_o.png",
- "morelights_modern_tablelamp_d.png"}},
- {name = "morelights_modern:tablelamp_l",
- description = "Modern Table Lamp (light)",
- tiles = {"morelights_metal_dark_32.png^morelights_modern_tablelamp_o.png",
- "morelights_modern_tablelamp_l.png"}},
- },
- {
- drawtype = "mesh",
- mesh = "morelights_modern_tablelamp.obj",
- collision_box = {
- type = "fixed",
- fixed = {-1/4, -1/2, -1/4, 1/4, 7/16, 1/4}
- },
- selection_box = {
- type = "fixed",
- fixed = {-1/4, -1/2, -1/4, 1/4, 7/16, 1/4}
- },
- paramtype = "light",
- light_source = 10,
- groups = {choppy = 2, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_defaults(),
- })
- morelights.register_variants({
- {name = "morelights_modern:pathlight_d",
- description = "Modern Path Light (dark)",
- tiles = {"morelights_metal_dark_32.png^morelights_modern_pathlight.png"}},
- {name = "morelights_modern:pathlight_l",
- description = "Modern Path Light (light)",
- tiles = {"morelights_metal_light_32.png^morelights_modern_pathlight.png"}}
- },
- {
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {{-1/32, -8/16, -1/32, 1/32, 1/8, 1/32},
- {-1/16, 1/8, -1/16, 1/16, 5/16, 1/16},
- {-1/8, 5/16, -1/8, 1/8, 3/8, 1/8}}
- },
- selection_box = {
- type = "fixed",
- fixed = {{-1/8, -1/2, -1/8, 1/8, 3/8, 1/8}}
- },
- paramtype = "light",
- light_source = 8,
- groups = {cracky = 3, oddly_breakable_by_hand = 3},
- sounds = default.node_sound_metal_defaults(),
- })
- --
- -- Craft recipes
- --
- minetest.register_craft({
- output = "morelights_modern:block",
- recipe = {
- {"", "default:steel_ingot", ""},
- {morelights.glass, "morelights:bulb", morelights.glass},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:smallblock",
- recipe = {
- {"", morelights.glass, ""},
- {"default:steel_ingot", "morelights:bulb", "default:steel_ingot"}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:post_d",
- recipe = {
- {"dye:dark_grey", "default:steel_ingot", ""},
- {"", "morelights:bulb", ""},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:post_l",
- recipe = {
- {"dye:white", "default:steel_ingot", ""},
- {"", "morelights:bulb", ""},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:streetpost_d 2",
- recipe = {
- {"dye:dark_grey", "default:steel_ingot", "default:steel_ingot"},
- {"", "default:steel_ingot", ""},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:streetpost_l 2",
- recipe = {
- {"dye:white", "default:steel_ingot", "default:steel_ingot"},
- {"", "default:steel_ingot", ""},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:barlight_c 4",
- recipe = {
- {"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
- {"default:copper_ingot", "default:glass", "default:copper_ingot"}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:barlight_c",
- type = "shapeless",
- recipe = {"morelights_modern:barlight_s"}
- })
- minetest.register_craft({
- output = "morelights_modern:barlight_s",
- type = "shapeless",
- recipe = {"morelights_modern:barlight_c"}
- })
- minetest.register_craft({
- output = "morelights_modern:ceilinglight",
- recipe = {
- {"default:steel_ingot", "morelights:bulb", "default:steel_ingot"},
- {"", morelights.glass, ""},
- }
- })
- minetest.register_craft({
- output = "morelights_modern:canlight_d",
- recipe = {
- {"dye:dark_grey", "default:steel_ingot", ""},
- {"default:steel_ingot", "morelights:bulb", "default:steel_ingot"},
- }
- })
- minetest.register_craft({
- output = "morelights_modern:canlight_l",
- recipe = {
- {"dye:white", "default:steel_ingot", ""},
- {"default:steel_ingot", "morelights:bulb", "default:steel_ingot"},
- }
- })
- minetest.register_craft({
- output = "morelights_modern:walllamp",
- recipe = {
- {"dye:white", morelights.glass, ""},
- {morelights.glass, "morelights:bulb", "default:steel_ingot"},
- {"", "dye:dark_grey", "default:steel_ingot"}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:tablelamp_d",
- recipe = {
- {"wool:dark_grey", "morelights:bulb", "wool:dark_grey"},
- {"", "default:steel_ingot", ""},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:tablelamp_l",
- recipe = {
- {"wool:white", "morelights:bulb", "wool:white"},
- {"", "default:steel_ingot", ""},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:pathlight_d",
- recipe = {
- {"dye:dark_grey", "morelights:bulb", ""},
- {"", "default:steel_ingot", ""},
- {"", "default:steel_ingot", ""}
- }
- })
- minetest.register_craft({
- output = "morelights_modern:pathlight_l",
- recipe = {
- {"dye:white", "morelights:bulb", ""},
- {"", "default:steel_ingot", ""},
- {"", "default:steel_ingot", ""}
- }
- })
|