Recipes for various Nodes added. Registered some Nodes for stairsplus. Added Support for Mesecons to the Switch.

This commit is contained in:
A.C.M
2019-01-26 22:33:18 +01:00
parent 83a1a8c6c1
commit c54c5ba035
7 changed files with 581 additions and 1 deletions

View File

@ -460,6 +460,7 @@ minetest.register_node("scifi_nodes:lightbar", {
groups = {cracky=1},
sounds = default.node_sound_glass_defaults()
})
--wall switch, currently does not do anything
minetest.register_node("scifi_nodes:switch_off", {
description = "Wall switch",
@ -1243,3 +1244,62 @@ minetest.register_node("scifi_nodes:windowpanel", {
sounds = default.node_sound_glass_defaults(),
})
if (mesecon.receptor_on ~= nil) and
(mesecon.receptor_off ~= nil) then
minetest.register_node("scifi_nodes:switch_off", {
description = "Wall switch",
tiles = {
"scifi_nodes_switch_off.png",
},
inventory_image = "scifi_nodes_switch_on.png",
wield_image = "scifi_nodes_switch_on.png",
drawtype = "signlike",
sunlight_propagates = true,
selection_box = {
type = "wallmounted",
fixed = {-0.5, -0.3, -0.3, -0.45, 0.3, 0.3}
},
paramtype = "light",
paramtype2 = "wallmounted",
groups = {cracky=1, oddly_breakable_by_hand=1, mesecon_needs_receiver = 1},
on_rightclick = function(pos, node, clicker, item, _)
minetest.set_node(pos, {name="scifi_nodes:switch_on", param2=node.param2})
mesecon.receptor_on(pos)
end,
sounds = default.node_sound_glass_defaults(),
mesecons = {receptor = { state = mesecon.state.off }}
})
minetest.register_node("scifi_nodes:switch_on", {
description = "Wall switch",
sunlight_propagates = true,
tiles = {
"scifi_nodes_switch_on.png",
},
inventory_image = "scifi_nodes_switch_on.png",
wield_image = "scifi_nodes_switch_on.png",
drawtype = "signlike",
selection_box = {
type = "wallmounted",
fixed = {-0.5, -0.3, -0.3, -0.45, 0.3, 0.3}
},
paramtype = "light",
paramtype2 = "wallmounted",
light_source = 5,
groups = {cracky=1, oddly_breakable_by_hand=1, not_in_creative_inventory=1, mesecon_needs_receiver = 1},
on_rightclick = function(pos, node, clicker, item, _)
minetest.set_node(pos, {name="scifi_nodes:switch_off", param2=node.param2})
mesecon.receptor_off(pos)
end,
sounds = default.node_sound_glass_defaults(),
mesecons = {receptor = { state = mesecon.state.on }}
})
minetest.register_craft({
output = "scifi_nodes:switch_off 2",
recipe = {
{"mesecons_button:button_off", "scifi_nodes:grey", ""}
}
})
end