mirror of
https://gitlab.com/deetmit/mesecons_x.git
synced 2024-10-05 17:13:16 +02:00
fix red tool; add nopower_plant
This commit is contained in:
parent
947a428da2
commit
a5dde49dc7
@ -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"})
|
||||
|
||||
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");
|
||||
|
34
mesecons_morewires/nopower_plant.lua
Normal file
34
mesecons_morewires/nopower_plant.lua
Normal file
@ -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"},
|
||||
}
|
||||
})
|
BIN
mesecons_morewires/textures/jeija_nopower_plant.png
Normal file
BIN
mesecons_morewires/textures/jeija_nopower_plant.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.9 KiB |
Loading…
Reference in New Issue
Block a user