MineClonia/MineClone2 Support (#22)
This commit is contained in:
parent
be330097a8
commit
c382515bca
@ -12,6 +12,8 @@ castle_masonry.register_arrowslit = function(material)
|
||||
description = S("@1 Arrowslit", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -33,6 +35,8 @@ castle_masonry.register_arrowslit = function(material)
|
||||
description = S("@1 Arrowslit with Cross", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -58,6 +62,8 @@ castle_masonry.register_arrowslit = function(material)
|
||||
description = S("@1 Arrowslit with Hole", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -81,6 +87,8 @@ castle_masonry.register_arrowslit = function(material)
|
||||
description = S("@1 Embrasure", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
102
init.lua
102
init.lua
@ -1,6 +1,17 @@
|
||||
castle_masonry = {}
|
||||
|
||||
castle_masonry.sounds = {}
|
||||
|
||||
if minetest.get_modpath("default") then
|
||||
castle_masonry.sounds = default
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mcl_sounds") then
|
||||
castle_masonry.sounds = mcl_sounds
|
||||
end
|
||||
|
||||
local MP = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
dofile(MP.."/pillars.lua")
|
||||
dofile(MP.."/arrow_slits.lua")
|
||||
dofile(MP.."/murder_holes.lua")
|
||||
@ -12,7 +23,7 @@ local S = minetest.get_translator("castle_masonry")
|
||||
|
||||
local read_setting = function(name, default)
|
||||
local setting = minetest.settings:get_bool(name)
|
||||
if setting == nil then return default end
|
||||
if not setting then return default end
|
||||
return setting
|
||||
end
|
||||
|
||||
@ -26,55 +37,58 @@ end
|
||||
--}
|
||||
|
||||
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_masonry:stonewall"})
|
||||
|
||||
local function register_material(def, setting_default)
|
||||
if read_setting("castle_masonry_" .. def.name, setting_default) then
|
||||
table.insert(castle_masonry.materials, def)
|
||||
end
|
||||
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"})
|
||||
|
||||
-- castle masonry materials
|
||||
register_material({name="stonewall", desc=S("Stonewall"), tile="castle_stonewall.png", craft_material="castle_masonry:stonewall"}, true)
|
||||
|
||||
-- MTG materials
|
||||
if minetest.get_modpath("default") then
|
||||
register_material({name="cobble", desc=S("Cobble"), tile="default_cobble.png", craft_material="default:cobble"}, true)
|
||||
register_material({name="stonebrick", desc=S("Stonebrick"), tile="default_stone_brick.png", craft_material="default:stonebrick"}, true)
|
||||
register_material({name="stone", desc=S("Stone"), tile="default_stone.png", craft_material="default:stone"}, true)
|
||||
register_material({name="wood", desc=S("Wood"), tile="default_wood.png", craft_material="group:wood", composition_material="default:wood"})
|
||||
register_material({name="ice", desc=S("Ice"), tile="default_ice.png", craft_material="default:ice"})
|
||||
register_material({name="snow", desc=S("Snow"), tile="default_snow.png", craft_material="default:snow"})
|
||||
register_material({name="sandstone", desc=S("Sandstone"), tile="default_sandstone.png", craft_material="default:sandstone"}, true)
|
||||
register_material({name="sandstonebrick", desc=S("Sandstone Brick"), tile="default_sandstone_brick.png", craft_material="default:sandstonebrick"}, true)
|
||||
register_material({name="desertstonebrick", desc=S("Desert Stone Brick"), tile="default_desert_stone_brick.png", craft_material="default:desert_stonebrick"}, true)
|
||||
register_material({name="desertsandstonebrick", desc=S("Desert Sandstone Brick"), tile="default_desert_sandstone_brick.png", craft_material="default:desert_sandstone_brick"}, true)
|
||||
register_material({name="silversandstonebrick", desc=S("Silver Sandstone Brick"), tile="default_silver_sandstone_brick.png", craft_material="default:silver_sandstone_brick"}, true)
|
||||
register_material({name="desertstone", desc=S("Desert Stone"), tile="default_desert_stone.png", craft_material="default:desert_stone"}, true)
|
||||
register_material({name="desertsandstone", desc=S("Desert Sandstone"), tile="default_desert_sandstone.png", craft_material="default:desert_sandstone"}, true)
|
||||
register_material({name="silversandstone", desc=S("Silver Sandstone"), tile="default_silver_sandstone.png", craft_material="default:silver_sandstone"}, true)
|
||||
register_material({name="obsidianbrick", desc=S("Obsidian Brick"), tile="default_obsidian_brick.png", craft_material="default:obsidianbrick"})
|
||||
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"})
|
||||
|
||||
-- MCL materials
|
||||
if minetest.get_modpath("mcl_core") then
|
||||
register_material({name="cobble", desc=S("Cobble"), craft_material="group:cobble", composition_material="mcl_core:cobble"}, true)
|
||||
register_material({name="stonebrick", desc=S("Stonebrick"), craft_material="mcl_core:stonebrick"}, true)
|
||||
register_material({name="stone", desc=S("Stone"), craft_material="group:stone", composition_material="mcl_core:stone"}, true)
|
||||
register_material({name="wood", desc=S("Wood"), craft_material="group:wood", composition_material="mcl_core:wood"})
|
||||
register_material({name="ice", desc=S("Ice"), craft_material="mcl_core:ice"})
|
||||
register_material({name="snow", desc=S("Snow"), craft_material="mcl_core:snowblock"})
|
||||
register_material({name="sandstone", desc=S("Sandstone"), craft_material="mcl_core:sandstone"}, true)
|
||||
register_material({name="redsandstone", desc=S("Red Sandstone"), craft_material="mcl_core:redsandstone"}, true)
|
||||
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"})
|
||||
if minetest.get_modpath("mcl_nether") then
|
||||
register_material({name="quartz", desc=S("Quartz"), craft_material="mcl_nether:quartz_block"}, true)
|
||||
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"})
|
||||
if minetest.get_modpath("mcl_blackstone") then
|
||||
register_material({name="blackstone", desc=S("Blackstone"), craft_material="mcl_blackstone:blackstone_brick_polished"}, true)
|
||||
end
|
||||
if read_setting("castle_masonry_desertsandstonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertsandstonebrick", desc=S("Desert Sandstone Brick"), tile="default_desert_sandstone_brick.png", craft_material="default:desert_sandstone_brick"})
|
||||
end
|
||||
if read_setting("castle_masonry_silversandstonebrick", true) then
|
||||
table.insert(castle_masonry.materials, {name="silversandstonebrick", desc=S("Silver Sandstone Brick"), tile="default_silver_sandstone_brick.png", craft_material="default:silver_sandstone_brick"})
|
||||
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_desertsandstone", true) then
|
||||
table.insert(castle_masonry.materials, {name="desertsandstone", desc=S("Desert Sandstone"), tile="default_desert_sandstone.png", craft_material="default:desert_sandstone"})
|
||||
end
|
||||
if read_setting("castle_masonry_silversandstone", true) then
|
||||
table.insert(castle_masonry.materials, {name="silversandstone", desc=S("Silver Sandstone"), tile="default_silver_sandstone.png", craft_material="default:silver_sandstone"})
|
||||
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"})
|
||||
if minetest.get_modpath("mcl_deepslate") then
|
||||
register_material({name="deepslate_bricks", desc=S("Deepslate Bricks"), craft_material="mcl_deepslate:deepslate_bricks"}, true)
|
||||
register_material({name="deepslate_tiles", desc=S("Deepslate Tiles"), craft_material="mcl_deepslate:deepslate_tiles"}, true)
|
||||
end
|
||||
|
||||
|
||||
castle_masonry.get_material_properties = function(material)
|
||||
local composition_def
|
||||
local burn_time
|
||||
@ -88,7 +102,7 @@ castle_masonry.get_material_properties = function(material)
|
||||
|
||||
local tiles = material.tile
|
||||
if tiles == nil then
|
||||
tiles = composition_def.tile
|
||||
tiles = composition_def.tiles
|
||||
elseif type(tiles) == "string" then
|
||||
tiles = {tiles}
|
||||
end
|
||||
|
4
mod.conf
4
mod.conf
@ -1,6 +1,6 @@
|
||||
name = castle_masonry
|
||||
depends = default
|
||||
optional_depends = moreblocks, stairs, building_blocks, asphalt, streets
|
||||
depends =
|
||||
optional_depends = default, mcl_core, mcl_sounds, mcl_nether, mcl_deepslate, mcl_blackstone, mcl_stairs, moreblocks, stairs, building_blocks, asphalt, streets
|
||||
description = """
|
||||
This is a mod all about creating castles and castle dungeons.
|
||||
Many of the nodes are used for the outer-walls or dungeons.
|
||||
|
@ -13,6 +13,8 @@ castle_masonry.register_murderhole = function(material)
|
||||
description = S("@1 Murder Hole", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -32,6 +34,8 @@ castle_masonry.register_murderhole = function(material)
|
||||
description = S("@1 Machicolation", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
50
paving.lua
50
paving.lua
@ -10,16 +10,18 @@ minetest.register_node("castle_masonry:pavement_brick", {
|
||||
description = S("Paving Stone"),
|
||||
drawtype = "normal",
|
||||
tiles = {"castle_pavement_brick.png"},
|
||||
groups = {cracky=2},
|
||||
groups = {cracky=2, pickaxey=2},
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = castle_masonry.sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_masonry:pavement_brick 4",
|
||||
recipe = {
|
||||
{"default:stone", "default:cobble"},
|
||||
{"default:cobble", "default:stone"},
|
||||
{"group:stone", "group:cobble"},
|
||||
{"group:cobble", "group:stone"},
|
||||
}
|
||||
})
|
||||
|
||||
@ -28,18 +30,26 @@ if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("castle_masonry", "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(),
|
||||
groups = {cracky=2, pickaxey=2, not_in_creative_inventory=1},
|
||||
sounds = castle_masonry.sounds.node_sound_stone_defaults(),
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
stairsplus:register_alias_all("castle", "pavement_brick", "castle_masonry", "pavement_brick")
|
||||
elseif minetest.get_modpath("mcl_stairs") then
|
||||
mcl_stairs.register_stair_and_slab("pavement_brick", "castle_masonry:pavement_brick",
|
||||
{pickaxey=2},
|
||||
{"castle_pavement_brick.png"},
|
||||
S("Castle Pavement Stair"),
|
||||
S("Castle Pavement Slab"),
|
||||
castle_masonry.sounds.node_sound_stone_defaults()
|
||||
)
|
||||
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()
|
||||
castle_masonry.sounds.node_sound_stone_defaults()
|
||||
)
|
||||
end
|
||||
|
||||
@ -56,27 +66,31 @@ minetest.register_node("castle_masonry:roofslate", {
|
||||
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(),
|
||||
groups = {cracky=3, pickaxey=1, attached_node=1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
sounds = castle_masonry.sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
local mod_building_blocks = minetest.get_modpath("building_blocks")
|
||||
local mod_streets = minetest.get_modpath("streets") or minetest.get_modpath("asphalt")
|
||||
local has_mcl = minetest.get_modpath("mcl_core")
|
||||
local gravel = has_mcl and "mcl_core:gravel" or "default:gravel"
|
||||
|
||||
if mod_building_blocks then
|
||||
minetest.register_craft({
|
||||
output = "castle_masonry:roofslate 4",
|
||||
recipe = {
|
||||
{ "building_blocks:Tar" , "default:gravel" },
|
||||
{ "default:gravel", "building_blocks:Tar" }
|
||||
{ "building_blocks:Tar" , gravel },
|
||||
{ gravel, "building_blocks:Tar" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "castle_masonry:roofslate 4",
|
||||
recipe = {
|
||||
{ "default:gravel", "building_blocks:Tar" },
|
||||
{ "building_blocks:Tar" , "default:gravel" }
|
||||
{ gravel, "building_blocks:Tar" },
|
||||
{ "building_blocks:Tar" , gravel }
|
||||
}
|
||||
})
|
||||
end
|
||||
@ -85,16 +99,16 @@ if mod_streets then
|
||||
minetest.register_craft( {
|
||||
output = "castle_masonry:roofslate 4",
|
||||
recipe = {
|
||||
{ "streets:asphalt" , "default:gravel" },
|
||||
{ "default:gravel", "streets:asphalt" }
|
||||
{ "streets:asphalt" , gravel },
|
||||
{ gravel, "streets:asphalt" }
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft( {
|
||||
output = "castle_masonry:roofslate 4",
|
||||
recipe = {
|
||||
{ "default:gravel", "streets:asphalt" },
|
||||
{ "streets:asphalt" , "default:gravel" }
|
||||
{ gravel, "streets:asphalt" },
|
||||
{ "streets:asphalt" , gravel }
|
||||
}
|
||||
})
|
||||
end
|
||||
@ -103,7 +117,7 @@ if not (mod_building_blocks or mod_streets) then
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
output = "castle_masonry:roofslate",
|
||||
recipe = "default:gravel",
|
||||
recipe = gravel,
|
||||
})
|
||||
|
||||
end
|
||||
|
16
pillars.lua
16
pillars.lua
@ -18,6 +18,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Pillar Base", desc),
|
||||
tiles = tile,
|
||||
groups = crossbrace_connectable_groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -36,6 +38,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Half Pillar Base", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -54,6 +58,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Pillar Top", desc),
|
||||
tiles = tile,
|
||||
groups = crossbrace_connectable_groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -72,6 +78,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Half Pillar Top", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -90,6 +98,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Pillar Middle", desc),
|
||||
tiles = tile,
|
||||
groups = crossbrace_connectable_groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -106,6 +116,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Half Pillar Middle", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -123,6 +135,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Crossbrace", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
@ -147,6 +161,8 @@ castle_masonry.register_pillar = function(material)
|
||||
description = S("@1 Extended Crossbrace", desc),
|
||||
tiles = tile,
|
||||
groups = composition_def.groups,
|
||||
_mcl_hardness = composition_def._mcl_hardness or 0.8,
|
||||
_mcl_blast_resistance = composition_def._mcl_blast_resistance or 1,
|
||||
sounds = composition_def.sounds,
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
|
@ -1,24 +1,31 @@
|
||||
[Materials]
|
||||
|
||||
castle_masonry_stonewall (Stonewall) bool true
|
||||
castle_masonry_cobble (Cobble) bool true
|
||||
castle_masonry_stonebrick (Stone Brick) bool true
|
||||
castle_masonry_stone (Stone) bool true
|
||||
castle_masonry_sandstone (Sandstone) bool true
|
||||
castle_masonry_wood (Wood) bool false
|
||||
castle_masonry_ice (Ice) bool false
|
||||
castle_masonry_snow (Snow) bool false
|
||||
|
||||
[Materials MTG]
|
||||
castle_masonry_sandstonebrick (Sandstone Brick) bool true
|
||||
castle_masonry_desertstonebrick (Desert Stone Brick) bool true
|
||||
castle_masonry_desertsandstonebrick (Desert Sandstone Brick) bool true
|
||||
castle_masonry_silversandstonebrick (Silver Sandstone Brick) bool true
|
||||
castle_masonry_stone (Stone) bool true
|
||||
castle_masonry_sandstone (Sandstone) bool true
|
||||
castle_masonry_desertstone (Desert Stone) bool true
|
||||
castle_masonry_desertsandstone (Desert Sandstone) bool true
|
||||
castle_masonry_silversandstone (Silver Sandstone) 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]
|
||||
[Materials MCL]
|
||||
castle_masonry_redsandstone (Red Sandstone) bool true
|
||||
castle_masonry_quartz (Quartz) bool true
|
||||
castle_masonry_blackstone (Blackstone) bool true
|
||||
castle_masonry_deepslate_bricks (Deepslate Bricks) bool true
|
||||
castle_masonry_deepslate_tiles (Deepslate Tiles) bool true
|
||||
|
||||
[Forms]
|
||||
castle_masonry_pillar (Pillars) bool true
|
||||
castle_masonry_arrowslit (Arrow slits) bool true
|
||||
castle_masonry_murderhole (Murder holes and machicolations) bool true
|
||||
|
104
stone_wall.lua
104
stone_wall.lua
@ -1,5 +1,11 @@
|
||||
|
||||
local S = minetest.get_translator("castle_masonry")
|
||||
local has_mcl = minetest.get_modpath("mcl_core")
|
||||
local gravel = has_mcl and "mcl_core:gravel" or "default:gravel"
|
||||
local desert_stone = has_mcl and "mcl_core:redsandstone" or "default:desert_stone"
|
||||
local sandstone = has_mcl and "mcl_core:sandstone" or "default:sandstone"
|
||||
local stonebrick = has_mcl and "mcl_core:stonebrick" or "default:stonebrick"
|
||||
local obsidian = has_mcl and "mcl_core:obsidian" or "default:obsidian"
|
||||
|
||||
|
||||
minetest.register_alias("castle:stonewall", "castle_masonry:stonewall")
|
||||
@ -13,9 +19,11 @@ minetest.register_node("castle_masonry:stonewall", {
|
||||
tiles = {"castle_stonewall.png"},
|
||||
paramtype = "light",
|
||||
drop = "castle_masonry:stonewall",
|
||||
groups = {cracky=3},
|
||||
groups = {cracky=3, pickaxey=1},
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
sunlight_propagates = false,
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = castle_masonry.sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("castle_masonry:rubble", {
|
||||
@ -23,15 +31,17 @@ minetest.register_node("castle_masonry:rubble", {
|
||||
drawtype = "normal",
|
||||
tiles = {"castle_rubble.png"},
|
||||
paramtype = "light",
|
||||
groups = {crumbly=3,falling_node=1},
|
||||
sounds = default.node_sound_gravel_defaults(),
|
||||
groups = {crumbly=3, shovely=1, falling_node=1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
sounds = castle_masonry.sounds.node_sound_gravel_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_masonry:stonewall",
|
||||
recipe = {
|
||||
{"default:cobble"},
|
||||
{"default:desert_stone"},
|
||||
{"group:cobble"},
|
||||
{desert_stone},
|
||||
}
|
||||
})
|
||||
|
||||
@ -45,8 +55,8 @@ minetest.register_craft({
|
||||
minetest.register_craft({
|
||||
output = "castle_masonry:rubble 2",
|
||||
recipe = {
|
||||
{"default:gravel"},
|
||||
{"default:desert_stone"},
|
||||
{gravel},
|
||||
{desert_stone},
|
||||
}
|
||||
})
|
||||
|
||||
@ -61,15 +71,17 @@ minetest.register_node("castle_masonry:stonewall_corner", {
|
||||
"castle_stonewall.png",
|
||||
"castle_stonewall.png",
|
||||
"castle_corner_stonewall2.png"},
|
||||
groups = {cracky=3},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
groups = {cracky=3, pickaxey=1},
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
sounds = castle_masonry.sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_masonry:stonewall_corner",
|
||||
recipe = {
|
||||
{"", "castle_masonry:stonewall"},
|
||||
{"castle_masonry:stonewall", "default:sandstone"},
|
||||
{"castle_masonry:stonewall", sandstone},
|
||||
}
|
||||
})
|
||||
|
||||
@ -77,29 +89,47 @@ 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(),
|
||||
groups = {cracky=3, pickaxey=1, not_in_creative_inventory=1},
|
||||
_mcl_hardness = 0.8,
|
||||
_mcl_blast_resistance = 1,
|
||||
sounds = castle_masonry.sounds.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(),
|
||||
groups = {cracky=3, pickaxey=1, not_in_creative_inventory=1},
|
||||
sounds = castle_masonry.sounds.node_sound_gravel_defaults(),
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
stairsplus:register_alias_all("castle", "stonewall", "castle_masonry", "stonewall")
|
||||
stairsplus:register_alias_all("castle", "rubble", "castle_masonry", "rubble")
|
||||
|
||||
elseif minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab("stonewall", "castle_masonry:stonewall",
|
||||
{cracky=3},
|
||||
elseif minetest.get_modpath("mcl_stairs") then
|
||||
mcl_stairs.register_stair_and_slab("stonewall", "castle_masonry:stonewall",
|
||||
{pickaxey=1},
|
||||
{"castle_stonewall.png"},
|
||||
S("Castle Stonewall Stair"),
|
||||
S("Castle Stonewall Slab"),
|
||||
default.node_sound_stone_defaults()
|
||||
castle_masonry.sounds.node_sound_stone_defaults()
|
||||
)
|
||||
|
||||
mcl_stairs.register_stair_and_slab("rubble", "castle_masonry:rubble",
|
||||
{shovely=1},
|
||||
{"castle_rubble.png"},
|
||||
S("Castle Rubble Stair"),
|
||||
S("Castle Rubble Slab"),
|
||||
castle_masonry.sounds.node_sound_gravel_defaults()
|
||||
)
|
||||
elseif minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab("stonewall", "castle_masonry:stonewall",
|
||||
{cracky=3, pickaxey=1},
|
||||
{"castle_stonewall.png"},
|
||||
S("Castle Stonewall Stair"),
|
||||
S("Castle Stonewall Slab"),
|
||||
castle_masonry.sounds.node_sound_stone_defaults()
|
||||
)
|
||||
|
||||
stairs.register_stair_and_slab("rubble", "castle_masonry:rubble",
|
||||
@ -107,7 +137,7 @@ elseif minetest.get_modpath("stairs") then
|
||||
{"castle_rubble.png"},
|
||||
S("Castle Rubble Stair"),
|
||||
S("Castle Rubble Slab"),
|
||||
default.node_sound_stone_defaults()
|
||||
castle_masonry.sounds.node_sound_stone_defaults()
|
||||
)
|
||||
end
|
||||
|
||||
@ -117,23 +147,25 @@ minetest.register_node("castle_masonry:dungeon_stone", {
|
||||
description = S("Dungeon Stone"),
|
||||
drawtype = "normal",
|
||||
tiles = {"castle_dungeon_stone.png"},
|
||||
groups = {cracky=2},
|
||||
groups = {cracky=2, pickaxey=2},
|
||||
_mcl_hardness = 1,
|
||||
_mcl_blast_resistance = 1,
|
||||
paramtype = "light",
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
sounds = castle_masonry.sounds.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_masonry:dungeon_stone 2",
|
||||
recipe = {
|
||||
{"default:stonebrick", "default:obsidian"},
|
||||
{stonebrick, obsidian},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "castle_masonry:dungeon_stone 2",
|
||||
recipe = {
|
||||
{"default:stonebrick"},
|
||||
{"default:obsidian"},
|
||||
{stonebrick},
|
||||
{obsidian},
|
||||
}
|
||||
})
|
||||
|
||||
@ -142,19 +174,27 @@ if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("castle_masonry", "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(),
|
||||
groups = {cracky=2, pickaxey=2, not_in_creative_inventory=1},
|
||||
sounds = castle_masonry.sounds.node_sound_stone_defaults(),
|
||||
sunlight_propagates = true,
|
||||
})
|
||||
|
||||
stairsplus:register_alias_all("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},
|
||||
|
||||
elseif minetest.get_modpath("mcl_stairs") then
|
||||
mcl_stairs.register_stair_and_slab("dungeon_stone", "castle_masonry:dungeon_stone",
|
||||
{pickaxey=2},
|
||||
{"castle_dungeon_stone.png"},
|
||||
S("Dungeon Stone Stair"),
|
||||
S("Dungeon Stone Slab"),
|
||||
default.node_sound_stone_defaults()
|
||||
castle_masonry.sounds.node_sound_stone_defaults()
|
||||
)
|
||||
elseif minetest.get_modpath("stairs") then
|
||||
stairs.register_stair_and_slab("dungeon_stone", "castle_masonry:dungeon_stone",
|
||||
{cracky=2, pickaxey=2},
|
||||
{"castle_dungeon_stone.png"},
|
||||
S("Dungeon Stone Stair"),
|
||||
S("Dungeon Stone Slab"),
|
||||
castle_masonry.sounds.node_sound_stone_defaults()
|
||||
)
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user