summaryrefslogtreecommitdiff
path: root/mesecons_insulated
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_insulated')
-rw-r--r--mesecons_insulated/depends.txt1
-rw-r--r--mesecons_insulated/init.lua6
2 files changed, 7 insertions, 0 deletions
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 b494540..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}}
@@ -20,6 +22,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
},
paramtype = "light",
paramtype2 = "facedir",
+ is_ground_content = false,
walkable = false,
sunlight_propagates = true,
selection_box = {
@@ -38,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", {
@@ -53,6 +57,7 @@ minetest.register_node("mesecons_insulated:insulated_off", {
},
paramtype = "light",
paramtype2 = "facedir",
+ is_ground_content = false,
walkable = false,
sunlight_propagates = true,
selection_box = {
@@ -70,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({