diff --git a/beam_stained.lua b/beam_stained.lua deleted file mode 100644 index 2678080..0000000 --- a/beam_stained.lua +++ /dev/null @@ -1,453 +0,0 @@ -minetest.register_node("mydeck:beams", { - description = "Beam", - tiles = { - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:beam", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.125, -0.5, -0.5, 0.125, 0, 0.5}, - } - }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - - local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - - if node == "mydeck:post" then - minetest.set_node(pos,{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - end -}) -minetest.register_node("mydeck:beam_wbrackets", { - description = "Beam with Bracket", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png^[transformR90^mydeck_beambt_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^[transformR90^mydeck_beambt_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:beam", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.125, -0.5, -0.5, 0.125, 0, 0.5}, - {0.125, -0.5, -0.125, 0.1875, -0.1875, 0.125}, - {-0.1875, -0.5, -0.125, -0.125, -0.1875, 0.125}, - } - } -}) - -minetest.register_node("mydeck:joists_beams", { - description = "Deck Joists with Beam", - tiles = { - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:joists"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) - -minetest.register_node("mydeck:joists_beam_wbrackets", { - description = "Deck Joists with Beam and Bracket", - tiles = { - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:joists"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - - {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, - {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) -minetest.register_node("mydeck:joists_side_beams", { - description = "Deck Joists side with Beam", - tiles = { - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:joists_side"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) -minetest.register_node("mydeck:joists_side_beam_wbrackets", { - description = "Deck Joists side with Beam and Bracket", - tiles = { - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:joists_side"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, - {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) - -minetest.register_node("mydeck:deck_joists_beams", { - description = "Deck Joists with Beam", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 3, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) - -minetest.register_node("mydeck:deck_joists_beam_wbrackets", { - description = "Deck Joists with Beam with Bracket", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 3, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, - {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) - -minetest.register_node("mydeck:deck_joists_side_beams", { - description = "Deck Joists side with Beam", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 3, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists_side"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) -minetest.register_node("mydeck:deck_joists_side_beam_wbrackets", { - description = "Deck Joists side with Beam with Bracket", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambf_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_beambs_ol.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 3, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists_side"}, - }, - { - items = {"mydeck:beam"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, - {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, - } - }, -}) diff --git a/deckboards.lua b/deckboards.lua index 7d6cab9..c77793b 100644 --- a/deckboards.lua +++ b/deckboards.lua @@ -14,7 +14,7 @@ minetest.register_node("mydeck:deck_boards", { paramtype2 = "facedir", sunlight_propagates = true, sounds = default.node_sound_wood_defaults(), - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1,stain=1}, node_box = { type = "fixed", fixed = { diff --git a/deckboards_stained.lua b/deckboards_stained.lua deleted file mode 100644 index fe2061a..0000000 --- a/deckboards_stained.lua +++ /dev/null @@ -1,422 +0,0 @@ -minetest.register_node("mydeck:deck_boardss", { - description = "Deck Boards Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:deck_boards", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.375, 0.2725, 0.5, -0.5, 0.5}, - {-0.5, -0.375, 0.0225, 0.5, -0.5, 0.25}, - {-0.5, -0.375, -0.2275, 0.5, -0.5, 0}, - {-0.5, -0.375, -0.4775, 0.5, -0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.375, -0.5, 0.5, -0.5, 0.5}, - } - }, - - after_place_node = function(pos, placer, itemstack, pointed_thing) - - local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name - local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - - if node == "mydeck:joists" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if node == "mydeck:joists_side" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_side" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if node == "mydeck:joists_beam" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_beam" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if node == "mydeck:joists_side_beam" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_side_beam" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if node == "mydeck:joists_end" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_end" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_end", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if node == "mydeck:joists_side_end" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_side_end" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_end", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if node == "mydeck:joists_endr" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_endr" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_endr", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if node == "mydeck:joists_side_endr" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_side_endr" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_endr", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if node == "mydeck:joists_beam_wbracket" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_beam_wbracket" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if node == "mydeck:joists_side_beam_wbracket" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:joists_side_beam_wbracket" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - end, - -}) -minetest.register_node("mydeck:deck_beams", { - description = "Deck on Beam Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.125, -0.5, -0.5, 0.125, -0.125, 0.5}, - {-0.5, 0, 0.2725, 0.5, -0.125, 0.5}, - {-0.5, 0, 0.0225, 0.5, -0.125, 0.25}, - {-0.5, 0, -0.2275, 0.5, -0.125, 0}, - {-0.5, 0, -0.4775, 0.5, -0.125, -0.25}, - } - }, -}) - -minetest.register_node("mydeck:deck_joistss", { - description = "Deck Joists Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists"}, - }, - } - }, - - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:deck_joists_sides", { - description = "Deck Joists Side Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists_side"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - } - }, -}) - - -minetest.register_node("mydeck:deck_joists_ends", { - description = "Deck Joists with End Plate Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists_end"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.375, 0.5}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:deck_joists_side_ends", { - description = "Deck Joists Side with End Plate Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists_side_end"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:deck_joists_endrs", { - description = "Deck Joists Side with Wall Plate stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists_endr"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:deck_joists_side_endrs", { - description = "Deck Joists Side with Wall Plate Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:deck_boards"}, - }, - { - items = {"mydeck:joists_side_endr"}, - }, - } - }, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, 0.5, 0.5, 0.375, 0.375}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, - {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, - {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, - {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, - } - }, -}) diff --git a/init.lua b/init.lua index e3a8cbc..e707491 100644 --- a/init.lua +++ b/init.lua @@ -8,10 +8,3 @@ dofile(minetest.get_modpath("mydeck").."/beam.lua") dofile(minetest.get_modpath("mydeck").."/stairs.lua") dofile(minetest.get_modpath("mydeck").."/stain.lua") dofile(minetest.get_modpath("mydeck").."/lattice.lua") -dofile(minetest.get_modpath("mydeck").."/rail_stained.lua") -dofile(minetest.get_modpath("mydeck").."/deckboards_stained.lua") -dofile(minetest.get_modpath("mydeck").."/piles_stained.lua") -dofile(minetest.get_modpath("mydeck").."/beam_stained.lua") -dofile(minetest.get_modpath("mydeck").."/joists_stained.lua") -dofile(minetest.get_modpath("mydeck").."/stairs_stained.lua") -dofile(minetest.get_modpath("mydeck").."/lattice_stained.lua") diff --git a/joists_stained.lua b/joists_stained.lua deleted file mode 100644 index c47d09c..0000000 --- a/joists_stained.lua +++ /dev/null @@ -1,238 +0,0 @@ - -minetest.register_node("mydeck:joistss", { - description = "Deck Joists", - tiles = { - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:joists", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - - local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name - local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - - if node == "mydeck:beam" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:beam" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if node == "mydeck:beam_wbracket" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:beam_wbracket" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - end -}) - -minetest.register_node("mydeck:joists_sides", { - description = "Deck Joists Side", - tiles = { - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:joists_side", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - - local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name - local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - - if node == "mydeck:beam_wbracket" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:beam_wbracket" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if node == "mydeck:beam" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:beam" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - end -}) - - -minetest.register_node("mydeck:joists_ends", { - description = "Deck Joists with End Plate", - tiles = { - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:joists_end", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, 0.375, 0.5, 0.375, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:joists_side_ends", { - description = "Deck Joists Side with End Plate", - tiles = { - "mydeck_hwood.png^mydeck_joistend_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:joists_side_end", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:joists_endrs", { - description = "Deck Joists Side with Wall Plate", - tiles = { - "mydeck_hwood.png^mydeck_joistend_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:joists_endr", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:joists_side_endrs", { - description = "Deck Joists Side with Wall Plate", - tiles = { - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:joists_side_endr", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, - {0, 0, -0.5, 0.125, 0.375, 0.5}, - {-0.5, 0, 0.5, 0.5, 0.375, 0.375}, - {0.375, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, - } - }, -}) diff --git a/lattice_stained.lua b/lattice_stained.lua deleted file mode 100644 index 7b194a5..0000000 --- a/lattice_stained.lua +++ /dev/null @@ -1,47 +0,0 @@ -minetest.register_node("mydeck:lattices", { - description = "Lattice", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:lattice", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.4375, -0.5, 0.4375, -0.375, 0.5, 0.5}, -- NodeBox1 - {-0.3125, -0.5, 0.4375, -0.25, 0.5, 0.5}, -- NodeBox2 - {-0.1875, -0.5, 0.4375, -0.125, 0.5, 0.5}, -- NodeBox3 - {-0.0625, -0.5, 0.4375, 0, 0.5, 0.5}, -- NodeBox4 - {0.0625, -0.5, 0.4375, 0.125, 0.5, 0.5}, -- NodeBox5 - {0.1875, -0.5, 0.4375, 0.25, 0.5, 0.5}, -- NodeBox6 - {0.3125, -0.5, 0.4375, 0.375, 0.5, 0.5}, -- NodeBox7 - {0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox8 - - {-0.5, -0.5, 0.375, 0.5, -0.4375, 0.4375}, -- NodeBox9 - {-0.5, -0.375, 0.375, 0.5, -0.3125, 0.4375}, -- NodeBox10 - {-0.5, -0.25, 0.375, 0.5, -0.1875, 0.4375}, -- NodeBox11 - {-0.5, -0.125, 0.375, 0.5, -0.0625, 0.4375}, -- NodeBox12 - {-0.5, 0, 0.375, 0.5, 0.0625, 0.4375}, -- NodeBox13 - {-0.5, 0.125, 0.375, 0.5, 0.1875, 0.4375}, -- NodeBox14 - {-0.5, 0.25, 0.375, 0.5, 0.3125, 0.4375}, -- NodeBox15 - {-0.5, 0.375, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox16 - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.5, 0.5, 0.5, 0.375}, - } - }, -}) - diff --git a/machine.lua b/machine.lua index ae71359..8e31906 100644 --- a/machine.lua +++ b/machine.lua @@ -1,7 +1,11 @@ local material = {} local shape = {} local make_ok = {} +local make_ok2 = {} +local make_ok3 = {} local anzahl = {} +local brushcount = {} +local cbruchcount = {} minetest.register_node("mydeck:machine", { description = "Deck Machine", @@ -53,48 +57,79 @@ can_dig = function(pos,player) return false elseif not inv:is_empty("res") then return false + elseif not inv:is_empty("wool") then + return false + elseif not inv:is_empty("steel") then + return false + elseif not inv:is_empty("stick") then + return false + elseif not inv:is_empty("brush") then + return false + elseif not inv:is_empty("dye") then + return false + elseif not inv:is_empty("cbrush") then + return false end return true end, on_construct = function(pos) local meta = minetest.env:get_meta(pos) - meta:set_string("formspec", "invsize[10,11;]".. - "background[-0.15,-0.25;10.40,11.75;mydeck_background.png]".. - "label[4,5;Wood:]".. - "list[current_name;ingot;4,5.5;1,1;]".. - "label[6.5,5;Output:]".. - "list[current_name;res;6.5,5.5;1,1;]".. - "label[0,0;Choose Deck Parts:]".. + meta:set_string("formspec", "invsize[12,10;]".. + "background[-0.15,-0.25;12.40,10.75;mydeck_background.png]".. + "label[6,4;Wood:]".. + "list[current_name;ingot;6,4.5;1,1;]".. + "label[7.5,4;Output:]".. + "list[current_name;res;7.5,4.5;1,1;]".. "label[0.5,0.5;Joists]".. - "image_button[0.5,1;1,1;mydeck_mach1.png;joists; ]".. - "image_button[1.5,1;1,1;mydeck_mach2.png;joistside; ]".. - "image_button[2.5,1;1,1;mydeck_mach3.png;joistend; ]".. - "image_button[3.5,1;1,1;mydeck_mach4.png;joistsidend; ]".. - "image_button[4.5,1;1,1;mydeck_mach5.png;joistendr; ]".. - "image_button[5.5,1;1,1;mydeck_mach6.png;joistsidendr; ]".. - "image_button[7,1;1,1;mydeck_mach20.png;brush; ]".. + "item_image_button[0.5,1;1,1;mydeck:joists;joists; ]".. + "item_image_button[1.5,1;1,1;mydeck:joists_side;joistside; ]".. + "item_image_button[2.5,1;1,1;mydeck:joists_end;joistend; ]".. + "item_image_button[3.5,1;1,1;mydeck:joists_side_end;joistsidend; ]".. + "item_image_button[4.5,1;1,1;mydeck:joists_endr;joistendr; ]".. + "item_image_button[5.5,1;1,1;mydeck:joists_side_endr;joistsidendr; ]".. "label[0.5,2;Pile Post Beam and Stairs]".. - "image_button[0.5,2.5;1,1;mydeck_mach7.png;pile; ]".. - "image_button[1.5,2.5;1,1;mydeck_mach8.png;post; ]".. - "image_button[2.5,2.5;1,1;mydeck_mach9.png;beam; ]".. - "image_button[3.5,2.5;1,1;mydeck_mach14.png;stairs; ]".. - "image_button[4.5,2.5;1,1;mydeck_mach15.png;stairso; ]".. - "image_button[5.5,2.5;1,1;mydeck_mach16.png;stairsi; ]".. - "image_button[6.5,2.5;1,1;mydeck_mach17.png;sraill; ]".. - "image_button[7.5,2.5;1,1;mydeck_mach18.png;srailr; ]".. + "item_image_button[0.5,2.5;1,1;mydeck:pile;pile; ]".. + "item_image_button[1.5,2.5;1,1;mydeck:post;post; ]".. + "item_image_button[2.5,2.5;1,1;mydeck:beam;beam; ]".. + "item_image_button[3.5,2.5;1,1;mydeck:stairs;stairs; ]".. + "item_image_button[4.5,2.5;1,1;mydeck:stairs_ocorner;stairso; ]".. + "item_image_button[5.5,2.5;1,1;mydeck:stairs_icorner;stairsi; ]".. + "item_image_button[6.5,2.5;1,1;mydeck:stairs_raill;sraill; ]".. + "item_image_button[7.5,2.5;1,1;mydeck:stairs_railr;srailr; ]".. "label[0.5,3.5;Deck Boards and Rail]".. - "image_button[0.5,4;1,1;mydeck_mach10.png;deckb; ]".. - "image_button[1.5,4;1,1;mydeck_mach11.png;rail; ]".. - "image_button[2.5,4;1,1;mydeck_mach12.png;railc; ]".. - "image_button[3.5,4;1,1;mydeck_mach13.png;railic; ]".. - "image_button[4.5,4;1,1;mydeck_mach19.png;lattice; ]".. + "item_image_button[0.5,4;1,1;mydeck:deck_boards;deckb; ]".. + "item_image_button[1.5,4;1,1;mydeck:rail;rail; ]".. + "item_image_button[2.5,4;1,1;mydeck:rail_corner;railc; ]".. + "item_image_button[3.5,4;1,1;mydeck:rail_icorner;railic; ]".. + "item_image_button[4.5,4;1,1;mydeck:lattice;lattice; ]".. - "list[current_player;main;1,7;8,4;]") + "label[9.5,0.5;Craft Stain Brush]".. + "label[10.5,1;Wool]".. + "list[current_name;wool;9.5,1;1,1;]".. + "label[10.5,2;Steel Ingot]".. + "list[current_name;steel;9.5,2;1,1;]".. + "label[10.5,3;Stick]".. + "list[current_name;stick;9.5,3;1,1;]".. + "button[9.5,4;1,1;mbrush;Make]".. + "label[10.5,5;Brush]".. + "list[current_name;brush;9.5,5;1,1;]".. + "label[10.5,6;Dye]".. + "list[current_name;dye;9.5,6;1,1;]".. + "button[9.5,7;1,1;mcbrush;Make]".. + "list[current_name;cbrush;9.5,8;1,1;]".. + + "list[current_player;main;0.5,6;8,4;]") meta:set_string("infotext", "Deck Machine") local inv = meta:get_inventory() inv:set_size("ingot", 1) inv:set_size("res", 1) + inv:set_size("wool", 1) + inv:set_size("steel", 1) + inv:set_size("stick", 1) + inv:set_size("brush", 1) + inv:set_size("dye", 1) + inv:set_size("cbrush", 1) end, on_receive_fields = function(pos, formname, fields, sender) @@ -107,7 +142,6 @@ or fields["joistend"] or fields["joistsidend"] or fields["joistendr"] or fields["joistsidendr"] -or fields["brush"] or fields["pile"] or fields["post"] @@ -179,15 +213,6 @@ then end end - if fields["brush"] then - make_ok = "0" - anzahl = "2" - shape = "mydeck:stain_brush" - if inv:is_empty("ingot") then - return - end - end - if fields["pile"] then make_ok = "0" anzahl = "1" @@ -312,12 +337,12 @@ then --register nodes ---------------------------------------------------------------------------------- local gwood = minetest.registered_aliases[ingotstack:get_name()] -if not gwood then - gwood = ingotstack:get_name() -end + if not gwood then + gwood = ingotstack:get_name() + end local allwood = minetest.registered_items[gwood] -if allwood and allwood.groups and allwood.groups["wood"] then + if allwood and allwood.groups and allwood.groups["wood"] then -- if ingotstack:get_name()=="default:wood" then make_ok = "1" end @@ -331,10 +356,98 @@ if allwood and allwood.groups and allwood.groups["wood"] then ingotstack:take_item() inv:set_stack("ingot",1,ingotstack) end -end -end +end --if fields + +local color_tab = { +{"black", "Black", "^[colorize:black:200"}, +{"blue", "Blue", "^[colorize:#0B0B3B:150"}, +{"brown", "Brown", "^[colorize:#190B07:140"}, +{"cyan", "Cyan", "^[colorize:cyan:75"}, +{"dark_green", "Dark Green", "^[colorize:#071907:150"}, +{"dark_grey", "Dark Grey", "^[colorize:#1C1C1C:150"}, +{"green", "Green", "^[colorize:green:75"}, +{"grey", "Grey", "^[colorize:#848484:100"}, +{"magenta", "Magenta", "^[colorize:magenta:75"}, +{"orange", "Orange", "^[colorize:orange:75"}, +{"pink", "Pink", "^[colorize:#FE2E9A:75"}, +{"red", "Red", "^[colorize:#B40404:75"}, +{"violet", "Violet", "^[colorize:#08088A:100"}, +{"white", "White", "^[colorize:white:100"}, +{"yellow", "Yellow", "^[colorize:yellow:75"}, +} +for i in ipairs (color_tab) do +local col = color_tab[i][1] +local coldesc = color_tab[i][2] +local alpha = color_tab[i][3] + local woolstack = inv:get_stack("wool", 1) + local steelstack = inv:get_stack("steel", 1) + local stickstack = inv:get_stack("stick", 1) + local brushstack = inv:get_stack("brush", 1) + local dyestack = inv:get_stack("dye", 1) + +if fields["mbrush"] +then + if fields["mbrush"] then + make_ok2 = "0" + if inv:is_empty("wool") or + inv:is_empty("steel") or + inv:is_empty("stick") then + return + end + end + + if woolstack:get_name()== "wool:"..col and + steelstack:get_name()=="default:steel_ingot" and + stickstack:get_name()== "default:stick" then + material = "mydeck:stain_brush" + make_ok2 = "1" + end + + if inv:is_empty("brush") and + make_ok2 == "1" then + inv:add_item("brush",material) + woolstack:take_item() + inv:set_stack("wool",1,woolstack) + steelstack:take_item() + inv:set_stack("steel",1,steelstack) + stickstack:take_item() + inv:set_stack("stick",1,stickstack) + end + +end --if fields + +if fields["mcbrush"] +then + + if fields["mcbrush"] then + make_ok3 = "0" + if inv:is_empty("brush") or + inv:is_empty("dye") then + return + end + end + + if brushstack:get_name()=="mydeck:stain_brush" and + dyestack:get_name()=="dye:"..col then + material = "mydeck:stain_brush_"..col + make_ok3 = "1" + end + + if inv:is_empty("cbrush") and + make_ok3 == "1" then + inv:add_item("cbrush",material) + brushstack:take_item() + inv:set_stack("brush",1,brushstack) + dyestack:take_item() + inv:set_stack("dye",1,dyestack) + end + + +end --if fields +end --color table +end --on_recieve }) --Craft @@ -345,7 +458,7 @@ minetest.register_craft({ {'', '', ''}, {'default:wood', 'default:tree', 'default:wood'}, {'default:tree', "default:wood", 'default:tree'}, - }, + } }) diff --git a/piles_stained.lua b/piles_stained.lua deleted file mode 100644 index 2e0b308..0000000 --- a/piles_stained.lua +++ /dev/null @@ -1,104 +0,0 @@ - - -minetest.register_node("mydeck:pile_wposts", { - description = "Pile", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png^mydeck_piletp_ol.png^[transformR90", - "mydeck_concrete.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_piles_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_piles_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_pilef_ol.png", - "mydeck_hwood.png^mydeck_tint1.png^mydeck_pilef_ol.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = { - max_items = 2, - items = { - { - items = {"mydeck:pile"}, - }, - { - items = {"mydeck:post"}, - }, - } - }, - - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - {-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, - {-0.375, -0.5, -0.375, 0.375, -0.25, 0.375}, - {-0.25, -0.25, -0.1875, -0.1875, 0.25, 0.1875}, - {-0.1875, -0.5, -0.1875, 0.1875, -0.1875, 0.1875}, - {0.1875, -0.5, -0.1875, 0.25, 0.25, 0.1875}, - {-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875}, - } - } -}) -minetest.register_node("mydeck:posts", { - description = "Post", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png^[transformR90", - "mydeck_hwood.png^mydeck_tint1.png^[transformR90", - "mydeck_hwood.png^mydeck_tint1.png^[transformR90", - "mydeck_hwood.png^mydeck_tint1.png^[transformR90", - "mydeck_hwood.png^mydeck_tint1.png^[transformR90", - "mydeck_hwood.png^mydeck_tint1.png^[transformR90", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:post", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875}, - } - }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - - local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name - local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - local nodeu = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name - - - if node == "mydeck:pile" then - minetest.set_node(pos,{name = "air"}) - end - if node == "mydeck:pile" then - minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:pile_wpost", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - - if nodeu == "mydeck:beam" then - minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if nodeu == "mydeck:joists_beam" then - minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if nodeu == "mydeck:joists_side_beam" then - minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if nodeu == "mydeck:deck_joists_beam" then - minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - if nodeu == "mydeck:deck_joists_side_beam" then - minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) - end - end -}) - - - - - - - diff --git a/rail_stained.lua b/rail_stained.lua deleted file mode 100644 index 7dbb501..0000000 --- a/rail_stained.lua +++ /dev/null @@ -1,129 +0,0 @@ -minetest.register_node("mydeck:rails", { - description = "Deck Rail Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:rail", - sunlight_propagates = true, - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5}, - {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, - {0.4375, -0.5, 0.3125, 0.5, 0.5, 0.5}, - {-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5}, - {-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375}, - {-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375}, - {0.3125, -0.25, 0.375, 0.375, 0.375, 0.4375}, - {0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375}, - {0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375}, - {-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, - } - } -}) -minetest.register_node("mydeck:rail_corners", { - description = "Deck Rail Corner Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - drop = "mydeck:rail_corner", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5}, - {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, - {0.3125, -0.5, 0.3125, 0.5, 0.5, 0.5}, - {-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5}, - {-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375}, - {-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375}, - {0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375}, - {0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375}, - {-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375}, - {0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375}, - {0.3125, -0.375, -0.5, 0.5, -0.25, 0.5}, - {0.25, 0.375, -0.5, 0.5, 0.5, 0.5}, - {0.375, -0.25, -0.375, 0.4375, 0.375, -0.3125}, - {0.375, -0.25, -0.25, 0.4375, 0.375, -0.1875}, - {0.375, -0.25, -0.125, 0.4375, 0.375, -0.0625}, - {0.375, -0.25, 0.1875, 0.4375, 0.375, 0.25}, - {0.375, -0.25, 0.0625, 0.4375, 0.375, 0.125}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, - {0.3125, -0.5, -0.5, 0.5, 0.5, 0.5}, - } - } -}) -minetest.register_node("mydeck:rail_icorners", { - description = "Deck Rail Corner Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_rwood_ol.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - drop = "mydeck:rail_icorner", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, - {0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375}, - {0.25, 0.375, 0.25, 0.5, 0.5, 0.5}, - } - }, - selection_box = { - type = "fixed", - fixed = { - {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, - {0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375}, - {0.25, 0.375, 0.25, 0.5, 0.5, 0.5}, - } - } -}) - - - - - - - - - diff --git a/screenshot.png b/screenshot.png new file mode 100644 index 0000000..c3cd1d2 Binary files /dev/null and b/screenshot.png differ diff --git a/stain.lua b/stain.lua index d0a48bd..f9b5370 100644 --- a/stain.lua +++ b/stain.lua @@ -1,211 +1,2070 @@ + +local USES = 200 + +local color_tab = { +{"black", "Black", "^[colorize:black:200"}, +{"blue", "Blue", "^[colorize:#0B0B3B:150"}, +{"brown", "Brown", "^[colorize:#190B07:140"}, +{"cyan", "Cyan", "^[colorize:cyan:75"}, +{"dark_green", "Dark Green", "^[colorize:#071907:150"}, +{"dark_grey", "Dark Grey", "^[colorize:#1C1C1C:150"}, +{"green", "Green", "^[colorize:green:75"}, +{"grey", "Grey", "^[colorize:#848484:100"}, +{"magenta", "Magenta", "^[colorize:magenta:75"}, +{"orange", "Orange", "^[colorize:orange:75"}, +{"pink", "Pink", "^[colorize:#FE2E9A:75"}, +{"red", "Red", "^[colorize:#B40404:75"}, +{"violet", "Violet", "^[colorize:#08088A:100"}, +{"white", "White", "^[colorize:white:100"}, +{"yellow", "Yellow", "^[colorize:yellow:75"}, +} +for i in ipairs (color_tab) do +local col = color_tab[i][1] +local coldesc = color_tab[i][2] +local alpha = color_tab[i][3] + + + + minetest.register_craftitem("mydeck:stain_brush",{ --- description = "Stain Brush", - inventory_image = "mydeck_brush.png", + description = "Stain Brush", + inventory_image = "mydeck_paint_brush.png", + stack_max = 1, }) -minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing) - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_boards" then - minetest.set_node(pos,{name = "mydeck:deck_boardss", param2=node.param2}) +minetest.register_tool("mydeck:stain_brush_"..col, { + description = coldesc.." Stain Brush", + inventory_image = "mydeck_paint_brush_"..col..".png", + groups = {not_in_creative_inventory=1}, + on_use = function(itemstack, user, pointed_thing) + + if pointed_thing.type ~= "node" then + return + end + local pos = pointed_thing.under + local node = minetest.get_node(pos) + + if node.name == "mydeck:deck_boards" then + minetest.set_node(pos,{name = "mydeck:deck_boardss_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists" then - minetest.set_node(pos,{name = "mydeck:deck_joistss", param2=node.param2}) + if node.name == "mydeck:deck_joists" then + minetest.set_node(pos,{name = "mydeck:deck_joistss_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_side" then - minetest.set_node(pos,{name = "mydeck:deck_joists_sides", param2=node.param2}) + if node.name == "mydeck:deck_joists_side" then + minetest.set_node(pos,{name = "mydeck:deck_joists_sides_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_end" then - minetest.set_node(pos,{name = "mydeck:deck_joists_ends", param2=node.param2}) + if node.name == "mydeck:deck_joists_end" then + minetest.set_node(pos,{name = "mydeck:deck_joists_ends_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_side_end" then - minetest.set_node(pos,{name = "mydeck:deck_joists_side_ends", param2=node.param2}) + if node.name == "mydeck:deck_joists_side_end" then + minetest.set_node(pos,{name = "mydeck:deck_joists_side_ends_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_endr" then - minetest.set_node(pos,{name = "mydeck:deck_joists_endrs", param2=node.param2}) + if node.name == "mydeck:deck_joists_endr" then + minetest.set_node(pos,{name = "mydeck:deck_joists_endrs_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_side_endr" then - minetest.set_node(pos,{name = "mydeck:deck_joists_side_endrs", param2=node.param2}) + if node.name == "mydeck:deck_joists_side_endr" then + minetest.set_node(pos,{name = "mydeck:deck_joists_side_endrs_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:rail" then - minetest.set_node(pos,{name = "mydeck:rails", param2=node.param2}) + if node.name == "mydeck:rail" then + minetest.set_node(pos,{name = "mydeck:rails_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:rail_corner" then - minetest.set_node(pos,{name = "mydeck:rail_corners", param2=node.param2}) + if node.name == "mydeck:rail_corner" then + minetest.set_node(pos,{name = "mydeck:rail_corners_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:rail_icorner" then - minetest.set_node(pos,{name = "mydeck:rail_icorners", param2=node.param2}) + if node.name == "mydeck:rail_icorner" then + minetest.set_node(pos,{name = "mydeck:rail_icorners_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:beam" then - minetest.set_node(pos,{name = "mydeck:beams", param2=node.param2}) + if node.name == "mydeck:beam" then + minetest.set_node(pos,{name = "mydeck:beams_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:beam_wbracket" then - minetest.set_node(pos,{name = "mydeck:beam_wbrackets", param2=node.param2}) + if node.name == "mydeck:beam_wbracket" then + minetest.set_node(pos,{name = "mydeck:beam_wbrackets_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_beam" then - minetest.set_node(pos,{name = "mydeck:joists_beams", param2=node.param2}) + if node.name == "mydeck:joists_beam" then + minetest.set_node(pos,{name = "mydeck:joists_beams_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_beam_wbracket" then - minetest.set_node(pos,{name = "mydeck:joists_beam_wbrackets", param2=node.param2}) + if node.name == "mydeck:joists_beam_wbracket" then + minetest.set_node(pos,{name = "mydeck:joists_beam_wbrackets_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_side_beam" then - minetest.set_node(pos,{name = "mydeck:joists_side_beams", param2=node.param2}) + if node.name == "mydeck:joists_side_beam" then + minetest.set_node(pos,{name = "mydeck:joists_side_beams_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_side_beam_wbracket" then - minetest.set_node(pos,{name = "mydeck:joists_side_beam_wbrackets", param2=node.param2}) + if node.name == "mydeck:joists_side_beam_wbracket" then + minetest.set_node(pos,{name = "mydeck:joists_side_beam_wbrackets_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_beam" then - minetest.set_node(pos,{name = "mydeck:deck_joists_beams", param2=node.param2}) + if node.name == "mydeck:deck_joists_beam" then + minetest.set_node(pos,{name = "mydeck:deck_joists_beams_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_beam_wbracket" then - minetest.set_node(pos,{name = "mydeck:deck_joists_beam_wbrackets", param2=node.param2}) + if node.name == "mydeck:deck_joists_beam_wbracket" then + minetest.set_node(pos,{name = "mydeck:deck_joists_beam_wbrackets_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_side_beam" then - minetest.set_node(pos,{name = "mydeck:deck_joists_side_beams", param2=node.param2}) + if node.name == "mydeck:deck_joists_side_beam" then + minetest.set_node(pos,{name = "mydeck:deck_joists_side_beams_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_joists_side_beam_wbracket" then - minetest.set_node(pos,{name = "mydeck:deck_joists_side_beam_wbrackets", param2=node.param2}) + if node.name == "mydeck:deck_joists_side_beam_wbracket" then + minetest.set_node(pos,{name = "mydeck:deck_joists_side_beam_wbrackets_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists" then - minetest.set_node(pos,{name = "mydeck:joistss", param2=node.param2}) + if node.name == "mydeck:joists" then + minetest.set_node(pos,{name = "mydeck:joistss_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_side" then - minetest.set_node(pos,{name = "mydeck:joists_sides", param2=node.param2}) + if node.name == "mydeck:joists_side" then + minetest.set_node(pos,{name = "mydeck:joists_sides_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_end" then - minetest.set_node(pos,{name = "mydeck:joists_ends", param2=node.param2}) + if node.name == "mydeck:joists_end" then + minetest.set_node(pos,{name = "mydeck:joists_ends_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_side_end" then - minetest.set_node(pos,{name = "mydeck:joists_side_ends", param2=node.param2}) + if node.name == "mydeck:joists_side_end" then + minetest.set_node(pos,{name = "mydeck:joists_side_ends_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_endr" then - minetest.set_node(pos,{name = "mydeck:joists_endrs", param2=node.param2}) + if node.name == "mydeck:joists_endr" then + minetest.set_node(pos,{name = "mydeck:joists_endrs_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:joists_side_endr" then - minetest.set_node(pos,{name = "mydeck:joists_side_endrs", param2=node.param2}) + if node.name == "mydeck:joists_side_endr" then + minetest.set_node(pos,{name = "mydeck:joists_side_endrs_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:pile" then - minetest.set_node(pos,{name = "mydeck:piles", param2=node.param2}) + if node.name == "mydeck:pile" then + minetest.set_node(pos,{name = "mydeck:piles_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:pile_wpost" then - minetest.set_node(pos,{name = "mydeck:pile_wposts", param2=node.param2}) + if node.name == "mydeck:pile_wpost" then + minetest.set_node(pos,{name = "mydeck:pile_wposts_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:post" then - minetest.set_node(pos,{name = "mydeck:posts", param2=node.param2}) + if node.name == "mydeck:post" then + minetest.set_node(pos,{name = "mydeck:posts_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs" then - minetest.set_node(pos,{name = "mydeck:stairss", param2=node.param2}) + if node.name == "mydeck:stairs" then + minetest.set_node(pos,{name = "mydeck:stairss_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairsb" then - minetest.set_node(pos,{name = "mydeck:stairsbs", param2=node.param2}) + if node.name == "mydeck:stairsb" then + minetest.set_node(pos,{name = "mydeck:stairsbs_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs_ocorner" then - minetest.set_node(pos,{name = "mydeck:stairs_ocorners", param2=node.param2}) + if node.name == "mydeck:stairs_ocorner" then + minetest.set_node(pos,{name = "mydeck:stairs_ocorners_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs_icorner" then - minetest.set_node(pos,{name = "mydeck:stairs_icorners", param2=node.param2}) + if node.name == "mydeck:stairs_icorner" then + minetest.set_node(pos,{name = "mydeck:stairs_icorners_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs_icorner" then - minetest.set_node(pos,{name = "mydeck:stairs_icorners", param2=node.param2}) + if node.name == "mydeck:stairs_icorner" then + minetest.set_node(pos,{name = "mydeck:stairs_icorners_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs_railr" then - minetest.set_node(pos,{name = "mydeck:stairs_railrs", param2=node.param2}) + if node.name == "mydeck:stairs_railr" then + minetest.set_node(pos,{name = "mydeck:stairs_railrs_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs_raill" then - minetest.set_node(pos,{name = "mydeck:stairs_raills", param2=node.param2}) + if node.name == "mydeck:stairs_raill" then + minetest.set_node(pos,{name = "mydeck:stairs_raills_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:lattice" then - minetest.set_node(pos,{name = "mydeck:lattices", param2=node.param2}) + if node.name == "mydeck:lattice" then + minetest.set_node(pos,{name = "mydeck:lattices_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs_raill_end" then - minetest.set_node(pos,{name = "mydeck:stairs_raill_ends", param2=node.param2}) + if node.name == "mydeck:stairs_raill_end" then + minetest.set_node(pos,{name = "mydeck:stairs_raill_ends_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:stairs_railr_end" then - minetest.set_node(pos,{name = "mydeck:stairs_railr_ends", param2=node.param2}) + if node.name == "mydeck:stairs_railr_end" then + minetest.set_node(pos,{name = "mydeck:stairs_railr_ends_"..col, param2=node.param2}) end - if puncher:get_wielded_item():get_name() == "mydeck:stain_brush" - and node.name == "mydeck:deck_beam" then - minetest.set_node(pos,{name = "mydeck:deck_beams", param2=node.param2}) + if node.name == "mydeck:deck_beam" then + minetest.set_node(pos,{name = "mydeck:deck_beams_"..col, param2=node.param2}) end -end) - + + if node.name == "mydeck:deck_boardss" then + minetest.set_node(pos,{name = "mydeck:deck_boardss_"..col, param2=node.param2}) + end + if not minetest.setting_getbool("creative_mode") then + itemstack:add_wear(65535 / (USES - 1)) + end + return itemstack + +end +}) + +minetest.register_node("mydeck:deck_boardss_"..col, { + description = "Deck Boards Stained", + tiles = {"mydeck_hwood.png"..alpha}, + + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:deck_boards", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1,stain=1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.375, 0.2725, 0.5, -0.5, 0.5}, + {-0.5, -0.375, 0.0225, 0.5, -0.5, 0.25}, + {-0.5, -0.375, -0.2275, 0.5, -0.5, 0}, + {-0.5, -0.375, -0.4775, 0.5, -0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.375, -0.5, 0.5, -0.5, 0.5}, + } + }, + + after_place_node = function(pos, placer, itemstack, pointed_thing) + + local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name + local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + + + if node == "mydeck:joists" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if node == "mydeck:joists_side" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_side" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if node == "mydeck:joists_beam" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_beam" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if node == "mydeck:joists_side_beam" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_side_beam" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if node == "mydeck:joists_end" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_end" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_end", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if node == "mydeck:joists_side_end" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_side_end" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_end", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if node == "mydeck:joists_endr" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_endr" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_endr", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if node == "mydeck:joists_side_endr" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_side_endr" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_endr", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if node == "mydeck:joists_beam_wbracket" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_beam_wbracket" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if node == "mydeck:joists_side_beam_wbracket" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:joists_side_beam_wbracket" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + end, + +}) +minetest.register_node("mydeck:deck_beams_"..col, { + description = "Deck on Beam Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.125, -0.5, -0.5, 0.125, -0.125, 0.5}, + {-0.5, 0, 0.2725, 0.5, -0.125, 0.5}, + {-0.5, 0, 0.0225, 0.5, -0.125, 0.25}, + {-0.5, 0, -0.2275, 0.5, -0.125, 0}, + {-0.5, 0, -0.4775, 0.5, -0.125, -0.25}, + } + }, +}) + +minetest.register_node("mydeck:deck_joistss_"..col, { + description = "Deck Joists Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists"}, + }, + } + }, + + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:deck_joists_sides_"..col, { + description = "Deck Joists Side Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists_side"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + } + }, +}) + + +minetest.register_node("mydeck:deck_joists_ends_"..col, { + description = "Deck Joists with End Plate Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists_end"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, 0.375, 0.5, 0.375, 0.5}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:deck_joists_side_ends_"..col, { + description = "Deck Joists Side with End Plate Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists_side_end"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:deck_joists_endrs_"..col, { + description = "Deck Joists Side with Wall Plate stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists_endr"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:deck_joists_side_endrs_"..col, { + description = "Deck Joists Side with Wall Plate Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists_side_endr"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, 0.5, 0.5, 0.375, 0.375}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + } + }, +}) +minetest.register_node("mydeck:beams_"..col, { + description = "Beam", + tiles = { + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:beam", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.125, -0.5, -0.5, 0.125, 0, 0.5}, + } + }, + after_place_node = function(pos, placer, itemstack, pointed_thing) + + local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + + + if node == "mydeck:post" then + minetest.set_node(pos,{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + end +}) +minetest.register_node("mydeck:beam_wbrackets_"..col, { + description = "Beam with Bracket", + tiles = { + "mydeck_hwood.png"..alpha.."^[transformR90^mydeck_beambt_ol.png", + "mydeck_hwood.png"..alpha.."^[transformR90^mydeck_beambt_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:beam", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.125, -0.5, -0.5, 0.125, 0, 0.5}, + {0.125, -0.5, -0.125, 0.1875, -0.1875, 0.125}, + {-0.1875, -0.5, -0.125, -0.125, -0.1875, 0.125}, + } + } +}) + +minetest.register_node("mydeck:joists_beams_"..col, { + description = "Deck Joists with Beam", + tiles = { + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:joists"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) + +minetest.register_node("mydeck:joists_beam_wbrackets_"..col, { + description = "Deck Joists with Beam and Bracket", + tiles = { + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:joists"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + + {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, + {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) +minetest.register_node("mydeck:joists_side_beams_"..col, { + description = "Deck Joists side with Beam", + tiles = { + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:joists_side"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) +minetest.register_node("mydeck:joists_side_beam_wbrackets_"..col, { + description = "Deck Joists side with Beam and Bracket", + tiles = { + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:joists_side"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, + {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) + +minetest.register_node("mydeck:deck_joists_beams_"..col, { + description = "Deck Joists with Beam", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 3, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) + +minetest.register_node("mydeck:deck_joists_beam_wbrackets_"..col, { + description = "Deck Joists with Beam with Bracket", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 3, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, + {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) + +minetest.register_node("mydeck:deck_joists_side_beams_"..col, { + description = "Deck Joists side with Beam", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 3, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists_side"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) +minetest.register_node("mydeck:deck_joists_side_beam_wbrackets_"..col, { + description = "Deck Joists side with Beam with Bracket", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambf_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_beambs_ol.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 3, + items = { + { + items = {"mydeck:deck_boards"}, + }, + { + items = {"mydeck:joists_side"}, + }, + { + items = {"mydeck:beam"}, + }, + } + }, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + {-0.5, 0.375, 0.2725, 0.5, 0.5, 0.5}, + {-0.5, 0.375, 0.0225, 0.5, 0.5, 0.25}, + {-0.5, 0.375, -0.2275, 0.5, 0.5, 0}, + {-0.5, 0.375, -0.4775, 0.5, 0.5, -0.25}, + {-0.125, -0.5, 0.125, 0.125, -0.1875, 0.1875}, + {-0.125, -0.5, -0.1875, 0.125, -0.1875, -0.125}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0.5}, + {-0.5, -0.5, -0.125, 0.5, 0, 0.125}, + } + }, +}) +minetest.register_node("mydeck:joistss_"..col, { + description = "Deck Joists", + tiles = { + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:joists", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, + after_place_node = function(pos, placer, itemstack, pointed_thing) + + local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name + local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + + + if node == "mydeck:beam" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:beam" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if node == "mydeck:beam_wbracket" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:beam_wbracket" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + end +}) + +minetest.register_node("mydeck:joists_sides_"..col, { + description = "Deck Joists Side", + tiles = { + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:joists_side", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, + after_place_node = function(pos, placer, itemstack, pointed_thing) + + local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name + local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + + + if node == "mydeck:beam_wbracket" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:beam_wbracket" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if node == "mydeck:beam" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:beam" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:joists_side_beam", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + end +}) + + +minetest.register_node("mydeck:joists_ends_"..col, { + description = "Deck Joists with End Plate", + tiles = { + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:joists_end", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, 0.375, 0.5, 0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:joists_side_ends_"..col, { + description = "Deck Joists Side with End Plate", + tiles = { + "mydeck_hwood.png^mydeck_joistend_ol.png"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:joists_side_end", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:joists_endrs_"..col, { + description = "Deck Joists Side with Wall Plate", + tiles = { + "mydeck_hwood.png^mydeck_joistend_ol.png"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:joists_endr", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, -0.5, 0.5, 0.375, -0.375}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:joists_side_endrs_"..col, { + description = "Deck Joists Side with Wall Plate", + tiles = { + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR180"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR90"..alpha, + "mydeck_hwood.png^mydeck_joistend_ol.png^[transformR270"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:joists_side_endr", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, -0.375, 0.375, 0.5}, + {0, 0, -0.5, 0.125, 0.375, 0.5}, + {-0.5, 0, 0.5, 0.5, 0.375, 0.375}, + {0.375, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.375, 0.5}, + } + }, +}) +minetest.register_node("mydeck:lattices_"..col, { + description = "Lattice", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:lattice", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.4375, -0.5, 0.4375, -0.375, 0.5, 0.5}, -- NodeBox1 + {-0.3125, -0.5, 0.4375, -0.25, 0.5, 0.5}, -- NodeBox2 + {-0.1875, -0.5, 0.4375, -0.125, 0.5, 0.5}, -- NodeBox3 + {-0.0625, -0.5, 0.4375, 0, 0.5, 0.5}, -- NodeBox4 + {0.0625, -0.5, 0.4375, 0.125, 0.5, 0.5}, -- NodeBox5 + {0.1875, -0.5, 0.4375, 0.25, 0.5, 0.5}, -- NodeBox6 + {0.3125, -0.5, 0.4375, 0.375, 0.5, 0.5}, -- NodeBox7 + {0.4375, -0.5, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox8 + + {-0.5, -0.5, 0.375, 0.5, -0.4375, 0.4375}, -- NodeBox9 + {-0.5, -0.375, 0.375, 0.5, -0.3125, 0.4375}, -- NodeBox10 + {-0.5, -0.25, 0.375, 0.5, -0.1875, 0.4375}, -- NodeBox11 + {-0.5, -0.125, 0.375, 0.5, -0.0625, 0.4375}, + {-0.5, 0, 0.375, 0.5, 0.0625, 0.4375}, + {-0.5, 0.125, 0.375, 0.5, 0.1875, 0.4375}, + {-0.5, 0.25, 0.375, 0.5, 0.3125, 0.4375}, + {-0.5, 0.375, 0.375, 0.5, 0.4375, 0.4375}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.5, 0.5, 0.5, 0.375}, + } + }, +}) +minetest.register_node("mydeck:pile_wposts_"..col, { + description = "Pile", + tiles = { + "mydeck_hwood.png"..alpha.."^mydeck_piletp_ol.png^[transformR90", + "mydeck_concrete.png", + "mydeck_hwood.png"..alpha.."^mydeck_piles_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_piles_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_pilef_ol.png", + "mydeck_hwood.png"..alpha.."^mydeck_pilef_ol.png", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = { + max_items = 2, + items = { + { + items = {"mydeck:pile"}, + }, + { + items = {"mydeck:post"}, + }, + } + }, + + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, + {-0.4375, -0.5, -0.4375, 0.4375, -0.3125, 0.4375}, + {-0.375, -0.5, -0.375, 0.375, -0.25, 0.375}, + {-0.25, -0.25, -0.1875, -0.1875, 0.25, 0.1875}, + {-0.1875, -0.5, -0.1875, 0.1875, -0.1875, 0.1875}, + {0.1875, -0.5, -0.1875, 0.25, 0.25, 0.1875}, + {-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875}, + } + } +}) +minetest.register_node("mydeck:posts_"..col, { + description = "Post", + tiles = { + "mydeck_hwood.png"..alpha.."^[transformR90", + "mydeck_hwood.png"..alpha.."^[transformR90", + "mydeck_hwood.png"..alpha.."^[transformR90", + "mydeck_hwood.png"..alpha.."^[transformR90", + "mydeck_hwood.png"..alpha.."^[transformR90", + "mydeck_hwood.png"..alpha.."^[transformR90", + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:post", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.1875, -0.5, -0.1875, 0.1875, 0.5, 0.1875}, + } + }, + after_place_node = function(pos, placer, itemstack, pointed_thing) + + local deck = minetest.get_node({x=pos.x, y=pos.y, z=pos.z}).name + local node = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + local nodeu = minetest.get_node({x=pos.x, y=pos.y+1, z=pos.z}).name + + + if node == "mydeck:pile" then + minetest.set_node(pos,{name = "air"}) + end + if node == "mydeck:pile" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z},{name = "mydeck:pile_wpost", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + + if nodeu == "mydeck:beam" then + minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if nodeu == "mydeck:joists_beam" then + minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if nodeu == "mydeck:joists_side_beam" then + minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if nodeu == "mydeck:deck_joists_beam" then + minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + if nodeu == "mydeck:deck_joists_side_beam" then + minetest.set_node({x=pos.x, y=pos.y+1, z=pos.z},{name = "mydeck:deck_joists_side_beam_wbracket", param2=minetest.dir_to_facedir(placer:get_look_dir())}) + end + end +}) +minetest.register_node("mydeck:rails_"..col, { + description = "Deck Rail Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:rail", + sunlight_propagates = true, + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5}, + {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, + {0.4375, -0.5, 0.3125, 0.5, 0.5, 0.5}, + {-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5}, + {-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375}, + {-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375}, + {0.3125, -0.25, 0.375, 0.375, 0.375, 0.4375}, + {0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375}, + {0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375}, + {-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, + } + } +}) +minetest.register_node("mydeck:rail_corners_"..col, { + description = "Deck Rail Corner Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + drop = "mydeck:rail_corner", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.3125, -0.4375, 0.375, 0.5}, + {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5}, + {0.3125, -0.5, 0.3125, 0.5, 0.5, 0.5}, + {-0.5, -0.375, 0.3125, 0.5, -0.25, 0.5}, + {-0.375, -0.25, 0.375, -0.3125, 0.375, 0.4375}, + {-0.25, -0.25, 0.375, -0.1875, 0.375, 0.4375}, + {0.1875, -0.25, 0.375, 0.25, 0.375, 0.4375}, + {0.0625, -0.25, 0.375, 0.125, 0.375, 0.4375}, + {-0.125, -0.25, 0.375, -0.0625, 0.375, 0.4375}, + {0.3125, -0.5, -0.5, 0.5, 0.5, -0.4375}, + {0.3125, -0.375, -0.5, 0.5, -0.25, 0.5}, + {0.25, 0.375, -0.5, 0.5, 0.5, 0.5}, + {0.375, -0.25, -0.375, 0.4375, 0.375, -0.3125}, + {0.375, -0.25, -0.25, 0.4375, 0.375, -0.1875}, + {0.375, -0.25, -0.125, 0.4375, 0.375, -0.0625}, + {0.375, -0.25, 0.1875, 0.4375, 0.375, 0.25}, + {0.375, -0.25, 0.0625, 0.4375, 0.375, 0.125}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0.3125, 0.5, 0.5, 0.5}, + {0.3125, -0.5, -0.5, 0.5, 0.5, 0.5}, + } + } +}) +minetest.register_node("mydeck:rail_icorners_"..col, { + description = "Deck Rail Corner Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + "mydeck_hwood.png^mydeck_rwood_ol.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + drop = "mydeck:rail_icorner", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, + {0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375}, + {0.25, 0.375, 0.25, 0.5, 0.5, 0.5}, + } + }, + selection_box = { + type = "fixed", + fixed = { + {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, + {0.4375, -0.5, 0.3125, 0.5, 0.375, 0.4375}, + {0.25, 0.375, 0.25, 0.5, 0.5, 0.5}, + } + } +}) +minetest.register_node("mydeck:stairss_"..col, { + description = "Stairs", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:stairs", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.25, -0.5, 0.5, -0.125, -0.125}, + {-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875}, + {-0.5, 0.375, 0.125, 0.5, 0.5, 0.5}, + + {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125}, + {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875}, + {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625}, + {-0.375, -0.375, -0.125, -0.25, -0.25, 0}, + {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625}, + {-0.375, -0.25, 0, -0.25, 0, 0.125}, + {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5}, + {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25}, + {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125}, + {-0.375, 0, 0.3125, -0.25, 0.375, 0.375}, + {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375}, + + {0.375, -0.5, -0.4375, 0.25, -0.25, -0.125}, + {0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875}, + {0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625}, + {0.375, -0.375, -0.125, 0.25, -0.25, 0}, + {0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625}, + {0.375, -0.25, 0, 0.25, 0, 0.125}, + {0.375, 0.125, 0.1875, 0.25, 0.375, 0.5}, + {0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25}, + {0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125}, + {0.375, 0, 0.3125, 0.25, 0.375, 0.375}, + {0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375}, + + + + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875}, + {-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125}, + {-0.5, -0.5, 0.125, 0.5, 0.5, 0.5}, + } + }, + after_place_node = function(pos, placer, itemstack, pointed_thing) + + local nodedown = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + + +-- if nodedown == "air" then + minetest.set_node(pos,{name = "mydeck:stairsbs", param2=minetest.dir_to_facedir(placer:get_look_dir())}) +-- end + end +}) +minetest.register_abm({ + nodenames = {"mydeck:stairss"}, + interval = 1, + chance = 1, + action = function(pos, node) + local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + + + if nodeu == "air" then + minetest.set_node(pos,{name = "mydeck:stairsbs", param2 = node.param2}) + end + end, +}) +minetest.register_abm({ + nodenames = {"mydeck:stairsbs"}, + interval = 1, + chance = 1, + action = function(pos, node) + local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name + + + if nodeu ~= "air" then + minetest.set_node(pos,{name = "mydeck:stairss", param2 = node.param2}) + end + end, +}) +minetest.register_node("mydeck:stairsbs_"..col, { + description = "Stairs", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:stairs", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.25, -0.5, 0.5, -0.125, -0.125}, + {-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875}, + {-0.5, 0.375, 0.125, 0.5, 0.5, 0.5}, + + {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125}, + {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875}, + {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625}, + {-0.375, -0.375, -0.125, -0.25, -0.25, 0}, + {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625}, + {-0.375, -0.25, 0, -0.25, 0, 0.125}, + {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5}, + {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25}, + {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125}, + {-0.375, 0, 0.3125, -0.25, 0.375, 0.375}, + {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375}, + + {0.375, -0.5, -0.4375, 0.25, -0.25, -0.125}, + {0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875}, + {0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625}, + {0.375, -0.375, -0.125, 0.25, -0.25, 0}, + {0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625}, + {0.375, -0.25, 0, 0.25, 0, 0.125}, + {0.375, 0.125, 0.1875, 0.25, 0.375, 0.5}, + {0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25}, + {0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125}, + {0.375, 0, 0.3125, 0.25, 0.375, 0.375}, + {0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375}, + + + {-0.375, -0.5625, -0.4375, -0.25, -0.5, -0.1875 }, + {-0.375, -0.625, -0.5, -0.25, -0.5625, -0.25 }, + {-0.375, -0.6875, -0.5, -0.25, -0.5625, -0.3125 }, + {-0.375, -0.75, -0.5, -0.25, -0.5625, -0.375 }, + {-0.375, -0.8125, -0.5, -0.25, -0.5625, -0.4375 }, + + {0.375, -0.5625, -0.4375, 0.25, -0.5, -0.1875 }, + {0.375, -0.625, -0.5, 0.25, -0.5625, -0.25 }, + {0.375, -0.6875, -0.5, 0.25, -0.5625, -0.3125 }, + {0.375, -0.75, -0.5, 0.25, -0.5625, -0.375 }, + {0.375, -0.8125, -0.5, 0.25, -0.5625, -0.4375 }, + {-0.5, -0.625, -0.5, 0.5, -0.5, -0.4375}, + + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875}, + {-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125}, + {-0.5, -0.5, 0.125, 0.5, 0.5, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:stairs_ocorners_"..col, { + description = "Stairs Outside Corner", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:stairs_ocorner", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.25, -0.5, 0.5, -0.125, -0.125 }, + {-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875}, + {-0.5, 0.375, 0.125, -0.125, 0.5, 0.5 }, + + {0.125, -0.25, -0.5, 0.5, -0.125, 0.5}, + {-0.1875, 0.0625, -0.1875, 0.1875, 0.1875, 0.5}, + + {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 }, + {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 }, + {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 }, + {-0.375, -0.375, -0.125, -0.25, -0.25, 0 }, + {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 }, + {-0.375, -0.25, 0, -0.25, 0, 0.125 }, + {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 }, + {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 }, + {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 }, + {-0.375, 0, 0.3125, -0.25, 0.375, 0.375 }, + {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 }, + + { 0.4375, -0.5, 0.375, 0.125, -0.25, 0.25 }, + { 0.125, -0.1875, 0.375, - 0.1875, 0.0625, 0.25 }, + { 0.125, -0.4375, 0.375, 0.0625, -0.1875, 0.25 }, + { 0.125, -0.375, 0.375, 0, -0.25, 0.25 }, + { 0.0625, -0.3125, 0.375, -0.0625, -0.1875, 0.25 }, + { 0 , -0.25, 0.375, -0.125, 0, 0.25 }, + {-0.1875, 0.125, 0.375, -0.5, 0.375, 0.25 }, + {-0.1875, -0.125, 0.375, -0.25, 0.1875, 0.25 }, + {-0.25, -0.0625, 0.375, -0.3125, 0.25, 0.25 }, + {-0.3125, 0, 0.375, -0.375, 0.375, 0.25 }, + {-0.3125, 0.0625, 0.375, -0.4375, 0.3125, 0.25 }, + + {0.1875, -0.5, -0.1875, 0.4375, -0.125, -0.4375}, + + + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}, + {-0.5, -0.5, -0.1875, 0.1875, 0.1875, 0.5}, + {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, + } + }, +}) + +minetest.register_node("mydeck:stairs_icorners_"..col, { + description = "Stairs Inside Corner", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:stairs_icorner", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.25, -0.5, -0.125, -0.125, -0.125 }, + {-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875}, + {-0.5, 0.375, 0.125, 0.5, 0.5, 0.5}, + + {-0.1875, 0.0625, -0.5, 0.1875, 0.1875, -0.1875}, + {0.125, 0.375, -0.5, 0.5, 0.5, 0.5}, + + {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 }, + {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 }, + {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 }, + {-0.375, -0.375, -0.125, -0.25, -0.25, 0 }, + {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 }, + {-0.375, -0.25, 0, -0.25, 0, 0.125 }, + {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 }, + {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 }, + {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 }, + {-0.375, 0, 0.3125, -0.25, 0.375, 0.375 }, + {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 }, + + {-0.4375, -0.5, -0.375, -0.125, -0.25, -0.25 }, + {-0.125, -0.1875, -0.375, 0.1875, 0.0625, -0.25 }, + {-0.125, -0.4375, -0.375, -0.0625, -0.1875, -0.25 }, + {-0.125, -0.375, -0.375, 0, -0.25, -0.25 }, + {-0.0625, -0.3125, -0.375, 0.0625, -0.1875, -0.25 }, + { 0 , -0.25, -0.375, 0.125, 0, -0.25 }, + { 0.1875, 0.125, -0.375, 0.5, 0.375, -0.25 }, + { 0.1875, -0.125, -0.375, 0.25, 0.1875, -0.25 }, + { 0.25, -0.0625, -0.375, 0.3125, 0.25, -0.25 }, + { 0.3125, 0, -0.375, 0.375, 0.375, -0.25 }, + { 0.3125, 0.0625, -0.375, 0.4375, 0.3125, -0.25 }, + + + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, -0.1875, -0.125, -0.1875 }, + {-0.5, -0.5, -0.1875, 0.125, 0.1875, 0.125}, + {-0.5, -0.5, 0.125, 0.5, 0.5, 0.5}, + + {-0.1875, -0.5, -0.5, 0.125, 0.1875, 0.125}, + {0.125, -0.5, -0.5, 0.5, 0.5, 0.5}, + } + }, +}) + + +minetest.register_node("mydeck:stairs_railrs_"..col, { + description = "Right Stairs Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:stairs_railr", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, -- NodeBox1 + {0.3125, -1.5, -0.4375, 0.5, -0.5, -0.5}, -- NodeBox1 + {0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox2 + {0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox3 + {0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375}, -- NodeBox4 + {0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125}, -- NodeBox5 + {0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25}, -- NodeBox6 + {0.3125, 0.0625, 0.125, 0.5, 0.1875, 0.1875}, -- NodeBox7 + {0.3125, 0, 0.0625, 0.5, 0.125, 0.125}, -- NodeBox8 + {0.3125, -0.0625, 0, 0.5, 0.0625, 0.0625}, -- NodeBox9 + {0.3125, -0.125, -0.0625, 0.5, 0, 0}, -- NodeBox10 + {0.3125, -0.1875, -0.125, 0.5, -0.0625, -0.0625}, -- NodeBox11 + {0.3125, -0.25, -0.1875, 0.5, -0.125, -0.125}, -- NodeBox12 + {0.3125, -0.3125, -0.25, 0.5, -0.1875, -0.1875}, -- NodeBox13 + {0.3125, -0.375, -0.3125, 0.5, -0.25, -0.25}, -- NodeBox14 + {0.3125, -0.4375, -0.375, 0.5, -0.3125, -0.3125}, -- NodeBox15 + {0.3125, -0.5, -0.4375, 0.5, -0.375, -0.375}, -- NodeBox16 + {0.3125, -0.5, -0.5, 0.5, -0.4375, -0.4375}, -- NodeBox17 + + + } + }, + selection_box = { + type = "fixed", + fixed = { + {0.3125, -0.5, -0.5, 0.5, 0.5, 0.5 }, + } + }, +}) +minetest.register_node("mydeck:stairs_raills_"..col, { + description = "Left Stairs Rail Stained", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + drop = "mydeck:stairs_raill", + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5}, -- NodeBox1 + {-0.3125, -1.5, -0.4375, -0.5, -0.5, -0.5}, -- NodeBox1 + {-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5}, -- NodeBox2 + {-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375}, -- NodeBox3 + {-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375}, -- NodeBox4 + {-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125}, -- NodeBox5 + {-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25}, -- NodeBox6 + {-0.3125, 0.0625, 0.125, -0.5, 0.1875, 0.1875}, -- NodeBox7 + {-0.3125, 0, 0.0625, -0.5, 0.125, 0.125}, -- NodeBox8 + {-0.3125, -0.0625, 0, -0.5, 0.0625, 0.0625}, -- NodeBox9 + {-0.3125, -0.125, -0.0625, -0.5, 0, 0}, -- NodeBox10 + {-0.3125, -0.1875, -0.125, -0.5, -0.0625, -0.0625}, -- NodeBox11 + {-0.3125, -0.25, -0.1875, -0.5, -0.125, -0.125}, -- NodeBox12 + {-0.3125, -0.3125, -0.25, -0.5, -0.1875, -0.1875}, -- NodeBox13 + {-0.3125, -0.375, -0.3125, -0.5, -0.25, -0.25}, -- NodeBox14 + {-0.3125, -0.4375, -0.375, -0.5, -0.3125, -0.3125}, -- NodeBox15 + {-0.3125, -0.5, -0.4375, -0.5, -0.375, -0.375}, -- NodeBox16 + {-0.3125, -0.5, -0.5, -0.5, -0.4375, -0.4375}, -- NodeBox17 + + + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, -0.5, -0.5, 0.5, 0.5 }, + } + }, +}) + + + +minetest.register_node("mydeck:stairs_railr_ends_"..col, { + description = "Stairs", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + drop = "mydeck:stairs_railr", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, + {0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5}, + {0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375}, + {0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375}, + {0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125}, + {0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25}, + + + } + }, + selection_box = { + type = "fixed", + fixed = { + {0.3125, -0.5, 0.1875, 0.5, 0.5, 0.5 }, + } + }, +}) +minetest.register_node("mydeck:stairs_raill_ends_"..col, { + description = "Stairs", + tiles = { + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + "mydeck_hwood.png"..alpha, + }, + drawtype = "nodebox", + paramtype = "light", + paramtype2 = "facedir", + drop = "mydeck:stairs_raill", + sunlight_propagates = true, + sounds = default.node_sound_wood_defaults(), + groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, + node_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5}, + {-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5}, + {-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375}, + {-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375}, + {-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125}, + {-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25}, + + + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.3125, -0.5, 0.1875, -0.5, 0.5, 0.5 }, + } + }, +}) + + + +end diff --git a/stairs.lua b/stairs.lua index 2356638..ecd7774 100644 --- a/stairs.lua +++ b/stairs.lua @@ -162,7 +162,7 @@ minetest.register_node("mydeck:stairsb", { }) minetest.register_node("mydeck:stairs_ocorner", { - description = "Stairs", + description = "Stairs Outside Corner", tiles = { "mydeck_hwood.png", "mydeck_hwood.png", @@ -227,7 +227,7 @@ minetest.register_node("mydeck:stairs_ocorner", { }) minetest.register_node("mydeck:stairs_icorner", { - description = "Stairs", + description = "Stairs Inside Corner", tiles = { "mydeck_hwood.png", "mydeck_hwood.png", @@ -293,7 +293,7 @@ minetest.register_node("mydeck:stairs_icorner", { }) minetest.register_node("mydeck:stairs_railr", { - description = "Stairs", + description = "Right Hand Rail", tiles = { "mydeck_hwood.png", "mydeck_hwood.png", @@ -359,7 +359,7 @@ minetest.register_node("mydeck:stairs_railr", { minetest.register_node("mydeck:stairs_raill", { - description = "Stairs", + description = "Left Hand Rail", tiles = { "mydeck_hwood.png", "mydeck_hwood.png", diff --git a/stairs_stained.lua b/stairs_stained.lua deleted file mode 100644 index c936271..0000000 --- a/stairs_stained.lua +++ /dev/null @@ -1,485 +0,0 @@ -minetest.register_node("mydeck:stairss", { - description = "Stairs", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:stairs", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.25, -0.5, 0.5, -0.125, -0.125}, - {-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875}, - {-0.5, 0.375, 0.125, 0.5, 0.5, 0.5}, - - {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125}, - {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875}, - {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625}, - {-0.375, -0.375, -0.125, -0.25, -0.25, 0}, - {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625}, - {-0.375, -0.25, 0, -0.25, 0, 0.125}, - {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5}, - {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25}, - {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125}, - {-0.375, 0, 0.3125, -0.25, 0.375, 0.375}, - {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375}, - - {0.375, -0.5, -0.4375, 0.25, -0.25, -0.125}, - {0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875}, - {0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625}, - {0.375, -0.375, -0.125, 0.25, -0.25, 0}, - {0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625}, - {0.375, -0.25, 0, 0.25, 0, 0.125}, - {0.375, 0.125, 0.1875, 0.25, 0.375, 0.5}, - {0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25}, - {0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125}, - {0.375, 0, 0.3125, 0.25, 0.375, 0.375}, - {0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375}, - - - - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875}, - {-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125}, - {-0.5, -0.5, 0.125, 0.5, 0.5, 0.5}, - } - }, - after_place_node = function(pos, placer, itemstack, pointed_thing) - - local nodedown = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - --- if nodedown == "air" then - minetest.set_node(pos,{name = "mydeck:stairsbs", param2=minetest.dir_to_facedir(placer:get_look_dir())}) --- end - end -}) -minetest.register_abm({ - nodenames = {"mydeck:stairss"}, - interval = 1, - chance = 1, - action = function(pos, node) - local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - - if nodeu == "air" then - minetest.set_node(pos,{name = "mydeck:stairsbs", param2 = node.param2}) - end - end, -}) -minetest.register_abm({ - nodenames = {"mydeck:stairsbs"}, - interval = 1, - chance = 1, - action = function(pos, node) - local nodeu = minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name - - - if nodeu ~= "air" then - minetest.set_node(pos,{name = "mydeck:stairss", param2 = node.param2}) - end - end, -}) -minetest.register_node("mydeck:stairsbs", { - description = "Stairs", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:stairs", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.25, -0.5, 0.5, -0.125, -0.125}, - {-0.5, 0.0625, -0.1875, 0.5, 0.1875, 0.1875}, - {-0.5, 0.375, 0.125, 0.5, 0.5, 0.5}, - - {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125}, - {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875}, - {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625}, - {-0.375, -0.375, -0.125, -0.25, -0.25, 0}, - {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625}, - {-0.375, -0.25, 0, -0.25, 0, 0.125}, - {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5}, - {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25}, - {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125}, - {-0.375, 0, 0.3125, -0.25, 0.375, 0.375}, - {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375}, - - {0.375, -0.5, -0.4375, 0.25, -0.25, -0.125}, - {0.375, -0.1875, -0.125, 0.25, 0.0625, 0.1875}, - {0.375, -0.4375, -0.125, 0.25, -0.1875, -0.0625}, - {0.375, -0.375, -0.125, 0.25, -0.25, 0}, - {0.375, -0.3125, -0.0625, 0.25, -0.1875, 0.0625}, - {0.375, -0.25, 0, 0.25, 0, 0.125}, - {0.375, 0.125, 0.1875, 0.25, 0.375, 0.5}, - {0.375, -0.125, 0.1875, 0.25, 0.1875, 0.25}, - {0.375, -0.0625, 0.25, 0.25, 0.25, 0.3125}, - {0.375, 0, 0.3125, 0.25, 0.375, 0.375}, - {0.375, 0.0625, 0.3125, 0.25, 0.3125, 0.4375}, - - - {-0.375, -0.5625, -0.4375, -0.25, -0.5, -0.1875 }, - {-0.375, -0.625, -0.5, -0.25, -0.5625, -0.25 }, - {-0.375, -0.6875, -0.5, -0.25, -0.5625, -0.3125 }, - {-0.375, -0.75, -0.5, -0.25, -0.5625, -0.375 }, - {-0.375, -0.8125, -0.5, -0.25, -0.5625, -0.4375 }, - - {0.375, -0.5625, -0.4375, 0.25, -0.5, -0.1875 }, - {0.375, -0.625, -0.5, 0.25, -0.5625, -0.25 }, - {0.375, -0.6875, -0.5, 0.25, -0.5625, -0.3125 }, - {0.375, -0.75, -0.5, 0.25, -0.5625, -0.375 }, - {0.375, -0.8125, -0.5, 0.25, -0.5625, -0.4375 }, - {-0.5, -0.625, -0.5, 0.5, -0.5, -0.4375}, - - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.125, -0.1875}, - {-0.5, -0.5, -0.1875, 0.5, 0.1875, 0.125}, - {-0.5, -0.5, 0.125, 0.5, 0.5, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:stairs_ocorners", { - description = "Stairs Outside Corner", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:stairs_ocorner", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.25, -0.5, 0.5, -0.125, -0.125 }, - {-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875}, - {-0.5, 0.375, 0.125, -0.125, 0.5, 0.5 }, - - {0.125, -0.25, -0.5, 0.5, -0.125, 0.5}, - {-0.1875, 0.0625, -0.1875, 0.1875, 0.1875, 0.5}, - - {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 }, - {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 }, - {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 }, - {-0.375, -0.375, -0.125, -0.25, -0.25, 0 }, - {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 }, - {-0.375, -0.25, 0, -0.25, 0, 0.125 }, - {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 }, - {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 }, - {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 }, - {-0.375, 0, 0.3125, -0.25, 0.375, 0.375 }, - {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 }, - - { 0.4375, -0.5, 0.375, 0.125, -0.25, 0.25 }, - { 0.125, -0.1875, 0.375, - 0.1875, 0.0625, 0.25 }, - { 0.125, -0.4375, 0.375, 0.0625, -0.1875, 0.25 }, - { 0.125, -0.375, 0.375, 0, -0.25, 0.25 }, - { 0.0625, -0.3125, 0.375, -0.0625, -0.1875, 0.25 }, - { 0 , -0.25, 0.375, -0.125, 0, 0.25 }, - {-0.1875, 0.125, 0.375, -0.5, 0.375, 0.25 }, - {-0.1875, -0.125, 0.375, -0.25, 0.1875, 0.25 }, - {-0.25, -0.0625, 0.375, -0.3125, 0.25, 0.25 }, - {-0.3125, 0, 0.375, -0.375, 0.375, 0.25 }, - {-0.3125, 0.0625, 0.375, -0.4375, 0.3125, 0.25 }, - - {0.1875, -0.5, -0.1875, 0.4375, -0.125, -0.4375}, - - - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, 0.5, -0.125, 0.5}, - {-0.5, -0.5, -0.1875, 0.1875, 0.1875, 0.5}, - {-0.5, -0.5, 0.125, -0.125, 0.5, 0.5}, - } - }, -}) - -minetest.register_node("mydeck:stairs_icorners", { - description = "Stairs Inside Corner", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:stairs_icorner", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.5, -0.25, -0.5, -0.125, -0.125, -0.125 }, - {-0.5, 0.0625, -0.1875, 0.1875, 0.1875, 0.1875}, - {-0.5, 0.375, 0.125, 0.5, 0.5, 0.5}, - - {-0.1875, 0.0625, -0.5, 0.1875, 0.1875, -0.1875}, - {0.125, 0.375, -0.5, 0.5, 0.5, 0.5}, - - {-0.375, -0.5, -0.4375, -0.25, -0.25, -0.125 }, - {-0.375, -0.1875, -0.125, -0.25, 0.0625, 0.1875 }, - {-0.375, -0.4375, -0.125, -0.25, -0.1875, -0.0625 }, - {-0.375, -0.375, -0.125, -0.25, -0.25, 0 }, - {-0.375, -0.3125, -0.0625, -0.25, -0.1875, 0.0625 }, - {-0.375, -0.25, 0, -0.25, 0, 0.125 }, - {-0.375, 0.125, 0.1875, -0.25, 0.375, 0.5 }, - {-0.375, -0.125, 0.1875, -0.25, 0.1875, 0.25 }, - {-0.375, -0.0625, 0.25, -0.25, 0.25, 0.3125 }, - {-0.375, 0, 0.3125, -0.25, 0.375, 0.375 }, - {-0.375, 0.0625, 0.3125, -0.25, 0.3125, 0.4375 }, - - {-0.4375, -0.5, -0.375, -0.125, -0.25, -0.25 }, - {-0.125, -0.1875, -0.375, 0.1875, 0.0625, -0.25 }, - {-0.125, -0.4375, -0.375, -0.0625, -0.1875, -0.25 }, - {-0.125, -0.375, -0.375, 0, -0.25, -0.25 }, - {-0.0625, -0.3125, -0.375, 0.0625, -0.1875, -0.25 }, - { 0 , -0.25, -0.375, 0.125, 0, -0.25 }, - { 0.1875, 0.125, -0.375, 0.5, 0.375, -0.25 }, - { 0.1875, -0.125, -0.375, 0.25, 0.1875, -0.25 }, - { 0.25, -0.0625, -0.375, 0.3125, 0.25, -0.25 }, - { 0.3125, 0, -0.375, 0.375, 0.375, -0.25 }, - { 0.3125, 0.0625, -0.375, 0.4375, 0.3125, -0.25 }, - - - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.5, -0.5, -0.5, -0.1875, -0.125, -0.1875 }, - {-0.5, -0.5, -0.1875, 0.125, 0.1875, 0.125}, - {-0.5, -0.5, 0.125, 0.5, 0.5, 0.5}, - - {-0.1875, -0.5, -0.5, 0.125, 0.1875, 0.125}, - {0.125, -0.5, -0.5, 0.5, 0.5, 0.5}, - } - }, -}) - - -minetest.register_node("mydeck:stairs_railrs", { - description = "Right Stairs Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:stairs_railr", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, -- NodeBox1 - {0.3125, -1.5, -0.4375, 0.5, -0.5, -0.5}, -- NodeBox1 - {0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5}, -- NodeBox2 - {0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375}, -- NodeBox3 - {0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375}, -- NodeBox4 - {0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125}, -- NodeBox5 - {0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25}, -- NodeBox6 - {0.3125, 0.0625, 0.125, 0.5, 0.1875, 0.1875}, -- NodeBox7 - {0.3125, 0, 0.0625, 0.5, 0.125, 0.125}, -- NodeBox8 - {0.3125, -0.0625, 0, 0.5, 0.0625, 0.0625}, -- NodeBox9 - {0.3125, -0.125, -0.0625, 0.5, 0, 0}, -- NodeBox10 - {0.3125, -0.1875, -0.125, 0.5, -0.0625, -0.0625}, -- NodeBox11 - {0.3125, -0.25, -0.1875, 0.5, -0.125, -0.125}, -- NodeBox12 - {0.3125, -0.3125, -0.25, 0.5, -0.1875, -0.1875}, -- NodeBox13 - {0.3125, -0.375, -0.3125, 0.5, -0.25, -0.25}, -- NodeBox14 - {0.3125, -0.4375, -0.375, 0.5, -0.3125, -0.3125}, -- NodeBox15 - {0.3125, -0.5, -0.4375, 0.5, -0.375, -0.375}, -- NodeBox16 - {0.3125, -0.5, -0.5, 0.5, -0.4375, -0.4375}, -- NodeBox17 - - - } - }, - selection_box = { - type = "fixed", - fixed = { - {0.3125, -0.5, -0.5, 0.5, 0.5, 0.5 }, - } - }, -}) -minetest.register_node("mydeck:stairs_raills", { - description = "Left Stairs Rail Stained", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - drop = "mydeck:stairs_raill", - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5}, -- NodeBox1 - {-0.3125, -1.5, -0.4375, -0.5, -0.5, -0.5}, -- NodeBox1 - {-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5}, -- NodeBox2 - {-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375}, -- NodeBox3 - {-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375}, -- NodeBox4 - {-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125}, -- NodeBox5 - {-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25}, -- NodeBox6 - {-0.3125, 0.0625, 0.125, -0.5, 0.1875, 0.1875}, -- NodeBox7 - {-0.3125, 0, 0.0625, -0.5, 0.125, 0.125}, -- NodeBox8 - {-0.3125, -0.0625, 0, -0.5, 0.0625, 0.0625}, -- NodeBox9 - {-0.3125, -0.125, -0.0625, -0.5, 0, 0}, -- NodeBox10 - {-0.3125, -0.1875, -0.125, -0.5, -0.0625, -0.0625}, -- NodeBox11 - {-0.3125, -0.25, -0.1875, -0.5, -0.125, -0.125}, -- NodeBox12 - {-0.3125, -0.3125, -0.25, -0.5, -0.1875, -0.1875}, -- NodeBox13 - {-0.3125, -0.375, -0.3125, -0.5, -0.25, -0.25}, -- NodeBox14 - {-0.3125, -0.4375, -0.375, -0.5, -0.3125, -0.3125}, -- NodeBox15 - {-0.3125, -0.5, -0.4375, -0.5, -0.375, -0.375}, -- NodeBox16 - {-0.3125, -0.5, -0.5, -0.5, -0.4375, -0.4375}, -- NodeBox17 - - - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.3125, -0.5, -0.5, -0.5, 0.5, 0.5 }, - } - }, -}) - - - -minetest.register_node("mydeck:stairs_railr_ends", { - description = "Stairs", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - drop = "mydeck:stairs_railr", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {0.3125, -0.5, 0.4375, 0.5, 0.375, 0.5}, - {0.3125, 0.375, 0.4375, 0.5, 0.5, 0.5}, - {0.3125, 0.3125, 0.375, 0.5, 0.4375, 0.4375}, - {0.3125, 0.25, 0.3125, 0.5, 0.375, 0.375}, - {0.3125, 0.1875, 0.25, 0.5, 0.3125, 0.3125}, - {0.3125, 0.125, 0.1875, 0.5, 0.25, 0.25}, - - - } - }, - selection_box = { - type = "fixed", - fixed = { - {0.3125, -0.5, 0.1875, 0.5, 0.5, 0.5 }, - } - }, -}) -minetest.register_node("mydeck:stairs_raill_ends", { - description = "Stairs", - tiles = { - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - "mydeck_hwood.png^mydeck_tint1.png", - }, - drawtype = "nodebox", - paramtype = "light", - paramtype2 = "facedir", - drop = "mydeck:stairs_raill", - sunlight_propagates = true, - sounds = default.node_sound_wood_defaults(), - groups = {cracky = 2, choppy = 2, not_in_creative_inventory=1, flammable = 1}, - node_box = { - type = "fixed", - fixed = { - {-0.3125, -0.5, 0.4375, -0.5, 0.375, 0.5}, - {-0.3125, 0.375, 0.4375, -0.5, 0.5, 0.5}, - {-0.3125, 0.3125, 0.375, -0.5, 0.4375, 0.4375}, - {-0.3125, 0.25, 0.3125, -0.5, 0.375, 0.375}, - {-0.3125, 0.1875, 0.25, -0.5, 0.3125, 0.3125}, - {-0.3125, 0.125, 0.1875, -0.5, 0.25, 0.25}, - - - } - }, - selection_box = { - type = "fixed", - fixed = { - {-0.3125, -0.5, 0.1875, -0.5, 0.5, 0.5 }, - } - }, -}) - - - - - - diff --git a/textures/mydeck_background.png b/textures/mydeck_background.png index 55e2411..8c95b5f 100644 Binary files a/textures/mydeck_background.png and b/textures/mydeck_background.png differ diff --git a/textures/mydeck_mach1.png b/textures/mydeck_mach1.png deleted file mode 100644 index 63f77b3..0000000 Binary files a/textures/mydeck_mach1.png and /dev/null differ diff --git a/textures/mydeck_mach10.png b/textures/mydeck_mach10.png deleted file mode 100644 index 14a3f42..0000000 Binary files a/textures/mydeck_mach10.png and /dev/null differ diff --git a/textures/mydeck_mach11.png b/textures/mydeck_mach11.png deleted file mode 100644 index e3c978c..0000000 Binary files a/textures/mydeck_mach11.png and /dev/null differ diff --git a/textures/mydeck_mach12.png b/textures/mydeck_mach12.png deleted file mode 100644 index bb56e64..0000000 Binary files a/textures/mydeck_mach12.png and /dev/null differ diff --git a/textures/mydeck_mach13.png b/textures/mydeck_mach13.png deleted file mode 100644 index 0f6ccba..0000000 Binary files a/textures/mydeck_mach13.png and /dev/null differ diff --git a/textures/mydeck_mach14.png b/textures/mydeck_mach14.png deleted file mode 100644 index 37d4540..0000000 Binary files a/textures/mydeck_mach14.png and /dev/null differ diff --git a/textures/mydeck_mach15.png b/textures/mydeck_mach15.png deleted file mode 100644 index 6626ae6..0000000 Binary files a/textures/mydeck_mach15.png and /dev/null differ diff --git a/textures/mydeck_mach16.png b/textures/mydeck_mach16.png deleted file mode 100644 index d885e9a..0000000 Binary files a/textures/mydeck_mach16.png and /dev/null differ diff --git a/textures/mydeck_mach17.png b/textures/mydeck_mach17.png deleted file mode 100644 index 5be2acc..0000000 Binary files a/textures/mydeck_mach17.png and /dev/null differ diff --git a/textures/mydeck_mach18.png b/textures/mydeck_mach18.png deleted file mode 100644 index 8004c75..0000000 Binary files a/textures/mydeck_mach18.png and /dev/null differ diff --git a/textures/mydeck_mach19.png b/textures/mydeck_mach19.png deleted file mode 100644 index aff7163..0000000 Binary files a/textures/mydeck_mach19.png and /dev/null differ diff --git a/textures/mydeck_mach2.png b/textures/mydeck_mach2.png deleted file mode 100644 index fbda080..0000000 Binary files a/textures/mydeck_mach2.png and /dev/null differ diff --git a/textures/mydeck_mach3.png b/textures/mydeck_mach3.png deleted file mode 100644 index a554cc7..0000000 Binary files a/textures/mydeck_mach3.png and /dev/null differ diff --git a/textures/mydeck_mach4.png b/textures/mydeck_mach4.png deleted file mode 100644 index 2b989c5..0000000 Binary files a/textures/mydeck_mach4.png and /dev/null differ diff --git a/textures/mydeck_mach5.png b/textures/mydeck_mach5.png deleted file mode 100644 index e8c3a87..0000000 Binary files a/textures/mydeck_mach5.png and /dev/null differ diff --git a/textures/mydeck_mach6.png b/textures/mydeck_mach6.png deleted file mode 100644 index 0f9522c..0000000 Binary files a/textures/mydeck_mach6.png and /dev/null differ diff --git a/textures/mydeck_mach7.png b/textures/mydeck_mach7.png deleted file mode 100644 index c9a2ca3..0000000 Binary files a/textures/mydeck_mach7.png and /dev/null differ diff --git a/textures/mydeck_mach8.png b/textures/mydeck_mach8.png deleted file mode 100644 index 5ffde2b..0000000 Binary files a/textures/mydeck_mach8.png and /dev/null differ diff --git a/textures/mydeck_mach9.png b/textures/mydeck_mach9.png deleted file mode 100644 index 15a6a06..0000000 Binary files a/textures/mydeck_mach9.png and /dev/null differ diff --git a/textures/mydeck_paint_brush.png b/textures/mydeck_paint_brush.png new file mode 100644 index 0000000..195e282 Binary files /dev/null and b/textures/mydeck_paint_brush.png differ diff --git a/textures/mydeck_paint_brush_black.png b/textures/mydeck_paint_brush_black.png new file mode 100644 index 0000000..2c0b8eb Binary files /dev/null and b/textures/mydeck_paint_brush_black.png differ diff --git a/textures/mydeck_paint_brush_blue.png b/textures/mydeck_paint_brush_blue.png new file mode 100644 index 0000000..21d8178 Binary files /dev/null and b/textures/mydeck_paint_brush_blue.png differ diff --git a/textures/mydeck_paint_brush_brown.png b/textures/mydeck_paint_brush_brown.png new file mode 100644 index 0000000..a17015f Binary files /dev/null and b/textures/mydeck_paint_brush_brown.png differ diff --git a/textures/mydeck_paint_brush_cyan.png b/textures/mydeck_paint_brush_cyan.png new file mode 100644 index 0000000..4097cf8 Binary files /dev/null and b/textures/mydeck_paint_brush_cyan.png differ diff --git a/textures/mydeck_paint_brush_dark_green.png b/textures/mydeck_paint_brush_dark_green.png new file mode 100644 index 0000000..7272d8b Binary files /dev/null and b/textures/mydeck_paint_brush_dark_green.png differ diff --git a/textures/mydeck_paint_brush_dark_grey.png b/textures/mydeck_paint_brush_dark_grey.png new file mode 100644 index 0000000..21f4328 Binary files /dev/null and b/textures/mydeck_paint_brush_dark_grey.png differ diff --git a/textures/mydeck_paint_brush_green.png b/textures/mydeck_paint_brush_green.png new file mode 100644 index 0000000..c0c2c68 Binary files /dev/null and b/textures/mydeck_paint_brush_green.png differ diff --git a/textures/mydeck_paint_brush_grey.png b/textures/mydeck_paint_brush_grey.png new file mode 100644 index 0000000..58c5787 Binary files /dev/null and b/textures/mydeck_paint_brush_grey.png differ diff --git a/textures/mydeck_paint_brush_magenta.png b/textures/mydeck_paint_brush_magenta.png new file mode 100644 index 0000000..aac77ef Binary files /dev/null and b/textures/mydeck_paint_brush_magenta.png differ diff --git a/textures/mydeck_paint_brush_orange.png b/textures/mydeck_paint_brush_orange.png new file mode 100644 index 0000000..d97909f Binary files /dev/null and b/textures/mydeck_paint_brush_orange.png differ diff --git a/textures/mydeck_paint_brush_pink.png b/textures/mydeck_paint_brush_pink.png new file mode 100644 index 0000000..c7e5e29 Binary files /dev/null and b/textures/mydeck_paint_brush_pink.png differ diff --git a/textures/mydeck_paint_brush_red.png b/textures/mydeck_paint_brush_red.png new file mode 100644 index 0000000..8318a25 Binary files /dev/null and b/textures/mydeck_paint_brush_red.png differ diff --git a/textures/mydeck_paint_brush_violet.png b/textures/mydeck_paint_brush_violet.png new file mode 100644 index 0000000..fc93632 Binary files /dev/null and b/textures/mydeck_paint_brush_violet.png differ diff --git a/textures/mydeck_paint_brush_white.png b/textures/mydeck_paint_brush_white.png new file mode 100644 index 0000000..e93eb59 Binary files /dev/null and b/textures/mydeck_paint_brush_white.png differ diff --git a/textures/mydeck_paint_brush_yellow.png b/textures/mydeck_paint_brush_yellow.png new file mode 100644 index 0000000..cc586bc Binary files /dev/null and b/textures/mydeck_paint_brush_yellow.png differ diff --git a/textures/mydeck_tint1.png b/textures/mydeck_tint1.png index 87b1c44..a1b3b62 100644 Binary files a/textures/mydeck_tint1.png and b/textures/mydeck_tint1.png differ diff --git a/textures/mydeck_tint1maybe.png b/textures/mydeck_tint1maybe.png deleted file mode 100644 index a1b3b62..0000000 Binary files a/textures/mydeck_tint1maybe.png and /dev/null differ