Add 'castle_masonry' mod from 'castle' modpack
|
@ -171,6 +171,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
* castle
|
||||
* mp_castle/
|
||||
* [castle_farming][] ([MIT][lic.castle_farming]) -- version [a190dcf Git][ver.castle_farming] *2017-04-21*
|
||||
* [castle_masonry][] ([MIT][lic.castle_masonry]) -- version [94b25b5 Git][ver.castle_masonry] *2017-02-28* ([patched][patch.castle_masonry])
|
||||
* [crafting_bench][] ([MIT][lic.crafting_bench]) -- version [3aa4cfb Git][ver.crafting_bench] *2017-02-28* ([patched][patch.crafting_bench])
|
||||
* [Creatures MOB-Engine][cme] ([zlib / CC-BY-SA][lic.cme]) -- version: [2.3.1-0-e3502a1 Git][ver.cme] *2016-02-16* ([patched][patch.cme])
|
||||
* mp_cme/
|
||||
|
@ -229,6 +230,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
[bridges]: https://forum.minetest.net/viewtopic.php?t=3488
|
||||
[campfire]: https://forum.minetest.net/viewtopic.php?t=10569
|
||||
[castle_farming]: https://github.com/minetest-mods/castle_farming
|
||||
[castle_masonry]: https://github.com/minetest-mods/castle_masonry
|
||||
[character_creator]: https://forum.minetest.net/viewtopic.php?t=13138
|
||||
[chatlog]: https://forum.minetest.net/viewtopic.php?t=6220
|
||||
[christmas]: https://forum.minetest.net/viewtopic.php?t=3950
|
||||
|
@ -339,6 +341,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
[lic.bridges]: mods/buildings/bridges/README.md
|
||||
[lic.campfire]: mods/campfire/README.md
|
||||
[lic.castle_farming]: mods/mp_castle/castle_farming/LICENSE
|
||||
[lic.castle_masonry]: mods/mp_castle/castle_masonry/LICENSE
|
||||
[lic.character_creator]: mods/player_visuals/character_creator/license.txt
|
||||
[lic.christmas]: mods/buildings/christmas/LICENSE.txt
|
||||
[lic.cme]: mods/mp_cme/LICENSE.txt
|
||||
|
@ -424,6 +427,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
[ver.bridges]: https://github.com/Sokomine/bridges/tree/5b5f475
|
||||
[ver.campfire]: https://github.com/Napiophelios/campfire/tree/b45acd2
|
||||
[ver.castle_farming]: https://github.com/minetest-mods/castle_farming/tree/a190dcf
|
||||
[ver.castle_masonry]: https://github.com/minetest-mods/castle_masonry/tree/94b25b5
|
||||
[ver.character_creator]: https://github.com/Rui-Minetest/character_creator/tree/0c0e187
|
||||
[ver.christmas]: https://github.com/TheZenKitteh/minetest-christmas/tree/d3bd872
|
||||
[ver.cme]: https://github.com/BlockMen/cme/tree/e3502a1
|
||||
|
@ -502,6 +506,7 @@ The game includes the mods from the default [minetest_game](https://github.com/m
|
|||
[patch.bedrock2]: https://github.com/AntumDeluge/mtmod-bedrock2/tree/0375ac1
|
||||
[patch.biome_lib]: https://github.com/AntumDeluge/mtmod-biome_lib/tree/4821839
|
||||
[patch.campfire]: https://github.com/AntumDeluge/mtmod-campfire/tree/67b9dd7
|
||||
[patch.castle_masonry]: https://github.com/AntumDeluge/mtmod-castle_masonry/tree/88c2f89
|
||||
[patch.christmas]: https://github.com/AntumDeluge/mtmod-christmas/tree/f6c8dc2
|
||||
[patch.clean]: https://github.com/AntumDeluge/mtmod-clean/tree/de460c5
|
||||
[patch.cme]: https://github.com/AntumDeluge/mtmp-cme/tree/7a6e106
|
||||
|
|
|
@ -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.
|
|
@ -0,0 +1,43 @@
|
|||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Castles Mod
|
||||
by: Philipbenr And DanDuncombe
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Licence: MIT
|
||||
|
||||
see: LICENSE
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
This is a mod all about creating castles and castle dungeons. Many of the nodes are used for the outer-walls or dungeons.
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=
|
||||
|
||||
Contains:
|
||||
|
||||
--Walls, Corner-walls,
|
||||
--Castlestone Stairs, Slabs, and Pillars
|
||||
--Arrowslits and embrasures
|
||||
--Rubble (to fill the interior of thick castle walls)
|
||||
--Murder holes and machicolations
|
||||
--Pillars and crossbraces
|
||||
--Roof slate
|
||||
--Paving stone
|
||||
--Dungeon stone
|
||||
|
||||
Mod settings can allow for the basic castle masonry forms to be made for the following material types (all optional):
|
||||
|
||||
Cobble
|
||||
Desert stone
|
||||
Desert stone brick
|
||||
Sandstone
|
||||
Sandstone brick
|
||||
Stone
|
||||
Stone brick
|
||||
Castle wall
|
||||
Wood
|
||||
Snow
|
||||
Ice
|
||||
Obsidian Brick
|
|
@ -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
|
|
@ -0,0 +1,7 @@
|
|||
default
|
||||
moreblocks?
|
||||
stairs?
|
||||
building_blocks?
|
||||
asphalt?
|
||||
streets?
|
||||
craft_guide?
|
|
@ -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.
|
|
@ -0,0 +1,137 @@
|
|||
castle_masonry = {}
|
||||
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
dofile(MP.."/pillars.lua")
|
||||
dofile(MP.."/arrow_slits.lua")
|
||||
dofile(MP.."/murder_holes.lua")
|
||||
dofile(MP.."/stone_wall.lua")
|
||||
dofile(MP.."/paving.lua")
|
||||
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
local read_setting = function(name, default)
|
||||
local setting = minetest.setting_getbool(name)
|
||||
if setting == nil then return default end
|
||||
return setting
|
||||
end
|
||||
|
||||
-- Material definition:
|
||||
-- {
|
||||
-- name=, -- the name that will be part of the resulting node names
|
||||
-- desc=, -- Player-facing name of the material
|
||||
-- tile=, -- Optional - the texture tile to use for the resulting blocks (can be a single texture or a table, as a normal node definition's tile def). If not set this will be taken from the material it's made out of.
|
||||
-- craft_material=, -- What source block is used to craft these blocks.
|
||||
-- composition_material=, -- Optional, this will override the properties of the product with a specific material. Useful if you want to use a group for the craft material (eg, "group:wood")
|
||||
--}
|
||||
|
||||
castle_masonry.materials = {}
|
||||
if read_setting("castle_masonry_stonewall", true) then
|
||||
table.insert(castle_masonry.materials, {name="stonewall", desc=S("Stonewall"), tile="castle_stonewall.png", craft_material="castle:stonewall"})
|
||||
end
|
||||
if read_setting("castle_masonry_cobble", true) then
|
||||
table.insert(castle_masonry.materials, {name="cobble", desc=S("Cobble"), tile="default_cobble.png", craft_material="default:cobble"})
|
||||
end
|
||||
if read_setting("castle_masonry_stonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="stonebrick", desc=S("Stonebrick"), tile="default_stone_brick.png", craft_material="default:stonebrick"})
|
||||
end
|
||||
if read_setting("castle_masonry_sandstonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="sandstonebrick", desc=S("Sandstone Brick"), tile="default_sandstone_brick.png", craft_material="default:sandstonebrick"})
|
||||
end
|
||||
if read_setting("castle_masonry_desertstonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertstonebrick", desc=S("Desert Stone Brick"), tile="default_desert_stone_brick.png", craft_material="default:desert_stonebrick"})
|
||||
end
|
||||
if read_setting("castle_masonry_stone", true) then
|
||||
table.insert(castle_masonry.materials, {name="stone", desc=S("Stone"), tile="default_stone.png", craft_material="default:stone"})
|
||||
end
|
||||
if read_setting("castle_masonry_sandstone", true) then
|
||||
table.insert(castle_masonry.materials, {name="sandstone", desc=S("Sandstone"), tile="default_sandstone.png", craft_material="default:sandstone"})
|
||||
end
|
||||
if read_setting("castle_masonry_desertstone", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertstone", desc=S("Desert Stone"), tile="default_desert_stone.png", craft_material="default:desert_stone"})
|
||||
end
|
||||
if read_setting("castle_masonry_wood", false) then
|
||||
table.insert(castle_masonry.materials, {name="wood", desc=S("Wood"), tile="default_wood.png", craft_material="group:wood", composition_material="default:wood"})
|
||||
end
|
||||
if read_setting("castle_masonry_ice", false) then
|
||||
table.insert(castle_masonry.materials, {name="ice", desc=S("Ice"), tile="default_ice.png", craft_material="default:ice"})
|
||||
end
|
||||
if read_setting("castle_masonry_snow", false) then
|
||||
table.insert(castle_masonry.materials, {name="snow", desc=S("Snow"), tile="default_snow.png", craft_material="default:snow"})
|
||||
end
|
||||
if read_setting("castle_masonry_obsidianbrick", false) then
|
||||
table.insert(castle_masonry.materials, {name="obsidianbrick", desc=S("Obsidian Brick"), tile="default_obsidian_brick.png", craft_material="default:obsidianbrick"})
|
||||
end
|
||||
|
||||
castle_masonry.get_material_properties = function(material)
|
||||
local composition_def
|
||||
local burn_time
|
||||
if material.composition_material ~= nil then
|
||||
composition_def = minetest.registered_nodes[material.composition_material]
|
||||
burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack(material.composition_material)}}).time
|
||||
else
|
||||
composition_def = minetest.registered_nodes[material.craft_material]
|
||||
burn_time = minetest.get_craft_result({method="fuel", width=1, items={ItemStack(material.craft_materia)}}).time
|
||||
end
|
||||
|
||||
local tiles = material.tile
|
||||
if tiles == nil then
|
||||
tiles = composition_def.tile
|
||||
elseif type(tiles) == "string" then
|
||||
tiles = {tiles}
|
||||
end
|
||||
|
||||
local desc = material.desc
|
||||
if desc == nil then
|
||||
desc = composition_def.description
|
||||
end
|
||||
|
||||
return composition_def, burn_time, tiles, desc
|
||||
end
|
||||
|
||||
|
||||
if read_setting("castle_masonry_pillar", true) then
|
||||
for _, material in pairs(castle_masonry.materials) do
|
||||
castle_masonry.register_pillar(material)
|
||||
end
|
||||
end
|
||||
|
||||
if read_setting("castle_masonry_arrowslit", true) then
|
||||
for _, material in pairs(castle_masonry.materials) do
|
||||
castle_masonry.register_arrowslit(material)
|
||||
end
|
||||
end
|
||||
|
||||
if read_setting("castle_masonry_murderhole", true) then
|
||||
for _, material in pairs(castle_masonry.materials) do
|
||||
castle_masonry.register_murderhole(material)
|
||||
end
|
||||
end
|
||||
|
||||
minetest.register_alias("castle:pillars_bottom", "castle_masonry:pillars_stonewall_bottom")
|
||||
minetest.register_alias("castle:pillars_top", "castle_masonry:pillars_stonewall_top")
|
||||
minetest.register_alias("castle:pillars_middle", "castle_masonry:pillars_stonewall_middle")
|
||||
minetest.register_alias("castle:arrowslit", "castle_masonry:arrowslit_stonewall")
|
||||
minetest.register_alias("castle:arrowslit_hole", "castle_masonry:arrowslit_stonewall_hole")
|
||||
minetest.register_alias("castle:arrowslit_cross", "castle_masonry:arrowslit_stonewall_cross")
|
||||
|
||||
for _, material in pairs(castle_masonry.materials) do
|
||||
castle_masonry.register_murderhole_alias("castle", material.name, "castle_masonry", material.name)
|
||||
castle_masonry.register_pillar_alias("castle", material.name, "castle_masonry", material.name)
|
||||
|
||||
-- Arrowslit upgrade has special handling because the castle mod arrow slit is reversed relative to current build-from-inside standard
|
||||
local lbm_def = {
|
||||
name = "castle_masonry:arrowslit_flip_front_to_back"..material.name,
|
||||
nodenames = {
|
||||
"castle:arrowslit_"..material.name,
|
||||
"castle:arrowslit_"..material.name.."_cross",
|
||||
"castle:arrowslit_"..material.name.."_hole",
|
||||
},
|
||||
action = function(pos, node)
|
||||
local flip_front_to_back = {[0]=2, 3, 0, 1, 6, 7, 4, 5, 10, 7, 8, 9, 14, 15, 12, 13, 18, 19, 16, 17, 22, 23, 20, 21}
|
||||
node.param2 = flip_front_to_back[node.param2]
|
||||
node.name = "castle_masonry" .. string.sub(node.name, 7, -1)
|
||||
minetest.swap_node(pos, node)
|
||||
end
|
||||
}
|
||||
minetest.register_lbm(lbm_def)
|
||||
end
|
|
@ -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
|
|
@ -0,0 +1 @@
|
|||
name = castle_masonry
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,314 @@
|
|||
-- internationalization boilerplate
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
local S, NS = dofile(MP.."/intllib.lua")
|
||||
|
||||
castle_masonry.register_pillar = function(material)
|
||||
local composition_def, burn_time, tile, desc = castle_masonry.get_material_properties(material)
|
||||
local crossbrace_connectable_groups = {}
|
||||
for group, val in pairs(composition_def.groups) do
|
||||
crossbrace_connectable_groups[group] = val
|
||||
end
|
||||
crossbrace_connectable_groups.crossbrace_connectable = 1
|
||||
|
||||
local mod_name = minetest.get_current_modname()
|
||||
|
||||
-- Node Definition
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_bottom", {
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Pillar Base", desc),
|
||||
tiles = tile,
|
||||
groups = crossbrace_connectable_groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5,-0.5,-0.5,0.5,-0.375,0.5},
|
||||
{-0.375,-0.375,-0.375,0.375,-0.125,0.375},
|
||||
{-0.25,-0.125,-0.25,0.25,0.5,0.25},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_bottom_half", {
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Half Pillar Base", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0, 0.5, -0.375, 0.5},
|
||||
{-0.375, -0.375, 0.125, 0.375, -0.125, 0.5},
|
||||
{-0.25, -0.125, 0.25, 0.25, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_top", {
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Pillar Top", desc),
|
||||
tiles = tile,
|
||||
groups = crossbrace_connectable_groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5,0.3125,-0.5,0.5,0.5,0.5},
|
||||
{-0.375,0.0625,-0.375,0.375,0.3125,0.375},
|
||||
{-0.25,-0.5,-0.25,0.25,0.0625,0.25},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_top_half", {
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Half Pillar Top", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, 0.3125, 0, 0.5, 0.5, 0.5},
|
||||
{-0.375, 0.0625, 0.125, 0.375, 0.3125, 0.5},
|
||||
{-0.25, -0.5, 0.25, 0.25, 0.0625, 0.5},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_middle", {
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Pillar Middle", desc),
|
||||
tiles = tile,
|
||||
groups = crossbrace_connectable_groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.25,-0.5,-0.25,0.25,0.5,0.25},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_middle_half", {
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Half Pillar Middle", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.25, -0.5, 0.25, 0.25, 0.5, 0.5},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_crossbrace",
|
||||
{
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Crossbrace", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "connected",
|
||||
fixed = {-0.25,0.25,-0.25,0.25,0.5,0.25},
|
||||
connect_front = {-0.25,0.25,-0.75,0.25,0.5,-0.25}, -- -Z
|
||||
connect_left = {-0.25,0.25,-0.25,-0.75,0.5,0.25}, -- -X
|
||||
connect_back = {-0.25,0.25,0.25,0.25,0.5,0.75}, -- +Z
|
||||
connect_right = {0.25,0.25,-0.25,0.75,0.5,0.25}, -- +X
|
||||
},
|
||||
connects_to = {
|
||||
mod_name..":pillar_"..material.name.."_crossbrace",
|
||||
mod_name..":pillar_"..material.name.."_extended_crossbrace",
|
||||
"group:crossbrace_connectable"},
|
||||
connect_sides = { "front", "left", "back", "right" },
|
||||
})
|
||||
|
||||
minetest.register_node(mod_name..":pillar_"..material.name.."_extended_crossbrace",
|
||||
{
|
||||
drawtype = "nodebox",
|
||||
description = S("@1 Extended Crossbrace", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {-1.25,0.25,-0.25,1.25,0.5,0.25},
|
||||
},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_bottom 4",
|
||||
recipe = {
|
||||
{"",material.craft_material,""},
|
||||
{"",material.craft_material,""},
|
||||
{material.craft_material,material.craft_material,material.craft_material} },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_top 4",
|
||||
recipe = {
|
||||
{material.craft_material,material.craft_material,material.craft_material},
|
||||
{"",material.craft_material,""},
|
||||
{"",material.craft_material,""} },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_middle 4",
|
||||
recipe = {
|
||||
{material.craft_material,material.craft_material},
|
||||
{material.craft_material,material.craft_material},
|
||||
{material.craft_material,material.craft_material} },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_crossbrace 10",
|
||||
recipe = {
|
||||
{material.craft_material,"",material.craft_material},
|
||||
{"",material.craft_material,""},
|
||||
{material.craft_material,"",material.craft_material} },
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_middle_half 2",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_middle"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_middle",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_middle_half", mod_name..":pillar_"..material.name.."_middle_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_top_half 2",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_top"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_top",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_top_half", mod_name..":pillar_"..material.name.."_top_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_bottom_half 2",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_bottom"},
|
||||
})
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_bottom",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_bottom_half", mod_name..":pillar_"..material.name.."_bottom_half"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_extended_crossbrace",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_crossbrace"},
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = mod_name..":pillar_"..material.name.."_crossbrace",
|
||||
type="shapeless",
|
||||
recipe = {mod_name..":pillar_"..material.name.."_extended_crossbrace"},
|
||||
})
|
||||
|
||||
if burn_time > 0 then
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_top",
|
||||
burntime = burn_time*5/4,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_top_half",
|
||||
burntime = burn_time*5/8,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_bottom",
|
||||
burntime = burn_time*5/4,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_bottom_half",
|
||||
burntime = burn_time*5/8,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_middle",
|
||||
burntime = burn_time*6/4,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_middle_half",
|
||||
burntime = burn_time*6/8,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_crossbrace",
|
||||
burntime = burn_time*5/10,
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = mod_name..":pillar_"..material.name.."_extended_crossbrace",
|
||||
burntime = burn_time*5/10,
|
||||
})
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
-- The original castle mod had "pillars_", plural, which didn't match the arrowslit and murderhole standard.
|
||||
castle_masonry.register_pillar_alias = function(old_mod_name, old_material_name, new_mod_name, new_material_name)
|
||||
minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom")
|
||||
minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half")
|
||||
minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace")
|
||||
minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle")
|
||||
minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half")
|
||||
minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top")
|
||||
minetest.register_alias(old_mod_name..":pillars_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half")
|
||||
minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom")
|
||||
minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half")
|
||||
minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace")
|
||||
minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle")
|
||||
minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half")
|
||||
minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top")
|
||||
minetest.register_alias(old_mod_name..":pillar_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half")
|
||||
end
|
||||
|
||||
castle_masonry.register_arrowslit_alias_force = function(old_mod_name, old_material_name, new_mod_name, new_material_name)
|
||||
minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom")
|
||||
minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half")
|
||||
minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace")
|
||||
minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle")
|
||||
minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half")
|
||||
minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top")
|
||||
minetest.register_alias_force(old_mod_name..":pillars_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half")
|
||||
minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_bottom", new_mod_name..":pillar_"..new_material_name.."_bottom")
|
||||
minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_bottom_half", new_mod_name..":pillar_"..new_material_name.."_bottom_half")
|
||||
minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_crossbrace", new_mod_name..":pillar_"..new_material_name.."_crossbrace")
|
||||
minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_middle", new_mod_name..":pillar_"..new_material_name.."_middle")
|
||||
minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_middle_half", new_mod_name..":pillar_"..new_material_name.."_middle_half")
|
||||
minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_top", new_mod_name..":pillar_"..new_material_name.."_top")
|
||||
minetest.register_alias_force(old_mod_name..":pillar_"..old_material_name.."_top_half", new_mod_name..":pillar_"..new_material_name.."_top_half")
|
||||
end
|
After Width: | Height: | Size: 304 KiB |
|
@ -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
|
|
@ -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
|
|
@ -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
|
||||
|
||||
--------------------------------------------
|
After Width: | Height: | Size: 696 B |
After Width: | Height: | Size: 682 B |
After Width: | Height: | Size: 691 B |
After Width: | Height: | Size: 543 B |
After Width: | Height: | Size: 700 B |
After Width: | Height: | Size: 563 B |
After Width: | Height: | Size: 261 B |
After Width: | Height: | Size: 660 B |