2018-11-23 00:08:40 +01:00
|
|
|
minetest.register_node("morelights_extras:f_block", {
|
2020-09-15 06:36:35 +02:00
|
|
|
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(),
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("morelights_extras:dirt_with_grass", {
|
2020-09-15 06:36:35 +02:00
|
|
|
description = "Grass Light",
|
2020-09-19 00:48:22 +02:00
|
|
|
tiles = {
|
|
|
|
"default_grass.png^morelights_extras_blocklight.png",
|
2020-09-19 00:55:39 +02:00
|
|
|
"default_dirt.png",
|
|
|
|
"default_dirt.png^default_grass_side.png"
|
2020-09-19 00:48:22 +02:00
|
|
|
},
|
2020-09-15 06:36:35 +02:00
|
|
|
paramtype = "light",
|
|
|
|
light_source = 12,
|
|
|
|
groups = {cracky = 2, oddly_breakable_by_hand = 3},
|
|
|
|
sounds = default.node_sound_glass_defaults()
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("morelights_extras:stone_block", {
|
2020-09-15 06:36:35 +02:00
|
|
|
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()
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("morelights_extras:sandstone_block", {
|
2020-09-15 06:36:35 +02:00
|
|
|
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()
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("morelights_extras:stairlight", {
|
2020-09-15 06:36:35 +02:00
|
|
|
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",
|
2020-09-19 00:48:22 +02:00
|
|
|
"", "", "morelights_extras_stairlight.png"},
|
2020-09-18 06:24:30 +02:00
|
|
|
inventory_image = "morelights_extras_stairlight_inv.png",
|
|
|
|
wield_image = "morelights_extras_stairlight_inv.png",
|
2020-09-15 06:36:35 +02:00
|
|
|
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(),
|
2018-11-23 00:08:40 +01:00
|
|
|
|
2020-09-15 06:36:35 +02:00
|
|
|
on_place = function(itemstack, placer, pointed_thing)
|
|
|
|
local node = minetest.get_node(vector.subtract(pointed_thing.above,
|
|
|
|
{x=0, y=1, z=0}))
|
2018-11-23 00:08:40 +01:00
|
|
|
|
2020-09-15 06:36:35 +02:00
|
|
|
if node and node.name:match("^stairs:stair")
|
|
|
|
and node.param2 < 4 then
|
|
|
|
minetest.item_place(itemstack, placer, pointed_thing, node.param2)
|
|
|
|
end
|
2018-11-23 00:08:40 +01:00
|
|
|
|
2020-09-15 06:36:35 +02:00
|
|
|
return itemstack
|
|
|
|
end,
|
2018-11-23 00:08:40 +01:00
|
|
|
|
2020-09-15 06:36:35 +02:00
|
|
|
on_rotate = function(pos, node, user, mode, new_param2)
|
|
|
|
return false
|
|
|
|
end,
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
--
|
|
|
|
-- Craft recipes
|
|
|
|
--
|
|
|
|
|
2020-09-19 00:16:40 +02:00
|
|
|
local a = morelights.craft_items
|
|
|
|
|
2018-11-23 00:08:40 +01:00
|
|
|
minetest.register_craft({
|
2020-09-15 06:36:35 +02:00
|
|
|
output = "morelights_extras:f_block",
|
|
|
|
recipe = {
|
2020-09-19 00:16:40 +02:00
|
|
|
{a.mese_fragment, a.steel, a.mese_fragment},
|
|
|
|
{a.glass_pane, "morelights:bulb", a.glass_pane},
|
|
|
|
{a.mese_fragment, a.steel, a.mese_fragment}
|
2020-09-15 06:36:35 +02:00
|
|
|
}
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-09-15 06:36:35 +02:00
|
|
|
output = "morelights_extras:dirt_with_grass",
|
|
|
|
recipe = {
|
2020-09-19 00:16:40 +02:00
|
|
|
{"", a.glass_pane, ""},
|
2020-09-15 06:36:35 +02:00
|
|
|
{"", "morelights:bulb", ""},
|
2020-09-19 00:16:40 +02:00
|
|
|
{a.grass, a.dirt, ""}
|
2020-09-15 06:36:35 +02:00
|
|
|
}
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-09-15 06:36:35 +02:00
|
|
|
output = "morelights_extras:stone_block",
|
|
|
|
recipe = {
|
2020-09-19 00:16:40 +02:00
|
|
|
{"", a.glass_pane, ""},
|
2020-09-15 06:36:35 +02:00
|
|
|
{"", "morelights:bulb", ""},
|
2020-09-19 00:16:40 +02:00
|
|
|
{"", a.stone_block, ""}
|
2020-09-15 06:36:35 +02:00
|
|
|
}
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-09-15 06:36:35 +02:00
|
|
|
output = "morelights_extras:sandstone_block",
|
|
|
|
recipe = {
|
2020-09-19 00:16:40 +02:00
|
|
|
{"", a.glass_pane, ""},
|
2020-09-15 06:36:35 +02:00
|
|
|
{"", "morelights:bulb", ""},
|
2020-09-19 00:16:40 +02:00
|
|
|
{"", a.sandstone_block, ""}
|
2020-09-15 06:36:35 +02:00
|
|
|
}
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2020-09-15 06:36:35 +02:00
|
|
|
output = "morelights_extras:stairlight",
|
|
|
|
recipe = {
|
2020-09-19 00:16:40 +02:00
|
|
|
{a.steel, "morelights:bulb", a.steel}
|
2020-09-15 06:36:35 +02:00
|
|
|
}
|
2018-11-23 00:08:40 +01:00
|
|
|
})
|