Merge branch 'master' of github.com:Jeija/minetest-mod-mesecons

This commit is contained in:
Jeija 2012-04-02 10:44:22 +02:00
commit 686bb6b434
7 changed files with 9 additions and 43 deletions

View File

@ -3,6 +3,7 @@ minetest.register_node("mesecons_delayer:delayer_off_1", {
drawtype = "raillike",
tile_images = {"mesecons_delayer_off_1.png"},
inventory_image = "mesecons_delayer_off_1.png",
wield_image = "mesecons_delayer_off_1.png",
walkable = false,
selection_box = {type = "fixed",},
groups = {bendy=2,snappy=1,dig_immediate=2},

View File

@ -1,4 +1,4 @@
Please note:
The mesecons modules in here have been disabled for various reasons:
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.

View File

@ -1,2 +1 @@
mesecons
experimental

View File

@ -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
minetest.register_node("mesecons_random:removestone", {

View File

@ -0,0 +1,2 @@
mesecons
mesecons_button

View File

@ -33,44 +33,18 @@ minetest.register_node("mesecons_walllever:wall_lever_on", {
minetest.register_on_dignode(
function(pos, oldnode, digger)
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
)
minetest.register_on_punchnode(function(pos, node, puncher)
if node.name == "mesecons_walllever:wall_lever_off" then
minetest.env:add_node(pos, {name="mesecons_walllever:wall_lever_on",param2=node.param2})
local rules_string=nil
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)
mesecon:receptor_on(pos, mesecon.button_get_rules(node.param2))
end
if node.name == "mesecons_walllever:wall_lever_on" then
minetest.env:add_node(pos, {name="mesecons_walllever:wall_lever_off",param2=node.param2})
local rules_string=nil
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)
mesecon:receptor_off(pos, mesecon.button_get_rules(node.param2))
end
end)
@ -82,5 +56,5 @@ minetest.register_craft({
{'"default:stick"'},
}
})
mesecon:add_receptor_node("mesecons_walllever:wall_lever")
mesecon:add_receptor_node_off("mesecons_walllever:wall_lever_off")
mesecon:add_receptor_node("mesecons_walllever:wall_lever", nil, mesecon.button_get_rules)
mesecon:add_receptor_node_off("mesecons_walllever:wall_lever_off", nil, mesecon.button_get_rules)