summaryrefslogtreecommitdiff
path: root/mesecons_extrawires/crossover.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:00:20 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2016-04-01 21:10:04 -0400
commit888b0ebfec8c2eff9015163549a7e47443cb8665 (patch)
tree915080159bfaa6ba6e226087c7ce0e8d5464b518 /mesecons_extrawires/crossover.lua
parentda66780a569712c23ae4f2996cfb4608a9f9d69d (diff)
downloaddreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.gz
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.bz2
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.tar.xz
dreambuilder_modpack-888b0ebfec8c2eff9015163549a7e47443cb8665.zip
"explode" all modpacks into their individual components
(you can't have a modpack buried inside a modpack)
Diffstat (limited to 'mesecons_extrawires/crossover.lua')
-rw-r--r--mesecons_extrawires/crossover.lua176
1 files changed, 176 insertions, 0 deletions
diff --git a/mesecons_extrawires/crossover.lua b/mesecons_extrawires/crossover.lua
new file mode 100644
index 0000000..4ecfc12
--- /dev/null
+++ b/mesecons_extrawires/crossover.lua
@@ -0,0 +1,176 @@
+function crossover_get_rules(node)
+ return {
+ {--first wire
+ {x=-1,y=0,z=0},
+ {x=1,y=0,z=0},
+ },
+ {--second wire
+ {x=0,y=0,z=-1},
+ {x=0,y=0,z=1},
+ },
+ }
+end
+
+local crossover_states = {
+ "mesecons_extrawires:crossover_off",
+ "mesecons_extrawires:crossover_01",
+ "mesecons_extrawires:crossover_10",
+ "mesecons_extrawires:crossover_on",
+}
+
+minetest.register_node("mesecons_extrawires:crossover_off", {
+ description = "Insulated Crossover",
+ drawtype = "nodebox",
+ tiles = {
+ "jeija_insulated_wire_crossing_tb_off.png",
+ "jeija_insulated_wire_crossing_tb_off.png",
+ "jeija_insulated_wire_ends_off.png"
+ },
+ paramtype = "light",
+ walkable = false,
+ stack_max = 99,
+ selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
+ { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 },
+ { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 },
+ { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 },
+ { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 },
+ { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 },
+ },
+ },
+ groups = {dig_immediate=3, mesecon=3},
+ mesecons = {
+ conductor = {
+ states = crossover_states,
+ rules = crossover_get_rules(),
+ }
+ },
+})
+
+minetest.register_node("mesecons_extrawires:crossover_01", {
+ description = "You hacker you!",
+ drop = "mesecons_extrawires:crossover_off",
+ drawtype = "nodebox",
+ tiles = {
+ "jeija_insulated_wire_crossing_tb_01.png",
+ "jeija_insulated_wire_crossing_tb_01.png",
+ "jeija_insulated_wire_ends_01x.png",
+ "jeija_insulated_wire_ends_01x.png",
+ "jeija_insulated_wire_ends_01z.png",
+ "jeija_insulated_wire_ends_01z.png"
+ },
+ paramtype = "light",
+ walkable = false,
+ stack_max = 99,
+ selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
+ { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 },
+ { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 },
+ { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 },
+ { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 },
+ { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 },
+ },
+ },
+ groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
+ mesecons = {
+ conductor = {
+ states = crossover_states,
+ rules = crossover_get_rules(),
+ }
+ },
+})
+
+minetest.register_node("mesecons_extrawires:crossover_10", {
+ description = "You hacker you!",
+ drop = "mesecons_extrawires:crossover_off",
+ drawtype = "nodebox",
+ tiles = {
+ "jeija_insulated_wire_crossing_tb_10.png",
+ "jeija_insulated_wire_crossing_tb_10.png",
+ "jeija_insulated_wire_ends_10x.png",
+ "jeija_insulated_wire_ends_10x.png",
+ "jeija_insulated_wire_ends_10z.png",
+ "jeija_insulated_wire_ends_10z.png"
+ },
+ paramtype = "light",
+ walkable = false,
+ stack_max = 99,
+ selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
+ { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 },
+ { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 },
+ { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 },
+ { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 },
+ { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 },
+ },
+ },
+ groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
+ mesecons = {
+ conductor = {
+ states = crossover_states,
+ rules = crossover_get_rules(),
+ }
+ },
+})
+
+minetest.register_node("mesecons_extrawires:crossover_on", {
+ description = "You hacker you!",
+ drop = "mesecons_extrawires:crossover_off",
+ drawtype = "nodebox",
+ tiles = {
+ "jeija_insulated_wire_crossing_tb_on.png",
+ "jeija_insulated_wire_crossing_tb_on.png",
+ "jeija_insulated_wire_ends_on.png",
+ "jeija_insulated_wire_ends_on.png",
+ "jeija_insulated_wire_ends_on.png",
+ "jeija_insulated_wire_ends_on.png"
+ },
+ paramtype = "light",
+ walkable = false,
+ stack_max = 99,
+ selection_box = {type="fixed", fixed={-16/32-0.0001, -18/32, -16/32-0.001, 16/32+0.001, -5/32, 16/32+0.001}},
+ node_box = {
+ type = "fixed",
+ fixed = {
+ { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
+ { -3/32, -17/32, -16/32-0.001, 3/32, -13/32, -6/32 },
+ { -3/32, -13/32, -9/32, 3/32, -6/32, -6/32 },
+ { -3/32, -9/32, -9/32, 3/32, -6/32, 9/32 },
+ { -3/32, -13/32, 6/32, 3/32, -6/32, 9/32 },
+ { -3/32, -17/32, 6/32, 3/32, -13/32, 16/32+0.001 },
+ },
+ },
+ groups = {dig_immediate=3, mesecon=3, not_in_creative_inventory=1},
+ mesecons = {
+ conductor = {
+ states = crossover_states,
+ rules = crossover_get_rules(),
+ }
+ },
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "mesecons_extrawires:crossover_off",
+ recipe = {
+ "mesecons_insulated:insulated_off",
+ "mesecons_insulated:insulated_off",
+ },
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "mesecons_insulated:insulated_off 2",
+ recipe = {
+ "mesecons_extrawires:crossover_off",
+ },
+})