Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use rotate_simple for insulated wires #382

Merged
merged 3 commits into from Jan 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions 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 },
Expand Down Expand Up @@ -46,6 +48,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", {
Expand Down Expand Up @@ -73,6 +76,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({
Expand Down
1 change: 1 addition & 0 deletions mesecons_extrawires/depends.txt
@@ -1,2 +1,3 @@
default
mesecons
screwdriver?
4 changes: 4 additions & 0 deletions 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 },
Expand Down Expand Up @@ -47,6 +49,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", {
Expand Down Expand Up @@ -74,6 +77,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({
Expand Down
1 change: 1 addition & 0 deletions mesecons_insulated/depends.txt
@@ -1 +1,2 @@
mesecons
screwdriver?
4 changes: 4 additions & 0 deletions 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}}
Expand Down Expand Up @@ -38,6 +40,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", {
Expand Down Expand Up @@ -70,6 +73,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({
Expand Down