Change indentation, fix sunlight_propagates spelling

This commit is contained in:
random-geek 2020-09-14 21:36:35 -07:00
parent f74339235d
commit d782f5d665
5 changed files with 760 additions and 758 deletions

@ -1,53 +1,53 @@
morelights = {}
if minetest.get_modpath("xpanes") then
morelights.glass = "xpanes:pane_flat"
morelights.glass = "xpanes:pane_flat"
else
morelights.glass = "default:glass"
morelights.glass = "default:glass"
end
function morelights.register_variants(variants, fixedDef)
for _,variant in ipairs(variants) do
local name = variant.name
local def = table.copy(fixedDef)
for _, variant in ipairs(variants) do
local name = variant.name
local def = table.copy(fixedDef)
for k,v in pairs(variant) do
if k ~= "name" then
def[k] = v
end
for k,v in pairs(variant) do
if k ~= "name" then
def[k] = v
end
end
minetest.register_node(name, def)
end
minetest.register_node(name, def)
end
end
function morelights.on_place_hanging(itemstack, placer, pointed_thing, replaceName)
local ceiling = minetest.get_node(vector.add(pointed_thing.above,
{x=0, y=1, z=0}))
local ceiling = minetest.get_node(vector.add(pointed_thing.above,
{x=0, y=1, z=0}))
if ceiling and ceiling.name ~= "air"
and minetest.get_item_group(ceiling.name, "mounted_ceiling") == 0
and not (placer and placer:get_player_control().sneak) then
if ceiling and ceiling.name ~= "air"
and minetest.get_item_group(ceiling.name, "mounted_ceiling") == 0
and not (placer and placer:get_player_control().sneak) then
local name = itemstack:get_name()
local fakestack = itemstack
fakestack:set_name(replaceName)
local name = itemstack:get_name()
local fakestack = itemstack
fakestack:set_name(replaceName)
minetest.item_place(fakestack, placer, pointed_thing, 0)
itemstack:set_name(name)
minetest.item_place(fakestack, placer, pointed_thing, 0)
itemstack:set_name(name)
return itemstack
end
minetest.item_place(itemstack, placer, pointed_thing, 0)
return itemstack
end
minetest.item_place(itemstack, placer, pointed_thing, 0)
return itemstack
end
function morelights.rotate_and_place(itemstack, placer, pointed_thing, lookup)
local dir = minetest.dir_to_wallmounted(vector.subtract(pointed_thing.under, pointed_thing.above))
local fDirs = lookup or {[0] = 20, 0, 16, 12, 8, 4}
minetest.item_place(itemstack, placer, pointed_thing, fDirs[dir] or 0)
return itemstack
local dir = minetest.dir_to_wallmounted(vector.subtract(pointed_thing.under, pointed_thing.above))
local fDirs = lookup or {[0] = 20, 0, 16, 12, 8, 4}
minetest.item_place(itemstack, placer, pointed_thing, fDirs[dir] or 0)
return itemstack
end
local path = minetest.get_modpath("morelights")

