nonfunctional checkpoint

This commit is contained in:
flux
2022-06-11 18:17:41 -07:00
parent dce587cf33
commit c5ddb5f2d4
109 changed files with 2088 additions and 2153 deletions

30
moreblocks/.luacheckrc Normal file
View File

@ -0,0 +1,30 @@
std = "lua51+luajit+minetest+moreblocks"
unused_args = false
max_line_length = 120
stds.minetest = {
read_globals = {
"DIR_DELIM",
"minetest",
"core",
"dump",
"vector",
"nodeupdate",
"VoxelManip",
"VoxelArea",
"PseudoRandom",
"ItemStack",
"default",
"table",
}
}
stds.moreblocks = {
globals = {
"moreblocks",
},
read_globals = {
"default",
"stairsplus",
},
}

110
moreblocks/aliases.lua Normal file
View File

@ -0,0 +1,110 @@
--[[
More Blocks: alias definitions
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
-- More Blocks aliases:
minetest.register_alias("sweeper", "moreblocks:sweeper")
minetest.register_alias("circular_saw", "moreblocks:circular_saw")
minetest.register_alias("jungle_stick", "moreblocks:jungle_stick")
-- Old block/item replacement:
minetest.register_alias("moreblocks:oerkkiblock", "default:mossycobble")
minetest.register_alias("moreblocks:screwdriver", "screwdriver:screwdriver")
-- Node and item renaming:
minetest.register_alias("moreblocks:stone_bricks", "default:stonebrick")
minetest.register_alias("moreblocks:stonebrick", "default:stonebrick")
minetest.register_alias("moreblocks:junglewood", "default:junglewood")
minetest.register_alias("moreblocks:jungle_wood", "default:junglewood")
minetest.register_alias("moreblocks:fence_junglewood", "default:fence_junglewood")
minetest.register_alias("moreblocks:fence_jungle_wood", "default:fence_junglewood")
minetest.register_alias("moreblocks:jungle_stick", "default:stick")
for _, t in pairs(circular_saw.names) do
minetest.register_alias("moreblocks:" .. t[1] .. "_jungle_wood" .. t[2],
"moreblocks:" .. t[1] .. "_junglewood" .. t[2])
end
minetest.register_alias("moreblocks:horizontaltree", "moreblocks:horizontal_tree")
minetest.register_alias("moreblocks:horizontaljungletree", "moreblocks:horizontal_jungle_tree")
minetest.register_alias("moreblocks:stonesquare", "moreblocks:stone_tile")
minetest.register_alias("moreblocks:circlestonebrick", "moreblocks:circle_stone_bricks")
minetest.register_alias("moreblocks:ironstonebrick", "moreblocks:iron_stone_bricks")
minetest.register_alias("moreblocks:coalstone", "moreblocks:coal_stone")
minetest.register_alias("moreblocks:ironstone", "moreblocks:iron_stone")
minetest.register_alias("moreblocks:woodtile", "moreblocks:wood_tile")
minetest.register_alias("moreblocks:woodtile_full", "moreblocks:wood_tile_full")
minetest.register_alias("moreblocks:woodtile_centered", "moreblocks:wood_tile_centered")
minetest.register_alias("moreblocks:woodtile_up", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:wood_tile_up", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:woodtile_down", "moreblocks:wood_tile_down")
minetest.register_alias("moreblocks:woodtile_left", "moreblocks:wood_tile_left")
minetest.register_alias("moreblocks:woodtile_right", "moreblocks:wood_tile_right")
minetest.register_alias("moreblocks:coalglass", "moreblocks:coal_glass")
minetest.register_alias("moreblocks:ironglass", "moreblocks:iron_glass")
minetest.register_alias("moreblocks:glowglass", "moreblocks:glow_glass")
minetest.register_alias("moreblocks:superglowglass", "moreblocks:super_glow_glass")
minetest.register_alias("moreblocks:trapglass", "moreblocks:trap_glass")
minetest.register_alias("moreblocks:trapstone", "moreblocks:trap_stone")
minetest.register_alias("moreblocks:cactuschecker", "moreblocks:cactus_checker")
minetest.register_alias("moreblocks:coalchecker", "moreblocks:coal_checker")
minetest.register_alias("moreblocks:ironchecker", "moreblocks:iron_checker")
minetest.register_alias("moreblocks:cactusbrick", "moreblocks:cactus_brick")
minetest.register_alias("moreblocks:cleanglass", "moreblocks:clean_glass")
minetest.register_alias("moreblocks:emptybookshelf", "moreblocks:empty_bookshelf")
minetest.register_alias("moreblocks:junglestick", "moreblocks:jungle_stick")
minetest.register_alias("moreblocks:splitstonesquare", "moreblocks:split_stone_tile")
minetest.register_alias("moreblocks:allfacestree", "moreblocks:all_faces_tree")
minetest.register_alias("moreblocks:empty_bookshelf", "moreblocks:empty_shelf")
minetest.register_alias("moreblocks:split_stone_tile_alt", "moreblocks:checker_stone_tile")
minetest.register_alias("moreblocks:wood_tile_flipped", "moreblocks:wood_tile")
minetest.register_alias("moreblocks:wood_tile_down", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:wood_tile_left", "moreblocks:wood_tile_offset")
minetest.register_alias("moreblocks:wood_tile_right", "moreblocks:wood_tile_offset")
-- ABM for horizontal trees (fix facedir):
local horizontal_tree_convert_facedir = {7, 12, 9, 18}
minetest.register_abm({
nodenames = {"moreblocks:horizontal_tree", "moreblocks:horizontal_jungle_tree"},
interval = 1,
chance = 1,
action = function(pos, node)
if node.name == "moreblocks:horizontal_tree" then
node.name = "default:tree"
else
node.name = "default:jungletree"
end
node.param2 = node.param2 < 3 and node.param2 or 0
minetest.set_node(pos, {
name = node.name,
param2 = horizontal_tree_convert_facedir[node.param2 + 1]
})
end,
})
minetest.register_lbm({
name = "moreblocks:reduce_wood_tile_redundancy",
nodenames = {
"moreblocks:wood_tile_left",
"moreblocks:wood_tile_down",
"moreblocks:wood_tile_right",
"moreblocks:wood_tile_flipped",
},
action = function(pos, node)
if node.name:find("left") then
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2 = 1})
elseif node.name:find("down") then
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2 = 2})
elseif node.name:find("right") then
minetest.set_node(pos, {name = "moreblocks:wood_tile_offset", param2 = 3})
else
-- wood_tile_flipped
minetest.set_node(pos, {name = "moreblocks:wood_tile", param2 = 1})
end
minetest.log('action', "LBM replaced " .. node.name ..
" at " .. minetest.pos_to_string(pos))
end,
})

