From af9bd2326e02cef904f07c693ba7b66ba0fe34e3 Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Mon, 20 Feb 2017 13:49:57 -0700 Subject: [PATCH] Initial commit This was split out of the venerable Castle mod, https://github.com/minetest-mods/castle, which has been maintained by a long line of distinguished modders. I've added half-pillars, crossbraces, machicolations, embrasures, intllib support, and made the registration functions accessible by other mods. --- .gitattributes | 17 ++ .gitignore | 47 ++++ LICENSE | 21 ++ arrow_slits.lua | 166 ++++++++++++++ depends.txt | 6 + description.txt | 1 + init.lua | 137 ++++++++++++ intllib.lua | 45 ++++ locale/template.pot | 185 ++++++++++++++++ mod.conf | 1 + murder_holes.lua | 91 ++++++++ paving.lua | 109 +++++++++ pillars.lua | 279 ++++++++++++++++++++++++ settingtypes.txt | 20 ++ stone_wall.lua | 160 ++++++++++++++ textures/LICENSE.txt | 21 ++ textures/castle_corner_stonewall1.png | Bin 0 -> 696 bytes textures/castle_corner_stonewall2.png | Bin 0 -> 682 bytes textures/castle_corner_stonewall_tb.png | Bin 0 -> 691 bytes textures/castle_dungeon_stone.png | Bin 0 -> 543 bytes textures/castle_pavement_brick.png | Bin 0 -> 700 bytes textures/castle_rubble.png | Bin 0 -> 563 bytes textures/castle_slate.png | Bin 0 -> 261 bytes textures/castle_stonewall.png | Bin 0 -> 660 bytes 24 files changed, 1306 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 arrow_slits.lua create mode 100644 depends.txt create mode 100644 description.txt create mode 100644 init.lua create mode 100644 intllib.lua create mode 100644 locale/template.pot create mode 100644 mod.conf create mode 100644 murder_holes.lua create mode 100644 paving.lua create mode 100644 pillars.lua create mode 100644 settingtypes.txt create mode 100644 stone_wall.lua create mode 100644 textures/LICENSE.txt create mode 100644 textures/castle_corner_stonewall1.png create mode 100644 textures/castle_corner_stonewall2.png create mode 100644 textures/castle_corner_stonewall_tb.png create mode 100644 textures/castle_dungeon_stone.png create mode 100644 textures/castle_pavement_brick.png create mode 100644 textures/castle_rubble.png create mode 100644 textures/castle_slate.png create mode 100644 textures/castle_stonewall.png diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..bdb0cab --- /dev/null +++ b/.gitattributes @@ -0,0 +1,17 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cd2946a --- /dev/null +++ b/.gitignore @@ -0,0 +1,47 @@ +# Windows image file caches +Thumbs.db +ehthumbs.db + +# Folder config file +Desktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# ========================= +# Operating System Files +# ========================= + +# OSX +# ========================= + +.DS_Store +.AppleDouble +.LSOverride + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..5c3c583 --- /dev/null +++ b/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/arrow_slits.lua b/arrow_slits.lua new file mode 100644 index 0000000..188d7dd --- /dev/null +++ b/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/depends.txt b/depends.txt new file mode 100644 index 0000000..206a637 --- /dev/null +++ b/depends.txt @@ -0,0 +1,6 @@ +default +moreblocks? +stairs? +building_blocks? +asphalt? +streets? \ No newline at end of file diff --git a/description.txt b/description.txt new file mode 100644 index 0000000..2399226 --- /dev/null +++ b/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/init.lua b/init.lua new file mode 100644 index 0000000..d611dd4 --- /dev/null +++ b/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:pillars_stonewall_bottom") +minetest.register_alias("castle:pillars_top", "castle:pillars_stonewall_top") +minetest.register_alias("castle:pillars_middle", "castle:pillars_stonewall_middle") +minetest.register_alias("castle:arrowslit", "castle:arrowslit_stonewall") +minetest.register_alias("castle:arrowslit_hole", "castle:arrowslit_stonewall_hole") +minetest.register_alias("castle:arrowslit", "castle: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/intllib.lua b/intllib.lua new file mode 100644 index 0000000..6669d72 --- /dev/null +++ b/intllib.lua @@ -0,0 +1,45 @@ + +-- Fallback functions for when `intllib` is not installed. +-- Code released under Unlicense . + +-- 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/locale/template.pot b/locale/template.pot new file mode 100644 index 0000000..a0aeadb --- /dev/null +++ b/locale/template.pot @@ -0,0 +1,185 @@ +# 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 , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2017-02-20 13:31-0700\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \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:27 +msgid "Stonewall" +msgstr "" + +#: init.lua:30 +msgid "Cobble" +msgstr "" + +#: init.lua:33 +msgid "Stonebrick" +msgstr "" + +#: init.lua:36 +msgid "Sandstone Brick" +msgstr "" + +#: init.lua:39 +msgid "Desert Stone Brick" +msgstr "" + +#: init.lua:42 +msgid "Stone" +msgstr "" + +#: init.lua:45 +msgid "Sandstone" +msgstr "" + +#: init.lua:48 +msgid "Desert Stone" +msgstr "" + +#: init.lua:51 +msgid "Wood" +msgstr "" + +#: init.lua:54 +msgid "Ice" +msgstr "" + +#: init.lua:57 +msgid "Snow" +msgstr "" + +#: init.lua:60 +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 "" + +#: 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/mod.conf b/mod.conf new file mode 100644 index 0000000..dd444cc --- /dev/null +++ b/mod.conf @@ -0,0 +1 @@ +name = castle_masonry diff --git a/murder_holes.lua b/murder_holes.lua new file mode 100644 index 0000000..090c399 --- /dev/null +++ b/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/paving.lua b/paving.lua new file mode 100644 index 0000000..a6c5c42 --- /dev/null +++ b/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/pillars.lua b/pillars.lua new file mode 100644 index 0000000..2445f34 --- /dev/null +++ b/pillars.lua @@ -0,0 +1,279 @@ +-- 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", "group:crossbrace_connectable"}, + connect_sides = { "front", "left", "back", "right" }, + }) + + 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"}, + }) + + 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, + }) + 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/settingtypes.txt b/settingtypes.txt new file mode 100644 index 0000000..3f11b23 --- /dev/null +++ b/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/stone_wall.lua b/stone_wall.lua new file mode 100644 index 0000000..ae598e0 --- /dev/null +++ b/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/textures/LICENSE.txt b/textures/LICENSE.txt new file mode 100644 index 0000000..306be33 --- /dev/null +++ b/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/textures/castle_corner_stonewall1.png b/textures/castle_corner_stonewall1.png new file mode 100644 index 0000000000000000000000000000000000000000..0a9c0914744930e9884e8b0a8da2ee399f1e62eb GIT binary patch literal 696 zcmV;p0!RIcP)lcerQG{)UA2HMqD|QLLv0yFIEu7BG(qAJgJ=-745vlS z`}@bw50@g5kPuM;5D8FiYSTP>V>U(5^P+mOT4yd98N>JAzdN6go4Q#X{yW>g^}&a4 z^*$tt`|Q&PY#h_@G#J9rwf*X>Y?}^IoXZVIB8fpo;$`h4(9|Ix9xNBnmxxFx z>vi?x!`~GE6pE|$b=?_5hOkqC5VM40WPb3`y|?dfr!E74-Zy~8x%Any5$nwO=!{W@ar5zkl%2_n%)IbKVW<{IY4AdQs7D$FIt~`S!c7-~Zs95F%)C zZU&G~Uw1$L@C!vjNAC65A1>>_sha}l%sx$?5tu9j*d(zsQc@yoXzycNR{-$j)&AnL zajptkY->W$lao!#Qc=Z;t3Tem;^=-SmH3MwLkXxgTIaQ~>^k2k;kIHv>(v}|aM(!~;Z*mVI^ zICx`>s95W~->o;BuFE2sqc_G-&e8`KfNe~O2mokEq=*#IRLvSou1G{hL@T1?3ohGw z?_=G#XHQ?8ym$$Uh@h$>Vl55B#LRc@`~(07l|H<5ZeCLtQXlx}-fBI@d0id8b^i7@ zUtPI!A#xyt&b7JldNVw{_Xq6*_nbiGaM6S!%eF2G(Pu@ucwrIKOeBG!%DTv6TuqyS ztp#H+D>IjoGv|ymqeAOVpRzh~F%M+K`zRbKabnbgQ%I^Jxs;vfci%hn_^;(B_mx3!QF#Q`2sW1dx+#H(tb)oI@N{O*?CX z=allxzc;E1h{PiOewvtxhIeTsii2nx+>fO65DOz&=4?Hlqr_@w` QxBvhE07*qoM6N<$g0LDrQvd(} literal 0 HcmV?d00001 diff --git a/textures/castle_corner_stonewall_tb.png b/textures/castle_corner_stonewall_tb.png new file mode 100644 index 0000000000000000000000000000000000000000..d72d78d5917fbb36dabe44d133df69004dba39c0 GIT binary patch literal 691 zcmV;k0!;mhP)+36dg#J9n;9=7VD7A6&Q!5+HxzPjG+$?%lYs5d#Te z$p$DzqR8cv+@1F;MNWP2ryrln5cZ=#Z7WfglLGhBxa6;Q^0XG`(^@$zwOjT2=~w4S zDB46g@_RWf+R`|GREDG^Dn6^LRX?_M8AD$6deIa%1P2*EtTw!0+d;im_VK)))K$tk zW_#1i3dzTt?$M$FfNs!DRhkena@JcvpG}sh&Fy;EYhQDA7cu|<5P*E$Nx`Xh*bQpX z9`&FIVc$HcYDUYm+4i7KNZ(zwCuPx8h4OJXsH?4f_U(h5^JcVoHYt@$LX_5rra)N` z6QL1&Z~RU>O7hiKE+*w>)Xv4lOkjvfTHlX`v#b*AbO==R)}UY+7@?+zw4u;lDSVi;HOn`1I*+a6uGI8V@=9;FU4G z@{B|u;zU#@!jzmK&7ifRl#HVplrxNe+4LkusqNiC6^PqGHykN3)_TGzrVJ?sAPfLp z&Q{yYbp!$_#J{e)hNH3$k|S zE0as{C~4)Nf!R0_AixSsYz%pwAMsSRHoYE`w-`OLLcTmzt-=iEc>{`CRkrw46= zv(755T9sBBptBfb@O9A{qdA`!*>Cagy9m$?jJX)CL1CCsj8@8eXT6ms=a!&FIi0Ok z(C=?sT%)wsA!f7>9*L2iq{sWdysSehhJmm~cs0t@T<9}OsBh;x&_2fNNN|54?lHKO z`uh9N#Ppfn_V#bWKNsAi8?ZM%XrSO8!QZ1_mblb`9qTRIL< z&#({<+JRchF{+f(u$fHOrj$y~MANqO0UcYGg)tiC$Vkuz3(dS=ZVkAQj$;eOQ>wrnW{I4&(V?kxW@dhjSnrQ}trcZJ=XgK3o&}9H&`Cw-20dk^21I!37VIkF!Us-G!=1qor&M92`jrj0=cD7ruYcJQIxAw$yyeq@Ss h=e!HyN^_8~{sUA)T=tx0zGwgd002ovPDHLkV1g!U1~LEu literal 0 HcmV?d00001 diff --git a/textures/castle_pavement_brick.png b/textures/castle_pavement_brick.png new file mode 100644 index 0000000000000000000000000000000000000000..fd10e0fb6b455c3c03c5e009732f0b85bc03f833 GIT binary patch literal 700 zcmV;t0z>_YP)4 zj?VX?&)>e=w!;dxT+Fj9m1VhLc~jL{Ug}1xsjI3go0_w*E%L&C@1t(JdwG7o_WfS( zSm1d=s3b{>s$^L<7z|iZY6a*##tuql@856h#=jtBntZ(RRE2 zc=aJKDr_4;NCsX%O;cTOZTxN1G}yK!NtR?qV(jFNH@Uw>*uhZR--n{CW(A`(A|zU- zzT@D4P(ldL^Qxk{jssO;3-41*XC=kf#Z?>EDnpLHu=?$34s`YXKi~#6nyLa1d i)3QQJ4~JwnoBacKgp9%ugbiB&0000=kR=50OrdX@R_kQ|9M&f{@v^(lm#-2Y-9As%hRtS z446=dBTlI`a&{sNUH)4}K;6S$nrPu)kAn~em{lbH9(iiQ0FQw8Wq)lV zi^ZigRo!+AL?IlRwnh}RMyeDMcL!#CJG5aTfVB=2rb4_n**z_)3r~#4Mq;^nRumMt z$CfEyiSJRDE{*YFfsC2Cxqm(CzULASQOpzt*DgmZxqH6NT2*%oK!{PZvJ(GVhgB-_ zsnKeA5<#YAA2LsZj9hdmswfcX%AVPfi0HOC0G)-;P1eY!BzuGyydK-;xo4;{5^C|> z@!KvUvcOD4!=z&-XuDKd4*|`tP!J zK_&Wm-_I&vCjD^#FoUYbBm`BJ38zW3Q2zN`_bNqcLQOab*33)eH9(cBz#~6bM}(^C ziZZE4B`^%Hx6UIgtOk`T&x)I+Cz$8daB4Iq{|{;CbV~8|XAb}X002ovPDHLkV1n1c B{THWJ?_x+hLD3*|mOSy5KHYUy~hR#+-=4B{Ne0XB+bGPfAAz^DOHK5Z;yl}ca zmm-l=>(Nk-EFOc~ur_qaxDK9HTYu3p$ff8X@fZ3>013tGCjiAis33zf7m<#j00000 LNkvXXu0mjfi7Ia1 literal 0 HcmV?d00001 diff --git a/textures/castle_stonewall.png b/textures/castle_stonewall.png new file mode 100644 index 0000000000000000000000000000000000000000..b8f823fd39f1933ce4981f5d47f3a3145c060659 GIT binary patch literal 660 zcmV;F0&D$=P)k1dVSl}yX$80P85x{`H5KrIgd`u$8D?&Xo1W2}UK7CBUlYqYb_Bl$8BhZ`a~98}HM0Q)7%- zS>GvxB%7Ff6GM!Lehw*(I;=PafNpke%>`$F9WQ7SX=`!lF96^}+O1``!0BQE;OAHE z-F58}?2p5jhx4YXD+c)X_038k5CVie_UbS!zy0`nyy!oU(@ncp&ifeeUtBjFzn;}f zN}Q}$K0wKvM%t8DoM{`Nln}#W?XUz!Qiy3?%d6T7POzUnV?Zg1#e1K$kEhEFDa8<# z3yrAG$`ua7Vx0?wQw%)p=tTqjww3#_`0RY%!6TaD96~-!r z&xg^*{Neju%tdnSCjIw$9vA=S?xtdtGpb$q`mE4Gjy^X~eYoH5pQmm%gb?GS4LJe% z<^F}s#f3l!^x6RcJ`F|+yx1Ta?UX@Ekx>vN0mK;o>84r;7gEXD*Z=_Nb5_%WNHk-) u!2URLj*UcGXe{NVEKxB-LMRl7^YMR50;8M