diff options
Diffstat (limited to 'castle/pillars.lua')
-rw-r--r-- | castle/pillars.lua | 79 |
1 files changed, 42 insertions, 37 deletions
diff --git a/castle/pillars.lua b/castle/pillars.lua index 4024390..ac63cb5 100644 --- a/castle/pillars.lua +++ b/castle/pillars.lua @@ -6,13 +6,13 @@ local pillar = {} pillar.types = { {"stonewall", "Stonewall", "castle_stonewall", "castle:stonewall"}, - {"cobble", "Cobble", "default_cobble", "default:cobble"}, - {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"}, - {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"}, - {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"}, - {"stone", "Stone", "default_stone", "default:stone"}, - {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"}, - {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"}, + {"cobble", "Cobble", "default_cobble", "default:cobble"}, + {"stonebrick", "Stonebrick", "default_stone_brick", "default:stonebrick"}, + {"sandstonebrick", "Sandstone Brick", "default_sandstone_brick", "default:sandstonebrick"}, + {"desertstonebrick", "Desert Stone Brick", "default_desert_stone_brick", "default:desert_stonebrick"}, + {"stone", "Stone", "default_stone", "default:stone"}, + {"sandstone", "Sandstone", "default_sandstone", "default:sandstone"}, + {"desertstone", "Desert Stone", "default_desert_stone", "default:desert_stone"}, } for _, row in ipairs(pillar.types) do @@ -22,30 +22,30 @@ for _, row in ipairs(pillar.types) do local craft_material = row[4] -- Node Definition minetest.register_node("castle:pillars_"..name.."_bottom", { - drawtype = "nodebox", + drawtype = "nodebox", description = desc.." Pillar Base", tiles = {tile..".png"}, groups = {cracky=3,attached_node=1}, sounds = default.node_sound_defaults(), - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,0.500000}, - {-0.375000,-0.375000,-0.375000,0.375000,-0.125000,0.375000}, - {-0.250000,-0.125000,-0.250000,0.250000,0.500000,0.250000}, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.500000,-0.500000,-0.500000,0.500000,-0.375000,0.500000}, + {-0.375000,-0.375000,-0.375000,0.375000,-0.125000,0.375000}, + {-0.250000,-0.125000,-0.250000,0.250000,0.500000,0.250000}, + }, }, - }, }) minetest.register_node("castle:pillars_"..name.."_top", { - drawtype = "nodebox", + drawtype = "nodebox", description = desc.." Pillar Top", tiles = {tile..".png"}, groups = {cracky=3,attached_node=1}, sounds = default.node_sound_defaults(), - paramtype = "light", - paramtype2 = "facedir", + paramtype = "light", + paramtype2 = "facedir", node_box = { type = "fixed", fixed = { @@ -55,49 +55,54 @@ for _, row in ipairs(pillar.types) do }, }, }) + minetest.register_node("castle:pillars_"..name.."_middle", { - drawtype = "nodebox", + drawtype = "nodebox", description = desc.." Pillar Middle", tiles = {tile..".png"}, groups = {cracky=3,attached_node=1}, sounds = default.node_sound_defaults(), - paramtype = "light", - paramtype2 = "facedir", - node_box = { - type = "fixed", - fixed = { - {-0.250000,-0.500000,-0.250000,0.250000,0.500000,0.250000}, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.250000,-0.500000,-0.250000,0.250000,0.500000,0.250000}, + }, }, - }, }) + if craft_material then --Choose craft material minetest.register_craft({ output = "castle:pillars_"..name.."_bottom 4", recipe = { - {"",craft_material,""}, - {"",craft_material,""}, - {craft_material,craft_material,craft_material} }, + {"",craft_material,""}, + {"",craft_material,""}, + {craft_material,craft_material,craft_material} }, }) end + if craft_material then --Choose craft material minetest.register_craft({ output = "castle:pillars_"..name.."_top 4", recipe = { - {craft_material,craft_material,craft_material}, - {"",craft_material,""}, - {"",craft_material,""} }, + {craft_material,craft_material,craft_material}, + {"",craft_material,""}, + {"",craft_material,""} }, }) end + if craft_material then --Choose craft material minetest.register_craft({ output = "castle:pillars_"..name.."_middle 4", recipe = { - {craft_material,craft_material}, - {craft_material,craft_material}, - {craft_material,craft_material} }, + {craft_material,craft_material}, + {craft_material,craft_material}, + {craft_material,craft_material} }, }) end end + |