View File

@ -0,0 +1,28 @@
local S = moreblocks.S
function moreblocks.api.register_all_faces(mod, name, base, redef)
local def = table.copy(minetest.registered_nodes[base])
def.tiles = {def.tiles[1]}
def.description = S("All-faces @1", def.description)
if def.short_description then
def.short_description = S("All-faces @1", def.short_description)
end
redef = redef or {}
for k, v in pairs(redef) do
def[k] = v
end
local itemstring = ("%s:%s"):format(mod, name)
moreblocks.api.register_node_with_stairs(mod, name, def)
minetest.register_craft({
output = itemstring .. " 8",
recipe = {
{base, base, base},
{base, "", base},
{base, base, base},
}
})
end

4
moreblocks/api/init.lua Normal file
View File

@ -0,0 +1,4 @@
moreblocks.api = {}
moreblocks.dofile("api", "all_faces")
moreblocks.dofile("api", "trap")

40
moreblocks/api/trap.lua Normal file
View File

@ -0,0 +1,40 @@
local S = moreblocks.S
local cm = moreblocks.resources.craft_materials
function moreblocks.api.register_trap(mod, name, base, redef)
local def = table.copy(minetest.registered_nodes[base])
def.description = S("Trap @1", def.description)
if def.short_description then
def.short_description = S("Trap @1", def.short_description)
end
for i, tile in ipairs(def.tiles) do
def.tiles[i] = tile .. "^moreblocks_trap_box.png"
end
if def.drawtype ~= "glasslike_framed_optional" then
def.drawtype = "glasslike_framed"
end
def.walkable = false
def.paramtype = "light"
def.is_ground_content = false
redef = redef or {}
for k, v in pairs(redef) do
def[k] = v
end
local itemstring = ("%s:%s"):format(mod, name)
minetest.register_node(itemstring, def)
if cm.trap_material then
minetest.register_craft({
output = itemstring,
type = "shapeless",
recipe = {cm.trap_material, base},
})
end
end

581
moreblocks/crafting.lua Normal file
View File

