fix red tool; add nopower_plant

This commit is contained in:
Deet Mit 2022-01-14 15:32:31 +01:00
parent 947a428da2
commit a5dde49dc7
4 changed files with 40 additions and 1 deletions

@ -8,7 +8,11 @@ mesecons_autotools.register_action("red","left","air", function(user,pos,rad)
end)
mesecons_autotools.register_action("red","left","block", function(user,pos,rad,under)
--minetest.set_node(under,{name="air"})
mesecons_autotools.set_node(under,{name="air"},"red")
if is_circuit_element(under) then
mesecons_autotools.set_node(under,{name="air"},"red")
end
end)
mesecons_autotools.register_action("red","right","block", function(user,pos,rad,under)

@ -1 +1,2 @@
dofile(minetest.get_modpath("mesecons_morewires").."/xjunction.lua");
dofile(minetest.get_modpath("mesecons_morewires").."/nopower_plant.lua");

@ -0,0 +1,34 @@
-- Just emits no power, always.
print("dupa dupa dupa")
minetest.register_node("mesecons_morewires:nopower_plant", {
drawtype = "plantlike",
visual_scale = 1,
tiles = {"jeija_nopower_plant.png"},
inventory_image = "jeija_nopower_plant.png",
paramtype = "light",
is_ground_content = false,
walkable = false,
groups = {dig_immediate=3, mesecon = 2},
light_source = minetest.LIGHT_MAX-9,
description="No Power Plant",
selection_box = {
type = "fixed",
fixed = {-0.3, -0.5, -0.3, 0.3, -0.5+0.7, 0.3},
},
sounds = default.node_sound_leaves_defaults(),
mesecons = {receptor = {
state = mesecon.state.off
}},
on_blast = mesecon.on_blastnode,
})
minetest.register_craft({
output = "mesecons_morewires:nopower_plant 1",
recipe = {
{"group:mesecon_conductor_craftable"},
{"group:mesecon_conductor_craftable"},
{"wool:black"},
}
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB