diff options
Diffstat (limited to 'mesecons_insulated')
21 files changed, 82 insertions, 0 deletions
diff --git a/mesecons_insulated/depends.txt b/mesecons_insulated/depends.txt new file mode 100644 index 0000000..acaa924 --- /dev/null +++ b/mesecons_insulated/depends.txt @@ -0,0 +1 @@ +mesecons diff --git a/mesecons_insulated/doc/insulated/description.html b/mesecons_insulated/doc/insulated/description.html new file mode 100644 index 0000000..df2a6df --- /dev/null +++ b/mesecons_insulated/doc/insulated/description.html @@ -0,0 +1 @@ + Insulated mesecons are conductors that only conduct in one direction (and also not up or down). diff --git a/mesecons_insulated/doc/insulated/preview.png b/mesecons_insulated/doc/insulated/preview.png Binary files differnew file mode 100644 index 0000000..bf544e8 --- /dev/null +++ b/mesecons_insulated/doc/insulated/preview.png diff --git a/mesecons_insulated/doc/insulated/recipe.png b/mesecons_insulated/doc/insulated/recipe.png Binary files differnew file mode 100644 index 0000000..f2a731a --- /dev/null +++ b/mesecons_insulated/doc/insulated/recipe.png diff --git a/mesecons_insulated/init.lua b/mesecons_insulated/init.lua new file mode 100644 index 0000000..c6fc05e --- /dev/null +++ b/mesecons_insulated/init.lua @@ -0,0 +1,80 @@ +function insulated_wire_get_rules(node) + local rules = {{x = 1, y = 0, z = 0}, + {x =-1, y = 0, z = 0}} + if node.param2 == 1 or node.param2 == 3 then + return mesecon.rotate_rules_right(rules) + end + return rules +end + +minetest.register_node("mesecons_insulated:insulated_on", { + drawtype = "nodebox", + description = "Insulated Mesecon", + tiles = { + "jeija_insulated_wire_sides_on.png", + "jeija_insulated_wire_sides_on.png", + "jeija_insulated_wire_ends_on.png", + "jeija_insulated_wire_ends_on.png", + "jeija_insulated_wire_sides_on.png", + "jeija_insulated_wire_sides_on.png" + }, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = { -16/32-0.001, -18/32, -7/32, 16/32+0.001, -12/32, 7/32 } + }, + node_box = { + type = "fixed", + fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 } + }, + groups = {dig_immediate = 3, not_in_creative_inventory = 1}, + drop = "mesecons_insulated:insulated_off", + mesecons = {conductor = { + state = mesecon.state.on, + offstate = "mesecons_insulated:insulated_off", + rules = insulated_wire_get_rules + }} +}) + +minetest.register_node("mesecons_insulated:insulated_off", { + drawtype = "nodebox", + description = "Insulated Mesecon", + tiles = { + "jeija_insulated_wire_sides_off.png", + "jeija_insulated_wire_sides_off.png", + "jeija_insulated_wire_ends_off.png", + "jeija_insulated_wire_ends_off.png", + "jeija_insulated_wire_sides_off.png", + "jeija_insulated_wire_sides_off.png" + }, + paramtype = "light", + paramtype2 = "facedir", + walkable = false, + sunlight_propagates = true, + selection_box = { + type = "fixed", + fixed = { -16/32-0.001, -18/32, -7/32, 16/32+0.001, -12/32, 7/32 } + }, + node_box = { + type = "fixed", + fixed = { -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 } + }, + groups = {dig_immediate = 3}, + mesecons = {conductor = { + state = mesecon.state.off, + onstate = "mesecons_insulated:insulated_on", + rules = insulated_wire_get_rules + }} +}) + +minetest.register_craft({ + output = "mesecons_insulated:insulated_off 3", + recipe = { + {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, + {"mesecons:wire_00000000_off", "mesecons:wire_00000000_off", "mesecons:wire_00000000_off"}, + {"mesecons_materials:fiber", "mesecons_materials:fiber", "mesecons_materials:fiber"}, + } +}) diff --git a/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_01.png b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_01.png Binary files differnew file mode 100644 index 0000000..d872b2b --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_01.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_10.png b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_10.png Binary files differnew file mode 100644 index 0000000..ae06dea --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_10.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_off.png b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_off.png Binary files differnew file mode 100644 index 0000000..41b5ff4 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_off.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_on.png b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_on.png Binary files differnew file mode 100644 index 0000000..154288b --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_crossing_tb_on.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png b/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png Binary files differnew file mode 100644 index 0000000..85ca90b --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_off.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png b/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png Binary files differnew file mode 100644 index 0000000..772d9a6 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_curved_tb_on.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_ends_01x.png b/mesecons_insulated/textures/jeija_insulated_wire_ends_01x.png Binary files differnew file mode 100644 index 0000000..b742152 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_ends_01x.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_ends_01z.png b/mesecons_insulated/textures/jeija_insulated_wire_ends_01z.png Binary files differnew file mode 100644 index 0000000..497a467 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_ends_01z.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_ends_10x.png b/mesecons_insulated/textures/jeija_insulated_wire_ends_10x.png Binary files differnew file mode 100644 index 0000000..d407cff --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_ends_10x.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_ends_10z.png b/mesecons_insulated/textures/jeija_insulated_wire_ends_10z.png Binary files differnew file mode 100644 index 0000000..830d390 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_ends_10z.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png b/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png Binary files differnew file mode 100644 index 0000000..89a8385 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_ends_off.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png b/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png Binary files differnew file mode 100644 index 0000000..75cf435 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_ends_on.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png b/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png Binary files differnew file mode 100644 index 0000000..db33f14 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_sides_off.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png b/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png Binary files differnew file mode 100644 index 0000000..f76e9a8 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_sides_on.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png b/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png Binary files differnew file mode 100644 index 0000000..a897b29 --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_off.png diff --git a/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png b/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png Binary files differnew file mode 100644 index 0000000..8fc312b --- /dev/null +++ b/mesecons_insulated/textures/jeija_insulated_wire_tjunction_tb_on.png |