mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-26 10:20:19 +01:00
Merge branch 'master' of github.com:Jeija/minetest-mod-mesecons
This commit is contained in:
commit
686bb6b434
@ -3,6 +3,7 @@ minetest.register_node("mesecons_delayer:delayer_off_1", {
|
|||||||
drawtype = "raillike",
|
drawtype = "raillike",
|
||||||
tile_images = {"mesecons_delayer_off_1.png"},
|
tile_images = {"mesecons_delayer_off_1.png"},
|
||||||
inventory_image = "mesecons_delayer_off_1.png",
|
inventory_image = "mesecons_delayer_off_1.png",
|
||||||
|
wield_image = "mesecons_delayer_off_1.png",
|
||||||
walkable = false,
|
walkable = false,
|
||||||
selection_box = {type = "fixed",},
|
selection_box = {type = "fixed",},
|
||||||
groups = {bendy=2,snappy=1,dig_immediate=2},
|
groups = {bendy=2,snappy=1,dig_immediate=2},
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
Please note:
|
Please note:
|
||||||
The mesecons modules in here have been disabled for various reasons:
|
The mesecons modules in here have been disabled for various reasons:
|
||||||
They are old and deprecated, are not needed anymore or are buggy atm.
|
They are old and deprecated, are not needed anymore or are buggy atm.
|
||||||
You can create a model out of them, but it is not recommended to use any of them.
|
You can create a module out of them, but it is not recommended to use any of them.
|
||||||
|
@ -1,2 +1 @@
|
|||||||
mesecons
|
mesecons
|
||||||
experimental
|
|
||||||
|
@ -1,13 +1,3 @@
|
|||||||
--Launch TNT
|
|
||||||
|
|
||||||
mesecon:register_on_signal_on(function(pos, node)
|
|
||||||
if node.name=="experimental:tnt" then
|
|
||||||
minetest.env:remove_node(pos)
|
|
||||||
minetest.env:add_entity(pos, "experimental:tnt")
|
|
||||||
nodeupdate(pos)
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
|
|
||||||
-- REMOVE_STONE
|
-- REMOVE_STONE
|
||||||
|
|
||||||
minetest.register_node("mesecons_random:removestone", {
|
minetest.register_node("mesecons_random:removestone", {
|
||||||
|
2
mesecons_walllever/depends.txt
Normal file
2
mesecons_walllever/depends.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
mesecons
|
||||||
|
mesecons_button
|
@ -33,44 +33,18 @@ minetest.register_node("mesecons_walllever:wall_lever_on", {
|
|||||||
minetest.register_on_dignode(
|
minetest.register_on_dignode(
|
||||||
function(pos, oldnode, digger)
|
function(pos, oldnode, digger)
|
||||||
if oldnode.name == "mesecons_walllever:wall_lever_on" then
|
if oldnode.name == "mesecons_walllever:wall_lever_on" then
|
||||||
mesecon:receptor_off(pos)
|
mesecon:receptor_off(pos, mesecon.button_get_rules(oldnode.param2))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||||
if node.name == "mesecons_walllever:wall_lever_off" then
|
if node.name == "mesecons_walllever:wall_lever_off" then
|
||||||
minetest.env:add_node(pos, {name="mesecons_walllever:wall_lever_on",param2=node.param2})
|
minetest.env:add_node(pos, {name="mesecons_walllever:wall_lever_on",param2=node.param2})
|
||||||
local rules_string=nil
|
mesecon:receptor_on(pos, mesecon.button_get_rules(node.param2))
|
||||||
if node.param2 == 5 then
|
|
||||||
rules_string="button_z+"
|
|
||||||
end
|
|
||||||
if node.param2 == 3 then
|
|
||||||
rules_string="button_x+"
|
|
||||||
end
|
|
||||||
if node.param2 == 4 then
|
|
||||||
rules_string="button_z-"
|
|
||||||
end
|
|
||||||
if node.param2 == 2 then
|
|
||||||
rules_string="button_x-"
|
|
||||||
end
|
|
||||||
mesecon:receptor_on(pos, rules_string)
|
|
||||||
end
|
end
|
||||||
if node.name == "mesecons_walllever:wall_lever_on" then
|
if node.name == "mesecons_walllever:wall_lever_on" then
|
||||||
minetest.env:add_node(pos, {name="mesecons_walllever:wall_lever_off",param2=node.param2})
|
minetest.env:add_node(pos, {name="mesecons_walllever:wall_lever_off",param2=node.param2})
|
||||||
local rules_string=nil
|
mesecon:receptor_off(pos, mesecon.button_get_rules(node.param2))
|
||||||
if node.param2 == 5 then
|
|
||||||
rules_string="button_z+"
|
|
||||||
end
|
|
||||||
if node.param2 == 3 then
|
|
||||||
rules_string="button_x+"
|
|
||||||
end
|
|
||||||
if node.param2 == 4 then
|
|
||||||
rules_string="button_z-"
|
|
||||||
end
|
|
||||||
if node.param2 == 2 then
|
|
||||||
rules_string="button_x-"
|
|
||||||
end
|
|
||||||
mesecon:receptor_off(pos, rules_string)
|
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
@ -82,5 +56,5 @@ minetest.register_craft({
|
|||||||
{'"default:stick"'},
|
{'"default:stick"'},
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
mesecon:add_receptor_node("mesecons_walllever:wall_lever")
|
mesecon:add_receptor_node("mesecons_walllever:wall_lever", nil, mesecon.button_get_rules)
|
||||||
mesecon:add_receptor_node_off("mesecons_walllever:wall_lever_off")
|
mesecon:add_receptor_node_off("mesecons_walllever:wall_lever_off", nil, mesecon.button_get_rules)
|
Loading…
Reference in New Issue
Block a user