diff options
-rw-r--r-- | mesecons_extrawires/corner.lua | 4 | ||||
-rw-r--r-- | mesecons_extrawires/depends.txt | 1 | ||||
-rw-r--r-- | mesecons_extrawires/tjunction.lua | 4 | ||||
-rw-r--r-- | mesecons_insulated/depends.txt | 1 | ||||
-rw-r--r-- | mesecons_insulated/init.lua | 4 |
5 files changed, 14 insertions, 0 deletions
diff --git a/mesecons_extrawires/corner.lua b/mesecons_extrawires/corner.lua index 27cfab8..8dc9866 100644 --- a/mesecons_extrawires/corner.lua +++ b/mesecons_extrawires/corner.lua @@ -1,3 +1,5 @@ +local screwdriver_exists = minetest.global_exists("screwdriver") + local corner_nodebox = { type = "fixed", fixed = {{ -16/32-0.001, -17/32, -3/32, 0, -13/32, 3/32 }, @@ -47,6 +49,7 @@ minetest.register_node("mesecons_extrawires:corner_on", { offstate = "mesecons_extrawires:corner_off" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_node("mesecons_extrawires:corner_off", { @@ -75,6 +78,7 @@ minetest.register_node("mesecons_extrawires:corner_off", { onstate = "mesecons_extrawires:corner_on" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_craft({ diff --git a/mesecons_extrawires/depends.txt b/mesecons_extrawires/depends.txt index aca967d..369aeb7 100644 --- a/mesecons_extrawires/depends.txt +++ b/mesecons_extrawires/depends.txt @@ -1,2 +1,3 @@ default mesecons +screwdriver? diff --git a/mesecons_extrawires/tjunction.lua b/mesecons_extrawires/tjunction.lua index 018ee48..53a69f6 100644 --- a/mesecons_extrawires/tjunction.lua +++ b/mesecons_extrawires/tjunction.lua @@ -1,3 +1,5 @@ +local screwdriver_exists = minetest.global_exists("screwdriver") + local tjunction_nodebox = { type = "fixed", fixed = {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 }, @@ -48,6 +50,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", { offstate = "mesecons_extrawires:tjunction_off" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_node("mesecons_extrawires:tjunction_off", { @@ -76,6 +79,7 @@ minetest.register_node("mesecons_extrawires:tjunction_off", { onstate = "mesecons_extrawires:tjunction_on" }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_craft({ diff --git a/mesecons_insulated/depends.txt b/mesecons_insulated/depends.txt index acaa924..a0ba1ef 100644 --- a/mesecons_insulated/depends.txt +++ b/mesecons_insulated/depends.txt @@ -1 +1,2 @@ mesecons +screwdriver? diff --git a/mesecons_insulated/init.lua b/mesecons_insulated/init.lua index 20abc64..92ff639 100644 --- a/mesecons_insulated/init.lua +++ b/mesecons_insulated/init.lua @@ -1,3 +1,5 @@ +local screwdriver_exists = minetest.global_exists("screwdriver") + local function insulated_wire_get_rules(node) local rules = {{x = 1, y = 0, z = 0}, {x =-1, y = 0, z = 0}} @@ -39,6 +41,7 @@ minetest.register_node("mesecons_insulated:insulated_on", { rules = insulated_wire_get_rules }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_node("mesecons_insulated:insulated_off", { @@ -72,6 +75,7 @@ minetest.register_node("mesecons_insulated:insulated_off", { rules = insulated_wire_get_rules }}, on_blast = mesecon.on_blastnode, + on_rotate = screwdriver_exists and screwdriver.rotate_simple, }) minetest.register_craft({ |