@ -0,0 +1,581 @@
--[[
More Blocks: crafting recipes
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local cm = moreblocks.resources.craft_materials
if cm.stick and cm.dry_shrub then
minetest.register_craft({
output = cm.stick,
recipe = {{cm.dry_shrub}, }
})
end
if cm.stick then
minetest.register_craft({
output = cm.stick,
recipe = {{"group:sapling"}, }
})
end
if cm.stick and cm.wood then
minetest.register_craft({
output = cm.wood,
recipe = {
{cm.stick, cm.stick},
{cm.stick, cm.stick},
}
})
end
if cm.dirt_with_grass and cm.jungle_grass and cm.dirt then
minetest.register_craft({
output = cm.dirt_with_grass,
type = "shapeless",
recipe = {cm.jungle_grass, cm.dirt},
})
end
if cm.mossy_cobble and cm.jungle_grass and cm.cobble then
minetest.register_craft({
output = cm.mossy_cobble,
type = "shapeless",
recipe = {cm.jungle_grass, cm.cobble},
})
end
minetest.register_craft({
output = "moreblocks:wood_tile 9",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
-- This must be registered after `moreblocks:wood_tile` to avoid recipe conflicts,
-- since `moreblocks:wood_tile` is part of `group:wood`
minetest.register_craft({
output = "moreblocks:wood_tile_center 9",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"group:wood", "moreblocks:wood_tile", "group:wood"},
{"group:wood", "group:wood", "group:wood"},
}
})
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile",
recipe = {"moreblocks:wood_tile_flipped"}
})
minetest.register_craft({
output = "moreblocks:wood_tile_full 4",
recipe = {
{"moreblocks:wood_tile", "moreblocks:wood_tile"},
{"moreblocks:wood_tile", "moreblocks:wood_tile"},
}
})
if cm.stick then
minetest.register_craft({
output = "moreblocks:wood_tile_offset",
recipe = {
{cm.stick},
{"moreblocks:wood_tile_center"},
}
})
end
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile_offset",
recipe = {"moreblocks:wood_tile_down"}
})
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile_offset",
recipe = {"moreblocks:wood_tile_left"}
})
minetest.register_craft({
type = "shapeless",
output = "moreblocks:wood_tile_offset",
recipe = {"moreblocks:wood_tile_right"}
})
if cm.stone and cm.coal_lump then
minetest.register_craft({
output = "moreblocks:circle_stone_bricks 5",
recipe = {
{"", cm.stone, ""},
{cm.stone, cm.coal_lump, cm.stone},
{"", cm.stone, ""},
}
})
end
if cm.jungle_grass and cm.stick then
minetest.register_craft({
output = "moreblocks:sweeper 4",
recipe = {
{cm.jungle_grass},
{cm.stick},
}
})
end
if cm.cobble and cm.stone then
minetest.register_craft({
output = "moreblocks:stone_tile 9",
recipe = {
{cm.cobble, cm.cobble, cm.cobble},
{cm.cobble, cm.stone, cm.cobble},
{cm.cobble, cm.cobble, cm.cobble},
}
})
end
minetest.register_craft({
output = "moreblocks:split_stone_tile",
recipe = {
{"moreblocks:stone_tile"},
}
})
minetest.register_craft({
output = "moreblocks:checker_stone_tile",
recipe = {
{"moreblocks:split_stone_tile"},
}
})
-- When approaching the below craft, loop back to cobblestone, which can then be used to craft stone tiles again
if cm.cobble then
minetest.register_craft({
output = cm.cobble,
recipe = {
{"moreblocks:checker_stone_tile"},
}
})
end
if cm.stone and cm.brick then
minetest.register_craft({
output = "moreblocks:grey_bricks 2",
type = "shapeless",
recipe = {cm.stone, cm.brick},
})
end
if cm.stone_brick and cm.brick then
minetest.register_craft({
output = "moreblocks:grey_bricks 2",
type = "shapeless",
recipe = {cm.stone_brick, cm.brick},
})
end
if cm.bookshelf and cm.book then
minetest.register_craft({
output = "moreblocks:empty_shelf",
type = "shapeless",
recipe = {"moreblocks:sweeper", cm.bookshelf},
replacements = {{cm.bookshelf, cm.book .. " 3"}},
-- When obtaining an empty shelf, return the books used in it as well
})
end
if cm.vessels_shelf and cm.glass_bottle then
minetest.register_craft({
output = "moreblocks:empty_shelf",
type = "shapeless",
recipe = {"moreblocks:sweeper", cm.vessels_shelf},
replacements = {{cm.vessels_shelf, cm.glass_bottle .. " 3"}},
})
end
if cm.book and cm.bookshelf then
minetest.register_craft({
type = "shapeless",
output = cm.bookshelf,
recipe = {"moreblocks:empty_shelf", cm.book, cm.book, cm.book},
})
end
minetest.register_craft({
output = "moreblocks:empty_shelf",
recipe = {
{"group:wood", "group:wood", "group:wood"},
{"", "", ""},
{"group:wood", "group:wood", "group:wood"},
}
})
minetest.register_craft({
output = "moreblocks:coal_stone_bricks 4",
recipe = {
{"moreblocks:coal_stone", "moreblocks:coal_stone"},
{"moreblocks:coal_stone", "moreblocks:coal_stone"},
}
})
minetest.register_craft({
output = "moreblocks:iron_stone_bricks 4",
recipe = {
{"moreblocks:iron_stone", "moreblocks:iron_stone"},
{"moreblocks:iron_stone", "moreblocks:iron_stone"},
}
})
minetest.register_craft({
output = "moreblocks:plankstone 4",
recipe = {
{"group:stone", "group:wood"},
{"group:wood", "group:stone"},
}
})
minetest.register_craft({
output = "moreblocks:plankstone 4",
recipe = {
{"group:wood", "group:stone"},
{"group:stone", "group:wood"},
}
})
if cm.coal_lump and cm.stone then
minetest.register_craft({
output = "moreblocks:coal_checker 4",
recipe = {
{cm.stone, cm.coal_lump},
{cm.coal_lump, cm.stone},
}
})
minetest.register_craft({
output = "moreblocks:coal_checker 4",
recipe = {
{cm.coal_lump, cm.stone},
{cm.stone, cm.coal_lump},
}
})
end
if cm.steel_ingot and cm.stone then
minetest.register_craft({
output = "moreblocks:iron_checker 4",
recipe = {
{cm.steel_ingot, cm.stone},
{cm.stone, cm.steel_ingot},
}
})
minetest.register_craft({
output = "moreblocks:iron_checker 4",
recipe = {
{cm.stone, cm.steel_ingot},
{cm.steel_ingot, cm.stone},
}
})
end
if cm.chest and cm.chest_locked then
if cm.steel_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = {cm.steel_ingot, cm.chest},
})
end
if cm.copper_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = {cm.copper_ingot, cm.chest},
})
end
if cm.bronze_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = {cm.bronze_ingot, cm.chest},
})
end
if cm.gold_ingot then
minetest.register_craft({
output = cm.chest_locked,
type = "shapeless",
recipe = {cm.gold_ingot, cm.chest},
})
end
end
if cm.glass and cm.steel_ingot then
minetest.register_craft({
output = "moreblocks:iron_glass",
type = "shapeless",
recipe = {cm.steel_ingot, cm.glass},
})
minetest.register_craft({
output = cm.glass,
type = "shapeless",
recipe = {cm.steel_ingot, "moreblocks:coal_glass"},
})
end
if cm.glass and cm.coal_lump then
minetest.register_craft({
output = cm.glass,
type = "shapeless",
recipe = {cm.coal_lump, "moreblocks:iron_glass"},
})
minetest.register_craft({
output = "moreblocks:coal_glass",
type = "shapeless",
recipe = {cm.coal_lump, cm.glass},
})
end
if cm.glass then
minetest.register_craft({
output = "moreblocks:clean_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", cm.glass},
})
end
minetest.register_craft({
output = "moreblocks:trap_clean_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:trap_glass"},
})
if cm.glass and cm.torch then
minetest.register_craft({
output = "moreblocks:glow_glass",
type = "shapeless",
recipe = {cm.torch, cm.glass},
})
end
if cm.torch then
minetest.register_craft({
output = "moreblocks:clean_glow_glass",
type = "shapeless",
recipe = {cm.torch, "moreblocks:clean_glass"},
})
end
minetest.register_craft({
output = "moreblocks:clean_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:glow_glass"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:trap_glow_glass"},
})
if cm.torch and cm.glass then
minetest.register_craft({
output = "moreblocks:super_glow_glass",
type = "shapeless",
recipe = {cm.torch, cm.torch, cm.glass},
})
end
if cm.torch then
minetest.register_craft({
output = "moreblocks:super_glow_glass",
type = "shapeless",
recipe = {cm.torch, "moreblocks:glow_glass"},
})
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = {cm.torch, cm.torch, "moreblocks:clean_glass"},
})
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = {cm.torch, "moreblocks:clean_glow_glass"},
})
end
minetest.register_craft({
output = "moreblocks:clean_super_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:super_glow_glass"},
})
minetest.register_craft({
output = "moreblocks:trap_clean_super_glow_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "moreblocks:trap_super_glow_glass"},
})
if cm.coal_lump and cm.stone then
minetest.register_craft({
output = "moreblocks:coal_stone",
type = "shapeless",
recipe = {cm.coal_lump, cm.stone},
})
minetest.register_craft({
output = cm.stone,
type = "shapeless",
recipe = {cm.coal_lump, "moreblocks:iron_stone"},
})
end
if cm.stone and cm.steel_ingot then
minetest.register_craft({
output = cm.stone,
type = "shapeless",
recipe = {cm.steel_ingot, "moreblocks:coal_stone"},
})
minetest.register_craft({
output = "moreblocks:iron_stone",
type = "shapeless",
recipe = {cm.steel_ingot, cm.stone},
})
end
if cm.cactus and cm.brick then
minetest.register_craft({
output = "moreblocks:cactus_brick",
type = "shapeless",
recipe = {cm.cactus, cm.brick},
})
end
if cm.cactus and cm.stone then
minetest.register_craft({
output = "moreblocks:cactus_checker 4",
recipe = {
{cm.cactus, cm.stone},
{cm.stone, cm.cactus},
}
})
minetest.register_craft({
output = "moreblocks:cactus_checker 4",
recipe = {
{cm.stone, cm.cactus},
{cm.cactus, cm.stone},
}
})
end
if cm.jungle_grass then
minetest.register_craft({
output = "moreblocks:rope 3",
recipe = {
{cm.jungle_grass},
{cm.jungle_grass},
{cm.jungle_grass},
}
})
end
if cm.dirt then
minetest.register_craft({
output = "moreblocks:dirt_compressed",
recipe = {
{cm.dirt, cm.dirt, cm.dirt},
{cm.dirt, cm.dirt, cm.dirt},
{cm.dirt, cm.dirt, cm.dirt},
}
})
minetest.register_craft({
output = cm.dirt .. " 9",
recipe = {{"moreblocks:dirt_compressed"}},
})
end
if cm.cobble then
minetest.register_craft({
output = "moreblocks:cobble_compressed",
recipe = {
{cm.cobble, cm.cobble, cm.cobble},
{cm.cobble, cm.cobble, cm.cobble},
{cm.cobble, cm.cobble, cm.cobble},
}
})
minetest.register_craft({
output = cm.cobble .. " 9",
recipe = {
{"moreblocks:cobble_compressed"},
}
})
end
if cm.desert_cobble then
minetest.register_craft({
output = "moreblocks:desert_cobble_compressed",
recipe = {
{cm.desert_cobble, cm.desert_cobble, cm.desert_cobble},
{cm.desert_cobble, cm.desert_cobble, cm.desert_cobble},
{cm.desert_cobble, cm.desert_cobble, cm.desert_cobble},
}
})
minetest.register_craft({
output = cm.desert_cobble .. " 9",
recipe = {
{"moreblocks:desert_cobble_compressed"},
}
})
end
if cm.pine_tree then
minetest.register_craft({
type = "cooking", output = "moreblocks:tar", recipe = cm.pine_tree,
})
end
if cm.copper_block and cm.bucket_empty then
minetest.register_craft({
type = "shapeless",
output = "moreblocks:copperpatina",
recipe = {"group:water_bucket", cm.copper_block},
replacements = {
{"group:water_bucket", cm.bucket_empty}
}
})
end
if cm.copper_block then
minetest.register_craft({
type = "shapeless",
output = "moreblocks:copperpatina",
recipe = {"group:water", cm.copper_block},
})
end
if cm.copper_ingot then
minetest.register_craft({
output = cm.copper_ingot .. " 9",
recipe = {
{"moreblocks:copperpatina"},
}
})
end