@ -1,121 +1,123 @@
minetest.register_craftitem("morelights:bulb", {
description = "Light Bulb",
inventory_image = "morelights_bulb.png"
description = "Light Bulb",
inventory_image = "morelights_bulb.png"
})
morelights.register_variants({
{name = "morelights:pole_d", description = "Metal Pole (dark)",
tiles = {"morelights_metal_dark_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:pole_ceiling_d")
end},
{name = "morelights:pole_l", description = "Metal Pole (light)",
tiles = {"morelights_metal_light_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:pole_ceiling_l")
end}
{name = "morelights:pole_d", description = "Metal Pole (dark)",
tiles = {"morelights_metal_dark_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:pole_ceiling_d")
end},
{name = "morelights:pole_l", description = "Metal Pole (light)",
tiles = {"morelights_metal_light_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:pole_ceiling_l")
end}
},
{
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}
},
selection_box = {
type = "wallmounted",
wall_bottom = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
wall_side = {-1/2, -1/16, -1/16, 1/2, 1/16, 1/16},
wall_top = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propegates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-1/32, -1/2, -1/32, 1/32, 1/2, 1/32}
},
selection_box = {
type = "wallmounted",
wall_bottom = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
wall_side = {-1/2, -1/16, -1/16, 1/2, 1/16, 1/16},
wall_top = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
})
morelights.register_variants({
{name = "morelights:pole_ceiling_d",
tiles = {"morelights_metal_dark_32.png"}, drop = "morelights:pole_d"},
{name = "morelights:pole_ceiling_l",
tiles = {"morelights_metal_light_32.png"}, drop = "morelights:pole_l"}
{name = "morelights:pole_ceiling_d",
tiles = {"morelights_metal_dark_32.png"}, drop = "morelights:pole_d"},
{name = "morelights:pole_ceiling_l",
tiles = {"morelights_metal_light_32.png"}, drop = "morelights:pole_l"}
},
{
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {{-3/16, -7/16, -3/16, 3/16, -1/2, 3/16},
{-1/32, 1/2, -1/32, 1/32, -7/16, 1/32}}
},
selection_box = {
type = "wallmounted",
wall_bottom = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
wall_side = {-1/2, -1/16, -1/16, 1/2, 1/16, 1/16},
wall_top = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propegates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {{-3/16, -7/16, -3/16, 3/16, -1/2, 3/16},
{-1/32, 1/2, -1/32, 1/32, -7/16, 1/32}}
},
selection_box = {
type = "wallmounted",
wall_bottom = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16},
wall_side = {-1/2, -1/16, -1/16, 1/2, 1/16, 1/16},
wall_top = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
paramtype = "light",
paramtype2 = "wallmounted",
sunlight_propagates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
})
morelights.register_variants({
{name = "morelights:chain_d", description = "Metal Chain (dark)",
tiles = {"morelights_metal_dark_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:chain_ceiling_d")
end},
{name = "morelights:chain_l", description = "Metal Chain (light)",
tiles = {"morelights_metal_light_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:chain_ceiling_l")
end}
{name = "morelights:chain_d", description = "Metal Chain (dark)",
tiles = {"morelights_metal_dark_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:chain_ceiling_d")
end},
{name = "morelights:chain_l", description = "Metal Chain (light)",
tiles = {"morelights_metal_light_32.png"},
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights:chain_ceiling_l")
end}
},
{
drawtype = "mesh",
mesh = "morelights_chain.obj",
collision_box = {
type = "fixed",
fixed = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
selection_box = {
type = "fixed",
fixed = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
paramtype = "light",
groups = {cracky = 3, oddly_breakable_by_hand = 3, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
drawtype = "mesh",
mesh = "morelights_chain.obj",
collision_box = {
type = "fixed",
fixed = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
selection_box = {
type = "fixed",
fixed = {-1/16, -1/2, -1/16, 1/16, 1/2, 1/16}
},
paramtype = "light",
sunlight_propagates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
})
morelights.register_variants({
{name = "morelights:chain_ceiling_d",
tiles = {"morelights_metal_dark_32.png"}, drop = "morelights:chain_d"},
{name = "morelights:chain_ceiling_l",
tiles = {"morelights_metal_light_32.png"}, drop = "morelights:chain_l"}
{name = "morelights:chain_ceiling_d",
tiles = {"morelights_metal_dark_32.png"}, drop = "morelights:chain_d"},
{name = "morelights:chain_ceiling_l",
tiles = {"morelights_metal_light_32.png"}, drop = "morelights:chain_l"}
},
{
drawtype = "mesh",
mesh = "morelights_chain_ceiling.obj",
collision_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 1/2, 3/16},
{-1/16, -1/2, -1/16, 1/16, 7/16, 1/16}}
},
selection_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 1/2, 3/16},
{-1/16, -1/2, -1/16, 1/16, 7/16, 1/16}}
},
paramtype = "light",
groups = {cracky = 3, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
drawtype = "mesh",
mesh = "morelights_chain_ceiling.obj",
collision_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 1/2, 3/16},
{-1/16, -1/2, -1/16, 1/16, 7/16, 1/16}}
},
selection_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 1/2, 3/16},
{-1/16, -1/2, -1/16, 1/16, 7/16, 1/16}}
},
paramtype = "light",
sunlight_propagates = true,
groups = {cracky = 3, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
})
--
@ -123,46 +125,46 @@ morelights.register_variants({
--
minetest.register_craft({
output = "morelights:bulb",
recipe = {
{"", "default:glass", ""},
{"", "default:copper_ingot", ""},
{"", "default:steel_ingot", ""}
}
output = "morelights:bulb",
recipe = {
{"", "default:glass", ""},
{"", "default:copper_ingot", ""},
{"", "default:steel_ingot", ""}
}
})
minetest.register_craft({
output = "morelights:pole_d 2",
recipe = {
{"dye:dark_grey", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""}
}
output = "morelights:pole_d 2",
recipe = {
{"dye:dark_grey", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""}
}
})
minetest.register_craft({
output = "morelights:pole_l 2",
recipe = {
{"dye:white", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""}
}
output = "morelights:pole_l 2",
recipe = {
{"dye:white", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""}
}
})
minetest.register_craft({
output = "morelights:chain_d",
recipe = {
{"dye:dark_grey", "default:steel_ingot", ""},
{"", "", ""},
{"", "default:steel_ingot", ""}
}
output = "morelights:chain_d",
recipe = {
{"dye:dark_grey", "default:steel_ingot", ""},
{"", "", ""},
{"", "default:steel_ingot", ""}
}
})
minetest.register_craft({
output = "morelights:chain_l",
recipe = {
{"dye:white", "default:steel_ingot", ""},
{"", "", ""},
{"", "default:steel_ingot", ""}
}
output = "morelights:chain_l",
recipe = {
{"dye:white", "default:steel_ingot", ""},
{"", "", ""},
{"", "default:steel_ingot", ""}
}
})

@ -1,77 +1,77 @@
minetest.register_node("morelights_extras:f_block", {
description = "Futuristic Light Block",
tiles = {"morelights_extras_f_block.png"},
paramtype = "light",
light_source = LIGHT_MAX,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
description = "Futuristic Light Block",
tiles = {"morelights_extras_f_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_extras:dirt_with_grass", {
description = "Grass Light",
tiles = {"default_grass.png^morelights_extras_blocklight.png",
"default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
description = "Grass Light",
tiles = {"default_grass.png^morelights_extras_blocklight.png",
"default_dirt.png", "default_dirt.png^default_grass_side.png"},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
minetest.register_node("morelights_extras:stone_block", {
description = "Stone Block Light",
tiles = {"default_stone_block.png^morelights_extras_blocklight.png"},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
description = "Stone Block Light",
tiles = {"default_stone_block.png^morelights_extras_blocklight.png"},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
minetest.register_node("morelights_extras:sandstone_block", {
description = "Sandstone Block Light",
tiles = {"default_sandstone_block.png^morelights_extras_blocklight.png"},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
description = "Sandstone Block Light",
tiles = {"default_sandstone_block.png^morelights_extras_blocklight.png"},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults()
})
minetest.register_node("morelights_extras:stairlight", {
description = "Stair Light (place on stairs)",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-1/4, -13/16, -1/16, 1/4, -11/16, 0}
},
selection_box = {
type = "fixed",
fixed = {-1/4, -13/16, -1/16, 1/4, -11/16, 0}
},
walkable = false,
tiles = {"morelights_metal_dark.png"},
overlay_tiles = {"", "morelights_extras_stairlight.png",
"", "", "morelights_extras_stairlight.png"},
paramtype = "light",
paramtype2 = "facedir",
light_source = 10,
groups = {cracky = 2, oddly_breakable_by_hand = 3, attached_node = 1},
node_placement_prediction = "",
sounds = default.node_sound_glass_defaults(),
description = "Stair Light (place on stairs)",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-1/4, -13/16, -1/16, 1/4, -11/16, 0}
},
selection_box = {
type = "fixed",
fixed = {-1/4, -13/16, -1/16, 1/4, -11/16, 0}
},
walkable = false,
tiles = {"morelights_metal_dark.png"},
overlay_tiles = {"", "morelights_extras_stairlight.png",
"", "", "morelights_extras_stairlight.png"},
paramtype = "light",
paramtype2 = "facedir",
light_source = 10,
groups = {cracky = 2, oddly_breakable_by_hand = 3, attached_node = 1},
node_placement_prediction = "",
sounds = default.node_sound_glass_defaults(),
on_place = function(itemstack, placer, pointed_thing)
local node = minetest.get_node(vector.subtract(pointed_thing.above,
{x=0, y=1, z=0}))
on_place = function(itemstack, placer, pointed_thing)
local node = minetest.get_node(vector.subtract(pointed_thing.above,
{x=0, y=1, z=0}))
if node and node.name:match("^stairs:stair")
and node.param2 < 4 then
minetest.item_place(itemstack, placer, pointed_thing, node.param2)
end
if node and node.name:match("^stairs:stair")
and node.param2 < 4 then
minetest.item_place(itemstack, placer, pointed_thing, node.param2)
end
return itemstack
end,
return itemstack
end,
on_rotate = function(pos, node, user, mode, new_param2)
return false
end,
on_rotate = function(pos, node, user, mode, new_param2)
return false
end,
})
--
@ -79,44 +79,44 @@ minetest.register_node("morelights_extras:stairlight", {
--
minetest.register_craft({
output = "morelights_extras:f_block",
recipe = {
{"default:mese_crystal_fragment", "default:steel_ingot", "default:mese_crystal_fragment"},
{morelights.glass, "morelights:bulb", morelights.glass},
{"default:mese_crystal_fragment", "default:steel_ingot", "default:mese_crystal_fragment"}
}
output = "morelights_extras:f_block",
recipe = {
{"default:mese_crystal_fragment", "default:steel_ingot", "default:mese_crystal_fragment"},
{morelights.glass, "morelights:bulb", morelights.glass},
{"default:mese_crystal_fragment", "default:steel_ingot", "default:mese_crystal_fragment"}
}
})
minetest.register_craft({
output = "morelights_extras:dirt_with_grass",
recipe = {
{"", morelights.glass, ""},
{"", "morelights:bulb", ""},
{"default:grass_1", "default:dirt", ""}
}
output = "morelights_extras:dirt_with_grass",
recipe = {
{"", morelights.glass, ""},
{"", "morelights:bulb", ""},
{"default:grass_1", "default:dirt", ""}
}
})
minetest.register_craft({
output = "morelights_extras:stone_block",
recipe = {
{"", morelights.glass, ""},
{"", "morelights:bulb", ""},
{"", "default:stone_block", ""}
}
output = "morelights_extras:stone_block",
recipe = {
{"", morelights.glass, ""},
{"", "morelights:bulb", ""},
{"", "default:stone_block", ""}
}
})
minetest.register_craft({
output = "morelights_extras:sandstone_block",
recipe = {
{"", morelights.glass, ""},
{"", "morelights:bulb", ""},
{"", "default:sandstone_block", ""}
}
output = "morelights_extras:sandstone_block",
recipe = {
{"", morelights.glass, ""},
{"", "morelights:bulb", ""},
{"", "default:sandstone_block", ""}
}
})
minetest.register_craft({
output = "morelights_extras:stairlight",
recipe = {
{"default:steel_ingot", "morelights:bulb", "default:steel_ingot"}
}
output = "morelights_extras:stairlight",
recipe = {
{"default:steel_ingot", "morelights:bulb", "default:steel_ingot"}
}
})

@ -1,236 +1,236 @@
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(),
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(),
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,
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"}}
{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(),
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"}}
{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(),
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(),
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(),
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(),
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,
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"}},
{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(),
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(),
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,
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"}},
{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(),
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"}}
{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(),
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(),
})
--
@ -238,143 +238,143 @@ morelights.register_variants({
--
minetest.register_craft({
output = "morelights_modern:block",
recipe = {
{"", "default:steel_ingot", ""},
{morelights.glass, "morelights:bulb", morelights.glass},
{"", "default:steel_ingot", ""}
}
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"}
}
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", ""}
}
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", ""}
}
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", ""}
}
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", ""}
}
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"}
}
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"}
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"}
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, ""},
}
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"},
}
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"},
}
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"}
}
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", ""}
}
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", ""}
}
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", ""}
}
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", ""}
}
output = "morelights_modern:pathlight_l",
recipe = {
{"dye:white", "morelights:bulb", ""},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""}
}
})

