diff options
author | cheapie <no-email-for-you@example.com> | 2019-06-15 12:09:51 -0500 |
---|---|---|
committer | cheapie <no-email-for-you@example.com> | 2019-06-15 12:09:51 -0500 |
commit | da9556bd3a95b35cd88b035beed68e335e6696b5 (patch) | |
tree | ef04da80b0f4708e7747606ef0a38f001f9c0f2f /conductors.lua | |
parent | 0fda965aa475e06fdf7e238bb978c630abb9bbbd (diff) | |
download | digistuff-da9556bd3a95b35cd88b035beed68e335e6696b5.tar digistuff-da9556bd3a95b35cd88b035beed68e335e6696b5.tar.gz digistuff-da9556bd3a95b35cd88b035beed68e335e6696b5.tar.bz2 digistuff-da9556bd3a95b35cd88b035beed68e335e6696b5.tar.xz digistuff-da9556bd3a95b35cd88b035beed68e335e6696b5.zip |
Various additions
* Added intermediate connections for vertical digilines
* Added protection support to buttons and wall knobs (optional, defaults to off)
* Added the ability to manually control the button light (optional, defaults to off)
Diffstat (limited to 'conductors.lua')
-rw-r--r-- | conductors.lua | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/conductors.lua b/conductors.lua index d18b641..fb4fcae 100644 --- a/conductors.lua +++ b/conductors.lua @@ -167,6 +167,7 @@ digistuff.vertical_autoconnect = function(pos) shouldbe = "digistuff:vertical_top" end end + if node.name == "digistuff:vertical_tap" then shouldbe = "digistuff:vertical_tap" end if shouldbe ~= node.name or upnode.name == "digistuff:vertical_bottom" or dnnode.name == "digistuff:vertical_top" then node.name = shouldbe minetest.set_node(pos,node) @@ -183,6 +184,44 @@ digistuff.vertical_remove = function(pos) digistuff.vertical_autoconnect(dnpos) end +minetest.register_node("digistuff:vertical_tap", { + description = "Vertical Digiline Intermediate Connection", + tiles = {"digistuff_digiline_full.png"}, + paramtype = "light", + groups = {dig_immediate = 3,vertical_digiline = 1,}, + is_ground_content = false, + paramtype = "light", + drawtype = "nodebox", + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.4375,0.5}, + {-0.05,-0.4375,-0.05,0.05,0.5,0.05}, + }, + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.4375,0.5}, + }, + }, + after_place_node = digistuff.vertical_autoconnect, + after_destruct = digistuff.vertical_remove, + digiline = { + receptor = {}, + wire = { + rules = { + {x = 1,y = 0,z = 0}, + {x = -1,y = 0,z = 0}, + {x = 0,y = 0,z = 1}, + {x = 0,y = 0,z = -1}, + {x = 0,y = 1,z = 0}, + {x = 0,y = -1,z = 0}, + }, + }, + }, +}) + minetest.register_node("digistuff:vertical_bottom", { description = "Vertical Digiline", tiles = {"digistuff_digiline_full.png"}, @@ -506,6 +545,15 @@ minetest.register_craft({ }) minetest.register_craft({ + output = "digistuff:vertical_tap 5", + recipe = { + {"","digistuff:vertical_bottom",""}, + {"digilines:wire_std_00000000","digistuff:vertical_bottom","digilines:wire_std_00000000"}, + {"","digistuff:vertical_bottom",""}, + } +}) + +minetest.register_craft({ output = "digistuff:insulated_corner 3", recipe = { {"digistuff:insulated_straight","digistuff:insulated_straight",}, |