47
moreblocks/init.lua Normal file
View File

@ -0,0 +1,47 @@
--[[
=====================================================================
** More Blocks **
By Calinou, with the help of ShadowNinja and VanessaE.
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
=====================================================================
--]]
local modname = minetest.get_current_modname()
local modpath = minetest.get_modpath(modname)
local S = minetest.get_translator(modname)
moreblocks = {
version = {3, 0, 0},
fork = "minetest_mods",
modname = modname,
modpath = modpath,
S = S,
has = {
bucket = minetest.get_modpath("bucket"),
default = minetest.get_modpath("default"),
stairsplus = minetest.get_modpath("stairsplus"),
vessels = minetest.get_modpath("vessels"),
},
log = function(level, messagefmt, ...)
return minetest.log(level, ("[%s] %s"):format(modname, messagefmt:format(...)))
end,
dofile = function(...)
return dofile(table.concat({modpath, ...}, DIR_DELIM) .. ".lua")
end,
}
moreblocks.dofile("settings")
moreblocks.dofile("resources", "init")
moreblocks.dofile("api", "init")
moreblocks.dofile("items")
moreblocks.dofile("nodes")
moreblocks.dofile("redefinitions") -- FLUX TODO what is this doing and why
moreblocks.dofile("crafting")
moreblocks.dofile("aliases")

7
moreblocks/items.lua Normal file
View File

@ -0,0 +1,7 @@
-- Items
local S = moreblocks.S
minetest.register_craftitem("moreblocks:sweeper", {
description = S("Sweeper"),
inventory_image = "moreblocks_sweeper.png",
})

View File

@ -0,0 +1,49 @@
# textdomain: moreblocks
# German translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Xanthin, 2014.
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] geladen.
#: nodes.lua
All-faces @1=allseitiger @1
Cactus Brick=Kaktusziegel
Cactus Checker=Kaktus-Mosaik
Centered Wooden Tile=Holzfliese mittig
Checker Stone Tile=Stein-Mosaik
Circle Stone Bricks=Kreissteinziegel
Clean Glass=Klares Glas
Coal Checker=Kohlen-Mosaik
Coal Glass=Kohleglas
Clean Super Glow Glass=
Trap @1=@1falle
Clean Glow Glass=
Coal Stone=Kohlestein
Coal Stone Bricks=Kohlesteinziegel
Compressed Cobblestone=Gepresster Kopfsteinpflaster
Compressed Desert Cobblestone=
Compressed Dirt=Gepresste Erde
Copper Patina Block=Kupfer Edelrostblock
Empty Shelf=Leeres Regal
Full Wooden Tile=Vollholzfliese
Glow Glass=Leuchtglas
Iron Checker=Metall-Mosaik
Iron Glass=metallisiertes Glas
Iron Stone=Eisenstein
Iron Stone Bricks=Eisensteinziegel
Plankstone=Brettstein
Rope=Seil
Split Stone Tile=Geteilte Steinfliese
Stone Bricks=Steinziegel
Stone Tile=Steinfliese
Super Glow Glass=Superleuchtglas
Sweeper=Besen
Tar=Teer
Wooden Tile=Holzfliese
Offset Wooden Tile=Holzfliese versetzt

View File

