From 7d0812a794f94a69577b77f3f71e19a1257e5405 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 2 Apr 2012 07:53:08 +0200 Subject: [PATCH 1/6] Fix experimental-Bug with latest Git --- mesecons_random/depends.txt | 1 - mesecons_random/init.lua | 10 ---------- 2 files changed, 11 deletions(-) diff --git a/mesecons_random/depends.txt b/mesecons_random/depends.txt index 0aa5cc3..acaa924 100644 --- a/mesecons_random/depends.txt +++ b/mesecons_random/depends.txt @@ -1,2 +1 @@ mesecons -experimental diff --git a/mesecons_random/init.lua b/mesecons_random/init.lua index ce3a391..2ef3af1 100644 --- a/mesecons_random/init.lua +++ b/mesecons_random/init.lua @@ -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", { From 2ff53434c8e4a3963c0ab9e3a335db88ef35912d Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 2 Apr 2012 08:08:26 +0200 Subject: [PATCH 2/6] Fixed and enabled Wall-Levers --- mesecons_walllever/depends.txt | 1 + mesecons_walllever/init.lua | 86 ++++++++++++++++++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 mesecons_walllever/depends.txt create mode 100644 mesecons_walllever/init.lua diff --git a/mesecons_walllever/depends.txt b/mesecons_walllever/depends.txt new file mode 100644 index 0000000..acaa924 --- /dev/null +++ b/mesecons_walllever/depends.txt @@ -0,0 +1 @@ +mesecons diff --git a/mesecons_walllever/init.lua b/mesecons_walllever/init.lua new file mode 100644 index 0000000..0276aeb --- /dev/null +++ b/mesecons_walllever/init.lua @@ -0,0 +1,86 @@ +-- WALL LEVER +minetest.register_node("mesecons_walllever:wall_lever_off", { + drawtype = "signlike", + tile_images = {"jeija_wall_lever_off.png"}, + inventory_image = "jeija_wall_lever_off.png", + wield_image = "jeija_wall_lever_off.png", + paramtype = "light", + paramtype2 = "wallmounted", + legacy_wallmounted = true, + walkable = false, + selection_box = { + type = "wallmounted", + }, + groups = {dig_immediate=2}, + description="Lever", +}) +minetest.register_node("mesecons_walllever:wall_lever_on", { + drawtype = "signlike", + tile_images = {"jeija_wall_lever_on.png"}, + inventory_image = "jeija_wall_lever_on.png", + paramtype = "light", + paramtype2 = "wallmounted", + legacy_wallmounted = true, + walkable = false, + selection_box = { + type = "wallmounted", + }, + groups = {dig_immediate=2}, + drop = '"mesecons_walllever:wall_lever_off" 1', + description="Lever", +}) + +minetest.register_on_dignode( + function(pos, oldnode, digger) + if oldnode.name == "mesecons_walllever:wall_lever_on" then + mesecon:receptor_off(pos) + 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) + 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) + end +end) + +minetest.register_craft({ + output = '"mesecons_walllever:wall_lever_off" 2', + recipe = { + {'"mesecons:mesecon_off"'}, + {'"default:stone"'}, + {'"default:stick"'}, + } +}) +mesecon:add_receptor_node("mesecons_walllever:wall_lever") +mesecon:add_receptor_node_off("mesecons_walllever:wall_lever_off") From d44fa65bbcdbce14a9f5974ab7407e0c381664d5 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 2 Apr 2012 08:11:18 +0200 Subject: [PATCH 3/6] Deleted old Walllever-Directory --- mesecons_dev/mesecons_walllever/depends.txt | 0 mesecons_dev/mesecons_walllever/init.lua | 86 --------------------- 2 files changed, 86 deletions(-) delete mode 100644 mesecons_dev/mesecons_walllever/depends.txt delete mode 100644 mesecons_dev/mesecons_walllever/init.lua diff --git a/mesecons_dev/mesecons_walllever/depends.txt b/mesecons_dev/mesecons_walllever/depends.txt deleted file mode 100644 index e69de29..0000000 diff --git a/mesecons_dev/mesecons_walllever/init.lua b/mesecons_dev/mesecons_walllever/init.lua deleted file mode 100644 index 0276aeb..0000000 --- a/mesecons_dev/mesecons_walllever/init.lua +++ /dev/null @@ -1,86 +0,0 @@ --- WALL LEVER -minetest.register_node("mesecons_walllever:wall_lever_off", { - drawtype = "signlike", - tile_images = {"jeija_wall_lever_off.png"}, - inventory_image = "jeija_wall_lever_off.png", - wield_image = "jeija_wall_lever_off.png", - paramtype = "light", - paramtype2 = "wallmounted", - legacy_wallmounted = true, - walkable = false, - selection_box = { - type = "wallmounted", - }, - groups = {dig_immediate=2}, - description="Lever", -}) -minetest.register_node("mesecons_walllever:wall_lever_on", { - drawtype = "signlike", - tile_images = {"jeija_wall_lever_on.png"}, - inventory_image = "jeija_wall_lever_on.png", - paramtype = "light", - paramtype2 = "wallmounted", - legacy_wallmounted = true, - walkable = false, - selection_box = { - type = "wallmounted", - }, - groups = {dig_immediate=2}, - drop = '"mesecons_walllever:wall_lever_off" 1', - description="Lever", -}) - -minetest.register_on_dignode( - function(pos, oldnode, digger) - if oldnode.name == "mesecons_walllever:wall_lever_on" then - mesecon:receptor_off(pos) - 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) - 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) - end -end) - -minetest.register_craft({ - output = '"mesecons_walllever:wall_lever_off" 2', - recipe = { - {'"mesecons:mesecon_off"'}, - {'"default:stone"'}, - {'"default:stick"'}, - } -}) -mesecon:add_receptor_node("mesecons_walllever:wall_lever") -mesecon:add_receptor_node_off("mesecons_walllever:wall_lever_off") From cdb6e9b6d7c3aa99dab7eef30b9401064f35a6bb Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 2 Apr 2012 08:14:45 +0200 Subject: [PATCH 4/6] Fix mesecons_dev/README --- mesecons_dev/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mesecons_dev/README b/mesecons_dev/README index c54c51a..c8a3abd 100644 --- a/mesecons_dev/README +++ b/mesecons_dev/README @@ -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. From 3aa025b6ddb48a23d1d14edee944de2aee50ae0d Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 2 Apr 2012 08:24:48 +0200 Subject: [PATCH 5/6] Fix Wall-Lever for new Rules-System --- mesecons_walllever/depends.txt | 1 + mesecons_walllever/init.lua | 36 +++++----------------------------- 2 files changed, 6 insertions(+), 31 deletions(-) diff --git a/mesecons_walllever/depends.txt b/mesecons_walllever/depends.txt index acaa924..52a18df 100644 --- a/mesecons_walllever/depends.txt +++ b/mesecons_walllever/depends.txt @@ -1 +1,2 @@ mesecons +mesecons_button diff --git a/mesecons_walllever/init.lua b/mesecons_walllever/init.lua index 0276aeb..4e3401e 100644 --- a/mesecons_walllever/init.lua +++ b/mesecons_walllever/init.lua @@ -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) From d60af4b83d51ceeaf61acd742dbbfab6a631f40b Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 2 Apr 2012 08:41:27 +0200 Subject: [PATCH 6/6] Fix Delayer wield_image --- mesecons_delayer/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/mesecons_delayer/init.lua b/mesecons_delayer/init.lua index c76515a..bda85e3 100644 --- a/mesecons_delayer/init.lua +++ b/mesecons_delayer/init.lua @@ -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},