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.
17
.gitattributes
vendored
Normal file
@ -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
|
47
.gitignore
vendored
Normal file
@ -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
|
21
LICENSE
Normal file
@ -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.
|
166
arrow_slits.lua
Normal file
@ -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
|
6
depends.txt
Normal file
@ -0,0 +1,6 @@
|
||||
default
|
||||
moreblocks?
|
||||
stairs?
|
||||
building_blocks?
|
||||
asphalt?
|
||||
streets?
|
1
description.txt
Normal file
@ -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.
|
137
init.lua
Normal file
@ -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
|
45
intllib.lua
Normal file
@ -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
|
185
locale/template.pot
Normal file
@ -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 <EMAIL@ADDRESS>, 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 <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: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 ""
|
91
murder_holes.lua
Normal file
@ -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
|
109
paving.lua
Normal file
@ -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
|
279
pillars.lua
Normal file
@ -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
|
20
settingtypes.txt
Normal file
@ -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
|
160
stone_wall.lua
Normal file
@ -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
|
21
textures/LICENSE.txt
Normal file
@ -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
|
||||
|
||||
--------------------------------------------
|
BIN
textures/castle_corner_stonewall1.png
Normal file
After Width: | Height: | Size: 696 B |
BIN
textures/castle_corner_stonewall2.png
Normal file
After Width: | Height: | Size: 682 B |
BIN
textures/castle_corner_stonewall_tb.png
Normal file
After Width: | Height: | Size: 691 B |
BIN
textures/castle_dungeon_stone.png
Normal file
After Width: | Height: | Size: 543 B |
BIN
textures/castle_pavement_brick.png
Normal file
After Width: | Height: | Size: 700 B |
BIN
textures/castle_rubble.png
Normal file
After Width: | Height: | Size: 563 B |
BIN
textures/castle_slate.png
Normal file
After Width: | Height: | Size: 261 B |
BIN
textures/castle_stonewall.png
Normal file
After Width: | Height: | Size: 660 B |