@ -0,0 +1,46 @@
# textdomain: moreblocks
# Spanish translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# kaeza, 2013.
# CodeXP <codexp@gmx.net>, 2018.
# Carlos Barraza 2020.
#: nodes.lua
All-faces @1=@1, todas las caras
Cactus Brick=Ladrillos de Cactus
Cactus Checker=Cuadros de Cactus
Centered Wooden Tile=Parqué Centrado
Checker Stone Tile=Cuadros de Baldosa de Piedra
Circle Stone Bricks=Bloques de Piedra Circulares
Clean Glass=Cristal Limpio
Coal Checker=Cuadros de Carbón
Coal Glass=Cristal con Carbón
Clean Super Glow Glass=Cristal Súper Brillante Limpio
Trap @1=@1 Falso
Clean Glow Glass=Cristal Brillante Limpio
Coal Stone=Carbón y Piedra
Coal Stone Bricks=Ladrillos de Piedra de Carbon
Compressed Cobblestone=Adoquín Comprimido
Compressed Desert Cobblestone=Adoquín del Desierto Comprimido
Compressed Dirt=Tierra Comprimida
Copper Patina Block=Bloque de Pátina de Cobre
Empty Shelf=Estante vacio
Full Wooden Tile=Parqué Completo
Glow Glass=Cristal Brillante
Iron Checker=Cuadros de Hierro
Iron Glass=Cristal con Hierro
Iron Stone=Hierro y Piedra
Iron Stone Bricks=Ladrillo de Piedra de Hierro
Plankstone=Tablones de piedra
Rope=Soga
Split Stone Tile=Baldosas de Piedra Partida
Stone Bricks=Ladrillos de Piedra
Stone Tile=Baldosa de Piedra
Super Glow Glass=Cristal Súper Brillante
Sweeper=Limpiador
Tar=Alquitrán
Wooden Tile=Parqué
Offset Wooden Tile=Parqué Ajustado

View File

@ -0,0 +1,50 @@
# textdomain: moreblocks
# French translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Hugo Locurcio <hugo.locurcio@hugo.pro>, 2013-2019.
# Jat15, 2013.
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] a été chargé.
#: nodes.lua
All-faces @1=@1 (toutes faces)
Cactus Brick=Briques de cactus
Cactus Checker=Damier en cactus
Centered Wooden Tile=Dalle en bois centrée
Checker Stone Tile=Damier de dalle en pierre
Circle Stone Bricks=Briques en pierre circulaires
Clean Glass=Verre propre
Coal Checker=Damier en charbon
Coal Glass=Verre de charbon
Clean Super Glow Glass=
Trap @1=@1 traversable
Clean Glow Glass=
Coal Stone=Pierre de charbon
Coal Stone Bricks=Briques en pierre de charbon
Compressed Cobblestone=Pierre taillée compressée
Compressed Desert Cobblestone=
Compressed Dirt=Terre compressée
Copper Patina Block=Bloc de patine de cuivre
Empty Shelf=Étagère vide
Full Wooden Tile=Dalle en bois complète
Glow Glass=Verre brillant
Iron Checker=Damier de fer
Iron Glass=Verre de fer
Iron Stone=Pierre de fer
Iron Stone Bricks=Briques en pierre de fer
Plankstone=Pierre-bois
Rope=Corde
Split Stone Tile=Dalle en pierre découpée
Stone Bricks=Briques en pierre
Stone Tile=Dalle en pierre
Super Glow Glass=Verre très brillant
Sweeper=Balai
Tar=Bitume
Wooden Tile=Dalle en bois
Offset Wooden Tile=Dalle en bois décalée

View File

@ -0,0 +1,49 @@
# textdomain: moreblocks
# Italian translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# Emon, 2016.
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] caricato.
#: nodes.lua
All-faces @1=@1 su ogni lato
Cactus Brick=Mattoni di cactus
Cactus Checker=Scacchiera in cactus
Centered Wooden Tile=Mattonella in legno centrata
Checker Stone Tile=
Circle Stone Bricks=Mattoni concentrici in pietra
Clean Glass=Vetro pulito
Coal Checker=Scacchiera in carbone
Coal Glass=Vetro e carbone
Clean Super Glow Glass=
Trap @1=@1 trappola
Clean Glow Glass=
Coal Stone=Pietra in carbone
Coal Stone Bricks=Mattoni di pietra in carbone
Compressed Cobblestone=
Compressed Desert Cobblestone=
Compressed Dirt=
Copper Patina Block=
Empty Shelf=Scaffale Vuoto
Full Wooden Tile=Mattonella in legno pieno
Glow Glass=Vetro luminoso
Iron Checker=Scacchiera in ferro
Iron Glass=Vetro e ferro
Iron Stone=Pietra in ferro
Iron Stone Bricks=Mattoni di pietra in ferro
Plankstone=Pietra e legno
Rope=Corda
Split Stone Tile=Mattonella in pietra divisa
Stone Bricks=
Stone Tile=Mattonella in pietra
Super Glow Glass=Super vetro luminoso
Sweeper=Spazzola
Tar=
Wooden Tile=Mattonella in legno
Offset Wooden Tile=

View File

@ -0,0 +1,49 @@
# textdomain: moreblocks
# Polish translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# mat9117, 2019
# CodeXP <codexp@gmx.net>, 2018.
#: init.lua
[moreblocks] loaded.=[moreblocks] załadowane.
#: nodes.lua
All-faces @1=Wielostronna tekstura @1
Cactus Brick=Kaktusowa cegła
Cactus Checker=Kaktusowa szachownica
Centered Wooden Tile=Wyśrodkowany drewniany kafelek
Checker Stone Tile=Kamienna szachownica
Circle Stone Bricks=Okrągłe kamienne cegły
Clean Glass=Czyste szkło
Coal Checker=Węglowa szachownica
Coal Glass=Szkło węglowe
Clean Super Glow Glass=
Trap @1=@1 pułapka
Clean Glow Glass=
Coal Stone=Kamień węglowy
Coal Stone Bricks=Węglowe kamienne cegły
Compressed Cobblestone=Skompresowany bruk
Compressed Desert Cobblestone=
Compressed Dirt=Skompresowana ziemia
Copper Patina Block=Blok patynowanej miedzi
Empty Shelf=Pusta półka
Full Wooden Tile=Pełny drewniany kafelek
Glow Glass=Świecące szkło
Iron Checker=Żelazna szachownica
Iron Glass=Żelazne szkło
Iron Stone=Żelazny kamień
Iron Stone Bricks=Żelazne kamienne cegły
Plankstone=Deskokamień
Rope=Lina
Split Stone Tile=Kamienny blok kafelkowy
Stone Bricks=Kamienne cegły
Stone Tile=Kamienny kafelek
Super Glow Glass=Super świecące szkło
Sweeper=Miotła
Tar=Smoła
Wooden Tile=Drewniany kafelek
Offset Wooden Tile=

