diff options
Diffstat (limited to 'castle_masonry')
24 files changed, 1324 insertions, 0 deletions
diff --git a/castle_masonry/LICENSE b/castle_masonry/LICENSE new file mode 100644 index 0000000..5c3c583 --- /dev/null +++ b/castle_masonry/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2017 Minetest Mods Team + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/castle_masonry/README.txt b/castle_masonry/README.txt new file mode 100644 index 0000000..98b129a --- /dev/null +++ b/castle_masonry/README.txt @@ -0,0 +1,43 @@ +=-=-=-=-=-=-=-=-=-= + +Castles Mod +by: Philipbenr And DanDuncombe + +=-=-=-=-=-=-=-=-=-= + +Licence: MIT + +see: LICENSE + +=-=-=-=-=-=-=-=-=-= + +This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons. + +=-=-=-=-=-=-=-=-=-= + +Contains: + +--Walls, Corner-walls, +--Castlestone Stairs, Slabs, and Pillars +--Arrowslits and embrasures +--Rubble (to fill the interior of thick castle walls) +--Murder holes and machicolations +--Pillars and crossbraces +--Roof slate +--Paving stone +--Dungeon stone + +Mod settings can allow for the basic castle masonry forms to be made for the following material types (all optional): + +Cobble +Desert stone +Desert stone brick +Sandstone +Sandstone brick +Stone +Stone brick +Castle wall +Wood +Snow +Ice +Obsidian Brick
\ No newline at end of file diff --git a/castle_masonry/arrow_slits.lua b/castle_masonry/arrow_slits.lua new file mode 100644 index 0000000..188d7dd --- /dev/null +++ b/castle_masonry/arrow_slits.lua @@ -0,0 +1,166 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +castle_masonry.register_arrowslit = function(material) + local composition_def, burn_time, tile, desc = castle_masonry.get_material_properties(material) + local mod_name = minetest.get_current_modname() + + -- Node Definition + minetest.register_node(mod_name..":arrowslit_"..material.name, { + drawtype = "nodebox", + description = S("@1 Arrowslit", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.375, 0.5, -0.0625, 0.375, 0.3125}, + {0.0625, -0.375, 0.5, 0.5, 0.375, 0.3125}, + {-0.5, 0.375, 0.5, 0.5, 0.5, 0.3125}, + {-0.5, -0.5, 0.5, 0.5, -0.375, 0.3125}, + {0.25, -0.5, 0.3125, 0.5, 0.5, 0.125}, + {-0.5, -0.5, 0.3125, -0.25, 0.5, 0.125}, + }, + }, + }) + + minetest.register_node(mod_name..":arrowslit_"..material.name.."_cross", { + drawtype = "nodebox", + description = S("@1 Arrowslit with Cross", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.125, 0.5, -0.0625, 0.375, 0.3125}, + {0.0625, -0.125, 0.5, 0.5, 0.375, 0.3125}, + {-0.5, 0.375, 0.5, 0.5, 0.5, 0.3125}, + {-0.5, -0.5, 0.5, 0.5, -0.375, 0.3125}, + {0.0625, -0.375, 0.5, 0.5, -0.25, 0.3125}, + {-0.5, -0.375, 0.5, -0.0625, -0.25, 0.3125}, + {-0.5, -0.25, 0.5, -0.1875, -0.125, 0.3125}, + {0.1875, -0.25, 0.5, 0.5, -0.125, 0.3125}, + {0.25, -0.5, 0.3125, 0.5, 0.5, 0.125}, + {-0.5, -0.5, 0.3125, -0.25, 0.5, 0.125}, + }, + }, + }) + + minetest.register_node(mod_name..":arrowslit_"..material.name.."_hole", { + drawtype = "nodebox", + description = S("@1 Arrowslit with Hole", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.375, 0.5, -0.125, 0.375, 0.3125}, + {0.125, -0.375, 0.5, 0.5, 0.375, 0.3125}, + {-0.5, -0.5, 0.5, 0.5, -0.375, 0.3125}, + {0.0625, -0.125, 0.5, 0.125, 0.375, 0.3125}, + {-0.125, -0.125, 0.5, -0.0625, 0.375, 0.3125}, + {-0.5, 0.375, 0.5, 0.5, 0.5, 0.3125}, + {0.25, -0.5, 0.3125, 0.5, 0.5, 0.125}, + {-0.5, -0.5, 0.3125, -0.25, 0.5, 0.125}, + }, + }, + }) + + minetest.register_node(mod_name..":arrowslit_"..material.name.."_embrasure", { + drawtype = "nodebox", + description = S("@1 Embrasure", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, 0.375, -0.125, 0.5, 0.5}, + {0.125, -0.5, 0.375, 0.25, 0.5, 0.5}, + {0.25, -0.5, 0.25, 0.5, 0.5, 0.5}, + {0.375, -0.5, 0.125, 0.5, 0.5, 0.25}, + {-0.5, -0.5, 0.25, -0.25, 0.5, 0.5}, + {-0.5, -0.5, 0.125, -0.375, 0.5, 0.25}, + }, + }, + }) + + minetest.register_craft({ + output = mod_name..":arrowslit_"..material.name.." 6", + recipe = { + {material.craft_material,"", material.craft_material}, + {material.craft_material,"", material.craft_material}, + {material.craft_material,"", material.craft_material} }, + }) + + minetest.register_craft({ + output = mod_name..":arrowslit_"..material.name.."_cross", + recipe = { + {mod_name..":arrowslit_"..material.name} }, + }) + minetest.register_craft({ + output = mod_name..":arrowslit_"..material.name.."_hole", + recipe = { + {mod_name..":arrowslit_"..material.name.."_cross"} }, + }) + minetest.register_craft({ + output = mod_name..":arrowslit_"..material.name.."_embrasure", + recipe = { + {mod_name..":arrowslit_"..material.name.."_hole"} }, + }) + minetest.register_craft({ + output = mod_name..":arrowslit_"..material.name, + recipe = { + {mod_name..":arrowslit_"..material.name.."_embrasure"} }, + }) + + if burn_time > 0 then + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":arrowslit_"..material.name, + burntime = burn_time, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":arrowslit_"..material.name.."_cross", + burntime = burn_time, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":arrowslit_"..material.name.."_hole", + burntime = burn_time, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":arrowslit_"..material.name.."_embrasure", + burntime = burn_time, + }) + end +end + + +castle_masonry.register_arrowslit_alias = function(old_mod_name, old_material_name, new_mod_name, new_material_name) + minetest.register_alias(old_mod_name..":arrowslit_"..old_material_name, new_mod_name..":arrowslit_"..new_material_name) + minetest.register_alias(old_mod_name..":arrowslit_"..old_material_name.."_cross", new_mod_name..":arrowslit_"..new_material_name.."_cross") + minetest.register_alias(old_mod_name..":arrowslit_"..old_material_name.."_hole", new_mod_name..":arrowslit_"..new_material_name.."_hole") + minetest.register_alias(old_mod_name..":arrowslit_"..old_material_name.."_embrasure", new_mod_name..":arrowslit_"..new_material_name.."_embrasure") +end + +castle_masonry.register_arrowslit_alias_force = function(old_mod_name, old_material_name, new_mod_name, new_material_name) + minetest.register_alias_force(old_mod_name..":arrowslit_"..old_material_name, new_mod_name..":arrowslit_"..new_material_name) + minetest.register_alias_force(old_mod_name..":arrowslit_"..old_material_name.."_cross", new_mod_name..":arrowslit_"..new_material_name.."_cross") + minetest.register_alias_force(old_mod_name..":arrowslit_"..old_material_name.."_hole", new_mod_name..":arrowslit_"..new_material_name.."_hole") + minetest.register_alias_force(old_mod_name..":arrowslit_"..old_material_name.."_embrasure", new_mod_name..":arrowslit_"..new_material_name.."_embrasure") +end
\ No newline at end of file diff --git a/castle_masonry/depends.txt b/castle_masonry/depends.txt new file mode 100644 index 0000000..206a637 --- /dev/null +++ b/castle_masonry/depends.txt @@ -0,0 +1,6 @@ +default +moreblocks? +stairs? +building_blocks? +asphalt? +streets?
\ No newline at end of file diff --git a/castle_masonry/description.txt b/castle_masonry/description.txt new file mode 100644 index 0000000..2399226 --- /dev/null +++ b/castle_masonry/description.txt @@ -0,0 +1 @@ +This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons. diff --git a/castle_masonry/init.lua b/castle_masonry/init.lua new file mode 100644 index 0000000..0d23922 --- /dev/null +++ b/castle_masonry/init.lua @@ -0,0 +1,137 @@ +castle_masonry = {} + +local MP = minetest.get_modpath(minetest.get_current_modname()) +dofile(MP.."/pillars.lua") +dofile(MP.."/arrow_slits.lua") +dofile(MP.."/murder_holes.lua") +dofile(MP.."/stone_wall.lua") +dofile(MP.."/paving.lua") + +local S, NS = dofile(MP.."/intllib.lua") + +local read_setting = function(name, default) + local setting = minetest.setting_getbool(name) + if setting == nil then return default end + return setting +end + +-- Material definition: +-- { +-- name=, -- the name that will be part of the resulting node names +-- desc=, -- Player-facing name of the material +-- tile=, -- Optional - the texture tile to use for the resulting blocks (can be a single texture or a table, as a normal node definition's tile def). If not set this will be taken from the material it's made out of. +-- craft_material=, -- What source block is used to craft these blocks. +-- composition_material=, -- Optional, this will override the properties of the product with a specific material. Useful if you want to use a group for the craft material (eg, "group:wood") +--} + +castle_masonry.materials = {} +if read_setting("castle_masonry_stonewall", true) then + table.insert(castle_masonry.materials, {name="stonewall", desc=S("Stonewall"), tile="castle_stonewall.png", craft_material="castle:stonewall"}) +end +if read_setting("castle_masonry_cobble", true) then + table.insert(castle_masonry.materials, {name="cobble", desc=S("Cobble"), tile="default_cobble.png", craft_material="default:cobble"}) +end +if read_setting("castle_masonry_stonebrick", true) then + table.insert(castle_masonry.materials, {name="stonebrick", desc=S("Stonebrick"), tile="default_stone_brick.png", craft_material="default:stonebrick"}) +end +if read_setting("castle_masonry_sandstonebrick", true) then + table.insert(castle_masonry.materials, {name="sandstonebrick", desc=S("Sandstone Brick"), tile="default_sandstone_brick.png", craft_material="default:sandstonebrick"}) +end +if read_setting("castle_masonry_desertstonebrick", true) then + table.insert(castle_masonry.materials, {name="desertstonebrick", desc=S("Desert Stone Brick"), tile="default_desert_stone_brick.png", craft_material="default:desert_stonebrick"}) +end +if read_setting("castle_masonry_stone", true) then + table.insert(castle_masonry.materials, {name="stone", desc=S("Stone"), tile="default_stone.png", craft_material="default:stone"}) +end +if read_setting("castle_masonry_sandstone", true) then + table.insert(castle_masonry.materials, {name="sandstone", desc=S("Sandstone"), tile="default_sandstone.png", craft_material="default:sandstone"}) +end +if read_setting("castle_masonry_desertstone", true) then + table.insert(castle_masonry.materials, {name="desertstone", desc=S("Desert Stone"), tile="default_desert_stone.png", craft_material="default:desert_stone"}) +end +if read_setting("castle_masonry_wood", false) then + table.insert(castle_masonry.materials, {name="wood", desc=S("Wood"), tile="default_wood.png", craft_material="group:wood", composition_material="default:wood"}) +end +if read_setting("castle_masonry_ice", false) then + table.insert(castle_masonry.materials, {name="ice", desc=S("Ice"), tile="default_ice.png", craft_material="default:ice"}) +end +if read_setting("castle_masonry_snow", false) then + table.insert(castle_masonry.materials, {name="snow", desc=S("Snow"), tile="default_snow.png", craft_material="default:snow"}) +end +if read_setting("castle_masonry_obsidianbrick", false) then + table.insert(castle_masonry.materials, {name="obsidianbrick", desc=S("Obsidian Brick"), tile="default_obsidian_brick.png", craft_material="default:obsidianbrick"}) +end + +castle_masonry.get_material_properties = function(material) + local composition_def + local burn_time + if material.composition_material ~= nil then + composition_def = minetest.registered_nodes[material.composition_material] + burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack(material.composition_material)}}).time + else + composition_def = minetest.registered_nodes[material.craft_material] + burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack(material.craft_materia)}}).time + end + + local tiles = material.tile + if tiles == nil then + tiles = composition_def.tile + elseif type(tiles) == "string" then + tiles = {tiles} + end + + local desc = material.desc + if desc == nil then + desc = composition_def.description + end + + return composition_def, burn_time, tiles, desc +end + + +if read_setting("castle_masonry_pillar", true) then + for _, material in pairs(castle_masonry.materials) do + castle_masonry.register_pillar(material) + end +end + +if read_setting("castle_masonry_arrowslit", true) then + for _, material in pairs(castle_masonry.materials) do + castle_masonry.register_arrowslit(material) + end +end + +if read_setting("castle_masonry_murderhole", true) then + for _, material in pairs(castle_masonry.materials) do + castle_masonry.register_murderhole(material) + end +end + +minetest.register_alias("castle:pillars_bottom", "castle_masonry:pillars_stonewall_bottom") +minetest.register_alias("castle:pillars_top", "castle_masonry:pillars_stonewall_top") +minetest.register_alias("castle:pillars_middle", "castle_masonry:pillars_stonewall_middle") +minetest.register_alias("castle:arrowslit", "castle_masonry:arrowslit_stonewall") +minetest.register_alias("castle:arrowslit_hole", "castle_masonry:arrowslit_stonewall_hole") +minetest.register_alias("castle:arrowslit_cross", "castle_masonry:arrowslit_stonewall_cross") + +for _, material in pairs(castle_masonry.materials) do + castle_masonry.register_murderhole_alias("castle", material.name, "castle_masonry", material.name) + castle_masonry.register_pillar_alias("castle", material.name, "castle_masonry", material.name) + + -- Arrowslit upgrade has special handling because the castle mod arrow slit is reversed relative to current build-from-inside standard + local lbm_def = { + name = "castle_masonry:arrowslit_flip_front_to_back"..material.name, + nodenames = { + "castle:arrowslit_"..material.name, + "castle:arrowslit_"..material.name.."_cross", + "castle:arrowslit_"..material.name.."_hole", + }, + action = function(pos, node) + local flip_front_to_back = {[0]=2, 3, 0, 1, 6, 7, 4, 5, 10, 7, 8, 9, 14, 15, 12, 13, 18, 19, 16, 17, 22, 23, 20, 21} + node.param2 = flip_front_to_back[node.param2] + node.name = "castle_masonry" .. string.sub(node.name, 7, -1) + minetest.swap_node(pos, node) + end + } + minetest.register_lbm(lbm_def) +end
\ No newline at end of file diff --git a/castle_masonry/intllib.lua b/castle_masonry/intllib.lua new file mode 100644 index 0000000..6669d72 --- /dev/null +++ b/castle_masonry/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense <http://unlicense.org>. + +-- Get the latest version of this file at: +-- https://raw.githubusercontent.com/minetest-mods/intllib/master/lib/intllib.lua + +local function format(str, ...) + local args = { ... } + local function repl(escape, open, num, close) + if escape == "" then + local replacement = tostring(args[tonumber(num)]) + if open == "" then + replacement = replacement..close + end + return replacement + else + return "@"..open..num..close + end + end + return (str:gsub("(@?)@(%(?)(%d+)(%)?)", repl)) +end + +local gettext, ngettext +if minetest.get_modpath("intllib") then + if intllib.make_gettext_pair then + -- New method using gettext. + gettext, ngettext = intllib.make_gettext_pair() + else + -- Old method using text files. + gettext = intllib.Getter() + end +end + +-- Fill in missing functions. + +gettext = gettext or function(msgid, ...) + return format(msgid, ...) +end + +ngettext = ngettext or function(msgid, msgid_plural, n, ...) + return format(n==1 and msgid or msgid_plural, ...) +end + +return gettext, ngettext diff --git a/castle_masonry/locale/template.pot b/castle_masonry/locale/template.pot new file mode 100644 index 0000000..93b2f4c --- /dev/null +++ b/castle_masonry/locale/template.pot @@ -0,0 +1,189 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-21 23:41-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: arrow_slits.lua:12 +msgid "@1 Arrowslit" +msgstr "" + +#: arrow_slits.lua:33 +msgid "@1 Arrowslit with Cross" +msgstr "" + +#: arrow_slits.lua:58 +msgid "@1 Arrowslit with Hole" +msgstr "" + +#: arrow_slits.lua:81 +msgid "@1 Embrasure" +msgstr "" + +#: init.lua:29 +msgid "Stonewall" +msgstr "" + +#: init.lua:32 +msgid "Cobble" +msgstr "" + +#: init.lua:35 +msgid "Stonebrick" +msgstr "" + +#: init.lua:38 +msgid "Sandstone Brick" +msgstr "" + +#: init.lua:41 +msgid "Desert Stone Brick" +msgstr "" + +#: init.lua:44 +msgid "Stone" +msgstr "" + +#: init.lua:47 +msgid "Sandstone" +msgstr "" + +#: init.lua:50 +msgid "Desert Stone" +msgstr "" + +#: init.lua:53 +msgid "Wood" +msgstr "" + +#: init.lua:56 +msgid "Ice" +msgstr "" + +#: init.lua:59 +msgid "Snow" +msgstr "" + +#: init.lua:62 +msgid "Obsidian Brick" +msgstr "" + +#: murder_holes.lua:14 +msgid "@1 Murder Hole" +msgstr "" + +#: murder_holes.lua:33 +msgid "@1 Machicolation" +msgstr "" + +#: paving.lua:11 +msgid "Paving Stone" +msgstr "" + +#: paving.lua:30 +msgid "Pavement Brick" +msgstr "" + +#: paving.lua:40 +msgid "Castle Pavement Stair" +msgstr "" + +#: paving.lua:41 +msgid "Castle Pavement Slab" +msgstr "" + +#: paving.lua:49 +msgid "Roof Slates" +msgstr "" + +#: pillars.lua:18 +msgid "@1 Pillar Base" +msgstr "" + +#: pillars.lua:36 +msgid "@1 Half Pillar Base" +msgstr "" + +#: pillars.lua:54 +msgid "@1 Pillar Top" +msgstr "" + +#: pillars.lua:72 +msgid "@1 Half Pillar Top" +msgstr "" + +#: pillars.lua:90 +msgid "@1 Pillar Middle" +msgstr "" + +#: pillars.lua:106 +msgid "@1 Half Pillar Middle" +msgstr "" + +#: pillars.lua:123 +msgid "@1 Crossbrace" +msgstr "" + +#: pillars.lua:147 +msgid "@1 Extended Crossbrace" +msgstr "" + +#: stone_wall.lua:11 +msgid "Castle Wall" +msgstr "" + +#: stone_wall.lua:22 +msgid "Castle Rubble" +msgstr "" + +#: stone_wall.lua:57 +msgid "Castle Corner" +msgstr "" + +#: stone_wall.lua:78 +msgid "Stone Wall" +msgstr "" + +#: stone_wall.lua:86 +msgid "Rubble" +msgstr "" + +#: stone_wall.lua:100 +msgid "Castle Stonewall Stair" +msgstr "" + +#: stone_wall.lua:101 +msgid "Castle Stonewall Slab" +msgstr "" + +#: stone_wall.lua:108 +msgid "Castle Rubble Stair" +msgstr "" + +#: stone_wall.lua:109 +msgid "Castle Rubble Slab" +msgstr "" + +#: stone_wall.lua:117 stone_wall.lua:143 +msgid "Dungeon Stone" +msgstr "" + +#: stone_wall.lua:156 +msgid "Dungeon Stone Stair" +msgstr "" + +#: stone_wall.lua:157 +msgid "Dungeon Stone Slab" +msgstr "" diff --git a/castle_masonry/mod.conf b/castle_masonry/mod.conf new file mode 100644 index 0000000..dd444cc --- /dev/null +++ b/castle_masonry/mod.conf @@ -0,0 +1 @@ +name = castle_masonry diff --git a/castle_masonry/murder_holes.lua b/castle_masonry/murder_holes.lua new file mode 100644 index 0000000..090c399 --- /dev/null +++ b/castle_masonry/murder_holes.lua @@ -0,0 +1,91 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +------------------------------------------------------------------------------------- + +castle_masonry.register_murderhole = function(material) + local composition_def, burn_time, tile, desc = castle_masonry.get_material_properties(material) + local mod_name = minetest.get_current_modname() + + -- Node Definition + minetest.register_node(mod_name..":hole_"..material.name, { + drawtype = "nodebox", + description = S("@1 Murder Hole", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-8/16,-8/16,-8/16,-4/16,8/16,8/16}, + {4/16,-8/16,-8/16,8/16,8/16,8/16}, + {-4/16,-8/16,-8/16,4/16,8/16,-4/16}, + {-4/16,-8/16,8/16,4/16,8/16,4/16}, + }, + }, + }) + + minetest.register_node(mod_name..":machicolation_"..material.name, { + drawtype = "nodebox", + description = S("@1 Machicolation", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0, -0.5, 0.5, 0.5, 0}, + {-0.5, -0.5, 0, -0.25, 0.5, 0.5}, + {0.25, -0.5, 0, 0.5, 0.5, 0.5}, + }, + }, + }) + + minetest.register_craft({ + output = mod_name..":hole_"..material.name.." 4", + recipe = { + {"",material.craft_material, "" }, + {material.craft_material,"", material.craft_material}, + {"",material.craft_material, ""} + }, + }) + + minetest.register_craft({ + output = mod_name..":machicolation_"..material.name, + type="shapeless", + recipe = {mod_name..":hole_"..material.name}, + }) + minetest.register_craft({ + output = mod_name..":hole_"..material.name, + type="shapeless", + recipe = {mod_name..":machicolation_"..material.name}, + }) + + if burn_time > 0 then + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":hole_"..material.name, + burntime = burn_time, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":machicolation_"..material.name, + burntime = burn_time, + }) + end +end + +castle_masonry.register_murderhole_alias = function(old_mod_name, old_material_name, new_mod_name, new_material_name) + minetest.register_alias(old_mod_name..":hole_"..old_material_name, new_mod_name..":hole_"..new_material_name) + minetest.register_alias(old_mod_name..":machicolation_"..old_material_name, new_mod_name..":machicolation_"..new_material_name) +end + +castle_masonry.register_murderhole_alias_force = function(old_mod_name, old_material_name, new_mod_name, new_material_name) + minetest.register_alias_force(old_mod_name..":hole_"..old_material_name, new_mod_name..":hole_"..new_material_name) + minetest.register_alias_force(old_mod_name..":machicolation_"..old_material_name, new_mod_name..":machicolation_"..new_material_name) +end
\ No newline at end of file diff --git a/castle_masonry/paving.lua b/castle_masonry/paving.lua new file mode 100644 index 0000000..a6c5c42 --- /dev/null +++ b/castle_masonry/paving.lua @@ -0,0 +1,109 @@ +minetest.register_alias("castle:pavement", "castle_masonry:pavement_brick") +minetest.register_alias("castle:pavement_brick", "castle_masonry:pavement_brick") +minetest.register_alias("castle:roofslate", "castle_masonry:roofslate") + + +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +minetest.register_node("castle_masonry:pavement_brick", { + description = S("Paving Stone"), + drawtype = "normal", + tiles = {"castle_pavement_brick.png"}, + groups = {cracky=2}, + paramtype = "light", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = "castle_masonry:pavement_brick 4", + recipe = { + {"default:stone", "default:cobble"}, + {"default:cobble", "default:stone"}, + } +}) + + +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("castle", "pavement_brick", "castle_masonry:pavement_brick", { + description = S("Pavement Brick"), + tiles = {"castle_pavement_brick.png"}, + groups = {cracky=2, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) +elseif minetest.get_modpath("stairs") then + stairs.register_stair_and_slab("pavement_brick", "castle_masonry:pavement_brick", + {cracky=2}, + {"castle_pavement_brick.png"}, + S("Castle Pavement Stair"), + S("Castle Pavement Slab"), + default.node_sound_stone_defaults() + ) +end + + +minetest.register_node("castle_masonry:roofslate", { + drawtype = "raillike", + description = S("Roof Slates"), + inventory_image = "castle_slate.png", + paramtype = "light", + walkable = false, + tiles = {'castle_slate.png'}, + climbable = true, + selection_box = { + type = "fixed", + fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2}, + }, + groups = {cracky=3,attached_node=1}, + sounds = default.node_sound_glass_defaults(), +}) + +local mod_building_blocks = minetest.get_modpath("building_blocks") +local mod_streets = minetest.get_modpath("streets") or minetest.get_modpath("asphalt") + +if mod_building_blocks then + minetest.register_craft({ + output = "castle_masonry:roofslate 4", + recipe = { + { "building_blocks:Tar" , "default:gravel" }, + { "default:gravel", "building_blocks:Tar" } + } + }) + + minetest.register_craft( { + output = "castle_masonry:roofslate 4", + recipe = { + { "default:gravel", "building_blocks:Tar" }, + { "building_blocks:Tar" , "default:gravel" } + } + }) +end + +if mod_streets then + minetest.register_craft( { + output = "castle_masonry:roofslate 4", + recipe = { + { "streets:asphalt" , "default:gravel" }, + { "default:gravel", "streets:asphalt" } + } + }) + + minetest.register_craft( { + output = "castle_masonry:roofslate 4", + recipe = { + { "default:gravel", "streets:asphalt" }, + { "streets:asphalt" , "default:gravel" } + } + }) +end + +if not (mod_building_blocks or mod_streets) then + minetest.register_craft({ + type = "cooking", + output = "castle_masonry:roofslate", + recipe = "default:gravel", + }) + +end
\ No newline at end of file diff --git a/castle_masonry/pillars.lua b/castle_masonry/pillars.lua new file mode 100644 index 0000000..96d76a3 --- /dev/null +++ b/castle_masonry/pillars.lua @@ -0,0 +1,314 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +castle_masonry.register_pillar = function(material) + local composition_def, burn_time, tile, desc = castle_masonry.get_material_properties(material) + local crossbrace_connectable_groups = {} + for group, val in pairs(composition_def.groups) do + crossbrace_connectable_groups[group] = val + end + crossbrace_connectable_groups.crossbrace_connectable = 1 + + local mod_name = minetest.get_current_modname() + + -- Node Definition + minetest.register_node(mod_name..":pillar_"..material.name.."_bottom", { + drawtype = "nodebox", + description = S("@1 Pillar Base", desc), + tiles = tile, + groups = crossbrace_connectable_groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5,-0.5,-0.5,0.5,-0.375,0.5}, + {-0.375,-0.375,-0.375,0.375,-0.125,0.375}, + {-0.25,-0.125,-0.25,0.25,0.5,0.25}, + }, + }, + }) + + minetest.register_node(mod_name..":pillar_"..material.name.."_bottom_half", { + drawtype = "nodebox", + description = S("@1 Half Pillar Base", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, 0, 0.5, -0.375, 0.5}, + {-0.375, -0.375, 0.125, 0.375, -0.125, 0.5}, + {-0.25, -0.125, 0.25, 0.25, 0.5, 0.5}, + }, + }, + }) + + minetest.register_node(mod_name..":pillar_"..material.name.."_top", { + drawtype = "nodebox", + description = S("@1 Pillar Top", desc), + tiles = tile, + groups = crossbrace_connectable_groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5,0.3125,-0.5,0.5,0.5,0.5}, + {-0.375,0.0625,-0.375,0.375,0.3125,0.375}, + {-0.25,-0.5,-0.25,0.25,0.0625,0.25}, + }, + }, + }) + + minetest.register_node(mod_name..":pillar_"..material.name.."_top_half", { + drawtype = "nodebox", + description = S("@1 Half Pillar Top", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.5, 0.3125, 0, 0.5, 0.5, 0.5}, + {-0.375, 0.0625, 0.125, 0.375, 0.3125, 0.5}, + {-0.25, -0.5, 0.25, 0.25, 0.0625, 0.5}, + }, + }, + }) + + minetest.register_node(mod_name..":pillar_"..material.name.."_middle", { + drawtype = "nodebox", + description = S("@1 Pillar Middle", desc), + tiles = tile, + groups = crossbrace_connectable_groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.25,-0.5,-0.25,0.25,0.5,0.25}, + }, + }, + }) + + minetest.register_node(mod_name..":pillar_"..material.name.."_middle_half", { + drawtype = "nodebox", + description = S("@1 Half Pillar Middle", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.25, -0.5, 0.25, 0.25, 0.5, 0.5}, + }, + }, + }) + + minetest.register_node(mod_name..":pillar_"..material.name.."_crossbrace", + { + drawtype = "nodebox", + description = S("@1 Crossbrace", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "connected", + fixed = {-0.25,0.25,-0.25,0.25,0.5,0.25}, + connect_front = {-0.25,0.25,-0.75,0.25,0.5,-0.25}, -- -Z + connect_left = {-0.25,0.25,-0.25,-0.75,0.5,0.25}, -- -X + connect_back = {-0.25,0.25,0.25,0.25,0.5,0.75}, -- +Z + connect_right = {0.25,0.25,-0.25,0.75,0.5,0.25}, -- +X + }, + connects_to = { + mod_name..":pillar_"..material.name.."_crossbrace", + mod_name..":pillar_"..material.name.."_extended_crossbrace", + "group:crossbrace_connectable"}, + connect_sides = { "front", "left", "back", "right" }, + }) + + minetest.register_node(mod_name..":pillar_"..material.name.."_extended_crossbrace", + { + drawtype = "nodebox", + description = S("@1 Extended Crossbrace", desc), + tiles = tile, + groups = composition_def.groups, + sounds = composition_def.sounds, + paramtype = "light", + paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = {-1.25,0.25,-0.25,1.25,0.5,0.25}, + }, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_bottom 4", + recipe = { + {"",material.craft_material,""}, + {"",material.craft_material,""}, + {material.craft_material,material.craft_material,material.craft_material} }, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_top 4", + recipe = { + {material.craft_material,material.craft_material,material.craft_material}, + {"",material.craft_material,""}, + {"",material.craft_material,""} }, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_middle 4", + recipe = { + {material.craft_material,material.craft_material}, + {material.craft_material,material.craft_material}, + {material.craft_material,material.craft_material} }, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_crossbrace 10", + recipe = { + {material.craft_material,"",material.craft_material}, + {"",material.craft_material,""}, + {material.craft_material,"",material.craft_material} }, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_middle_half 2", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_middle"}, + }) + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_middle", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_middle_half", mod_name..":pillar_"..material.name.."_middle_half"}, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_top_half 2", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_top"}, + }) + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_top", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_top_half", mod_name..":pillar_"..material.name.."_top_half"}, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_bottom_half 2", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_bottom"}, + }) + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_bottom", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_bottom_half", mod_name..":pillar_"..material.name.."_bottom_half"}, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_extended_crossbrace", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_crossbrace"}, + }) + + minetest.register_craft({ + output = mod_name..":pillar_"..material.name.."_crossbrace", + type="shapeless", + recipe = {mod_name..":pillar_"..material.name.."_extended_crossbrace"}, + }) + + if burn_time > 0 then + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_top", + burntime = burn_time*5/4, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_top_half", + burntime = burn_time*5/8, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_bottom", + burntime = burn_time*5/4, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_bottom_half", + burntime = burn_time*5/8, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_middle", + burntime = burn_time*6/4, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_middle_half", + burntime = burn_time*6/8, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_crossbrace", + burntime = burn_time*5/10, + }) + minetest.register_craft({ + type = "fuel", + recipe = mod_name..":pillar_"..material.name.."_extended_crossbrace", + burntime = burn_time*5/10, + }) + end + +end + +-- The original castle mod had "pillars_", plural, which didn't match the arrowslit and murderhole standard. +castle_masonry.register_pillar_alias = function(old_mod_name, old_material_name, new_mod_name, new_material_name) + minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom") + minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half") + minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace") + minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle") + minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half") + minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top") + minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half") + minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom") + minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half") + minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace") + minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle") + minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half") + minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top") + minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half") +end + +castle_masonry.register_arrowslit_alias_force = function(old_mod_name, old_material_name, new_mod_name, new_material_name) + minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom") + minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half") + minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace") + minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle") + minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half") + minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top") + minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half") + minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom") + minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half") + minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace") + minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle") + minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half") + minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top") + minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half") +end
\ No newline at end of file diff --git a/castle_masonry/screenshot.png b/castle_masonry/screenshot.png Binary files differnew file mode 100644 index 0000000..ff33db0 --- /dev/null +++ b/castle_masonry/screenshot.png diff --git a/castle_masonry/settingtypes.txt b/castle_masonry/settingtypes.txt new file mode 100644 index 0000000..3f11b23 --- /dev/null +++ b/castle_masonry/settingtypes.txt @@ -0,0 +1,20 @@ +[Materials] + +castle_masonry_stonewall (Stonewall) bool true +castle_masonry_cobble (Cobble) bool true +castle_masonry_stonebrick (Stone Brick) bool true +castle_masonry_sandstonebrick (Sandstone Brick) bool true +castle_masonry_desertstonebrick (Desert Stone Brick) bool true +castle_masonry_stone (Stone) bool true +castle_masonry_sandstone (Sandstone) bool true +castle_masonry_desertstone (Desert Stone) bool true +castle_masonry_wood (Wood) bool false +castle_masonry_ice (Ice) bool false +castle_masonry_snow (Snow) bool false +castle_masonry_obsidianbrick (Obsidian Brick) bool false + +[Forms] + +castle_masonry_pillar (Pillars) bool true +castle_masonry_arrowslit (Arrow slits) bool true +castle_masonry_murderhole (Murder holes and machicolations) bool true
\ No newline at end of file diff --git a/castle_masonry/stone_wall.lua b/castle_masonry/stone_wall.lua new file mode 100644 index 0000000..ae598e0 --- /dev/null +++ b/castle_masonry/stone_wall.lua @@ -0,0 +1,160 @@ +-- internationalization boilerplate +local MP = minetest.get_modpath(minetest.get_current_modname()) +local S, NS = dofile(MP.."/intllib.lua") + +minetest.register_alias("castle:stonewall", "castle_masonry:stonewall") +minetest.register_alias("castle:dungeon_stone", "castle_masonry:dungeon_stone") +minetest.register_alias("castle:rubble", "castle_masonry:rubble") +minetest.register_alias("castle:stonewall_corner", "castle_masonry:stonewall_corner") + +minetest.register_node("castle_masonry:stonewall", { + description = S("Castle Wall"), + drawtype = "normal", + tiles = {"castle_stonewall.png"}, + paramtype = "light", + drop = "castle_masonry:stonewall", + groups = {cracky=3}, + sunlight_propagates = false, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("castle_masonry:rubble", { + description = S("Castle Rubble"), + drawtype = "normal", + tiles = {"castle_rubble.png"}, + paramtype = "light", + groups = {crumbly=3,falling_node=1}, + sounds = default.node_sound_gravel_defaults(), +}) + +minetest.register_craft({ + output = "castle_masonry:stonewall", + recipe = { + {"default:cobble"}, + {"default:desert_stone"}, + } +}) + +minetest.register_craft({ + output = "castle_masonry:rubble", + recipe = { + {"castle_masonry:stonewall"}, + } +}) + +minetest.register_craft({ + output = "castle_masonry:rubble 2", + recipe = { + {"default:gravel"}, + {"default:desert_stone"}, + } +}) + +minetest.register_node("castle_masonry:stonewall_corner", { + drawtype = "normal", + paramtype = "light", + paramtype2 = "facedir", + description = S("Castle Corner"), + tiles = {"castle_corner_stonewall_tb.png^[transformR90", + "castle_corner_stonewall_tb.png^[transformR180", + "castle_corner_stonewall1.png", + "castle_stonewall.png", + "castle_stonewall.png", + "castle_corner_stonewall2.png"}, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = "castle_masonry:stonewall_corner", + recipe = { + {"", "castle_masonry:stonewall"}, + {"castle_masonry:stonewall", "default:sandstone"}, + } +}) + +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("castle_masonry", "stonewall", "castle_masonry:stonewall", { + description = S("Stone Wall"), + tiles = {"castle_stonewall.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_all("castle_masonry", "rubble", "castle_masonry:rubble", { + description = S("Rubble"), + tiles = {"castle_rubble.png"}, + groups = {cracky=3, not_in_creative_inventory=1}, + sounds = default.node_sound_gravel_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_stair_alias("castle", "stonewall", "castle_masonry", "stonewall") + stairsplus:register_stair_alias("castle", "rubble", "castle_masonry", "rubble") + +elseif minetest.get_modpath("stairs") then + stairs.register_stair_and_slab("stonewall", "castle_masonry:stonewall", + {cracky=3}, + {"castle_stonewall.png"}, + S("Castle Stonewall Stair"), + S("Castle Stonewall Slab"), + default.node_sound_stone_defaults() + ) + + stairs.register_stair_and_slab("rubble", "castle_masonry:rubble", + {cracky=3}, + {"castle_rubble.png"}, + S("Castle Rubble Stair"), + S("Castle Rubble Slab"), + default.node_sound_stone_defaults() + ) +end + +-------------------------------------------------------------------------------------------------------------- + +minetest.register_node("castle_masonry:dungeon_stone", { + description = S("Dungeon Stone"), + drawtype = "normal", + tiles = {"castle_dungeon_stone.png"}, + groups = {cracky=2}, + paramtype = "light", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craft({ + output = "castle_masonry:dungeon_stone 2", + recipe = { + {"default:stonebrick", "default:obsidian"}, + } +}) + +minetest.register_craft({ + output = "castle_masonry:dungeon_stone 2", + recipe = { + {"default:stonebrick"}, + {"default:obsidian"}, + } +}) + + +if minetest.get_modpath("moreblocks") then + stairsplus:register_all("castle", "dungeon_stone", "castle_masonry:dungeon_stone", { + description = S("Dungeon Stone"), + tiles = {"castle_dungeon_stone.png"}, + groups = {cracky=2, not_in_creative_inventory=1}, + sounds = default.node_sound_stone_defaults(), + sunlight_propagates = true, + }) + + stairsplus:register_stair_alias("castle", "dungeon_stone", "castle_masonry", "dungeon_stone") + +elseif minetest.get_modpath("stairs") then + stairs.register_stair_and_slab("dungeon_stone", "castle_masonry:dungeon_stone", + {cracky=2}, + {"castle_dungeon_stone.png"}, + S("Dungeon Stone Stair"), + S("Dungeon Stone Slab"), + default.node_sound_stone_defaults() + ) +end
\ No newline at end of file diff --git a/castle_masonry/textures/LICENSE.txt b/castle_masonry/textures/LICENSE.txt new file mode 100644 index 0000000..306be33 --- /dev/null +++ b/castle_masonry/textures/LICENSE.txt @@ -0,0 +1,21 @@ +-------------------------------------------- + +License Textures: Philipner - CC-BY-SA 3.0 + +-castle_corner_stonewall_tb.png +-castle_corner_stonewall1.png +-castle_corner_stonewall2.png + +-------------------------------------------- + +16 px textures based on Castle mod +original textures by Philipner + +License Textures: Napiophelios - CC-BY-SA 3.0 + +-castle_pavement_brick.png +-castle_rubble.png +-castle_slate.png +-castle_stonewall.png + +-------------------------------------------- diff --git a/castle_masonry/textures/castle_corner_stonewall1.png b/castle_masonry/textures/castle_corner_stonewall1.png Binary files differnew file mode 100644 index 0000000..0a9c091 --- /dev/null +++ b/castle_masonry/textures/castle_corner_stonewall1.png diff --git a/castle_masonry/textures/castle_corner_stonewall2.png b/castle_masonry/textures/castle_corner_stonewall2.png Binary files differnew file mode 100644 index 0000000..d9d7d0c --- /dev/null +++ b/castle_masonry/textures/castle_corner_stonewall2.png diff --git a/castle_masonry/textures/castle_corner_stonewall_tb.png b/castle_masonry/textures/castle_corner_stonewall_tb.png Binary files differnew file mode 100644 index 0000000..d72d78d --- /dev/null +++ b/castle_masonry/textures/castle_corner_stonewall_tb.png diff --git a/castle_masonry/textures/castle_dungeon_stone.png b/castle_masonry/textures/castle_dungeon_stone.png Binary files differnew file mode 100644 index 0000000..6a2c154 --- /dev/null +++ b/castle_masonry/textures/castle_dungeon_stone.png diff --git a/castle_masonry/textures/castle_pavement_brick.png b/castle_masonry/textures/castle_pavement_brick.png Binary files differnew file mode 100644 index 0000000..fd10e0f --- /dev/null +++ b/castle_masonry/textures/castle_pavement_brick.png diff --git a/castle_masonry/textures/castle_rubble.png b/castle_masonry/textures/castle_rubble.png Binary files differnew file mode 100644 index 0000000..fbaa32c --- /dev/null +++ b/castle_masonry/textures/castle_rubble.png diff --git a/castle_masonry/textures/castle_slate.png b/castle_masonry/textures/castle_slate.png Binary files differnew file mode 100644 index 0000000..a7de1ea --- /dev/null +++ b/castle_masonry/textures/castle_slate.png diff --git a/castle_masonry/textures/castle_stonewall.png b/castle_masonry/textures/castle_stonewall.png Binary files differnew file mode 100644 index 0000000..b8f823f --- /dev/null +++ b/castle_masonry/textures/castle_stonewall.png |