diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 21:00:20 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 21:10:04 -0400 |
commit | 888b0ebfec8c2eff9015163549a7e47443cb8665 (patch) | |
tree | 915080159bfaa6ba6e226087c7ce0e8d5464b518 /infrastructure/advanced_curve_chevron.lua | |
parent | da66780a569712c23ae4f2996cfb4608a9f9d69d (diff) | |
download | dreambuilder_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 'infrastructure/advanced_curve_chevron.lua')
-rw-r--r-- | infrastructure/advanced_curve_chevron.lua | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/infrastructure/advanced_curve_chevron.lua b/infrastructure/advanced_curve_chevron.lua new file mode 100644 index 0000000..7d3b65d --- /dev/null +++ b/infrastructure/advanced_curve_chevron.lua @@ -0,0 +1,85 @@ +-- Curve chevron + minetest.register_node("infrastructure:curve_chevron_dark", { + description = "Flashing curve chevron", + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_curve_chevron_left_dark.png", + "infrastructure_curve_chevron_right_dark.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3}, + node_box = { + type = "fixed", + fixed = { + {-1/2, -1/2, -1/8, 1/2, 1/2, -1/16}, + {-1/2, -1/2, 1/16, 1/2, 1/2, 1/8}, + {-3/8, 1/4, -1/16, -1/4, 3/8, 1/16}, + {1/4, 1/4, -1/16, 3/8, 3/8, 1/16}, + {-3/8, -3/8, -1/16, -1/4, -1/4, 1/16}, + {1/4, -3/8, -1/16, 3/8, -1/4, 1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/8, 1/2, 1/2, 1/8} + }, + + on_punch = function(pos, node) + minetest.swap_node(pos, {name = "infrastructure:curve_chevron_bright", param2 = node.param2}) + end, + + mesecons = {effector = { + action_on = function (pos, node) + minetest.swap_node(pos, {name = "infrastructure:curve_chevron_bright", param2 = node.param2}) + end, + }} + }) + + minetest.register_node("infrastructure:curve_chevron_bright", { + tiles = { + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_traffic_lights_side.png", + "infrastructure_curve_chevron_left_bright.png", + "infrastructure_curve_chevron_right_bright.png" + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + groups = {cracky = 3, not_in_creative_inventory = 1}, + light_source = CURVE_CHEVRON_LIGHT_RANGE, + drop = "infrastructure:curve_chevron_dark", + node_box = { + type = "fixed", + fixed = { + {-1/2, -1/2, -1/8, 1/2, 1/2, -1/16}, + {-1/2, -1/2, 1/16, 1/2, 1/2, 1/8}, + {-3/8, 1/4, -1/16, -1/4, 3/8, 1/16}, + {1/4, 1/4, -1/16, 3/8, 3/8, 1/16}, + {-3/8, -3/8, -1/16, -1/4, -1/4, 1/16}, + {1/4, -3/8, -1/16, 3/8, -1/4, 1/16} + } + }, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/8, 1/2, 1/2, 1/8} + }, + + on_punch = function(pos, node) + minetest.swap_node(pos, {name = "infrastructure:curve_chevron_dark", param2 = node.param2}) + end, + + mesecons = {effector = { + action_off = function (pos, node) + minetest.swap_node(pos, {name = "infrastructure:curve_chevron_dark", param2 = node.param2}) + end + }} + }) + + minetest.register_alias("infrastructure:curve_chevron", "infrastructure:curve_chevron_dark") |