View File

@ -0,0 +1,52 @@
# textdomain: moreblocks
# Russian translation for MOREBLOCKS minetest mod.
# Copyright (C) 2018 Hugo Locurcio and contributors
# This file is distributed under the same license as the MOREBLOCKS package.
# CodeXP <codexp@gmx.net>, 2018.
#
#, fuzzy
#: circular_saw.lua
#: init.lua
[MOD] moreblocks loaded.=[MOD] moreblocks загружен.
#: nodes.lua
All-faces @1=всестороннее бревно @1
Cactus Brick=кирпич из кактуса
Cactus Checker=мозаика из кактуса
Centered Wooden Tile=деревянная мозаика (центр)
Checker Stone Tile=каменная мозаика
Circle Stone Bricks=кольцевой камень
Clean Glass=чистое стекло
Coal Checker=угольная мозаика
Coal Glass=угольное стекло
Clean Super Glow Glass=
Trap @1=мнимое @1
Clean Glow Glass=
Coal Stone=угольный камень
Coal Stone Bricks=угольно-каменный кирпич
Compressed Cobblestone=прессованный булыжник
Compressed Desert Cobblestone=
Compressed Dirt=прессованная земля
Copper Patina Block=медный патинированный блок
Empty Shelf=пустые полки
Full Wooden Tile=деревянная мозаика
Glow Glass=светящееся стекло
Iron Checker=стальная мозаика
Iron Glass=металлизированное стекло
Iron Stone=железный камень
Iron Stone Bricks=железно-каменный кирпич
Plankstone=дерево-каменная мозаика
Rope=верёвка
Split Stone Tile=каменная мозаика
Stone Bricks=каменный кирпич
Stone Tile=каменная плитка
Super Glow Glass=супер светящееся стекло
Sweeper=метёлка
Tar=смола
Wooden Tile=деревянная мозаика
Offset Wooden Tile=деревянная мозаика (сверху)

View File

@ -0,0 +1,39 @@
# textdomain: moreblocks
#: nodes.lua
All-faces @1=
Cactus Brick=
Cactus Checker=
Centered Wooden Tile=
Checker Stone Tile=
Circle Stone Bricks=
Clean Glass=
Coal Checker=
Coal Glass=
Clean Super Glow Glass=
Trap @1=
Clean Glow Glass=
Coal Stone=
Coal Stone Bricks=
Compressed Cobblestone=
Compressed Desert Cobblestone=
Compressed Dirt=
Copper Patina Block=
Empty Shelf=
Full Wooden Tile=
Glow Glass=
Iron Checker=
Iron Glass=
Iron Stone=
Iron Stone Bricks=
Plankstone=
Rope=
Split Stone Tile=
Stone Bricks=
Stone Tile=
Super Glow Glass=
Sweeper=
Tar=
Wooden Tile=
Offset Wooden Tile=

View File

@ -0,0 +1,44 @@
# textdomain: moreblocks
# zh_CN translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# IFRFSX <IFRFSX@protonmail.com>, 2020.
#: nodes.lua
All-faces @1=全切面@1树木方块
Cactus Brick=仙人掌砖
Cactus Checker=仙人掌棋盘方块
Centered Wooden Tile=居中的木瓦
Checker Stone Tile=棋盘石瓦
Circle Stone Bricks=圆石砖
Clean Glass=干净的玻璃
Coal Checker=棋盘煤块
Coal Glass=煤玻璃
Clean Super Glow Glass=
Trap @1=陷阱@1
Clean Glow Glass=
Coal Stone=煤炭石
Coal Stone Bricks=煤炭石砖
Compressed Cobblestone=压缩圆石
Compressed Desert Cobblestone=
Compressed Dirt=压缩土
Copper Patina Block=铜绿方块
Empty Shelf=空书架
Full Wooden Tile=全木瓦
Glow Glass=发光玻璃
Iron Checker=棋盘铁方块
Iron Glass=铁玻璃
Iron Stone=铁石
Iron Stone Bricks=铁石砖
Plankstone=板石
Rope=绳子
Split Stone Tile=裂石砖
Stone Bricks=石砖
Stone Tile=石瓦
Super Glow Glass=超级发光玻璃
Sweeper=清扫器
Tar=焦油
Wooden Tile=木瓦
Offset Wooden Tile=胶合木瓦

View File

@ -0,0 +1,56 @@
# textdomain: moreblocks
# zh_TW translation for More Blocks.
# Copyright © 2011-2020 Hugo Locurcio and contributors
# This file is distributed under the same license as the More Blocks package.
# IFRFSX <IFRFSX@protonmail.com>, 2020.
#: circular_saw.lua
Circular Saw=圓鋸
Input material=輸入@n材料
Left-over=剩餘材料
Max=最大值
Recycle output=回收@n輸出物
Set=設置
owned by @1=屬於@1所有
Circular Saw is empty=圓鋸是空的
Circular Saw is working on @1=圓鋸正在加工@1
#: nodes.lua
All-faces @1=全切面@1樹木方塊
Cactus Brick=仙人掌磚
Cactus Checker=仙人掌棋盤方塊
Centered Wooden Tile=居中的木瓦
Checker Stone Tile=棋盤石瓦
Circle Stone Bricks=圓石磚
Clean Glass=乾淨的玻璃
Coal Checker=棋盤煤塊
Coal Glass=煤玻璃
Clean Super Glow Glass=
Trap @1=陷阱@1
Clean Glow Glass=
Coal Stone=煤炭石
Coal Stone Bricks=煤炭石磚
Compressed Cobblestone=壓縮圓石
Compressed Desert Cobblestone=
Compressed Dirt=壓縮土
Copper Patina Block=銅綠方塊
Empty Shelf=空書架
Full Wooden Tile=全木瓦
Glow Glass=發光玻璃
Iron Checker=棋盤鐵方塊
Iron Glass=鐵玻璃
Iron Stone=鐵石
Iron Stone Bricks=鐵石磚
Plankstone=板石
Rope=繩子
Split Stone Tile=裂石磚
Stone Bricks=石磚
Stone Tile=石瓦
Super Glow Glass=超級發光玻璃
Sweeper=清掃器
Tar=焦油
Wooden Tile=木瓦
Offset Wooden Tile=膠合木瓦