@ -3,239 +3,239 @@
local brass_ingot_name
if minetest.get_modpath("basic_materials") then
-- Use basic materials brass ingot
brass_ingot_name = "basic_materials:brass_ingot"
-- Use basic materials brass ingot
brass_ingot_name = "basic_materials:brass_ingot"
else
-- Register and use morelights brass ingot
minetest.register_craftitem("morelights_vintage:brass_ingot", {
description = "Brass Ingot",
inventory_image = "default_steel_ingot.png^[multiply:#FFCE69"
})
-- Register and use morelights brass ingot
minetest.register_craftitem("morelights_vintage:brass_ingot", {
description = "Brass Ingot",
inventory_image = "default_steel_ingot.png^[multiply:#FFCE69"
})
minetest.register_craft({
output = "morelights_vintage:brass_ingot 2",
type = "shapeless",
recipe = {
"default:copper_ingot", "default:tin_ingot"
}
})
minetest.register_craft({
output = "morelights_vintage:brass_ingot 2",
type = "shapeless",
recipe = {
"default:copper_ingot", "default:tin_ingot"
}
})
brass_ingot_name = "morelights_vintage:brass_ingot"
brass_ingot_name = "morelights_vintage:brass_ingot"
end
minetest.register_node("morelights_vintage:chain_b", {
description = "Brass Chain",
drawtype = "mesh",
mesh = "morelights_chain.obj",
collision_box = {
type = "fixed",
fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}
},
selection_box = {
type = "fixed",
fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}
},
tiles = {"morelights_vintage_brass_32.png"},
paramtype = "light",
groups = {cracky = 3, oddly_breakable_by_hand = 3, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
description = "Brass Chain",
drawtype = "mesh",
mesh = "morelights_chain.obj",
collision_box = {
type = "fixed",
fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}
},
selection_box = {
type = "fixed",
fixed = {-1/16, -8/16, -1/16, 1/16, 8/16, 1/16}
},
tiles = {"morelights_vintage_brass_32.png"},
paramtype = "light",
groups = {cracky = 3, oddly_breakable_by_hand = 3, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights_vintage:chain_ceiling_b")
end,
on_place = function(itemstack, placer, pointed_thing)
return morelights.on_place_hanging(itemstack, placer, pointed_thing,
"morelights_vintage:chain_ceiling_b")
end,
})
minetest.register_node("morelights_vintage:chain_ceiling_b", {
drawtype = "mesh",
mesh = "morelights_chain_ceiling.obj",
collision_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 8/16, 3/16},
{-1/16, -8/16, -1/16, 1/16, 7/16, 1/16}}
},
selection_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 8/16, 3/16},
{-1/16, -8/16, -1/16, 1/16, 7/16, 1/16}}
},
tiles = {"morelights_vintage_brass_32.png"},
drop = "morelights_vintage:chain_b",
paramtype = "light",
groups = {cracky = 3, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
drawtype = "mesh",
mesh = "morelights_chain_ceiling.obj",
collision_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 8/16, 3/16},
{-1/16, -8/16, -1/16, 1/16, 7/16, 1/16}}
},
selection_box = {
type = "fixed",
fixed = {{-3/16, 7/16, -3/16, 3/16, 8/16, 3/16},
{-1/16, -8/16, -1/16, 1/16, 7/16, 1/16}}
},
tiles = {"morelights_vintage_brass_32.png"},
drop = "morelights_vintage:chain_b",
paramtype = "light",
groups = {cracky = 3, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1, mounted_ceiling = 1},
sounds = default.node_sound_metal_defaults(),
})
minetest.register_node("morelights_vintage:block", {
description = "Vintage Light Block",
tiles = {"morelights_vintage_block.png"},
paramtype = "light",
light_source = LIGHT_MAX,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
description = "Vintage Light Block",
tiles = {"morelights_vintage_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_vintage:smallblock", {
description = "Vintage Light Block (small)",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, 0, 1/4}
},
tiles = {"morelights_vintage_block.png", "morelights_vintage_block.png",
"[combine:16x16:0,4=morelights_vintage_block.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)
end,
description = "Vintage Light Block (small)",
drawtype = "nodebox",
node_box = {
type = "fixed",
fixed = {-1/4, -1/2, -1/4, 1/4, 0, 1/4}
},
tiles = {"morelights_vintage_block.png", "morelights_vintage_block.png",
"[combine:16x16:0,4=morelights_vintage_block.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)
end,
})
minetest.register_node("morelights_vintage:lantern_f", {
description = "Vintage Lantern (floor, wall, or ceiling)",
drawtype = "mesh",
mesh = "morelights_vintage_lantern_f.obj",
tiles = {"morelights_vintage_lantern.png", "morelights_metal_dark_32.png"},
collision_box = {
type = "fixed",
fixed = {-3/16, -1/2, -3/16, 3/16, 1/16, 3/16}
},
selection_box = {
type = "fixed",
fixed = {-3/16, -1/2, -3/16, 3/16, 1/16, 3/16}
},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
description = "Vintage Lantern (floor, wall, or ceiling)",
drawtype = "mesh",
mesh = "morelights_vintage_lantern_f.obj",
tiles = {"morelights_vintage_lantern.png", "morelights_metal_dark_32.png"},
collision_box = {
type = "fixed",
fixed = {-3/16, -1/2, -3/16, 3/16, 1/16, 3/16}
},
selection_box = {
type = "fixed",
fixed = {-3/16, -1/2, -3/16, 3/16, 1/16, 3/16}
},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
on_place = function(itemstack, placer, pointed_thing)
local wdir = minetest.dir_to_wallmounted(
vector.subtract(pointed_thing.under, pointed_thing.above))
local fakestack = itemstack
on_place = function(itemstack, placer, pointed_thing)
local wdir = minetest.dir_to_wallmounted(
vector.subtract(pointed_thing.under, pointed_thing.above))
local fakestack = itemstack
if wdir == 0 then
fakestack:set_name("morelights_vintage:lantern_c")
elseif wdir == 1 then
fakestack:set_name("morelights_vintage:lantern_f")
else
fakestack:set_name("morelights_vintage:lantern_w")
end
if wdir == 0 then
fakestack:set_name("morelights_vintage:lantern_c")
elseif wdir == 1 then
fakestack:set_name("morelights_vintage:lantern_f")
else
fakestack:set_name("morelights_vintage:lantern_w")
end
itemstack = minetest.item_place(fakestack, placer, pointed_thing, wdir)
itemstack:set_name("morelights_vintage:lantern_f")
itemstack = minetest.item_place(fakestack, placer, pointed_thing, wdir)
itemstack:set_name("morelights_vintage:lantern_f")
return itemstack
end,
return itemstack
end,
})
minetest.register_node("morelights_vintage:lantern_c", {
drawtype = "mesh",
mesh = "morelights_vintage_lantern_c.obj",
tiles = {"morelights_vintage_lantern.png", "morelights_metal_dark_32.png"},
collision_box = {
type = "fixed",
fixed = {-3/16, -1/16, -3/16, 3/16, 1/2, 3/16}
},
selection_box = {
type = "fixed",
fixed = {-3/16, 0, -3/16, 3/16, 1/2, 3/16}
},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(),
drop = "morelights_vintage:lantern_f",
drawtype = "mesh",
mesh = "morelights_vintage_lantern_c.obj",
tiles = {"morelights_vintage_lantern.png", "morelights_metal_dark_32.png"},
collision_box = {
type = "fixed",
fixed = {-3/16, -1/16, -3/16, 3/16, 1/2, 3/16}
},
selection_box = {
type = "fixed",
fixed = {-3/16, 0, -3/16, 3/16, 1/2, 3/16}
},
paramtype = "light",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(),
drop = "morelights_vintage:lantern_f",
})
minetest.register_node("morelights_vintage:lantern_w", {
drawtype = "mesh",
mesh = "morelights_vintage_lantern_w.obj",
tiles = {"morelights_vintage_lantern.png", "morelights_metal_dark_32.png"},
collision_box = {
type = "fixed",
fixed = {-3/16, -1/4, -5/16, 3/16, 1/8, 3/16}
},
selection_box = {
type = "wallmounted",
wall_bottom = {-3/16, -1/4, -5/16, 3/16, 1/8, 3/16},
wall_side = {-1/4, -5/16, -3/16, 1/8, 3/16, 3/16},
wall_top = {-3/16, -1/8, -5/16, 3/16, 1/4, 3/16}
},
paramtype = "light",
paramtype2 = "wallmounted",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(),
drop = "morelights_vintage:lantern_f",
drawtype = "mesh",
mesh = "morelights_vintage_lantern_w.obj",
tiles = {"morelights_vintage_lantern.png", "morelights_metal_dark_32.png"},
collision_box = {
type = "fixed",
fixed = {-3/16, -1/4, -5/16, 3/16, 1/8, 3/16}
},
selection_box = {
type = "wallmounted",
wall_bottom = {-3/16, -1/4, -5/16, 3/16, 1/8, 3/16},
wall_side = {-1/4, -5/16, -3/16, 1/8, 3/16, 3/16},
wall_top = {-3/16, -1/8, -5/16, 3/16, 1/4, 3/16}
},
paramtype = "light",
paramtype2 = "wallmounted",
light_source = 12,
groups = {cracky = 2, oddly_breakable_by_hand = 3,
not_in_creative_inventory = 1},
sounds = default.node_sound_glass_defaults(),
drop = "morelights_vintage:lantern_f",
})
minetest.register_node("morelights_vintage:hangingbulb", {
description = "Vintage Hanging Light Bulb",
drawtype = "mesh",
mesh = "morelights_vintage_hangingbulb.obj",
tiles = {"morelights_vintage_hangingbulb.png^[lowpart:50:morelights_metal_dark_32.png"},
use_texture_alpha = true,
collision_box = {
type = "fixed",
fixed = {-1/8, -1/8, -1/8, 1/8, 1/2, 1/8}
},
selection_box = {
type = "fixed",
fixed = {-1/8, -1/8, -1/8, 1/8, 1/2, 1/8}
},
paramtype = "light",
light_source = 10,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
description = "Vintage Hanging Light Bulb",
drawtype = "mesh",
mesh = "morelights_vintage_hangingbulb.obj",
tiles = {"morelights_vintage_hangingbulb.png^[lowpart:50:morelights_metal_dark_32.png"},
use_texture_alpha = true,
collision_box = {
type = "fixed",
fixed = {-1/8, -1/8, -1/8, 1/8, 1/2, 1/8}
},
selection_box = {
type = "fixed",
fixed = {-1/8, -1/8, -1/8, 1/8, 1/2, 1/8}
},
paramtype = "light",
light_source = 10,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("morelights_vintage:oillamp", {
description = "Vintage Oil Lamp",
drawtype = "mesh",
mesh = "morelights_vintage_oillamp.obj",
tiles = {{name = "morelights_vintage_oil_flame.png",
animation = {type = "sheet_2d", frames_w = 16, frames_h = 1, frame_length = 0.3}},
"morelights_vintage_oillamp.png",
"morelights_vintage_brass_32.png"},
collision_box = {
type = "fixed",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/4, 1/8}
},
selection_box = {
type = "fixed",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/4, 1/8}
},
paramtype = "light",
light_source = 8,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
description = "Vintage Oil Lamp",
drawtype = "mesh",
mesh = "morelights_vintage_oillamp.obj",
tiles = {{name = "morelights_vintage_oil_flame.png",
animation = {type = "sheet_2d", frames_w = 16, frames_h = 1, frame_length = 0.3}},
"morelights_vintage_oillamp.png",
"morelights_vintage_brass_32.png"},
collision_box = {
type = "fixed",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/4, 1/8}
},
selection_box = {
type = "fixed",
fixed = {-1/8, -1/2, -1/8, 1/8, 1/4, 1/8}
},
paramtype = "light",
light_source = 8,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
})
minetest.register_node("morelights_vintage:chandelier", {
description = "Vintage Chandelier",
drawtype = "mesh",
mesh = "morelights_vintage_chandelier.obj",
tiles = {"morelights_vintage_chandelier.png",
"morelights_vintage_brass_32.png^[multiply:#DFDFDF"},
collision_box = {
type = "fixed",
fixed = {-3/8, -1/2, -3/8, 3/8, 1/2, 3/8}
},
selection_box = {
type = "fixed",
fixed = {-3/8, -1/2, -3/8, 3/8, 1/2, 3/8}
},
paramtype = "light",
light_source = 10,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
description = "Vintage Chandelier",
drawtype = "mesh",
mesh = "morelights_vintage_chandelier.obj",
tiles = {"morelights_vintage_chandelier.png",
"morelights_vintage_brass_32.png^[multiply:#DFDFDF"},
collision_box = {
type = "fixed",
fixed = {-3/8, -1/2, -3/8, 3/8, 1/2, 3/8}
},
selection_box = {
type = "fixed",
fixed = {-3/8, -1/2, -3/8, 3/8, 1/2, 3/8}
},
paramtype = "light",
light_source = 10,
groups = {cracky = 2, oddly_breakable_by_hand = 3},
sounds = default.node_sound_glass_defaults(),
})
--
@ -243,63 +243,63 @@ minetest.register_node("morelights_vintage:chandelier", {
--
minetest.register_craft({
output = "morelights_vintage:chain_b",
recipe = {
{"", brass_ingot_name, ""},
{"", "", ""},
{"", brass_ingot_name, ""}
}
output = "morelights_vintage:chain_b",
recipe = {
{"", brass_ingot_name, ""},
{"", "", ""},
{"", brass_ingot_name, ""}
}
})
minetest.register_craft({
output = "morelights_vintage:block",
recipe = {
{"", "default:junglewood", ""},
{morelights.glass, "morelights:bulb", morelights.glass},
{"", "default:junglewood", ""}
}
output = "morelights_vintage:block",
recipe = {
{"", "default:junglewood", ""},
{morelights.glass, "morelights:bulb", morelights.glass},
{"", "default:junglewood", ""}
}
})
minetest.register_craft({
output = "morelights_vintage:smallblock",
recipe = {
{"", morelights.glass, ""},
{"default:junglewood", "morelights:bulb", "default:junglewood"}
}
output = "morelights_vintage:smallblock",
recipe = {
{"", morelights.glass, ""},
{"default:junglewood", "morelights:bulb", "default:junglewood"}
}
})
minetest.register_craft({
output = "morelights_vintage:lantern_f",
recipe = {
{"", "default:steel_ingot", ""},
{morelights.glass, "morelights:bulb", morelights.glass},
{"default:stick", "default:steel_ingot", "default:stick"}
}
output = "morelights_vintage:lantern_f",
recipe = {
{"", "default:steel_ingot", ""},
{morelights.glass, "morelights:bulb", morelights.glass},
{"default:stick", "default:steel_ingot", "default:stick"}
}
})
minetest.register_craft({
output = "morelights_vintage:hangingbulb",
recipe = {
{"", "default:steel_ingot", ""},
{"", "default:copper_ingot", ""},
{"", "morelights:bulb", ""}
}
output = "morelights_vintage:hangingbulb",
recipe = {
{"", "default:steel_ingot", ""},
{"", "default:copper_ingot", ""},
{"", "morelights:bulb", ""}
}
})
minetest.register_craft({
output = "morelights_vintage:oillamp",
recipe = {
{"", "default:glass", ""},
{"farming:cotton", brass_ingot_name, ""},
{"", "default:glass", ""}
}
output = "morelights_vintage:oillamp",
recipe = {
{"", "default:glass", ""},
{"farming:cotton", brass_ingot_name, ""},
{"", "default:glass", ""}
}
})
minetest.register_craft({
output = "morelights_vintage:chandelier",
recipe = {
{"", brass_ingot_name, ""},
{"morelights:bulb", brass_ingot_name, "morelights:bulb"},
{"default:steel_ingot", brass_ingot_name, "default:steel_ingot"}
}
output = "morelights_vintage:chandelier",
recipe = {
{"", brass_ingot_name, ""},
{"morelights:bulb", brass_ingot_name, "morelights:bulb"},
{"default:steel_ingot", brass_ingot_name, "default:steel_ingot"}
}
})