2021-05-29 17:12:33 +03:00
|
|
|
local S = minetest.get_translator(minetest.get_current_modname())
|
2019-03-16 04:00:48 +03:00
|
|
|
|
2019-12-14 20:57:17 +03:00
|
|
|
local light = minetest.LIGHT_MAX
|
|
|
|
|
2015-06-29 20:55:56 +03:00
|
|
|
minetest.register_node("mesecons_lightstone:lightstone_off", {
|
|
|
|
tiles = {"jeija_lightstone_gray_off.png"},
|
2017-02-27 03:52:24 +03:00
|
|
|
groups = {handy=1, mesecon_effector_off = 1, mesecon = 2},
|
2017-01-05 00:36:51 +03:00
|
|
|
is_ground_content = false,
|
2019-03-16 04:00:48 +03:00
|
|
|
description= S("Redstone Lamp"),
|
2020-02-19 06:54:17 +03:00
|
|
|
_tt_help = S("Glows when powered by redstone power"),
|
2019-12-14 20:57:17 +03:00
|
|
|
_doc_items_longdesc = S("Redstone lamps are simple redstone components which glow brightly (light level @1) when they receive redstone power.", light),
|
2017-07-24 18:14:55 +03:00
|
|
|
sounds = mcl_sounds.node_sound_glass_defaults(),
|
2015-06-29 20:55:56 +03:00
|
|
|
mesecons = {effector = {
|
2021-05-29 17:12:33 +03:00
|
|
|
action_on = function(pos, node)
|
2017-07-31 01:12:21 +03:00
|
|
|
minetest.swap_node(pos, {name="mesecons_lightstone:lightstone_on", param2 = node.param2})
|
2017-09-14 03:20:47 +03:00
|
|
|
end,
|
|
|
|
rules = mesecon.rules.alldirs,
|
2017-02-22 18:22:28 +03:00
|
|
|
}},
|
2020-04-17 22:40:13 +03:00
|
|
|
_mcl_blast_resistance = 0.3,
|
2017-02-27 03:52:24 +03:00
|
|
|
_mcl_hardness = 0.3,
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("mesecons_lightstone:lightstone_on", {
|
|
|
|
tiles = {"jeija_lightstone_gray_on.png"},
|
2018-01-09 17:19:10 +03:00
|
|
|
groups = {handy=1, not_in_creative_inventory=1, mesecon = 2, opaque = 1},
|
2015-06-29 20:55:56 +03:00
|
|
|
drop = "node mesecons_lightstone:lightstone_off",
|
2017-01-05 00:36:51 +03:00
|
|
|
is_ground_content = false,
|
2017-06-13 15:46:21 +03:00
|
|
|
paramtype = "light",
|
2019-12-14 20:57:17 +03:00
|
|
|
light_source = light,
|
2017-07-24 18:14:55 +03:00
|
|
|
sounds = mcl_sounds.node_sound_glass_defaults(),
|
2015-06-29 20:55:56 +03:00
|
|
|
mesecons = {effector = {
|
2021-05-29 17:12:33 +03:00
|
|
|
action_off = function(pos, node)
|
2017-07-31 01:12:21 +03:00
|
|
|
minetest.swap_node(pos, {name="mesecons_lightstone:lightstone_off", param2 = node.param2})
|
2017-09-14 03:20:47 +03:00
|
|
|
end,
|
|
|
|
rules = mesecon.rules.alldirs,
|
2017-02-22 18:22:28 +03:00
|
|
|
}},
|
2020-04-17 22:40:13 +03:00
|
|
|
_mcl_blast_resistance = 0.3,
|
2017-02-27 03:52:24 +03:00
|
|
|
_mcl_hardness = 0.3,
|
2015-06-29 20:55:56 +03:00
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_craft({
|
2017-03-21 06:27:50 +03:00
|
|
|
output = "mesecons_lightstone:lightstone_off",
|
2015-06-29 20:55:56 +03:00
|
|
|
recipe = {
|
2021-05-29 17:12:33 +03:00
|
|
|
{"","mesecons:redstone",""},
|
|
|
|
{"mesecons:redstone","mcl_nether:glowstone","mesecons:redstone"},
|
|
|
|
{"","mesecons:redstone",""},
|
2015-06-29 20:55:56 +03:00
|
|
|
}
|
|
|
|
})
|
2017-03-21 06:27:50 +03:00
|
|
|
|
|
|
|
-- Add entry alias for the Help
|
|
|
|
if minetest.get_modpath("doc") then
|
|
|
|
doc.add_entry_alias("nodes", "mesecons_lightstone:lightstone_off", "nodes", "mesecons_lightstone:lightstone_on")
|
|
|
|
end
|
|
|
|
|