5
moreblocks/mod.conf Normal file
View File

@ -0,0 +1,5 @@
name = moreblocks
title = More Blocks
description = Adds various blocks to the game.
optional_depends = bucket, default, stairsplus, vessels
min_minetest_version = 5.5.0

440
moreblocks/nodes.lua Normal file
View File

@ -0,0 +1,440 @@
--[[
More Blocks: node definitions
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local S = moreblocks.S
local cm = moreblocks.resources.craft_materials
local t = moreblocks.resources.textures
local sound_dirt = moreblocks.resources.sounds.dirt
local sound_wood = moreblocks.resources.sounds.wood
local sound_stone = moreblocks.resources.sounds.stone
local sound_glass = moreblocks.resources.sounds.glass
local sound_leaves = moreblocks.resources.sounds.leaves
local sound_metal = moreblocks.resources.sounds.metal
local function tile_tiles(tex)
return {tex, tex, tex, tex, tex .. "^[transformR90", tex .. "^[transformR90"}
end
local function register_with_stairs(name, def)
local itemstring = "moreblocks:" .. name
def.tiles = def.tiles or {"moreblocks_" .. name .. ".png"}
moreblocks.api.register_node_with_stairs("moreblocks", name, def)
minetest.register_alias(name, itemstring)
end
local function register_no_stairs(name, def)
local itemstring = "moreblocks:" .. name
def.tiles = def.tiles or {"moreblocks_" .. name .. ".png"}
minetest.register_node(itemstring, def)
minetest.register_alias(name, itemstring)
end
local function register_all_faces(name, base)
name = "all_faces_" .. name
local itemstring = "moreblocks:" .. name
moreblocks.api.register_all_faces("moreblocks", name, base)
minetest.register_alias(name, itemstring)
end
local function register_trap(name, base)
name = "trap_" .. name
local itemstring = "moreblocks:" .. name
moreblocks.api.register_trap("moreblocks", name, base)
minetest.register_alias(name, itemstring)
end
register_with_stairs("wood_tile", {
description = S("Wooden Tile"),
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
is_ground_content = false,
paramtype2 = "facedir",
place_param2 = 0,
tiles = tile_tiles(("%s^moreblocks_wood_tile.png"):format(t.wood)),
sounds = sound_wood,
})
register_with_stairs("wood_tile_center", {
description = S("Centered Wooden Tile"),
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
is_ground_content = false,
tiles = {
("%s^moreblocks_wood_tile_center.png"):format(t.wood)
},
sounds = sound_wood,
})
register_with_stairs("wood_tile_full", {
description = S("Full Wooden Tile"),
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
is_ground_content = false,
tiles = tile_tiles("moreblocks_wood_tile_full.png"),
sounds = sound_wood,
})
register_no_stairs("wood_tile_offset", {
description = S("Offset Wooden Tile"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {wood = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
is_ground_content = false,
tiles = {
("%s^moreblocks_wood_tile_offset.png"):format(t.wood)
},
sounds = sound_wood,
})
register_with_stairs("circle_stone_bricks", {
description = S("Circle Stone Bricks"),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("grey_bricks", {
description = S("Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("coal_stone_bricks", {
description = S("Coal Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("iron_stone_bricks", {
description = S("Iron Stone Bricks"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("stone_tile", {
description = S("Stone Tile"),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("split_stone_tile", {
description = S("Split Stone Tile"),
paramtype2 = "facedir",
place_param2 = 0,
tiles = {
"moreblocks_split_stone_tile_top.png",
"moreblocks_split_stone_tile.png"
},
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("checker_stone_tile", {
description = S("Checker Stone Tile"),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("tar", {
description = S("Tar"),
groups = {cracky = 2, tar_block = 1},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("dirt_compressed", {
description = S("Compressed Dirt"),
groups = {crumbly = 2},
is_ground_content = false,
sounds = sound_dirt,
})
register_with_stairs("cobble_compressed", {
description = S("Compressed Cobblestone"),
groups = {cracky = 1},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("desert_cobble_compressed", {
description = S("Compressed Desert Cobblestone"),
groups = {cracky = 1},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("plankstone", {
description = S("Plankstone"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {cracky = 3},
is_ground_content = false,
tiles = tile_tiles("moreblocks_plankstone.png"),
sounds = sound_stone,
})
register_with_stairs("iron_glass", {
description = S("Iron Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#DEDEDE"):format(t.glass),
("%s^[colorize:#DEDEDE"):format(t.glass_detail)
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
})
register_with_stairs("coal_glass", {
description = S("Coal Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#828282"):format(t.glass),
("%s^[colorize:#828282"):format(t.glass_detail)
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
})
register_with_stairs("clean_glass", {
description = S("Clean Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
"moreblocks_clean_glass.png",
"moreblocks_clean_glass_detail.png"
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
})
register_with_stairs("cactus_brick", {
description = S("Cactus Brick"),
paramtype2 = "facedir",
place_param2 = 0,
groups = {cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("cactus_checker", {
description = S("Cactus Checker"),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
tiles = tile_tiles(("%s^moreblocks_cactus_checker.png"):format(t.stone)),
sounds = sound_stone,
})
register_no_stairs("empty_shelf", {
description = S("Empty Shelf"),
paramtype2 = "facedir",
tiles = {
t.wood,
t.wood,
t.wood,
t.wood,
"moreblocks_empty_shelf.png",
"moreblocks_empty_shelf.png"
},
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
is_ground_content = false,
sounds = sound_wood,
furnace_burntime = 15,
})
register_with_stairs("coal_stone", {
description = S("Coal Stone"),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("iron_stone", {
description = S("Iron Stone"),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("coal_checker", {
description = S("Coal Checker"),
tiles = tile_tiles(("%s^moreblocks_coal_checker.png"):format(t.stone)),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("iron_checker", {
description = S("Iron Checker"),
tiles = tile_tiles(("%s^moreblocks_iron_checker.png"):format(t.stone)),
groups = {stone = 1, cracky = 3},
is_ground_content = false,
sounds = sound_stone,
})
register_with_stairs("glow_glass", {
description = S("Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#E9CD61"):format(t.glass),
("%s^[colorize:#E9CD61"):format(t.glass_detail)
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = 11,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
})
register_with_stairs("super_glow_glass", {
description = S("Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
("%s^[colorize:#FFFF78"):format(t.glass),
("%s^[colorize:#FFFF78"):format(t.glass_detail)
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = minetest.LIGHT_MAX,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
})
register_with_stairs("clean_glow_glass", {
description = S("Clean Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
"moreblocks_clean_glass.png^[colorize:#E9CD61",
"moreblocks_clean_glass_detail.png^[colorize:#E9CD61"
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = 11,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
})
register_with_stairs("clean_super_glow_glass", {
description = S("Clean Super Glow Glass"),
drawtype = "glasslike_framed_optional",
tiles = {
"moreblocks_clean_glass.png^[colorize:#FFFF78",
"moreblocks_clean_glass_detail.png^[colorize:#FFFF78"
},
use_texture_alpha = "clip",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
light_source = minetest.LIGHT_MAX,
groups = {cracky = 3, oddly_breakable_by_hand = 3},
sounds = sound_glass,
})
register_with_stairs("copperpatina", {
description = S("Copper Patina Block"),
groups = {cracky = 1, level = 2},
is_ground_content = false,
sounds = sound_metal,
})
register_no_stairs("rope", {
description = S("Rope"),
drawtype = "signlike",
inventory_image = "moreblocks_rope.png",
wield_image = "moreblocks_rope.png",
paramtype = "light",
sunlight_propagates = true,
is_ground_content = false,
paramtype2 = "wallmounted",
walkable = false,
climbable = true,
selection_box = {type = "wallmounted", },
groups = {snappy = 3, flammable = 2},
sounds = sound_leaves,
})
register_trap("clean_glass", "moreblocks:clean_glass")
register_trap("clean_glow_glass", "moreblocks:clean_glow_glass")
register_trap("clean_super_glow_glass", "moreblocks:clean_super_glow_glass")
if cm.stone then
register_trap("stone", cm.stone)
end
if cm.desert_stone then
register_trap("desert_stone", cm.desert_stone)
end
if cm.glass then
register_trap("glass", cm.glass)
register_trap("glow_glass", "moreblocks:glow_glass")
register_trap("super_glow_glass", "moreblocks:super_glow_glass")
end
if cm.obsidian_glass then
register_trap("obsidian_glass", cm.obsidian_glass)
end
if cm.obsidian then
register_trap("obsidian", cm.obsidian)
end
if cm.obsidian then
register_trap("obsidian", cm.obsidian)
end
if cm.sandstone then
register_trap("sandstone", cm.sandstone)
end
if cm.tree then
register_all_faces("tree", cm.tree)
end
if cm.jungle_tree then
register_all_faces("jungle_tree", cm.jungle_tree)
end
if cm.pine_tree then
register_all_faces("pine_tree", cm.pine_tree)
end
if cm.acacia_tree then
register_all_faces("acacia_tree", cm.acacia_tree)
end
if cm.aspen_tree then
register_all_faces("aspen_tree", cm.aspen_tree)
end

View File

@ -0,0 +1,106 @@
--[[
More Blocks: redefinitions of default stuff
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
local modname = minetest.get_current_modname()
-- Redefine some of the default crafting recipes to be more productive
-- Auxiliary function: take a recipe as returned by get_all_craft_recipes
-- and turn it into a table that can be used to clear a craft or declare a new one
local reconstruct_internal_craft = function(recipe)
local recp = {
{"", "", ""},
{"", "", ""},
{"", "", ""},
}
local width = recipe.width
for idx, item in pairs(recipe.items) do
local row = math.ceil(idx / width)
local col = idx - (row - 1) * width
recp[row][col] = item
end
return recp
end
-- Change the amount produced by recipe by apply func to the old amount
local change_recipe_amount = function(product, recipe, func)
-- if width == 0, this is a shapeless recipe, for which the
-- internal and Lua API recipe table is the same.
-- Otherwise we need to reconstruct the table for the shaped recipe.
local shapeless = (recipe.width == 0)
local recp = shapeless and recipe.items or reconstruct_internal_craft(recipe)
local oldamount = tonumber(recipe.output:match(" [0-9]+$") or "1")
local newamount = func(oldamount)
-- remove old crafting recipe
local redo = {recipe = recp}
-- preserve shapelessness
if shapeless then
redo.type = "shapeless"
end
minetest.clear_craft(redo)
-- new output
redo.output = ("%s %d"):format(product, newamount)
minetest.register_craft(redo)
minetest.log("action", ("[MOD]%s: recipe for %s production: %d => %d"):format(modname, product, oldamount, newamount))
end
local increase_craft_production = function(product, func)
local recipes = minetest.get_all_craft_recipes(product)
for _, r in pairs(recipes) do
if r.type == "normal" or r.method == "normal" then
change_recipe_amount(product, r, func)
end
end
end
-- Increase the crafting production according to the rules from the table, which is in the form:
-- {
-- { detector, amount changing function }
-- { detector, amount changing function }
-- }
-- TODO: consider exporting this function to other mods
local increase_craft_production_table = function(map_table)
for product, _ in pairs(minetest.registered_items) do
for _, tab in pairs(map_table) do
local detector = tab[1]
local func = tab[2]
if detector(product) then
increase_craft_production(product, func)
-- only apply one boost
break
end
end
end
end
increase_craft_production_table({
{function(n)
return n:match('^default:sign_wall')
end, function(old)
return old + 1
end},
{function(n)
return n == 'default:paper'
end, function(old)
return old * 4
end},
{function(n)
return n:match('^carts:.*rail$') or n:match('^default:.*rail$')
end, function(old)
return old + old / 2
end},
})
minetest.register_craft({
type = "toolrepair",
additional_wear = -0.10, -- Tool repair buff (10% bonus instead of 2%).
})

9
moreblocks/settings.lua Normal file
View File

@ -0,0 +1,9 @@
--[[
More Blocks: configuration handling
Copyright © 2011-2020 Hugo Locurcio and contributors.
Licensed under the zlib license. See LICENSE.md for more information.
--]]
moreblocks.settings = {
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 439 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 481 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 258 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 725 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 739 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 167 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 229 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 335 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 354 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 352 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 309 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 387 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 433 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B