diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-09-23 07:19:30 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-09-23 07:19:30 +0300 |
commit | eac138f56ff9fbccf4a3da846f16762086cb3181 (patch) | |
tree | 483e0ce11e4642559deb7e003c82baf74b14cb00 /glass_panes.lua | |
parent | ca7369d944dde40e51cff490903d6f5601ec42c7 (diff) |
multiple glass panes
Diffstat (limited to 'glass_panes.lua')
-rw-r--r-- | glass_panes.lua | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/glass_panes.lua b/glass_panes.lua new file mode 100644 index 0000000..3597a62 --- /dev/null +++ b/glass_panes.lua @@ -0,0 +1,97 @@ + +-- Double pane: top is decorative and can noclip through some slopes and such + +minetest.register_node("minetest_errata:pane_flat_double", { + description = "Double Glass Pane", + drawtype = "nodebox", + tiles = {"xpanes_white.png", "xpanes_white.png", "default_glass.png"}, + inventory_image = "minetest_errata_double_glass_item.png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + + node_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 3/2, 1/32}}, + }, + selection_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + + groups = {cracky=3}, + use_texture_alpha = true, +}) + +minetest.register_craft({output = "minetest_errata:pane_flat_double", + recipe ={ + {"xpanes:pane_flat",}, + {"xpanes:pane_flat",}, + }, +}) + + +-- Triple pane: top and right part are decorative + +minetest.register_node("minetest_errata:pane_flat_triple", { + description = "Triple Glass Pane", + drawtype = "nodebox", + tiles = {"xpanes_white.png", "xpanes_white.png", "default_glass.png"}, + inventory_image = "minetest_errata_triple_glass_item.png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + + node_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 3/2, 1/32}, + {-1/2, -1/2, -1/32, 3/2, 1/2, 1/32}}, + }, + selection_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + + groups = {cracky=3}, + use_texture_alpha = true, +}) + +minetest.register_craft({output = "minetest_errata:pane_flat_triple", + recipe ={ + {"xpanes:pane_flat",""}, + {"xpanes:pane_flat","xpanes:pane_flat",}, + }, +}) + + +-- Quadruple pane: all parts save for bottom left are decorative + +minetest.register_node("minetest_errata:pane_flat_quadruple", { + description = "Quadruple Glass Pane", + drawtype = "nodebox", + tiles = {"xpanes_white.png", "xpanes_white.png", "default_glass.png"}, + inventory_image = "minetest_errata_quadruple_glass_item.png", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + + node_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 3/2, 3/2, 1/32}}, + }, + selection_box = { + type = "fixed", + fixed = {{-1/2, -1/2, -1/32, 1/2, 1/2, 1/32}}, + }, + + groups = {cracky=3}, + use_texture_alpha = true, +}) + +minetest.register_craft({output = "minetest_errata:pane_flat_quadruple", + recipe ={ + {"xpanes:pane_flat","xpanes:pane_flat",}, + {"xpanes:pane_flat","xpanes:pane_flat",}, + }, +}) + |