[minetest-mod-moreblocks] 06/12: New upstream version 20161028+git7f06db22
Julien Puydt
julien.puydt at laposte.net
Fri Oct 28 16:33:33 UTC 2016
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository minetest-mod-moreblocks.
commit ba92f327fb7134d23cf673457fc308805114c14b
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Fri Oct 28 16:39:16 2016 +0200
New upstream version 20161028+git7f06db22
---
LICENSE.txt => LICENSE.md | 7 +-
README.md | 13 +
README.txt | 22 -
_config.txt | 11 -
aliases.lua | 175 ++----
circular_saw.lua | 647 +++++++++++----------
config.lua | 29 +
crafting.lua | 282 ++++++---
depends.txt | 1 +
description.txt | 1 +
init.lua | 391 ++-----------
locale/de.txt | 67 +++
locale/fr.txt | 50 +-
locale/it.txt | 70 +++
locale/template.txt | 64 ++
mod.conf | 1 +
models/moreblocks_slope.obj | 26 +
models/moreblocks_slope_cut.obj | 33 ++
models/moreblocks_slope_half.obj | 28 +
models/moreblocks_slope_half_raised.obj | 32 +
models/moreblocks_slope_inner.obj | 35 ++
models/moreblocks_slope_inner_cut.obj | 32 +
models/moreblocks_slope_inner_cut_half.obj | 34 ++
models/moreblocks_slope_inner_cut_half_raised.obj | 35 ++
models/moreblocks_slope_inner_half.obj | 35 ++
models/moreblocks_slope_inner_half_raised.obj | 38 ++
models/moreblocks_slope_outer.obj | 25 +
models/moreblocks_slope_outer_cut.obj | 23 +
models/moreblocks_slope_outer_cut_half.obj | 24 +
models/moreblocks_slope_outer_cut_half_raised.obj | 28 +
models/moreblocks_slope_outer_half.obj | 27 +
models/moreblocks_slope_outer_half_raised.obj | 34 ++
nodes.lua | 356 ++++++++++++
ownership.lua | 41 ++
redefinitions.lua | 249 +-------
stairsplus.lua | 434 --------------
stairsplus/API.md | 24 +
stairsplus/aliases.lua | 69 ++-
.../conversion.lua | 88 +--
stairsplus/init.lua | 91 +++
stairsplus/microblocks.lua | 168 +++++-
stairsplus/panels.lua | 147 ++++-
stairsplus/registrations.lua | 65 +++
stairsplus/slabs.lua | 321 ++++++----
stairsplus/slopes.lua | 362 ++++++++++++
stairsplus/stairs.lua | 331 +++++------
textures/default_brick.png | Bin 0 -> 716 bytes
textures/default_fence_overlay.png | Bin 0 -> 285 bytes
textures/invisible.png | Bin 0 -> 68 bytes
textures/moreblocks_cactus_brick.png | Bin 735 -> 718 bytes
textures/moreblocks_cactus_checker.png | Bin 826 -> 693 bytes
textures/moreblocks_circle_stone_bricks.png | Bin 646 -> 448 bytes
textures/moreblocks_circular_saw_bottom.png | Bin 699 -> 579 bytes
textures/moreblocks_circular_saw_side.png | Bin 587 -> 478 bytes
textures/moreblocks_circular_saw_top.png | Bin 667 -> 441 bytes
textures/moreblocks_clean_glass.png | Bin 249 -> 177 bytes
textures/moreblocks_clean_glass_detail.png | Bin 0 -> 96 bytes
textures/moreblocks_coal_checker.png | Bin 902 -> 744 bytes
textures/moreblocks_coal_glass.png | Bin 245 -> 155 bytes
textures/moreblocks_coal_glass_detail.png | Bin 0 -> 159 bytes
textures/moreblocks_coal_glass_stairsplus.png | Bin 278 -> 166 bytes
textures/moreblocks_coal_stone.png | Bin 545 -> 229 bytes
textures/moreblocks_coal_stone_bricks.png | Bin 0 -> 484 bytes
textures/moreblocks_cobble_compressed.png | Bin 0 -> 356 bytes
textures/moreblocks_copperpatina.png | Bin 0 -> 325 bytes
textures/moreblocks_empty_bookshelf.png | Bin 675 -> 219 bytes
textures/moreblocks_fence_jungle_wood.png | Bin 392 -> 204 bytes
textures/moreblocks_fence_wood.png | Bin 539 -> 480 bytes
textures/moreblocks_glass.png | Bin 978 -> 210 bytes
textures/moreblocks_glass_stairsplus.png | Bin 973 -> 215 bytes
textures/moreblocks_glow_glass.png | Bin 265 -> 157 bytes
textures/moreblocks_glow_glass_detail.png | Bin 0 -> 161 bytes
textures/moreblocks_glow_glass_stairsplus.png | Bin 287 -> 169 bytes
textures/moreblocks_grey_bricks.png | Bin 0 -> 725 bytes
textures/moreblocks_iron_checker.png | Bin 884 -> 850 bytes
textures/moreblocks_iron_glass.png | Bin 248 -> 158 bytes
textures/moreblocks_iron_glass_detail.png | Bin 0 -> 163 bytes
textures/moreblocks_iron_glass_stairsplus.png | Bin 283 -> 169 bytes
textures/moreblocks_iron_stone.png | Bin 555 -> 230 bytes
textures/moreblocks_iron_stone_bricks.png | Bin 741 -> 485 bytes
textures/moreblocks_jungle_wood.png | Bin 362 -> 0 bytes
textures/moreblocks_junglestick.png | Bin 215 -> 122 bytes
textures/moreblocks_obsidian_glass_stairsplus.png | Bin 209 -> 144 bytes
textures/moreblocks_plankstone.png | Bin 598 -> 335 bytes
textures/moreblocks_plankstone_2.png | Bin 604 -> 354 bytes
textures/moreblocks_rope.png | Bin 517 -> 356 bytes
textures/moreblocks_split_stone_tile.png | Bin 734 -> 273 bytes
textures/moreblocks_split_stone_tile_alt.png | Bin 0 -> 306 bytes
textures/moreblocks_split_stone_tile_top.png | Bin 752 -> 279 bytes
textures/moreblocks_stone_bricks.png | Bin 650 -> 0 bytes
textures/moreblocks_stone_tile.png | Bin 700 -> 271 bytes
textures/moreblocks_super_glow_glass.png | Bin 249 -> 154 bytes
textures/moreblocks_super_glow_glass_detail.png | Bin 0 -> 156 bytes
.../moreblocks_super_glow_glass_stairsplus.png | Bin 288 -> 171 bytes
textures/moreblocks_sweeper.png | Bin 477 -> 310 bytes
textures/moreblocks_tar.png | Bin 0 -> 270 bytes
textures/moreblocks_trap_glass.png | Bin 261 -> 170 bytes
textures/moreblocks_trap_glow_glass.png | Bin 0 -> 170 bytes
textures/moreblocks_trap_stone.png | Bin 817 -> 333 bytes
textures/moreblocks_trap_super_glow_glass.png | Bin 0 -> 170 bytes
textures/moreblocks_tree_stairsplus.png | Bin 0 -> 311 bytes
textures/moreblocks_wood.png | Bin 387 -> 0 bytes
textures/moreblocks_wood_tile.png | Bin 598 -> 396 bytes
textures/moreblocks_wood_tile_center.png | Bin 545 -> 288 bytes
textures/moreblocks_wood_tile_down.png | Bin 522 -> 0 bytes
textures/moreblocks_wood_tile_flipped.png | Bin 554 -> 0 bytes
textures/moreblocks_wood_tile_full.png | Bin 594 -> 436 bytes
textures/moreblocks_wood_tile_left.png | Bin 507 -> 0 bytes
textures/moreblocks_wood_tile_right.png | Bin 533 -> 0 bytes
textures/moreblocks_wood_tile_up.png | Bin 533 -> 289 bytes
110 files changed, 3053 insertions(+), 2013 deletions(-)
diff --git a/LICENSE.txt b/LICENSE.md
similarity index 71%
rename from LICENSE.txt
rename to LICENSE.md
index f42bd64..45c5ff5 100644
--- a/LICENSE.txt
+++ b/LICENSE.md
@@ -1,8 +1,9 @@
-+---- zlib/libpng license ----+
+zlib license
+============
-Copyright (c) 2013 Calinou
+Copyright (c) 2011-2015 Calinou and contributors
-This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.
+**This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.**
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..e6be474
--- /dev/null
+++ b/README.md
@@ -0,0 +1,13 @@
+More Blocks
+===========
+
+More Blocks for Minetest <http://minetest.net>, a free/libre infinite
+world block sandbox game.
+
+To install, just clone this repository into your "mods" directory.
+
+More Blocks code is licensed under the zlib license, textures are by Calinou and are licensed under CC BY-SA 3.0 Unported.
+
+moreblocks_copperpatina.png is by pithydon licensed under CC0 1.0
+
+**Forum topic:** <https://forum.minetest.net/viewtopic.php?f=11&t=509>
diff --git a/README.txt b/README.txt
deleted file mode 100644
index 4c15581..0000000
--- a/README.txt
+++ /dev/null
@@ -1,22 +0,0 @@
-Calinou's Minetest Mods
-=====================
-
-Calinou's Mods for Minetest [http://minetest.net], a free and opensource Minecraft-like game.
-
-This Git repository is mostly made for servers; it allows easy updating.
-
-To install, just clone this repository somewhere, then copy the "calinou_mods" folder in the "mods/minetest" folder of Minetest's installation folder.
-
-
-
-Misc stuff
-=====================
-
-All these mods' source codes, except More Ores are under the zlib/libpng license. More Ores is under the GNU GPLv3; the mods' textures are under the CC BY-SA 3.0 Unported.
-
-Mods' forum threads:
-More Blocks: http://minetest.net/forum/viewtopic.php?id=509
-More Ores: http://minetest.net/forum/viewtopic.php?id=549
-Map Tools: http://minetest.net/forum/viewtopic.php?id=1882
-Doors+: http://minetest.net/forum/viewtopic.php?id=2059
-Stairs+: http://minetest.net/forum/viewtopic.php?id=2092
diff --git a/_config.txt b/_config.txt
deleted file mode 100644
index b4395f4..0000000
--- a/_config.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-------------------------------------------------------------------------------
------------------------------- CONFIGURATION ---------------------------------
-------------------------------------------------------------------------------
-
-------------------------------------------------------------------------------
--------- Change settings by changing the values after the "=". ---------------
-------------------------------------------------------------------------------
-
-
--- Whether to direct wood based on player yaw when placing the block
-wood_facedir = true
diff --git a/aliases.lua b/aliases.lua
index f13b443..c34472d 100644
--- a/aliases.lua
+++ b/aliases.lua
@@ -1,156 +1,31 @@
--- Aliases (some of them are about the default mod, some about moreblocks)
+--[[
+More Blocks: alias definitions
--- Additional default aliases
-
-minetest.register_alias("woodpick", "default:pick_wood")
-minetest.register_alias("woodenpick", "default:pick_wood")
-minetest.register_alias("stonepick", "default:pick_stone")
-minetest.register_alias("steelpick", "default:pick_steel")
-minetest.register_alias("ironpick", "default:pick_steel")
-minetest.register_alias("mesepick", "default:pick_mese")
-
-minetest.register_alias("woodaxe", "default:axe_wood")
-minetest.register_alias("woodenaxe", "default:axe_wood")
-minetest.register_alias("stoneaxe", "default:axe_stone")
-minetest.register_alias("steelaxe", "default:axe_steel")
-minetest.register_alias("ironaxe", "default:axe_steel")
-
-minetest.register_alias("woodshovel", "default:shovel_wood")
-minetest.register_alias("woodenshovel", "default:shovel_wood")
-minetest.register_alias("stoneshovel", "default:shovel_stone")
-minetest.register_alias("steelshovel", "default:shovel_steel")
-minetest.register_alias("ironshovel", "default:shovel_steel")
-
-minetest.register_alias("woodsword", "default:sword_wood")
-minetest.register_alias("woodensword", "default:sword_wood")
-minetest.register_alias("stonesword", "default:sword_stone")
-minetest.register_alias("steelsword", "default:sword_steel")
-minetest.register_alias("ironsword", "default:sword_steel")
-
-minetest.register_alias("grass", "default:dirt_with_grass")
-minetest.register_alias("grassblock", "default:dirt_with_grass")
-minetest.register_alias("grass_block", "default:dirt_with_grass")
-
-minetest.register_alias("grassfootsteps", "default:dirt_with_grass_footsteps")
-minetest.register_alias("grass_footsteps", "default:dirt_with_grass_footsteps")
-
-minetest.register_alias("jungle_tree", "default:jungletree")
-
-minetest.register_alias("stick", "default:stick")
-minetest.register_alias("sign", "default:sign_wall")
-minetest.register_alias("fence", "default:fence_wood")
-minetest.register_alias("coal", "default:coal_lump")
-minetest.register_alias("iron", "default:iron_lump")
-minetest.register_alias("clay", "default:clay_lump")
-minetest.register_alias("steel", "default:steel_ingot")
-minetest.register_alias("steel_block", "default:steelblock")
-
-minetest.register_alias("stonebrick", "default:stonebrick")
-minetest.register_alias("stonebricks", "default:stonebrick")
-minetest.register_alias("stone_brick", "default:stonebrick")
-minetest.register_alias("stone_bricks", "default:stonebrick")
+Copyright (c) 2011-2015 Calinou 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("circularsaw", "moreblocks:circular_saw")
minetest.register_alias("circular_saw", "moreblocks:circular_saw")
-minetest.register_alias("screwdriver", "moreblocks:screwdriver")
-minetest.register_alias("screw_driver", "moreblocks:screw_driver")
-minetest.register_alias("screwdrive", "moreblocks:screw_driver")
-minetest.register_alias("screw_drive", "moreblocks:screw_driver")
-minetest.register_alias("sweep", "moreblocks:sweeper")
-minetest.register_alias("junglestick", "moreblocks:jungle_stick")
minetest.register_alias("jungle_stick", "moreblocks:jungle_stick")
-minetest.register_alias("obsidian", "default:obsidian")
-minetest.register_alias("obsidianglass", "default:obsidian_glass")
-minetest.register_alias("obsidian_glass", "default:obsidian_glass")
-
--- More Blocks aliases
-
-minetest.register_alias("circlestonebrick", "moreblocks:circle_stone_bricks")
-minetest.register_alias("circlestonebricks", "moreblocks:circle_stone_bricks")
-minetest.register_alias("circlestone_brick", "moreblocks:circle_stone_bricks")
-minetest.register_alias("circlestone_bricks", "moreblocks:circle_stone_bricks")
-minetest.register_alias("circle_stonebrick", "moreblocks:circle_stone_bricks")
-minetest.register_alias("circle_stonebricks", "moreblocks:circle_stone_bricks")
-minetest.register_alias("circle_stone_brick", "moreblocks:circle_stone_bricks")
-minetest.register_alias("circle_stone_bricks", "moreblocks:circle_stone_bricks")
-
-minetest.register_alias("stonesquare", "moreblocks:stone_tile")
-minetest.register_alias("stonesquares", "moreblocks:stone_tile")
-minetest.register_alias("stone_square", "moreblocks:stone_tile")
-minetest.register_alias("stone_squares", "moreblocks:stone_tile")
-minetest.register_alias("stonetile", "moreblocks:stone_tile")
-minetest.register_alias("stonetiles", "moreblocks:stone_tile")
-minetest.register_alias("stone_tile", "moreblocks:stone_tile")
-minetest.register_alias("stone_tiles", "moreblocks:stone_tile")
-
-minetest.register_alias("splitstonesquare", "moreblocks:split_stone_tile")
-minetest.register_alias("splitstonesquares", "moreblocks:split_stone_tile")
-minetest.register_alias("split_stone_square", "moreblocks:split_stone_tile")
-minetest.register_alias("split_stone_squares", "moreblocks:split_stone_tile")
-minetest.register_alias("split_stonesquare", "moreblocks:split_stone_tile")
-minetest.register_alias("split_stonesquares", "moreblocks:split_stone_tile")
-
-minetest.register_alias("coalstone", "moreblocks:coal_stone")
-minetest.register_alias("coal_stone", "moreblocks:coal_stone")
-
-minetest.register_alias("ironstone", "moreblocks:iron_stone")
-minetest.register_alias("iron_stone", "moreblocks:iron_stone")
-
-minetest.register_alias("coalglass", "moreblocks:coal_glass")
-minetest.register_alias("coal_glass", "moreblocks:coal_glass")
-
-minetest.register_alias("ironglass", "moreblocks:iron_glass")
-minetest.register_alias("iron_glass", "moreblocks:iron_glass")
-
-minetest.register_alias("glowglass", "moreblocks:glow_glass")
-minetest.register_alias("glow_glass", "moreblocks:glow_glass")
-
-minetest.register_alias("superglowglass", "moreblocks:super_glow_glass")
-minetest.register_alias("super_glowglass", "moreblocks:super_glow_glass")
-minetest.register_alias("super_glow_glass", "moreblocks:super_glow_glass")
-
-minetest.register_alias("plankstone", "moreblocks:plankstone")
-
-minetest.register_alias("cactusbrick", "moreblocks:cactus_brick")
-minetest.register_alias("cactus_brick", "moreblocks:cactus_brick")
-
-minetest.register_alias("cactuschecker", "moreblocks:cactus_checker")
-minetest.register_alias("cactus_checker", "moreblocks:cactus_checker")
-
-minetest.register_alias("coalchecker", "moreblocks:coal_checker")
-minetest.register_alias("coal_checker", "moreblocks:coal_checker")
-
-minetest.register_alias("ironchecker", "moreblocks:iron_checker")
-minetest.register_alias("iron_checker", "moreblocks:iron_checker")
-
-minetest.register_alias("woodtile", "moreblocks:wood_tile")
-minetest.register_alias("woodentile", "moreblocks:wood_tile")
-minetest.register_alias("wood_tile", "moreblocks:wood_tile")
-minetest.register_alias("wooden_tile", "moreblocks:wood_tile")
-
-minetest.register_alias("woodtile_full", "moreblocks:wood_tile_full")
-minetest.register_alias("woodentile_full", "moreblocks:wood_tile_full")
-minetest.register_alias("wood_tile_full", "moreblocks:wood_tile_full")
-minetest.register_alias("wooden_tile_full", "moreblocks:wood_tile_full")
-minetest.register_alias("full_woodtile", "moreblocks:wood_tile_full")
-minetest.register_alias("full_woodentile", "moreblocks:wood_tile_full")
-minetest.register_alias("full_wood_tile", "moreblocks:wood_tile_full")
-minetest.register_alias("full_wooden_tile", "moreblocks:wood_tile_full")
-
--- Old block/item replacement
-
+-- Old block/item replacement:
minetest.register_alias("moreblocks:oerkkiblock", "default:mossycobble")
minetest.register_alias("moreblocks:screwdriver", "screwdriver:screwdriver")
--- Node and item renaming
-
+-- 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_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")
@@ -181,3 +56,25 @@ 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")
+
+-- 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,
+})
+
diff --git a/circular_saw.lua b/circular_saw.lua
index 50068e8..09fbd90 100644
--- a/circular_saw.lua
+++ b/circular_saw.lua
@@ -1,365 +1,418 @@
--- Load translation library if intllib is installed
-
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
- else
- S = function ( s ) return s end
-end
+--[[
+More Blocks: circular saw
-circular_saw = {};
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
-circular_saw.known_stairs = {}
+local S = moreblocks.intllib
+circular_saw = {}
--- Register known moreblocks stairs
-for i,v in ipairs({"default:wood", "default:stone", "default:cobble", "default:mossycobble", "default:brick", "default:sandstone",
- "default:steelblock", "default:desert_stone", "default:glass", "default:tree", "default:jungletree", "default:stonebrick",
- "default:obsidian", "default:obsidian_glass", "default:stone_bricks", "default:junglewood", "default:goldblock",
- "default:copperblock", "default:bronzeblock", "default:diamondblock", "default:desert_stonebrick", "default:sandstonebrick",
+circular_saw.known_stairs = setmetatable({}, {
+ __newindex = function(k, v)
+ local modname = minetest.get_current_modname()
+ print(("WARNING: mod %s tried to add node %s to the circular saw"
+ .. " manually."):format(modname, v))
+ end,
+})
- "moreblocks:coal_stone", "moreblocks:iron_stone", "moreblocks:coal_checker", "moreblocks:iron_checker",
- "moreblocks:cactus_checker", "moreblocks:coal_glass", "moreblocks:iron_glass", "moreblocks:glow_glass",
- "moreblocks:super_glow_glass", "moreblocks:wooden_tile", "moreblocks:stone_tile", "moreblocks:split_stone_tile",
- "moreblocks:iron_stone_bricks", "moreblocks:circle_stone_bricks", "moreblocks:wood_tile_centered",
- "moreblocks:wood_tile_full", "moreblocks:plank_stone"}) do
- table.insert(circular_saw.known_stairs, v);
+-- This is populated by stairsplus:register_all:
+circular_saw.known_nodes = {}
+
+-- How many microblocks does this shape at the output inventory cost:
+-- It may cause slight loss, but no gain.
+circular_saw.cost_in_microblocks = {
+ 1, 1, 1, 1, 1, 1, 1, 2,
+ 2, 3, 2, 4, 2, 4, 5, 6,
+ 7, 1, 1, 2, 4, 6, 7, 8,
+ 3, 1, 1, 2, 4, 4, 2, 6,
+ 7, 3, 7, 7, 4, 8, 3, 2,
+ 6, 2, 1, 3, 4,
+}
+
+circular_saw.names = {
+ {"micro", "_1"},
+ {"panel", "_1"},
+ {"micro", "_2"},
+ {"panel", "_2"},
+ {"micro", "_4"},
+ {"panel", "_4"},
+ {"micro", ""},
+ {"panel", ""},
+ {"micro", "_12"},
+ {"panel", "_12"},
+ {"micro", "_14"},
+ {"panel", "_14"},
+ {"micro", "_15"},
+ {"panel", "_15"},
+ {"stair", "_outer"},
+ {"stair", ""},
+ {"stair", "_inner"},
+ {"slab", "_1"},
+ {"slab", "_2"},
+ {"slab", "_quarter"},
+ {"slab", ""},
+ {"slab", "_three_quarter"},
+ {"slab", "_14"},
+ {"slab", "_15"},
+ {"stair", "_half"},
+ {"stair", "_alt_1"},
+ {"stair", "_alt_2"},
+ {"stair", "_alt_4"},
+ {"stair", "_alt"},
+ {"slope", ""},
+ {"slope", "_half"},
+ {"slope", "_half_raised"},
+ {"slope", "_inner"},
+ {"slope", "_inner_half"},
+ {"slope", "_inner_half_raised"},
+ {"slope", "_inner_cut"},
+ {"slope", "_inner_cut_half"},
+ {"slope", "_inner_cut_half_raised"},
+ {"slope", "_outer"},
+ {"slope", "_outer_half"},
+ {"slope", "_outer_half_raised"},
+ {"slope", "_outer_cut"},
+ {"slope", "_outer_cut_half"},
+ {"slope", "_outer_cut_half_raised"},
+ {"slope", "_cut"},
+}
+
+function circular_saw:get_cost(inv, stackname)
+ for i, item in pairs(inv:get_list("output")) do
+ if item:get_name() == stackname then
+ return circular_saw.cost_in_microblocks[i]
+ end
+ end
end
-
--- How many microblocks does this shape at the output inventory cost?
-circular_saw.cost_in_microblocks = { 6, 7, 5, 3, 2, 4, 6,
- 2, 1, 4, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0 };
-
--- anz: amount of input material in microblocks
-circular_saw.get_stair_output_inv = function(modname, material, anz, max)
+function circular_saw:get_output_inv(modname, material, amount, max)
+ if (not max or max < 1 or max > 99) then max = 99 end
- local max_offered = 99;
+ local list = {}
+ local pos = #list
- if(not(max) or (max == nil) or tonumber(max) > 99 or tonumber(max) < 1) then
- max_offered = 99;
- else
- max_offered = tonumber(max);
- end
-
-
- -- If there is nothing inside display empty inventory
- if(anz < 1) then
- return { "", "", "", "", "", "", "",
- "", "", "", "", "", "", "",
- "", "", "", "", "", "", "",
- "", "", "", "", "", "", ""};
+ -- If there is nothing inside, display empty inventory:
+ if amount < 1 then
+ return list
end
- return {
- modname .. ":stair_" .. material .. " " .. math.min(math.floor(anz/6), max_offered),
- modname .. ":stair_" .. material .. "_inner " .. math.min(math.floor(anz/7), max_offered),
- modname .. ":stair_" .. material .. "_outer " .. math.min(math.floor(anz/5), max_offered),
- modname .. ":stair_" .. material .. "_half " .. math.min(math.floor(anz/3), max_offered),
- modname .. ":slab_" .. material .. "_quarter " .. math.min(math.floor(anz/2), max_offered),
- modname .. ":slab_" .. material .. " " .. math.min(math.floor(anz/4), max_offered),
- modname .. ":slab_" .. material .. "_three_quarter " .. math.min(math.floor(anz/6), max_offered),
-
- modname .. ":panel_" .. material .. "_bottom " .. math.min(math.floor(anz/2), max_offered),
- modname .. ":micro_" .. material .. "_bottom " .. math.min(math.floor(anz/1), max_offered),
- modname .. ":stair_" .. material .. "_alt " .. math.min(math.floor(anz/4), max_offered),
- "",
- }
+ for i = 1, #circular_saw.names do
+ local t = circular_saw.names[i]
+ local cost = circular_saw.cost_in_microblocks[i]
+ local balance = math.min(math.floor(amount/cost), max)
+ local nodename = modname .. ":" .. t[1] .. "_" .. material .. t[2]
+ if minetest.registered_nodes[nodename] then
+ pos = pos + 1
+ list[pos] = nodename .. " " .. balance
+ end
+ end
+ return list
end
--- Reset empty circular_saw after last full block has been taken out (or the circular_saw has been placed the first tiem); note: max_offered is not reset
-circular_saw.reset_circular_saw = function(pos)
- local meta = minetest.env:get_meta(pos);
- local inv = meta:get_inventory();
+-- Reset empty circular_saw after last full block has been taken out
+-- (or the circular_saw has been placed the first time)
+-- Note: max_offered is not reset:
+function circular_saw:reset(pos)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
- inv:set_list("input", { "" });
- inv:set_list("micro", { "" });
- inv:set_list("output", circular_saw.get_stair_output_inv("", "", 0, meta:get_string("max_offered")));
- meta:set_int("anz", 0);
+ inv:set_list("input", {})
+ inv:set_list("micro", {})
+ inv:set_list("output", {})
+ meta:set_int("anz", 0)
- meta:set_string("infotext", "Circular saw, empty (owned by " .. (meta:get_string("owner") or "") .. ")");
+ meta:set_string("infotext",
+ S("Circular Saw is empty (owned by %s)")
+ :format(meta:get_string("owner") or ""))
end
--- Player has taken something out of the box or placed something inside; that amounts to count microblocks
-circular_saw.update_inventory = function(pos, amount)
- local meta = minetest.env:get_meta(pos);
- local inv = meta:get_inventory();
- local akt = meta:get_int("anz");
-
- -- The material is receicled automaticly
- inv:set_list("recycle", { "" });
+-- Player has taken something out of the box or placed something inside
+-- that amounts to count microblocks:
+function circular_saw:update_inventory(pos, amount)
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
- if(akt + amount < 1) then -- If the last block is taken out
+ amount = meta:get_int("anz") + amount
- circular_saw.reset_circular_saw(pos);
- return;
+ -- The material is recycled automaticly.
+ inv:set_list("recycle", {})
+ if amount < 1 then -- If the last block is taken out.
+ self:reset(pos)
+ return
end
- local stack = inv:get_stack("input", 1);
- -- At least one "normal" block is necessary to see what kind of stairs are requested
- if(stack:is_empty()) then
-
- -- Any microblocks not taken out yet are now lost (covers material loss in the machine)
- circular_saw.reset_circular_saw(pos);
- return;
+ local stack = inv:get_stack("input", 1)
+ -- At least one "normal" block is necessary to see what kind of stairs are requested.
+ if stack:is_empty() then
+ -- Any microblocks not taken out yet are now lost.
+ -- (covers material loss in the machine)
+ self:reset(pos)
+ return
end
- local node_name = stack:get_name();
- local liste = node_name:split(":");
- local modname = liste[1];
- local material = liste[2];
-
- -- Display as many full blocks as possible
- inv:set_list("input", { modname.. ":" .. material .. " " .. math.floor( (akt + amount) / 8) });
-
- -- The stairnodes made of default nodes use moreblocks namespace, other mods keep own.
- if(modname == "default") then modname = "moreblocks"; end
- --print("circular_saw set to " ..modname.. " : " ..material.. " with " .. (akt+amount) .. " microblocks.");
-
- -- 0-7 microblocks may remain as a rest
- inv:set_list("micro", { modname.. ":micro_" .. material .. "_bottom " .. ((akt + amount) % 8) });
- -- Display
- inv:set_list("output", circular_saw.get_stair_output_inv(modname, material, (akt + amount), meta:get_string("max_offered")));
- -- Store how many microblocks are available
- meta:set_int("anz", (akt+amount));
-
- meta:set_string("infotext", "Circular saw, working with " ..material.. " (owned by " .. (meta:get_string("owner") or "") .. ")");
+ local node_name = stack:get_name() or ""
+ local name_parts = circular_saw.known_nodes[node_name] or ""
+ local modname = name_parts[1] or ""
+ local material = name_parts[2] or ""
+
+ inv:set_list("input", { -- Display as many full blocks as possible:
+ node_name.. " " .. math.floor(amount / 8)
+ })
+
+ -- The stairnodes made of default nodes use moreblocks namespace, other mods keep own:
+ if modname == "default" then
+ modname = "moreblocks"
+ end
+ -- print("circular_saw set to " .. modname .. " : "
+ -- .. material .. " with " .. (amount) .. " microblocks.")
+
+ -- 0-7 microblocks may remain left-over:
+ inv:set_list("micro", {
+ modname .. ":micro_" .. material .. "_bottom " .. (amount % 8)
+ })
+ -- Display:
+ inv:set_list("output",
+ self:get_output_inv(modname, material, amount,
+ meta:get_int("max_offered")))
+ -- Store how many microblocks are available:
+ meta:set_int("anz", amount)
+
+ meta:set_string("infotext",
+ S("Circular Saw is working on %s (owned by %s)")
+ :format(material, meta:get_string("owner") or ""))
end
--- The amount of items offered per shape can be configured
-circular_saw.on_receive_fields = function(pos, formname, fields, sender)
- local meta = minetest.env:get_meta(pos);
- if tonumber(fields.max_offered) and tonumber(fields.max_offered) > 0 and tonumber(fields.max_offered) < 99 then
- meta:set_string("max_offered", fields.max_offered);
- circular_saw.update_inventory(pos, 0); -- update to show the correct number of items
+-- The amount of items offered per shape can be configured:
+function circular_saw.on_receive_fields(pos, formname, fields, sender)
+ local meta = minetest.get_meta(pos)
+ local max = tonumber(fields.max_offered)
+ if max and max > 0 then
+ meta:set_string("max_offered", max)
+ -- Update to show the correct number of items:
+ circular_saw:update_inventory(pos, 0)
end
end
--- Moving the inventory of the circular_saw around is not allowed because it is a fictional inventory
-circular_saw.allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
- -- Moving inventory around would be rather immpractical and make things more difficult to calculate
- return 0;
+-- Moving the inventory of the circular_saw around is not allowed because it
+-- is a fictional inventory. Moving inventory around would be rather
+-- impractical and make things more difficult to calculate:
+function circular_saw.allow_metadata_inventory_move(
+ pos, from_list, from_index, to_list, to_index, count, player)
+ return 0
end
--- Only input- and recycle-slot are intended as input slots
-circular_saw.allow_metadata_inventory_put = function(pos, listname, index, stack, player)
-
- -- The player is not allowed to put something in there
- if(listname == "output" or listname == "micro") then
- return 0;
- end
-
- local meta = minetest.env:get_meta(pos);
- local inv = meta:get_inventory();
-
- -- Only alow those items that are offered in the output inventory to be recycled
- if(listname == "recycle" and not(inv:contains_item("output", stack:get_name()))) then
- return 0;
+-- Only input- and recycle-slot are intended as input slots:
+function circular_saw.allow_metadata_inventory_put(
+ pos, listname, index, stack, player)
+ -- The player is not allowed to put something in there:
+ if listname == "output" or listname == "micro" then
+ return 0
end
- -- Only accept certain blocks as input which are known to be craftable into stairs
- if(listname == "input") then
-
- for i,v in ipairs(circular_saw.known_stairs) do
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ local stackname = stack:get_name()
+ local count = stack:get_count()
- if(circular_saw.known_stairs[ i ] == stack:get_name()) then
- return stack:get_count();
+ -- Only alow those items that are offered in the output inventory to be recycled:
+ if listname == "recycle" then
+ if not inv:contains_item("output", stackname) then
+ return 0
end
+ local stackmax = stack:get_stack_max()
+ local instack = inv:get_stack("input", 1)
+ local microstack = inv:get_stack("micro", 1)
+ local incount = instack:get_count()
+ local incost = (incount * 8) + microstack:get_count()
+ local maxcost = (stackmax * 8) + 7
+ local cost = circular_saw:get_cost(inv, stackname)
+ if (incost + cost) > maxcost then
+ return math.max((maxcost - incost) / cost, 0)
+ end
+ return count
+ end
+ -- Only accept certain blocks as input which are known to be craftable into stairs:
+ if listname == "input" then
+ if not inv:is_empty("input") then
+ if inv:get_stack("input", index):get_name() ~= stackname then
+ return 0
+ end
end
- return 0;
-
+ if not inv:is_empty("micro") then
+ local microstackname = inv:get_stack("micro", 1):get_name():gsub("^.+:micro_", "", 1)
+ local cutstackname = stackname:gsub("^.+:", "", 1)
+ if microstackname ~= cutstackname then
+ return 0
+ end
+ end
+ for name, t in pairs(circular_saw.known_nodes) do
+ if name == stackname and inv:room_for_item("input", stack) then
+ return count
+ end
+ end
+ return 0
end
-
- return stack:get_count()
end
--- Taking is allowed from all slots (even the internal microblock slot)
-
--- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material
-circular_saw.on_metadata_inventory_put = function(pos, listname, index, stack, player)
-
- -- We need to find out if the circular_saw is already set to a specific material or not
- local meta = minetest.env:get_meta(pos);
- local inv = meta:get_inventory();
-
- -- Putting something into the input slot is only possible if that had been empty before or did contain something of the same material
- if( listname=="input") then
-
- -- Each new block is worth 8 microblocks
- circular_saw.update_inventory(pos, 8 * stack:get_count());
-
- elseif(listname=="recycle") then
-
- -- Lets look which shape this represents
- for i,v in ipairs(inv:get_list("output")) do
-
- if(v:get_name() == stack:get_name()) then
-
- local value = circular_saw.cost_in_microblocks[ i ] * stack:get_count();
- --print("\nRecycling " .. (v:get_name()) .. " into " ..value.. " microblocks.");
-
- -- We get value microblocks back
- circular_saw.update_inventory(pos, value);
- end
+-- Taking is allowed from all slots (even the internal microblock slot).
+-- Putting something in is slightly more complicated than taking anything
+-- because we have to make sure it is of a suitable material:
+function circular_saw.on_metadata_inventory_put(
+ pos, listname, index, stack, player)
+ -- We need to find out if the circular_saw is already set to a
+ -- specific material or not:
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ local stackname = stack:get_name()
+ local count = stack:get_count()
+
+ -- Putting something into the input slot is only possible if that had
+ -- been empty before or did contain something of the same material:
+ if listname == "input" then
+ -- Each new block is worth 8 microblocks:
+ circular_saw:update_inventory(pos, 8 * count)
+ elseif listname == "recycle" then
+ -- Lets look which shape this represents:
+ local cost = circular_saw:get_cost(inv, stackname)
+ local input_stack = inv:get_stack("input", 1)
+ -- check if this would not exceed input itemstack max_stacks
+ if input_stack:get_count() + ((cost * count) / 8) <= input_stack:get_stack_max() then
+ circular_saw:update_inventory(pos, cost * count)
end
end
end
--- The player takes something
-circular_saw.on_metadata_inventory_take = function(pos, listname, index, stack, player)
-
- -- If it is one of the offered stairs: find out how many microblocks have to be substracted
- if(listname=="output") then
-
- -- We do know how much each block at each position costs
- local cost = circular_saw.cost_in_microblocks[ index ] * stack:get_count();
-
- circular_saw.update_inventory(pos, -1 * cost);
-
- elseif(listname=="mikro") then
-
- -- Each microblock costs 1 microblock
- circular_saw.update_inventory(pos, -1 * 1 * stack:get_count());
+function circular_saw.on_metadata_inventory_take(
+ pos, listname, index, stack, player)
+
+ -- Prevent (inbuilt) swapping between inventories with different blocks
+ -- corrupting player inventory or Saw with 'unknown' items.
+ local meta = minetest.get_meta(pos)
+ local inv = meta:get_inventory()
+ local input_stack = inv:get_stack(listname, index)
+ if not input_stack:is_empty() and input_stack:get_name()~=stack:get_name() then
+ local player_inv = player:get_inventory()
+ if player_inv:room_for_item("main", input_stack) then
+ player_inv:add_item("main", input_stack)
+ end
- elseif(listname=="input") then
-
- -- Each normal (= full) block taken costs 8 microblocks
- circular_saw.update_inventory(pos, -1 * 8 * stack:get_count());
+ circular_saw:reset(pos)
+ return
+ end
+ -- If it is one of the offered stairs: find out how many
+ -- microblocks have to be substracted:
+ if listname == "output" then
+ -- We do know how much each block at each position costs:
+ local cost = circular_saw.cost_in_microblocks[index]
+ * stack:get_count()
+
+ circular_saw:update_inventory(pos, -cost)
+ elseif listname == "micro" then
+ -- Each microblock costs 1 microblock:
+ circular_saw:update_inventory(pos, -stack:get_count())
+ elseif listname == "input" then
+ -- Each normal (= full) block taken costs 8 microblocks:
+ circular_saw:update_inventory(pos, 8 * -stack:get_count())
end
- -- The recycle field plays no role here since it is processed immediately
+ -- The recycle field plays no role here since it is processed immediately.
end
-
-circular_saw.on_construct_init = function(pos, formspec)
-
- local meta = minetest.env:get_meta(pos)
- meta:set_string("formspec", formspec);
-
- meta:set_int( "anz", 0); -- No microblocks inside yet
- meta:set_string("max_offered", 99); -- How many items of this kind are offered by default?
- meta:set_string("infotext", "Circular saw, empty")
+gui_slots = "listcolors[#606060AA;#808080;#101010;#202020;#FFF]"
+
+function circular_saw.on_construct(pos)
+ local meta = minetest.get_meta(pos)
+ local fancy_inv = default.gui_bg..default.gui_bg_img..default.gui_slots
+ meta:set_string("formspec", "size[11,10]"..fancy_inv..
+ "label[0,0;" ..S("Input\nmaterial").. "]" ..
+ "list[current_name;input;1.5,0;1,1;]" ..
+ "label[0,1;" ..S("Left-over").. "]" ..
+ "list[current_name;micro;1.5,1;1,1;]" ..
+ "label[0,2;" ..S("Recycle\noutput").. "]" ..
+ "list[current_name;recycle;1.5,2;1,1;]" ..
+ "field[0.3,3.5;1,1;max_offered;" ..S("Max").. ":;${max_offered}]" ..
+ "button[1,3.2;1,1;Set;" ..S("Set").. "]" ..
+ "list[current_name;output;2.8,0;8,6;]" ..
+ "list[current_player;main;1.5,6.25;8,4;]")
+
+ meta:set_int("anz", 0) -- No microblocks inside yet.
+ meta:set_string("max_offered", 99) -- How many items of this kind are offered by default?
+ meta:set_string("infotext", S("Circular Saw is empty"))
local inv = meta:get_inventory()
- inv:set_size("input", 1) -- Input slot for full blocks of material x
- inv:set_size("micro", 1) -- Storage for 1-7 surplus microblocks
- inv:set_size("recycle", 1) -- Surplus partial blocks can be placed here
- inv:set_size("output", 28) -- 4*7 versions of stair-parts of material x
+ inv:set_size("input", 1) -- Input slot for full blocks of material x.
+ inv:set_size("micro", 1) -- Storage for 1-7 surplus microblocks.
+ inv:set_size("recycle", 1) -- Surplus partial blocks can be placed here.
+ inv:set_size("output", 6*8) -- 6x8 versions of stair-parts of material x.
- circular_saw.reset_circular_saw(pos);
+ circular_saw:reset(pos)
end
-circular_saw.can_dig = function(pos,player)
- local meta = minetest.env:get_meta(pos);
+function circular_saw.can_dig(pos,player)
+ local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- if not inv:is_empty("input") then
- return false
- elseif not inv:is_empty("micro") then
- return false
- elseif not inv:is_empty("recycle") then
+ if not inv:is_empty("input") or
+ not inv:is_empty("micro") or
+ not inv:is_empty("recycle") then
return false
end
-
- -- Can be digged by anyone when empty (not only by the owner)
+ -- Can be dug by anyone when empty, not only by the owner:
return true
-end,
-
+end
minetest.register_node("moreblocks:circular_saw", {
- description = S("Circular Saw"),
- drawtype = "nodebox",
- node_box = {
- type = "fixed",
- fixed = {
- {-0.4, -0.5, -0.4, -0.25, 0.25, -0.25}, -- Leg
- {0.25, -0.5, 0.25, 0.4, 0.25, 0.4}, -- Leg
- {-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg
- {0.25, -0.5, -0.4, 0.4, 0.25, -0.25}, -- Leg
- {-0.5, 0.25, -0.5, 0.5, 0.375, 0.5}, -- Tabletop
- {-0.01, 0.4375, -0.125, 0.01, 0.5, 0.125}, -- Saw blade (top)
- {-0.01, 0.375, -0.1875, 0.01, 0.4375, 0.1875}, -- Saw blade (bottom)
- {-0.25, -0.0625, -0.25, 0.25, 0.25, 0.25}, -- Motor case
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.4, -0.5, -0.4, -0.25, 0.25, -0.25}, -- Leg
- {0.25, -0.5, 0.25, 0.4, 0.25, 0.4}, -- Leg
- {-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg
- {0.25, -0.5, -0.4, 0.4, 0.25, -0.25}, -- Leg
- {-0.5, 0.25, -0.5, 0.5, 0.375, 0.5}, -- Tabletop
- {-0.01, 0.4375, -0.125, 0.01, 0.5, 0.125}, -- Saw blade (top)
- {-0.01, 0.375, -0.1875, 0.01, 0.4375, 0.1875}, -- Saw blade (bottom)
- {-0.25, -0.0625, -0.25, 0.25, 0.25, 0.25}, -- Motor case
- },
+ description = S("Circular Saw"),
+ drawtype = "nodebox",
+ node_box = {
+ type = "fixed",
+ fixed = {
+ {-0.4, -0.5, -0.4, -0.25, 0.25, -0.25}, -- Leg
+ {0.25, -0.5, 0.25, 0.4, 0.25, 0.4}, -- Leg
+ {-0.4, -0.5, 0.25, -0.25, 0.25, 0.4}, -- Leg
+ {0.25, -0.5, -0.4, 0.4, 0.25, -0.25}, -- Leg
+ {-0.5, 0.25, -0.5, 0.5, 0.375, 0.5}, -- Tabletop
+ {-0.01, 0.4375, -0.125, 0.01, 0.5, 0.125}, -- Saw blade (top)
+ {-0.01, 0.375, -0.1875, 0.01, 0.4375, 0.1875}, -- Saw blade (bottom)
+ {-0.25, -0.0625, -0.25, 0.25, 0.25, 0.25}, -- Motor case
},
- tiles = {"moreblocks_circular_saw_top.png", "moreblocks_circular_saw_bottom.png", "moreblocks_circular_saw_side.png"},
- paramtype = "light",
- sunlight_propagates = true,
- paramtype2 = "facedir",
- groups = {cracky=2},
- on_construct = function(pos)
- return circular_saw.on_construct_init(pos,
- "size[10,9]" ..
- "list[current_name;input;0,0;1,1;]" ..
- "label[0,0;Input material]" ..
- "list[current_name;micro;0,1;1,1;]" ..
- "label[0,1;Rest/microblocks]" ..
- "field[0.3,2.5;1,1;max_offered;Max:;${max_offered}]" ..
- "button[1,2;1,1;Set;Set]" ..
- "list[current_name;recycle;0,3;1,1;]" ..
- "label[0,3;Recycle output]" ..
- "list[current_name;output;2,0;7,4;]" ..
- "list[current_player;main;1,5;8,4;]");
- end,
-
- can_dig = function(pos,player)
- return circular_saw.can_dig(pos, player);
- end,
-
- -- Set owner of this circular saw
- after_place_node = function(pos, placer)
- local meta = minetest.env:get_meta(pos);
-
- meta:set_string("owner", (placer:get_player_name() or ""));
- meta:set_string("infotext", "Circular saw is empty (owned by " .. (placer:get_player_name() or "") .. ")");
- end,
-
- -- The amount of items offered per shape can be configured
- on_receive_fields = function(pos, formname, fields, sender)
- return circular_saw.on_receive_fields(pos, formname, fields, sender);
- end,
-
- allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
- return circular_saw.allow_metadata_inventory_move(pos, from_list, from_index, to_list, to_index, count, player);
- end,
-
- -- Only input- and recycle-slot are intended as input slots
- allow_metadata_inventory_put = function(pos, listname, index, stack, player)
- return circular_saw.allow_metadata_inventory_put(pos, listname, index, stack, player);
- end,
-
- -- Taking is allowed from all slots (even the internal microblock slot); moving is forbidden
-
- -- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material
- on_metadata_inventory_put = function(pos, listname, index, stack, player)
- return circular_saw.on_metadata_inventory_put(pos, listname, index, stack, player);
- end,
-
- on_metadata_inventory_take = function(pos, listname, index, stack, player)
- return circular_saw.on_metadata_inventory_take(pos, listname, index, stack, player);
- end
-
+ },
+ tiles = {"moreblocks_circular_saw_top.png",
+ "moreblocks_circular_saw_bottom.png",
+ "moreblocks_circular_saw_side.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ paramtype2 = "facedir",
+ groups = {choppy = 2,oddly_breakable_by_hand = 2},
+ sounds = default.node_sound_wood_defaults(),
+ on_construct = circular_saw.on_construct,
+ can_dig = circular_saw.can_dig,
+ -- Set the owner of this circular saw.
+ after_place_node = function(pos, placer)
+ local meta = minetest.get_meta(pos)
+ local owner = placer and placer:get_player_name() or ""
+ meta:set_string("owner", owner)
+ meta:set_string("infotext",
+ S("Circular Saw is empty (owned by %s)")
+ :format(owner))
+ end,
+
+ -- The amount of items offered per shape can be configured:
+ on_receive_fields = circular_saw.on_receive_fields,
+ allow_metadata_inventory_move = circular_saw.allow_metadata_inventory_move,
+ -- Only input- and recycle-slot are intended as input slots:
+ allow_metadata_inventory_put = circular_saw.allow_metadata_inventory_put,
+ -- Taking is allowed from all slots (even the internal microblock slot). Moving is forbidden.
+ -- Putting something in is slightly more complicated than taking anything because we have to make sure it is of a suitable material:
+ on_metadata_inventory_put = circular_saw.on_metadata_inventory_put,
+ on_metadata_inventory_take = circular_saw.on_metadata_inventory_take,
})
diff --git a/config.lua b/config.lua
new file mode 100644
index 0000000..d646dac
--- /dev/null
+++ b/config.lua
@@ -0,0 +1,29 @@
+--[[
+More Blocks: configuration handling
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+moreblocks.config = {}
+
+local function getbool_default(setting, default)
+ local value = minetest.setting_getbool(setting)
+ if value == nil then
+ value = default
+ end
+ return value
+end
+
+local function setting(settingtype, name, default)
+ if settingtype == "bool" then
+ moreblocks.config[name] =
+ getbool_default("moreblocks." .. name, default)
+ else
+ moreblocks.config[name] =
+ minetest.setting_get("moreblocks." .. name) or default
+ end
+end
+
+-- Show stairs/slabs/panels/microblocks in creative inventory (true or false):
+setting("bool", "stairsplus_in_creative_inventory", false)
diff --git a/crafting.lua b/crafting.lua
index 275f9f5..501c9f4 100644
--- a/crafting.lua
+++ b/crafting.lua
@@ -1,46 +1,67 @@
--- Crafting
+--[[
+More Blocks: crafting recipes
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
minetest.register_craft({
- output = "default:stick 1",
- recipe = {
- {"default:dry_shrub"},
- }
+ output = "default:stick",
+ recipe = {{"default:dry_shrub"},}
})
minetest.register_craft({
- output = "default:dirt_with_grass 1",
- recipe = {
- {"default:junglegrass"},
- {"default:dirt"},
- }
+ output = "default:stick",
+ recipe = {{"default:sapling"},}
})
minetest.register_craft({
- output = "default:dirt_with_grass 1",
- recipe = {
- {"default:mese"},
- {"default:dirt"},
- }
+ output = "default:stick",
+ recipe = {{"default:junglesapling"},}
})
minetest.register_craft({
- output = "default:mossycobble 1",
+ output = "default:wood",
recipe = {
- {"default:junglegrass"},
- {"default:cobble"},
+ {"default:stick", "default:stick"},
+ {"default:stick", "default:stick"},
}
})
minetest.register_craft({
- output = "default:mossycobble 1",
+ output = "default:junglewood",
recipe = {
- {"default:mese"},
- {"default:cobble"},
+ {"moreblocks:jungle_stick", "moreblocks:jungle_stick"},
+ {"moreblocks:jungle_stick", "moreblocks:jungle_stick"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile 9",
+ output = "default:dirt_with_grass",
+ type = "shapeless",
+ recipe = {"default:junglegrass", "default:dirt"},
+})
+
+minetest.register_craft({
+ output = "default:dirt_with_grass",
+ type = "shapeless",
+ recipe = {"default:mese", "default:dirt"},
+})
+
+minetest.register_craft({
+ output = "default:mossycobble",
+ type = "shapeless",
+ recipe = {"default:junglegrass", "default:cobble"},
+})
+
+minetest.register_craft({
+ output = "default:mossycobble",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "default:cobble"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:wood_tile 9",
recipe = {
{"default:wood", "default:wood", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
@@ -49,64 +70,60 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:woodtile_flipped 1",
- recipe = {
- {"moreblocks:woodtile"},
- }
+ output = "moreblocks:wood_tile_flipped",
+ recipe = {{"moreblocks:wood_tile"},}
})
minetest.register_craft({
- output = "moreblocks:woodtile_center 9",
+ output = "moreblocks:wood_tile_center 9",
recipe = {
{"default:wood", "default:wood", "default:wood"},
- {"default:wood", "moreblocks:woodtile", "default:wood"},
+ {"default:wood", "moreblocks:wood_tile", "default:wood"},
{"default:wood", "default:wood", "default:wood"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_full 4",
+ output = "moreblocks:wood_tile_full 4",
recipe = {
- {"moreblocks:woodtile", "moreblocks:woodtile"},
- {"moreblocks:woodtile", "moreblocks:woodtile"},
+ {"moreblocks:wood_tile", "moreblocks:wood_tile"},
+ {"moreblocks:wood_tile", "moreblocks:wood_tile"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_up 1",
+ output = "moreblocks:wood_tile_up",
recipe = {
{"default:stick"},
- {"moreblocks:woodtile_center"},
+ {"moreblocks:wood_tile_center"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_down 1",
+ output = "moreblocks:wood_tile_down",
recipe = {
- {"moreblocks:woodtile_center"},
+ {"moreblocks:wood_tile_center"},
{"default:stick"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_left 1",
+ output = "moreblocks:wood_tile_left",
recipe = {
- {"default:stick", "moreblocks:woodtile_center"},
+ {"default:stick", "moreblocks:wood_tile_center"},
}
})
minetest.register_craft({
- output = "moreblocks:woodtile_right 1",
+ output = "moreblocks:wood_tile_right",
recipe = {
- {"moreblocks:woodtile_center", "default:stick"},
+ {"moreblocks:wood_tile_center", "default:stick"},
}
})
minetest.register_craft({
output = "moreblocks:junglestick 4",
- recipe = {
- {"default:junglewood"},
- }
+ recipe = {{"default:junglewood"},}
})
minetest.register_craft({
@@ -145,7 +162,7 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:sweeper 3",
+ output = "moreblocks:sweeper 4",
recipe = {
{"default:junglegrass"},
{"default:stick"},
@@ -161,37 +178,50 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:split_stone_tile 1",
+ output = "moreblocks:split_stone_tile",
recipe = {
{"moreblocks:stone_tile"},
}
})
minetest.register_craft({
- output = "moreblocks:empty_bookshelf 1",
+ output = "moreblocks:split_stone_tile_alt",
recipe = {
- {"moreblocks:sweeper"},
- {"default:bookshelf"},
+ {"moreblocks:split_stone_tile"},
}
})
minetest.register_craft({
- output = "moreblocks:iron_stone_bricks 1",
+ output = "moreblocks:grey_bricks 2",
+ type = "shapeless",
+ recipe = {"default:stone", "default:brick"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:grey_bricks 2",
+ type = "shapeless",
+ recipe = {"default:stonebrick", "default:brick"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:empty_bookshelf",
type = "shapeless",
- recipe = {"default:steel_ingot", "default:stonebrick"},
+ recipe = {"moreblocks:sweeper", "default:bookshelf"},
})
minetest.register_craft({
- output = "default:wood 4",
+ output = "moreblocks:coal_stone_bricks 4",
recipe = {
- {"moreblocks:horizontal_tree"},
+ {"moreblocks:coal_stone", "moreblocks:coal_stone"},
+ {"moreblocks:coal_stone", "moreblocks:coal_stone"},
}
})
minetest.register_craft({
- output = "default:junglewood 4",
+ output = "moreblocks:iron_stone_bricks 4",
recipe = {
- {"moreblocks:horizontal_jungle_tree"},
+ {"moreblocks:iron_stone", "moreblocks:iron_stone"},
+ {"moreblocks:iron_stone", "moreblocks:iron_stone"},
}
})
@@ -244,67 +274,140 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "default:chest_locked 1",
+ output = "default:chest_locked",
type = "shapeless",
recipe = {"default:steel_ingot", "default:chest"},
})
+minetest.register_craft({
+ output = "default:chest_locked",
+ type = "shapeless",
+ recipe = {"default:copper_ingot", "default:chest"},
+})
+
+minetest.register_craft({
+ output = "default:chest_locked",
+ type = "shapeless",
+ recipe = {"default:bronze_ingot", "default:chest"},
+})
+
+minetest.register_craft({
+ output = "default:chest_locked",
+ type = "shapeless",
+ recipe = {"default:gold_ingot", "default:chest"},
+})
minetest.register_craft({
- output = "moreblocks:iron_glass 1",
+ output = "moreblocks:iron_glass",
type = "shapeless",
recipe = {"default:steel_ingot", "default:glass"},
})
minetest.register_craft({
- output = "moreblocks:coal_glass 1",
+ output = "default:glass",
+ type = "shapeless",
+ recipe = {"default:coal_lump", "moreblocks:iron_glass"},
+})
+
+
+minetest.register_craft({
+ output = "moreblocks:coal_glass",
type = "shapeless",
recipe = {"default:coal_lump", "default:glass"},
})
minetest.register_craft({
- output = "moreblocks:clean_glass 1",
+ output = "default:glass",
+ type = "shapeless",
+ recipe = {"default:steel_ingot", "moreblocks:coal_glass"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:clean_glass",
type = "shapeless",
recipe = {"moreblocks:sweeper", "default:glass"},
})
minetest.register_craft({
- output = "moreblocks:glow_glass 1",
+ output = "moreblocks:glow_glass",
type = "shapeless",
recipe = {"default:torch", "default:glass"},
})
minetest.register_craft({
- output = "moreblocks:super_glow_glass 1",
+ output = "moreblocks:trap_glow_glass",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "default:glass", "default:torch"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:trap_glow_glass",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "moreblocks:glow_glass"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:super_glow_glass",
type = "shapeless",
recipe = {"default:torch", "default:torch", "default:glass"},
})
minetest.register_craft({
- output = "moreblocks:coal_stone 1",
+ output = "moreblocks:super_glow_glass",
+ type = "shapeless",
+ recipe = {"default:torch", "moreblocks:glow_glass"},
+})
+
+
+minetest.register_craft({
+ output = "moreblocks:trap_super_glow_glass",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "default:glass", "default:torch", "default:torch"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:trap_super_glow_glass",
+ type = "shapeless",
+ recipe = {"default:mese_crystal_fragment", "moreblocks:super_glow_glass"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:coal_stone",
type = "shapeless",
recipe = {"default:coal_lump", "default:stone"},
})
minetest.register_craft({
- output = "moreblocks:iron_stone 1",
+ output = "default:stone",
+ type = "shapeless",
+ recipe = {"default:steel_ingot", "moreblocks:coal_stone"},
+})
+
+minetest.register_craft({
+ output = "moreblocks:iron_stone",
+ type = "shapeless",
+ recipe = {"default:steel_ingot", "default:stone"},
+})
+
+minetest.register_craft({
+ output = "default:stone",
type = "shapeless",
- recipe = {"default:iron_lump", "default:stone"},
+ recipe = {"default:coal_lump", "moreblocks:iron_stone"},
})
minetest.register_craft({
- output = "moreblocks:trap_stone 12",
+ output = "moreblocks:trap_stone",
type = "shapeless",
- recipe = {"default:mese", "default:stone"},
+ recipe = {"default:mese_crystal_fragment", "default:stone"},
})
minetest.register_craft({
- output = "moreblocks:trap_glass 12",
+ output = "moreblocks:trap_glass",
type = "shapeless",
- recipe = {"default:mese", "default:glass"},
+ recipe = {"default:mese_crystal_fragment", "default:glass"},
})
minetest.register_craft({
- output = "moreblocks:cactus_brick 1",
+ output = "moreblocks:cactus_brick",
type = "shapeless",
recipe = {"default:cactus", "default:brick"},
})
@@ -326,7 +429,7 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:rope 2",
+ output = "moreblocks:rope 3",
recipe = {
{"default:junglegrass"},
{"default:junglegrass"},
@@ -335,41 +438,48 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "moreblocks:horizontal_tree 2",
+ output = "moreblocks:cobble_compressed",
recipe = {
- {"default:tree", "", "default:tree"},
+ {"default:cobble", "default:cobble", "default:cobble"},
+ {"default:cobble", "default:cobble", "default:cobble"},
+ {"default:cobble", "default:cobble", "default:cobble"},
}
})
minetest.register_craft({
- output = "default:tree 2",
+ output = "default:cobble 9",
recipe = {
- {"moreblocks:horizontal_tree"},
- {"moreblocks:horizontal_tree"},
+ {"moreblocks:cobble_compressed"},
}
})
minetest.register_craft({
- output = "moreblocks:horizontal_jungle_tree 2",
- recipe = {
- {"default:jungletree", "", "default:jungletree"},
+ type = "cooking", output = "moreblocks:tar", recipe = "default:gravel",
+})
+
+minetest.register_craft({
+ type = "shapeless",
+ output = "moreblocks:copperpatina",
+ recipe = {"bucket:bucket_water", "default:copperblock"},
+ replacements = {
+ {"bucket:bucket_water", "bucket:bucket_empty"}
}
})
minetest.register_craft({
- output = "default:jungletree 2",
+ output = "default:copper_ingot 9",
recipe = {
- {"moreblocks:horizontal_jungle_tree"},
- {"moreblocks:horizontal_jungle_tree"},
+ {"moreblocks:copperpatina"},
}
})
-
-minetest.register_craft({
- output = "moreblocks:circular_saw 1",
+if minetest.setting_getbool("moreblocks.circular_saw_crafting") ~= false then -- “If nil or true then”
+ minetest.register_craft({
+ output = "moreblocks:circular_saw",
recipe = {
- { "", "default:steel_ingot", "" },
- { "default:tree", "default:tree", "default:tree"},
- { "default:tree", "", "default:tree"},
+ { "", "default:steel_ingot", "" },
+ { "group:wood", "group:wood", "group:wood"},
+ { "group:wood", "", "group:wood"},
}
-})
+ })
+end
diff --git a/depends.txt b/depends.txt
index 562cf63..198fe8a 100644
--- a/depends.txt
+++ b/depends.txt
@@ -1 +1,2 @@
default
+intllib?
diff --git a/description.txt b/description.txt
new file mode 100644
index 0000000..95d7a92
--- /dev/null
+++ b/description.txt
@@ -0,0 +1 @@
+Adds various miscellaneous blocks to the game.
diff --git a/init.lua b/init.lua
index f42bb56..2919a30 100644
--- a/init.lua
+++ b/init.lua
@@ -1,358 +1,33 @@
--- Load translation library if intllib is installed
-
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
- else
- S = function ( s ) return s end
-end
-
-dofile(minetest.get_modpath("moreblocks").."/_config.txt")
-
-dofile(minetest.get_modpath("moreblocks").."/redefinitions.lua")
-dofile(minetest.get_modpath("moreblocks").."/crafting.lua")
-dofile(minetest.get_modpath("moreblocks").."/aliases.lua")
-dofile(minetest.get_modpath("moreblocks").."/stairsplus_convert.lua")
-dofile(minetest.get_modpath("moreblocks").."/stairsplus/stairs.lua")
-dofile(minetest.get_modpath("moreblocks").."/stairsplus/slabs.lua")
-dofile(minetest.get_modpath("moreblocks").."/stairsplus/panels.lua")
-dofile(minetest.get_modpath("moreblocks").."/stairsplus/microblocks.lua")
-dofile(minetest.get_modpath("moreblocks").."/stairsplus/aliases.lua")
-dofile(minetest.get_modpath("moreblocks").."/stairsplus.lua")
-dofile(minetest.get_modpath("moreblocks").."/circular_saw.lua")
-
---[[
-****
-More Blocks
-by Calinou
-Licensed under the zlib/libpng license for code and CC BY-SA for textures, see LICENSE.txt for info.
-****
---]]
-
--- Blocks
-
-minetest.register_node("moreblocks:wood_tile", {
- description = S("Wooden Tile"),
- tiles = {"moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png^[transformR90", "moreblocks_wood_tile.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:wood_tile_flipped", {
- description = S("Wooden Tile"),
- tiles = {"moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png", "moreblocks_wood_tile_flipped.png^[transformR90", "moreblocks_wood_tile_flipped.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:wood_tile_center", {
- description = S("Centered Wooden Tile"),
- tiles = {"moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png^[transformR90", "moreblocks_wood_tile_center.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:wood_tile_full", {
- description = S("Full Wooden Tile"),
- tiles = {"moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png",
- "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png^[transformR90", "moreblocks_wood_tile_full.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:wood_tile_up", {
- description = S("Up Wooden Tile"),
- tiles = {"moreblocks_wood_tile_up.png", "moreblocks_wood_tile_up.png", "moreblocks_wood_tile_up.png",
- "moreblocks_wood_tile_up.png", "moreblocks_wood_tile_up.png^[transformR90", "moreblocks_wood_tile_up.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:wood_tile_down", {
- description = S("Down Wooden Tile"),
- tiles = {"moreblocks_wood_tile_down.png", "moreblocks_wood_tile_down.png", "moreblocks_wood_tile_down.png",
- "moreblocks_wood_tile_down.png", "moreblocks_wood_tile_down.png^[transformR90", "moreblocks_wood_tile_down.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:wood_tile_left", {
- description = S("Left Wooden Tile"),
- tiles = {"moreblocks_wood_tile_left.png", "moreblocks_wood_tile_left.png", "moreblocks_wood_tile_left.png",
- "moreblocks_wood_tile_left.png", "moreblocks_wood_tile_left.png^[transformR90", "moreblocks_wood_tile_left.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:wood_tile_right", {
- description = S("Right Wooden Tile"),
- tiles = {"moreblocks_wood_tile_right.png", "moreblocks_wood_tile_right.png", "moreblocks_wood_tile_right.png",
- "moreblocks_wood_tile_right.png", "moreblocks_wood_tile_right.png^[transformR90", "moreblocks_wood_tile_right.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:circle_stone_bricks", {
- description = S("Circle Stone Bricks"),
- tiles = {"moreblocks_circle_stone_bricks.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:iron_stone_bricks", {
- description = S("Iron Stone Bricks"),
- tiles = {"moreblocks_iron_stone_bricks.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:stone_tile", {
- description = S("Stone Tile"),
- tiles = {"moreblocks_stone_tile.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:split_stone_tile", {
- description = S("Split Stone Tile"),
- tiles = {"moreblocks_split_stone_tile_top.png", "moreblocks_split_stone_tile.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:plankstone", {
- description = S("Plankstone"),
- tiles = {"moreblocks_plankstone.png", "moreblocks_plankstone.png", "moreblocks_plankstone.png",
- "moreblocks_plankstone.png", "moreblocks_plankstone.png^[transformR90", "moreblocks_plankstone.png^[transformR90"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:iron_glass", {
- description = S("Iron Glass"),
- drawtype = "glasslike",
- tiles = {"moreblocks_iron_glass.png"},
- inventory_image = minetest.inventorycube("moreblocks_iron_glass.png"),
- paramtype = "light",
- sunlight_propagates = true,
- groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
- sounds = default.node_sound_glass_defaults(),
-})
-
-minetest.register_node("moreblocks:coal_glass", {
- description = S("Coal Glass"),
- drawtype = "glasslike",
- tiles = {"moreblocks_coal_glass.png"},
- inventory_image = minetest.inventorycube("moreblocks_coal_glass.png"),
- paramtype = "light",
- sunlight_propagates = true,
- groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
- sounds = default.node_sound_glass_defaults(),
-})
-
-minetest.register_node("moreblocks:clean_glass", {
- description = S("Clean Glass"),
- drawtype = "glasslike",
- tiles = {"moreblocks_clean_glass.png"},
- inventory_image = minetest.inventorycube("moreblocks_clean_glass.png"),
- paramtype = "light",
- sunlight_propagates = true,
- groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
- sounds = default.node_sound_glass_defaults(),
-})
-
-
-minetest.register_node("moreblocks:cactus_brick", {
- description = S("Cactus Brick"),
- tiles = {"moreblocks_cactus_brick.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:cactus_checker", {
- description = S("Cactus Checker"),
- tiles = {"moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png",
- "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png^[transformR90", "moreblocks_cactus_checker.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:empty_bookshelf", {
- description = S("Empty Bookshelf"),
- tiles = {"default_wood.png", "default_wood.png", "moreblocks_empty_bookshelf.png"},
- groups = {snappy=2,choppy=3,oddly_breakable_by_hand=2,flammable=3},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:coal_stone", {
- description = S("Coal Stone"),
- tiles = {"moreblocks_coal_stone.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:iron_stone", {
- description = S("Iron Stone"),
- tiles = {"moreblocks_iron_stone.png"},
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:coal_checker", {
- description = S("Coal Checker"),
- tiles = {"moreblocks_coal_checker.png", "moreblocks_coal_checker.png", "moreblocks_coal_checker.png",
- "moreblocks_coal_checker.png", "moreblocks_coal_checker.png^[transformR90", "moreblocks_coal_checker.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:iron_checker", {
- description = S("Iron Checker"),
- tiles = {"moreblocks_iron_checker.png", "moreblocks_iron_checker.png", "moreblocks_iron_checker.png",
- "moreblocks_iron_checker.png", "moreblocks_iron_checker.png^[transformR90", "moreblocks_iron_checker.png^[transformR90"},
- paramtype2 = "facedir",
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:trap_stone", {
- description = S("Trap Stone"),
- tiles = {"moreblocks_trap_stone.png"},
- walkable = false,
- groups = {cracky=3},
- sounds = default.node_sound_stone_defaults(),
-})
-
-minetest.register_node("moreblocks:trap_glass", {
- description = S("Trap Glass"),
- drawtype = "glasslike",
- tiles = {"moreblocks_trap_glass.png"},
- inventory_image = minetest.inventorycube("moreblocks_trap_glass.png"),
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
- sounds = default.node_sound_glass_defaults(),
-})
-
-minetest.register_node("moreblocks:fence_jungle_wood", {
- description = S("Jungle Wood Fence"),
- drawtype = "fencelike",
- tiles = {"moreblocks_jungle_wood.png"},
- inventory_image = "moreblocks_fence_jungle_wood.png",
- wield_image = "moreblocks_fence_jungle_wood.png",
- paramtype = "light",
- selection_box = {
- type = "fixed",
- fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
- },
- groups = {snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=2},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moreblocks:horizontal_tree", {
- description = S("Horizontal Tree"),
- tiles = {"default_tree.png", "default_tree.png", "default_tree.png^[transformR90",
- "default_tree.png^[transformR90", "default_tree_top.png", "default_tree_top.png"},
- paramtype2 = "facedir",
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- furnace_burntime = 30,
-})
-
-minetest.register_node("moreblocks:horizontal_jungle_tree", {
- description = S("Horizontal Jungle Tree"),
- tiles = {"default_jungletree.png", "default_jungletree.png", "default_jungletree.png^[transformR90",
- "default_jungletree.png^[transformR90", "default_jungletree_top.png", "default_jungletree_top.png"},
- paramtype2 = "facedir",
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- furnace_burntime = 30,
-})
-
-minetest.register_node("moreblocks:all_faces_tree", {
- description = S("All-faces Tree"),
- tiles = {"default_tree_top.png"},
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- furnace_burntime = 30,
-})
-
-minetest.register_node("moreblocks:all_faces_jungle_tree", {
- description = S("All-faces Tree"),
- tiles = {"default_jungletree_top.png"},
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
- furnace_burntime = 30,
-})
-
-minetest.register_node("moreblocks:glow_glass", {
- description = S("Glow Glass"),
- drawtype = "glasslike",
- tiles = {"moreblocks_glow_glass.png"},
- inventory_image = minetest.inventorycube("moreblocks_glow_glass.png"),
- paramtype = "light",
- sunlight_propagates = true,
- light_source = 11,
- groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
- sounds = default.node_sound_glass_defaults(),
-})
-
-minetest.register_node("moreblocks:super_glow_glass", {
- description = S("Super Glow Glass"),
- drawtype = "glasslike",
- tiles = {"moreblocks_super_glow_glass.png"},
- inventory_image = minetest.inventorycube("moreblocks_super_glow_glass.png"),
- paramtype = "light",
- sunlight_propagates = true,
- light_source = 15,
- groups = {snappy=2,cracky=3,oddly_breakable_by_hand=3},
- sounds = default.node_sound_glass_defaults(),
-})
-
-minetest.register_node("moreblocks:rope", {
- description = S("Rope"),
- drawtype = "signlike",
- tiles = {"moreblocks_rope.png"},
- inventory_image = "moreblocks_rope.png",
- wield_image = "moreblocks_rope.png",
- paramtype = "light",
- paramtype2 = "wallmounted",
- walkable = false,
- climbable = true,
- selection_box = {
- type = "wallmounted",
- },
- groups = {snappy=3,flammable=2},
- sounds = default.node_sound_leaves_defaults(),
-})
-
--- Items
-
-minetest.register_craftitem("moreblocks:sweeper", {
- description = S("Sweeper"),
- inventory_image = "moreblocks_sweeper.png",
-})
-
-minetest.register_craftitem("moreblocks:jungle_stick", {
- description = S("Jungle Stick"),
- inventory_image = "moreblocks_junglestick.png",
-})
-
-minetest.register_craftitem("moreblocks:nothing", {
- inventory_image = "invisible.png",
- on_use = minetest.item_eat(0),
-})
-
-print(S("[moreblocks] loaded."))
+--[[
+=====================================================================
+** More Blocks **
+By Calinou, with the help of ShadowNinja and VanessaE.
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+=====================================================================
+--]]
+
+moreblocks = {}
+
+local S
+if minetest.get_modpath("intllib") then
+ S = intllib.Getter()
+else
+ S = function(s) return s end
+end
+moreblocks.intllib = S
+
+local modpath = minetest.get_modpath("moreblocks")
+
+dofile(modpath .. "/config.lua")
+dofile(modpath .. "/circular_saw.lua")
+dofile(modpath .. "/stairsplus/init.lua")
+dofile(modpath .. "/nodes.lua")
+dofile(modpath .. "/redefinitions.lua")
+dofile(modpath .. "/crafting.lua")
+dofile(modpath .. "/aliases.lua")
+
+if minetest.setting_getbool("log_mods") then
+ minetest.log("action", S("[moreblocks] loaded."))
+end
diff --git a/locale/de.txt b/locale/de.txt
new file mode 100644
index 0000000..542f977
--- /dev/null
+++ b/locale/de.txt
@@ -0,0 +1,67 @@
+# Translation by Xanthin
+
+###init.lua###
+[moreblocks] loaded. = [moreblocks] geladen.
+
+###nodes.lua###
+Jungle Wood Fence = Tropenholzzaun
+Empty Bookshelf = Leeres Buecherregal
+Clean Glass = Klares Glas
+Plankstone = Brettstein
+Wooden Tile = Holzfliese
+Full Wooden Tile = Vollholzfliese
+Centered Wooden Tile = Holzfliese mittig
+Up Wooden Tile = Holzfliese oben
+Down Wooden Tile = Holzfliese unten
+Left Wooden Tile = Holzfliese links
+Right Wooden Tile = Holzfliese rechts
+Circle Stone Bricks = Kreissteinziegel
+Stone Tile = Steinfliese
+Split Stone Tile = Geteilte Steinfliese
+Glow Glass = Leuchtglas
+Super Glow Glass = Superleuchtglas
+Coal Glass = Kohleglas
+Iron Glass = Eisenglas
+Coal Checker = Karierte Kohle
+Iron Checker = Kariertes Eisen
+Trap Stone = Steinfalle
+Trap Glass = Glasfalle
+Trap Glow Glass = Leuchtglasfalle
+Trap Super Glow Glass = Superleuchtglasfalle
+Coal Stone = Kohlestein
+Iron Stone = Eisenstein
+Coal Stone Bricks = Kohlesteinziegel
+Iron Stone Bricks = Eisensteinziegel
+Cactus Checker = Karierter Kaktus
+Cactus Brick = Kaktusziegel
+Sweeper = Besen
+Jungle Stick = Tropenholzstock
+Rope = Seil
+All-faces Tree = Baumscheibenstamm
+
+###circular_saw.lua###
+Circular Saw = Kreissaege
+Circular saw, empty (owned by %s) = Kreissaege, leer (gehoert %s)
+Circular saw, working with %s (owned by %s) = Kreissaege, arbeitet mit %s (gehoert %s)
+Circular saw, empty = Kreissaege, leer
+Circular saw is empty (owned by %s) = Kreissaege ist leer (gehoert %s)
+
+Input\nmaterial = Ausgangs-\nmaterial
+Left-over = Rest
+Max = Anzahl
+Set = Ok
+Recycle\noutput = Wiederver-\nwerten
+
+###./stairsplus/*###
+%s Stairs = %streppe
+%s Slab = %sstufe
+%s Panel = %spaneel
+%s Microblock = %smikroblock
+
+%s Pane = %sscheibe
+%s Fence = %szaun
+
+###ownership.lua###
+someone = jemand
+Sorry, %s owns that spot. = Tut mir leid, %s gehoert diese Stelle.
+
diff --git a/locale/fr.txt b/locale/fr.txt
index e537a8c..6bd7f98 100644
--- a/locale/fr.txt
+++ b/locale/fr.txt
@@ -1,54 +1,72 @@
# Translation by Calinou
-[moreblocks] loaded. = [moreblocks] a été chargé.
+###init.lua###
+[moreblocks] loaded. = [moreblocks] a �t� charg�.
Jungle Wooden Planks = Planches de bois de jungle
-Empty Bookshelf = Étagère vide
+Empty Bookshelf = �tag�re vide
Clean Glass = Verre propre
Plankstone = Pierre-bois
Wooden Tile = Dalle en bois
-Full Wooden Tile = Dalle en bois complète
-Centered Wooden Tile = Dalle en bois centrée
+Full Wooden Tile = Dalle en bois compl�te
+Centered Wooden Tile = Dalle en bois centr�e
Up Wooden Tile = Dalle en bois vers le haut
Down Wooden Tile = Dalle en bois vers le bas
Left Wooden Tile = Dalle en bois vers la gauche
Right Wooden Tile = Dalle en bois vers la droite
Circle Stone Bricks = Briques en pierre circulaires
Stone Tile = Dalle en pierre
-Split Stone Tile = Dalle en pierre découpée
+Split Stone Tile = Dalle en pierre d�coup�e
Glow Glass = Verre brillant
-Super Glow Glass = Verre très brillant
-Coal Glass = Verre en charbon
-Iron Glass = Verre en fer
+Super Glow Glass = Verre tr�s brillant
+Coal Glass = Verre de charbon
+Iron Glass = Verre de fer
Coal Checker = Damier en charbon
Iron Checker = Damier en fer
-Trap Stone = Pierre à piège
-Trap Glass = Verre à piège
-Coal Stone = Pierre en charbon
-Iron Stone = Pierre en fer
+Trap Stone = Pierre traversable
+Trap Glass = Verre traversable
+Trap Glow Glass = Verre brillant traversable
+Trap Super Glow Glass = Verre tr�s brillant traversable
+Coal Stone = Pierre de charbon
+Iron Stone = Pierre de fer
+Coal Stone Bricks = Briques en pierre de charbon
+Iron Stone Bricks = Briques en pierre de fer
Cactus Checker = Damier en cactus
-Cactus Brick = Briques en cactus
+Cactus Brick = Briques de cactus
Sweeper = Balai
-Jungle Stick = Bâton en bois de jungle
+Jungle Stick = B�ton en bois de jungle
Horizontal Tree = Tronc d'arbre horizontal
Horizontal Jungle Tree = Tronc d'arbre de jungle horizontal
Rope = Corde
All-faces Tree = Tronc d'arbre
+###redefinition.lua###
Wooden = bois
Papyrus = Papyrus
Dry Shrub = Buisson mort
Sapling = Pousse d'arbre
Wooden Planks = Planches de bois
-Ladder = Échelle
+Ladder = �chelle
Glass = Verre
+###circular_saw.lua###
Circular Saw = Scie circulaire
+Circular saw, empty (owned by %s) = Scie circulaire, vide (propri�t� de %s)
+Circular saw, working with %s (owned by %s) = Scie circulaire, manipule %s (propri�t� de %s)
+Circular saw, empty = Scie circulaire, vide
+Circular saw is empty (owned by %s) = Scie circulaire est vide (propri�t� de %s)
+Input material = Entr�e du mat�riel
+Rest/microblocks = Reste/microbloc
+Max: = Max:
+Set = Fixer
+Recycle output = Recyclage
+
+###./stairsplus/*###
%s Stairs = Escaliers en %s
%s Slab = Demi-dalle en %s
%s Panel = Barre en %s
%s Microblock = Microbloc en %s
%s Pane = Panneau en %s
-%s Fence = Barrière en %s
+%s Fence = Barri�re en %s
\ No newline at end of file
diff --git a/locale/it.txt b/locale/it.txt
new file mode 100644
index 0000000..589e104
--- /dev/null
+++ b/locale/it.txt
@@ -0,0 +1,70 @@
+#
+# Italian translation
+# Translator: Emon
+#
+
+
+###init.lua###
+[moreblocks] loaded. = [moreblocks] caricato.
+
+###nodes.lua###
+Jungle Wood Fence = Recinzione in legno della giungla
+Empty Bookshelf = Libreria vuota
+Clean Glass = Vetro pulito
+Plankstone = Pietra e legno
+Wooden Tile = Mattonella in legno
+Full Wooden Tile = Mattonella in legno pieno
+Centered Wooden Tile = Mattonella in legno centrata
+Up Wooden Tile = Mattonella in legno verso l'alto
+Down Wooden Tile = Mattonella in legno verso il basso
+Left Wooden Tile = Mattonella in legno verso sinistra
+Right Wooden Tile = Mattonella in legno verso destra
+Circle Stone Bricks = Mattoni concentrici in pietra
+Stone Tile = Mattonella in pietra
+Split Stone Tile = Mattonella in pietra divisa
+Glow Glass = Vetro luminoso
+Super Glow Glass = Super vetro luminoso
+Coal Glass = Vetro e carbone
+Iron Glass = Vetro e ferro
+Coal Checker = Scacchiera in carbone
+Iron Checker = Scacchiera in ferro
+Trap Stone = Pietra trappola
+Trap Glass = Vetro trappola
+Trap Glow Glass = Vetro luminoso trappola
+Trap Super Glow Glass = Super vetro luminoso trappola
+Coal Stone = Pietra in carbone
+Iron Stone = Pietra in ferro
+Coal Stone Bricks = Mattoni di pietra in carbone
+Iron Stone Bricks = Mattoni di pietra in ferro
+Cactus Checker = Scacchiera in cactus
+Cactus Brick = Mattoni di cactus
+Sweeper = Spazzola
+Jungle Stick = Bastone in legno della giungla
+Rope = Corda
+All-faces Tree = Albero su ogni lato
+
+###circular_saw.lua###
+Circular Saw = Sega circolare
+Circular saw, empty (owned by %s) = Sega circolare, vuota (di proprietà di %s)
+Circular saw, working with %s (owned by %s) = Sega circolare, in funzione su %s (di proprietà di %s)
+Circular saw, empty = Sega circolare, vuota
+Circular saw is empty (owned by %s) = La sega circolare è vuota (di proprietà di %s)
+
+Input\nmaterial = Materiale\niniziale
+Left-over = Scarto
+Max = Max.
+Set = Imp.
+Recycle\noutput = Ricicla\nfinale
+
+###ownership.lua###
+someone = qualcuno
+Sorry, %s owns that spot. = Spiacente, quel punto è di proprietà di %s
+
+###./stairsplus/*###
+%s Stairs = Scale - %s
+%s Slab = Lastra - %s
+%s Panel = Pannello - %s
+%s Microblock = Microblocco %s
+
+%s Pane = Pannello - %s
+%s Fence = Recinzione - %s
diff --git a/locale/template.txt b/locale/template.txt
new file mode 100644
index 0000000..2b88227
--- /dev/null
+++ b/locale/template.txt
@@ -0,0 +1,64 @@
+###init.lua###
+[moreblocks] loaded. =
+
+###nodes.lua###
+Jungle Wood Fence =
+Empty Bookshelf =
+Clean Glass =
+Plankstone =
+Wooden Tile =
+Full Wooden Tile =
+Centered Wooden Tile =
+Up Wooden Tile =
+Down Wooden Tile =
+Left Wooden Tile =
+Right Wooden Tile =
+Circle Stone Bricks =
+Stone Tile =
+Split Stone Tile =
+Glow Glass =
+Super Glow Glass =
+Coal Glass =
+Iron Glass =
+Coal Checker =
+Iron Checker =
+Trap Stone =
+Trap Glass =
+Trap Glow Glass =
+Trap Super Glow Glass =
+Coal Stone =
+Iron Stone =
+Coal Stone Bricks =
+Iron Stone Bricks =
+Cactus Checker =
+Cactus Brick =
+Sweeper =
+Jungle Stick =
+Rope =
+All-faces Tree =
+
+###circular_saw.lua###
+Circular Saw =
+Circular saw, empty (owned by %s) =
+Circular saw, working with %s (owned by %s) =
+Circular saw, empty =
+Circular saw is empty (owned by %s) =
+
+Input\nmaterial =
+Left-over =
+Max =
+Set =
+Recycle\noutput =
+
+###ownership.lua###
+someone =
+Sorry, %s owns that spot. =
+
+###./stairsplus/*###
+%s Stairs =
+%s Slab =
+%s Panel =
+%s Microblock =
+
+%s Pane =
+%s Fence =
diff --git a/mod.conf b/mod.conf
new file mode 100644
index 0000000..b634ba9
--- /dev/null
+++ b/mod.conf
@@ -0,0 +1 @@
+name = moreblocks
diff --git a/models/moreblocks_slope.obj b/models/moreblocks_slope.obj
new file mode 100644
index 0000000..22a833f
--- /dev/null
+++ b/models/moreblocks_slope.obj
@@ -0,0 +1,26 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope.mtl
+o Cube_Cube.002
+v 0.500000 0.500000 0.500000
+v -0.500000 0.500000 0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 -0.500000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vn 0.000000 -0.000000 1.000000
+vn 0.000000 -1.000000 -0.000000
+vn -1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 0.707100 -0.707100
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 4/3/2 3/4/2 5/1/2 6/2/2
+f 2/1/3 5/3/3 3/4/3
+f 1/2/4 4/3/4 6/4/4
+f 2/1/5 1/2/5 6/3/5 5/4/5
diff --git a/models/moreblocks_slope_cut.obj b/models/moreblocks_slope_cut.obj
new file mode 100644
index 0000000..a9ea83d
--- /dev/null
+++ b/models/moreblocks_slope_cut.obj
@@ -0,0 +1,33 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_cut.mtl
+o moreblocks_slope_cut
+v -0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 0.500000 0.500000
+v -0.500000 -0.000000 0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.000000 -0.500000
+v -0.500000 -0.500000 -0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 0.500000
+vt 1.000000 0.500000
+vt 0.000000 1.000000
+vt 0.500000 0.000000
+vt 0.500000 2.000000
+vn 0.000000 -0.000000 1.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -1.000000 -0.000000
+vn -0.408200 0.816500 -0.408200
+vn 0.000000 0.000000 -1.000000
+vn -1.000000 0.000000 0.000000
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 2/1/2 5/2/2 6/5/2 3/6/2
+f 2/3/3 1/6/3 7/1/3 5/2/3
+f 7/7/4 4/3/4 3/8/4 6/6/4
+f 5/1/5 7/2/5 6/4/5
+f 7/1/6 1/2/6 4/5/6
diff --git a/models/moreblocks_slope_half.obj b/models/moreblocks_slope_half.obj
new file mode 100644
index 0000000..a6b1a56
--- /dev/null
+++ b/models/moreblocks_slope_half.obj
@@ -0,0 +1,28 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_half.mtl
+o Cube_Cube.002
+v 0.500000 -0.000000 0.500000
+v -0.500000 -0.000000 0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 -0.500000
+vt 1.000000 0.500000
+vt 0.000000 0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vn 0.000000 -0.000000 1.000000
+vn 0.000000 -1.000000 -0.000000
+vn -1.000000 0.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 0.894400 -0.447200
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 4/3/2 3/4/2 5/5/2 6/6/2
+f 2/1/3 5/3/3 3/4/3
+f 1/2/4 4/3/4 6/4/4
+f 2/5/5 1/6/5 6/3/5 5/4/5
diff --git a/models/moreblocks_slope_half_raised.obj b/models/moreblocks_slope_half_raised.obj
new file mode 100644
index 0000000..6f985e3
--- /dev/null
+++ b/models/moreblocks_slope_half_raised.obj
@@ -0,0 +1,32 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_half_raised.mtl
+o Cube.001
+v -0.500000 0.500000 0.500000
+v -0.500000 0.000000 -0.500000
+v -0.500000 -0.500000 -0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 0.000000 -0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+vt 1.000000 1.000000
+vt 0.000000 0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 0.500000
+vt 0.000000 1.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.000000 -1.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -0.000000 1.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 0.894400 -0.447200
+usemtl None.001
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 2/5/2 5/2/2 6/3/2 3/4/2
+f 5/5/3 7/6/3 8/3/3 6/4/3
+f 7/1/4 1/6/4 4/3/4 8/4/4
+f 4/4/5 3/1/5 6/6/5 8/3/5
+f 2/4/6 1/1/6 7/6/6 5/3/6
diff --git a/models/moreblocks_slope_inner.obj b/models/moreblocks_slope_inner.obj
new file mode 100644
index 0000000..d4a444e
--- /dev/null
+++ b/models/moreblocks_slope_inner.obj
@@ -0,0 +1,35 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_inner.mtl
+o Cube_Cube.000
+v 0.500000 0.500000 -0.500000
+v 0.500000 0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v -0.500000 0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v -0.500000 -0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 0.500000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.707100 -0.707100
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -0.000000 1.000000
+vn -0.707100 0.707100 0.000000
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/1/2 6/3/2 7/4/2
+f 5/1/3 2/2/3 6/4/3
+f 1/2/4 4/3/4 8/4/4
+f 8/1/5 4/2/5 3/3/5 7/4/5
+f 7/3/6 3/4/6 2/1/6 5/2/6
+f 2/1/7 1/2/7 8/3/7
+l 7 9
+l 2 9
diff --git a/models/moreblocks_slope_inner_cut.obj b/models/moreblocks_slope_inner_cut.obj
new file mode 100644
index 0000000..b687b11
--- /dev/null
+++ b/models/moreblocks_slope_inner_cut.obj
@@ -0,0 +1,32 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_inner_cut.mtl
+o moreblocks_slope_inner_cut
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.500000 -0.500000
+v 0.500000 0.500000 0.500000
+v -0.500000 -0.500000 0.500000
+v -0.500000 0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.500000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -0.000000 1.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 1.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.000000 -1.000000
+vn -0.577400 0.577400 -0.577400
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/1/2 1/2/2 4/3/2 6/4/2
+f 2/1/3 1/2/3 5/3/3 7/4/3
+f 6/1/4 4/2/4 3/3/4
+f 7/1/5 5/2/5 6/3/5
+f 2/1/6 7/2/6 3/4/6
+f 7/5/7 6/3/7 3/4/7
diff --git a/models/moreblocks_slope_inner_cut_half.obj b/models/moreblocks_slope_inner_cut_half.obj
new file mode 100644
index 0000000..82a387b
--- /dev/null
+++ b/models/moreblocks_slope_inner_cut_half.obj
@@ -0,0 +1,34 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_inner_cut_half.mtl
+o moreblocks_slope_inner_cut_half
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.000000 -0.500000
+v 0.500000 -0.000000 0.500000
+v -0.500000 -0.500000 0.500000
+v -0.500000 -0.000000 0.500000
+v -0.500000 -0.500000 -0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 0.500000
+vt 0.000000 0.500000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.500000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -0.000000 1.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 1.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.000000 -1.000000
+vn -0.408200 0.816500 -0.408200
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/1/2 1/2/2 4/3/2 6/4/2
+f 2/1/3 1/2/3 5/5/3 7/6/3
+f 6/1/4 4/2/4 3/5/4
+f 7/1/5 5/2/5 6/3/5
+f 2/1/6 7/2/6 3/4/6
+f 7/7/7 6/5/7 3/6/7
diff --git a/models/moreblocks_slope_inner_cut_half_raised.obj b/models/moreblocks_slope_inner_cut_half_raised.obj
new file mode 100644
index 0000000..8231ee4
--- /dev/null
+++ b/models/moreblocks_slope_inner_cut_half_raised.obj
@@ -0,0 +1,35 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_inner_cut_half_raised.mtl
+o moreblocks_slope_inner_cut_half_raised
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.500000 -0.500000
+v 0.500000 0.500000 0.500000
+v -0.500000 -0.500000 0.500000
+v -0.500000 0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v -0.500000 0.000000 -0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.500000
+vt 1.000000 0.500000
+vt 0.500000 0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -0.000000 1.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 1.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn -0.000000 0.000000 -1.000000
+vn -0.408200 0.816500 -0.408200
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/1/2 1/2/2 4/3/2 6/4/2
+f 2/1/3 1/2/3 5/3/3 7/4/3
+f 6/1/4 4/2/4 3/3/4
+f 7/1/5 5/2/5 6/3/5 8/5/5
+f 2/1/6 7/2/6 8/6/6 3/4/6
+f 8/7/7 6/3/7 3/4/7
diff --git a/models/moreblocks_slope_inner_half.obj b/models/moreblocks_slope_inner_half.obj
new file mode 100644
index 0000000..3e54dea
--- /dev/null
+++ b/models/moreblocks_slope_inner_half.obj
@@ -0,0 +1,35 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_inner_half.mtl
+o Cube_Cube.001
+v 0.500000 0.000000 -0.500000
+v 0.500000 -0.000000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v -0.500000 -0.000000 0.500000
+v -0.500000 -0.500000 -0.500000
+v -0.500000 -0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 0.500000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vn 1.000000 0.000000 0.000000
+vn -1.000000 0.000000 0.000000
+vn 0.000000 0.894400 -0.447200
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -0.000000 1.000000
+vn -0.447200 0.894400 0.000000
+usemtl None.002
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/1/2 6/3/2 7/4/2
+f 5/1/3 2/2/3 6/4/3
+f 1/2/4 4/3/4 8/4/4
+f 8/1/5 4/2/5 3/3/5 7/4/5
+f 7/3/6 3/4/6 2/1/6 5/2/6
+f 2/1/7 1/2/7 8/3/7
+l 7 9
+l 2 9
diff --git a/models/moreblocks_slope_inner_half_raised.obj b/models/moreblocks_slope_inner_half_raised.obj
new file mode 100644
index 0000000..e6c2205
--- /dev/null
+++ b/models/moreblocks_slope_inner_half_raised.obj
@@ -0,0 +1,38 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_inner_half_raised.mtl
+o Cube_Cube.003
+v 0.500000 0.500000 -0.500000
+v 0.500000 0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v -0.500000 0.500000 0.500000
+v -0.500000 0.000000 -0.500000
+v -0.500000 -0.500000 0.500000
+v -0.500000 0.000000 -0.500000
+v -0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 0.500000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 0.500000
+vt 0.000000 0.500000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 0.894400 -0.447200
+vn 0.000000 -0.000000 1.000000
+vn -0.447200 0.894400 0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 0.000000 -1.000000
+vn -1.000000 0.000000 0.000000
+usemtl None.003
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/1/2 2/2/2 6/4/2
+f 7/3/3 3/4/3 2/1/3 5/2/3
+f 2/2/4 1/3/4 8/4/4
+f 7/1/5 9/2/5 4/3/5 3/4/5
+f 6/5/6 1/2/6 4/3/6 9/4/6
+f 7/4/7 5/1/7 6/6/7 9/3/7
+l 2 10
+l 7 10
diff --git a/models/moreblocks_slope_outer.obj b/models/moreblocks_slope_outer.obj
new file mode 100644
index 0000000..b8f4e9e
--- /dev/null
+++ b/models/moreblocks_slope_outer.obj
@@ -0,0 +1,25 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_outer.mtl
+o Cube_Cube.004
+v 0.500000 -0.500000 0.500000
+v -0.500000 -0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.500000 0.500000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vn 0.000000 -1.000000 -0.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -0.000000 1.000000
+vn -0.707100 0.707100 0.000000
+vn 0.000000 0.707100 -0.707100
+usemtl None
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/2/2 1/3/2 4/4/2
+f 2/3/3 1/4/3 5/1/3
+f 5/1/4 3/3/4 2/4/4
+f 5/2/5 4/3/5 3/4/5
diff --git a/models/moreblocks_slope_outer_cut.obj b/models/moreblocks_slope_outer_cut.obj
new file mode 100644
index 0000000..e6cbfb4
--- /dev/null
+++ b/models/moreblocks_slope_outer_cut.obj
@@ -0,0 +1,23 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_outer_cut.mtl
+o Cube.002
+v 0.500000 0.500000 0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+vt 1.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 0.000000 1.000000
+vt 0.500000 1.000000
+vn 0.000000 -0.000000 1.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn -0.577400 0.577400 -0.577400
+usemtl None.004
+s off
+f 1/1/1 2/2/1 3/3/1
+f 4/3/2 1/4/2 3/2/2
+f 3/2/3 2/3/3 4/4/3
+f 2/3/4 1/5/4 4/2/4
diff --git a/models/moreblocks_slope_outer_cut_half.obj b/models/moreblocks_slope_outer_cut_half.obj
new file mode 100644
index 0000000..bd64194
--- /dev/null
+++ b/models/moreblocks_slope_outer_cut_half.obj
@@ -0,0 +1,24 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_outer_cut_half.mtl
+o Cube.003
+v 0.500000 -0.000000 0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+vt 1.000000 0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 0.000000 0.500000
+vt 0.000000 1.000000
+vt 0.500000 1.000000
+vn 0.000000 -0.000000 1.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn -0.408200 0.816500 -0.408200
+usemtl None.005
+s off
+f 1/1/1 2/2/1 3/3/1
+f 4/3/2 1/4/2 3/2/2
+f 3/2/3 2/3/3 4/5/3
+f 2/3/4 1/6/4 4/2/4
diff --git a/models/moreblocks_slope_outer_cut_half_raised.obj b/models/moreblocks_slope_outer_cut_half_raised.obj
new file mode 100644
index 0000000..c65e08d
--- /dev/null
+++ b/models/moreblocks_slope_outer_cut_half_raised.obj
@@ -0,0 +1,28 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_outer_cut_half_raised.mtl
+o Cube_Cube.005
+v -0.500000 -0.000000 0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.000000 -0.500000
+vt 0.000000 0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 1.000000 0.500000
+vn 0.000000 -0.000000 1.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 -1.000000 0.000000
+vn -0.408200 0.816500 -0.408200
+vn -0.707100 0.000000 -0.707100
+usemtl None.006
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 4/5/2 3/2/2 5/3/2 6/6/2
+f 2/5/3 5/3/3 3/4/3
+f 1/2/4 4/3/4 6/4/4
+f 2/3/5 1/6/5 6/1/5 5/2/5
diff --git a/models/moreblocks_slope_outer_half.obj b/models/moreblocks_slope_outer_half.obj
new file mode 100644
index 0000000..7bbb38d
--- /dev/null
+++ b/models/moreblocks_slope_outer_half.obj
@@ -0,0 +1,27 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_outer_half.mtl
+o Cube.004
+v -0.500000 -0.500000 0.500000
+v -0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 -0.000000 0.500000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 0.500000
+vt 0.000000 0.500000
+vn 0.000000 -1.000000 -0.000000
+vn 0.000000 -0.000000 1.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 0.894400 -0.447200
+vn -0.447200 0.894400 0.000000
+usemtl None.007
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 5/5/2 1/3/2 4/4/2
+f 3/4/3 5/6/3 4/3/3
+f 2/4/4 5/2/4 3/3/4
+f 1/4/5 5/1/5 2/3/5
diff --git a/models/moreblocks_slope_outer_half_raised.obj b/models/moreblocks_slope_outer_half_raised.obj
new file mode 100644
index 0000000..51a929a
--- /dev/null
+++ b/models/moreblocks_slope_outer_half_raised.obj
@@ -0,0 +1,34 @@
+# Blender v2.72 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib moreblocks_slope_outer_half_raised.mtl
+o Cube_Cube.006
+v -0.500000 -0.000000 0.500000
+v -0.500000 -0.500000 0.500000
+v 0.500000 -0.500000 0.500000
+v 0.500000 0.500000 0.500000
+v 0.500000 -0.500000 -0.500000
+v 0.500000 0.000000 -0.500000
+v -0.500000 0.000000 -0.500000
+v -0.500000 -0.500000 -0.500000
+vt 0.000000 0.500000
+vt 0.000000 0.000000
+vt 1.000000 0.000000
+vt 1.000000 1.000000
+vt 0.000000 1.000000
+vt 1.000000 0.500000
+vn 0.000000 -0.000000 1.000000
+vn 1.000000 0.000000 0.000000
+vn 0.000000 0.894400 -0.447200
+vn -1.000000 0.000000 0.000000
+vn -0.447200 0.894400 0.000000
+vn 0.000000 0.000000 -1.000000
+vn 0.000000 -1.000000 -0.000000
+usemtl None.008
+s off
+f 1/1/1 2/2/1 3/3/1 4/4/1
+f 4/5/2 3/2/2 5/3/2 6/6/2
+f 7/3/3 4/5/3 6/2/3
+f 1/6/4 7/1/4 8/2/4 2/3/4
+f 7/3/5 1/4/5 4/5/5
+f 6/1/6 5/2/6 8/3/6 7/6/6
+f 5/5/7 3/2/7 2/3/7 8/4/7
diff --git a/nodes.lua b/nodes.lua
new file mode 100644
index 0000000..da61b3f
--- /dev/null
+++ b/nodes.lua
@@ -0,0 +1,356 @@
+--[[
+More Blocks: node definitions
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+local S = moreblocks.intllib
+
+local sound_wood = default.node_sound_wood_defaults()
+local sound_stone = default.node_sound_stone_defaults()
+local sound_glass = default.node_sound_glass_defaults()
+local sound_leaves = default.node_sound_leaves_defaults()
+
+local function tile_tiles(name)
+ local tex = "moreblocks_" ..name.. ".png"
+ return {tex, tex, tex, tex, tex.. "^[transformR90", tex.. "^[transformR90"}
+end
+
+local nodes = {
+ ["wood_tile"] = {
+ description = S("Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = {"default_wood.png^moreblocks_wood_tile.png",
+ "default_wood.png^moreblocks_wood_tile.png",
+ "default_wood.png^moreblocks_wood_tile.png",
+ "default_wood.png^moreblocks_wood_tile.png",
+ "default_wood.png^moreblocks_wood_tile.png^[transformR90",
+ "default_wood.png^moreblocks_wood_tile.png^[transformR90"},
+ sounds = sound_wood,
+ },
+ ["wood_tile_flipped"] = {
+ description = S("Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = {"default_wood.png^moreblocks_wood_tile.png^[transformR90",
+ "default_wood.png^moreblocks_wood_tile.png^[transformR90",
+ "default_wood.png^moreblocks_wood_tile.png^[transformR90",
+ "default_wood.png^moreblocks_wood_tile.png^[transformR90",
+ "default_wood.png^moreblocks_wood_tile.png^[transformR180",
+ "default_wood.png^moreblocks_wood_tile.png^[transformR180"},
+ sounds = sound_wood,
+ no_stairs = true,
+ },
+ ["wood_tile_center"] = {
+ description = S("Centered Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = {"default_wood.png^moreblocks_wood_tile_center.png"},
+ sounds = sound_wood,
+ },
+ ["wood_tile_full"] = {
+ description = S("Full Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = tile_tiles("wood_tile_full"),
+ sounds = sound_wood,
+ },
+ ["wood_tile_up"] = {
+ description = S("Upwards Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = {"default_wood.png^moreblocks_wood_tile_up.png"},
+ sounds = sound_wood,
+ no_stairs = true,
+ },
+ ["wood_tile_down"] = {
+ description = S("Downwards Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = {"default_wood.png^[transformR180^moreblocks_wood_tile_up.png^[transformR180"},
+ sounds = sound_wood,
+ no_stairs = true,
+ },
+ ["wood_tile_left"] = {
+ description = S("Leftwards Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = {"default_wood.png^[transformR270^moreblocks_wood_tile_up.png^[transformR270"},
+ sounds = sound_wood,
+ no_stairs = true,
+ },
+ ["wood_tile_right"] = {
+ description = S("Rightwards Wooden Tile"),
+ groups = {snappy = 1, choppy = 2, oddly_breakable_by_hand = 2, flammable = 3},
+ tiles = {"default_wood.png^[transformR90^moreblocks_wood_tile_up.png^[transformR90"},
+ sounds = sound_wood,
+ no_stairs = true,
+ },
+ ["circle_stone_bricks"] = {
+ description = S("Circle Stone Bricks"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["grey_bricks"] = {
+ description = S("Stone Bricks"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["coal_stone_bricks"] = {
+ description = S("Coal Stone Bricks"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["iron_stone_bricks"] = {
+ description = S("Iron Stone Bricks"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["stone_tile"] = {
+ description = S("Stone Tile"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["split_stone_tile"] = {
+ description = S("Split Stone Tile"),
+ tiles = {"moreblocks_split_stone_tile_top.png",
+ "moreblocks_split_stone_tile.png"},
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["split_stone_tile_alt"] = {
+ description = S("Checkered Stone Tile"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["tar"] = {
+ description = S("Tar"),
+ groups = {cracky = 2, tar_block = 1},
+ sounds = sound_stone,
+ },
+ ["cobble_compressed"] = {
+ description = S("Compressed Cobblestone"),
+ groups = {cracky = 1},
+ sounds = sound_stone,
+ },
+ ["plankstone"] = {
+ description = S("Plankstone"),
+ groups = {cracky = 3},
+ tiles = tile_tiles("plankstone"),
+ sounds = sound_stone,
+ },
+ ["iron_glass"] = {
+ description = S("Iron Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_iron_glass.png", "moreblocks_iron_glass_detail.png"},
+ tiles = {"moreblocks_iron_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ },
+ ["coal_glass"] = {
+ description = S("Coal Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_coal_glass.png", "moreblocks_coal_glass_detail.png"},
+ tiles = {"moreblocks_coal_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ },
+ ["clean_glass"] = {
+ description = S("Clean Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_clean_glass.png", "moreblocks_clean_glass_detail.png"},
+ tiles = {"moreblocks_clean_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ },
+ ["cactus_brick"] = {
+ description = S("Cactus Brick"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["cactus_checker"] = {
+ description = S("Cactus Checker"),
+ groups = {cracky = 3},
+ tiles = {"default_stone.png^moreblocks_cactus_checker.png",
+ "default_stone.png^moreblocks_cactus_checker.png",
+ "default_stone.png^moreblocks_cactus_checker.png",
+ "default_stone.png^moreblocks_cactus_checker.png",
+ "default_stone.png^moreblocks_cactus_checker.png^[transformR90",
+ "default_stone.png^moreblocks_cactus_checker.png^[transformR90"},
+ sounds = sound_stone,
+ },
+ ["empty_bookshelf"] = {
+ description = S("Empty Bookshelf"),
+ tiles = {"default_wood.png", "default_wood.png",
+ "moreblocks_empty_bookshelf.png"},
+ groups = {snappy = 2, choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
+ sounds = sound_wood,
+ no_stairs = true,
+ },
+ ["coal_stone"] = {
+ description = S("Coal Stone"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["iron_stone"] = {
+ description = S("Iron Stone"),
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["coal_checker"] = {
+ description = S("Coal Checker"),
+ tiles = {"default_stone.png^moreblocks_coal_checker.png",
+ "default_stone.png^moreblocks_coal_checker.png",
+ "default_stone.png^moreblocks_coal_checker.png",
+ "default_stone.png^moreblocks_coal_checker.png",
+ "default_stone.png^moreblocks_coal_checker.png^[transformR90",
+ "default_stone.png^moreblocks_coal_checker.png^[transformR90"},
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["iron_checker"] = {
+ description = S("Iron Checker"),
+ tiles = {"default_stone.png^moreblocks_iron_checker.png",
+ "default_stone.png^moreblocks_iron_checker.png",
+ "default_stone.png^moreblocks_iron_checker.png",
+ "default_stone.png^moreblocks_iron_checker.png",
+ "default_stone.png^moreblocks_iron_checker.png^[transformR90",
+ "default_stone.png^moreblocks_iron_checker.png^[transformR90"},
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ },
+ ["trap_stone"] = {
+ description = S("Trap Stone"),
+ walkable = false,
+ groups = {cracky = 3},
+ sounds = sound_stone,
+ no_stairs = true,
+ },
+ ["trap_glass"] = {
+ description = S("Trap Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_trap_glass.png", "default_glass_detail.png"},
+ tiles = {"moreblocks_trap_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ walkable = false,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ no_stairs = true,
+ },
+ ["all_faces_tree"] = {
+ description = S("All-faces Tree"),
+ tiles = {"default_tree_top.png"},
+ groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
+ sounds = sound_wood,
+ furnace_burntime = 30,
+ },
+ ["all_faces_jungle_tree"] = {
+ description = S("All-faces Jungle Tree"),
+ tiles = {"default_jungletree_top.png"},
+ groups = {tree = 1,snappy = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
+ sounds = sound_wood,
+ furnace_burntime = 30,
+ },
+ ["glow_glass"] = {
+ description = S("Glow Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_glow_glass.png", "moreblocks_glow_glass_detail.png"},
+ tiles = {"moreblocks_glow_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ light_source = 11,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ },
+ ["trap_glow_glass"] = {
+ description = S("Trap Glow Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_trap_glass.png", "moreblocks_glow_glass_detail.png"},
+ tiles = {"moreblocks_trap_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ light_source = 11,
+ walkable = false,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ no_stairs = true,
+ },
+ ["super_glow_glass"] = {
+ description = S("Super Glow Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
+ tiles = {"moreblocks_super_glow_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ light_source = 14,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ },
+ ["trap_super_glow_glass"] = {
+ description = S("Trap Super Glow Glass"),
+ drawtype = "glasslike_framed_optional",
+ --tiles = {"moreblocks_trap_super_glow_glass.png", "moreblocks_super_glow_glass_detail.png"},
+ tiles = {"moreblocks_trap_super_glow_glass.png"},
+ paramtype = "light",
+ sunlight_propagates = true,
+ light_source = 14,
+ walkable = false,
+ groups = {snappy = 2, cracky = 3, oddly_breakable_by_hand = 3},
+ sounds = sound_glass,
+ no_stairs = true,
+ },
+ ["rope"] = {
+ description = S("Rope"),
+ drawtype = "signlike",
+ inventory_image = "moreblocks_rope.png",
+ wield_image = "moreblocks_rope.png",
+ paramtype = "light",
+ sunlight_propagates = true,
+ paramtype2 = "wallmounted",
+ walkable = false,
+ climbable = true,
+ selection_box = {type = "wallmounted",},
+ groups = {snappy = 3, flammable = 2},
+ sounds = sound_leaves,
+ no_stairs = true,
+ },
+ ["copperpatina"] = {
+ description = S("Copper Patina Block"),
+ groups = {cracky = 1, level = 2},
+ sounds = sound_stone,
+ },
+}
+
+for name, def in pairs(nodes) do
+ def.tiles = def.tiles or {"moreblocks_" ..name.. ".png"}
+ minetest.register_node("moreblocks:" ..name, def)
+ minetest.register_alias(name, "moreblocks:" ..name)
+ if not def.no_stairs then
+ local groups = {}
+ for k, v in pairs(def.groups) do groups[k] = v end
+ stairsplus:register_all("moreblocks", name, "moreblocks:" ..name, {
+ description = def.description,
+ groups = groups,
+ tiles = def.tiles,
+ sunlight_propagates = def.sunlight_propagates,
+ light_source = def.light_source,
+ sounds = def.sounds,
+ })
+ end
+end
+
+
+-- Items
+
+minetest.register_craftitem("moreblocks:sweeper", {
+ description = S("Sweeper"),
+ inventory_image = "moreblocks_sweeper.png",
+})
+
+minetest.register_craftitem("moreblocks:nothing", {
+ inventory_image = "invisible.png",
+ on_use = function() end,
+})
+
diff --git a/ownership.lua b/ownership.lua
new file mode 100644
index 0000000..1c2431b
--- /dev/null
+++ b/ownership.lua
@@ -0,0 +1,41 @@
+--[[
+More Blocks: ownership handling
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+local S = moreblocks.gettext
+
+function moreblocks.node_is_owned(pos, placer)
+ local ownername = false
+ if type(IsPlayerNodeOwner) == "function" then -- node_ownership mod
+ if HasOwner(pos, placer) then -- returns true if the node is owned
+ if not IsPlayerNodeOwner(pos, placer:get_player_name()) then
+ if type(getLastOwner) == "function" then -- ...is an old version
+ ownername = getLastOwner(pos)
+ elseif type(GetNodeOwnerName) == "function" then -- ...is a recent version
+ ownername = GetNodeOwnerName(pos)
+ else
+ ownername = S("someone")
+ end
+ end
+ end
+
+ elseif type(isprotect)=="function" then -- glomie's protection mod
+ if not isprotect(5, pos, placer) then
+ ownername = S("someone")
+ end
+ elseif type(protector)=="table" and type(protector.can_dig)=="function" then -- Zeg9's protection mod
+ if not protector.can_dig(5, pos, placer) then
+ ownername = S("someone")
+ end
+ end
+
+ if ownername ~= false then
+ minetest.chat_send_player( placer:get_player_name(), S("Sorry, %s owns that spot."):format(ownername) )
+ return true
+ else
+ return false
+ end
+end
diff --git a/redefinitions.lua b/redefinitions.lua
index 07a28bc..d111389 100644
--- a/redefinitions.lua
+++ b/redefinitions.lua
@@ -1,4 +1,11 @@
--- Redefinitions of some default crafting recipes
+--[[
+More Blocks: redefinitions of default stuff
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+-- Redefinitions of some default crafting recipes:
minetest.register_craft({
output = "default:sign_wall 4",
@@ -10,7 +17,7 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "default:ladder 3",
+ output = "default:ladder 4",
recipe = {
{"default:stick", "", "default:stick"},
{"default:stick", "default:stick", "default:stick"},
@@ -19,14 +26,14 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "default:paper 3",
+ output = "default:paper 4",
recipe = {
{"default:papyrus", "default:papyrus", "default:papyrus"},
}
})
minetest.register_craft({
- output = "default:rail 16",
+ output = "default:rail 24",
recipe = {
{"default:steel_ingot", "", "default:steel_ingot"},
{"default:steel_ingot", "default:stick", "default:steel_ingot"},
@@ -35,238 +42,6 @@ minetest.register_craft({
})
minetest.register_craft({
- output = "default:axe_wood",
- recipe = {
- {"default:wood", "default:wood"},
- {"default:stick", "default:wood"},
- {"default:stick", ""},
- }
-})
-
-minetest.register_craft({
- output = "default:axe_stone",
- recipe = {
- {"default:cobble", "default:cobble"},
- {"default:stick", "default:cobble"},
- {"default:stick", ""},
- }
-})
-
-minetest.register_craft({
- output = "default:axe_steel",
- recipe = {
- {"default:steel_ingot", "default:steel_ingot"},
- {"default:stick", "default:steel_ingot"},
- {"default:stick", ""},
- }
-})
-
--- Tool repair buff (15% bonus instead of 2%)
-
-minetest.register_craft({
type = "toolrepair",
- additional_wear = -0.15,
-})
-
--- Redefinitions of some default nodes
-
-minetest.register_node(":default:ladder", {
- description = "Ladder",
- drawtype = "signlike",
- tiles = {"default_ladder.png"},
- inventory_image = "default_ladder.png",
- wield_image = "default_ladder.png",
- paramtype = "light",
- sunlight_propagates = true,
- paramtype2 = "wallmounted",
- walkable = false,
- climbable = true,
- selection_box = {
- type = "wallmounted",
- },
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=3,flammable=2},
- legacy_wallmounted = true,
- sounds = default.node_sound_wood_defaults(),
-})
-
-if wood_facedir == true
-then
-minetest.register_node(":default:wood", {
- description = "Wooden Planks",
- tiles = {"default_wood.png"},
- paramtype2 = "facedir",
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3,wood=1},
- sounds = default.node_sound_wood_defaults(),
-})
-end
-
-minetest.register_node(":default:sapling", {
- description = "Sapling",
- drawtype = "plantlike",
- visual_scale = 1.0,
- tiles = {"default_sapling.png"},
- inventory_image = "default_sapling.png",
- wield_image = "default_sapling.png",
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
- },
- groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1},
- sounds = default.node_sound_defaults(),
-})
-
-minetest.register_node(":default:dry_shrub", {
- description = "Dry Shrub",
- drawtype = "plantlike",
- visual_scale = 1.0,
- tiles = {"default_dry_shrub.png"},
- inventory_image = "default_dry_shrub.png",
- wield_image = "default_dry_shrub.png",
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- groups = {snappy=3,flammable=3,attached_node=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-1/3, -1/2, -1/3, 1/3, 1/6, 1/3},
- },
-})
-
-minetest.register_node(":default:papyrus", {
- description = "Papyrus",
- drawtype = "plantlike",
- tiles = {"default_papyrus.png"},
- inventory_image = "default_papyrus.png",
- wield_image = "default_papyrus.png",
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.3, -0.5, -0.3, 0.3, 0.5, 0.3}
- },
- groups = {snappy=3,flammable=2},
- sounds = default.node_sound_leaves_defaults(),
+ additional_wear = -0.10, -- Tool repair buff (10% bonus instead of 2%).
})
-
-minetest.register_node(":default:fence_wood", {
- description = "Wooden Fence",
- drawtype = "fencelike",
- tiles = {"default_wood.png"},
- inventory_image = "default_fence.png",
- wield_image = "default_fence.png",
- paramtype = "light",
- sunlight_propagates = true,
- selection_box = {
- type = "fixed",
- fixed = {-1/7, -1/2, -1/7, 1/7, 1/2, 1/7},
- },
- groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=2},
- sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node(":default:junglegrass", {
- description = "Jungle Grass",
- drawtype = "plantlike",
- visual_scale = 1.3,
- tiles = {"default_junglegrass.png"},
- inventory_image = "default_junglegrass.png",
- wield_image = "default_junglegrass.png",
- paramtype = "light",
- walkable = false,
- buildable_to = true,
- is_ground_content = true,
- sunlight_propagates = true,
- drop = {
- max_items = 1,
- items = {
- {items = {'farming:seed_cotton'},rarity = 8},
- {items = {'default:junglegrass'}},
- }
- },
- groups = {snappy=3,flammable=2,flora=1,attached_node=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
-})
-
-minetest.register_node(":default:junglesapling", {
- description = "Jungle Sapling",
- drawtype = "plantlike",
- sunlight_propagates = true,
- tiles = {"default_junglesapling.png"},
- paramtype = "light",
- walkable = false,
- selection_box = {
- type = "fixed",
- fixed = {-0.3, -0.5, -0.3, 0.3, 0.35, 0.3}
- },
- groups = {snappy=2,dig_immediate=3,flammable=2,attached_node=1},
- sounds = default.node_sound_defaults(),
-})
-
-minetest.register_node(":default:grass_1", {
- description = "Grass",
- drawtype = "plantlike",
- tiles = {"default_grass_1.png"},
- -- use a bigger inventory image
- inventory_image = "default_grass_3.png",
- wield_image = "default_grass_3.png",
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- drop = {
- max_items = 1,
- items = {
- {items = {'farming:seed_wheat'},rarity = 5},
- {items = {'default:grass_1'}},
- }
- },
- groups = {snappy=3,flammable=3,flora=1,attached_node=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- on_place = function(itemstack, placer, pointed_thing)
- -- place a random grass node
- local stack = ItemStack("default:grass_"..math.random(1,5))
- local ret = minetest.item_place(stack, placer, pointed_thing)
- return ItemStack("default:grass_1 "..itemstack:get_count()-(1-ret:get_count()))
- end,
-})
-
-for i=2,5 do
- minetest.register_node(":default:grass_"..i, {
- description = "Grass",
- drawtype = "plantlike",
- tiles = {"default_grass_"..i..".png"},
- inventory_image = "default_grass_"..i..".png",
- wield_image = "default_grass_"..i..".png",
- paramtype = "light",
- sunlight_propagates = true,
- walkable = false,
- buildable_to = true,
- is_ground_content = true,
- drop = {
- max_items = 1,
- items = {
- {items = {'farming:seed_wheat'},rarity = 5},
- {items = {'default:grass_1'}},
- }
- },
- groups = {snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1},
- sounds = default.node_sound_leaves_defaults(),
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -5/16, 0.5},
- },
- })
-end
diff --git a/stairsplus.lua b/stairsplus.lua
deleted file mode 100644
index 82822bf..0000000
--- a/stairsplus.lua
+++ /dev/null
@@ -1,434 +0,0 @@
--- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
-
-if minetest.get_modpath("unified_inventory") or not minetest.setting_getbool("creative_mode") then
- stairsplus_expect_infinite_stacks = false
-else
- stairsplus_expect_infinite_stacks = true
-end
-
--- these vales are in order: facedir in degrees = 90, 0, 270, 180, 90
-
-local dirs1 = { 21, 20, 23, 22, 21 }
-local dirs2 = { 15, 8, 17, 6, 15 }
-local dirs3 = { 14, 11, 16, 5, 14 }
-
-stairsplus_players_onwall = {}
-
-minetest.register_chatcommand("st", {
- params = "",
- description = "Toggle stairsplus between placing wall/vertical stairs/panels and normal.",
- func = function(name, param)
- stairsplus_players_onwall[name] = not stairsplus_players_onwall[name]
-
- if stairsplus_players_onwall[name] then
- minetest.chat_send_player(name, "Stairsplus: Placing wall stairs/vertical panels.")
- else
- minetest.chat_send_player(name, "Stairsplus: Placing floor/ceiling stairs/panels.")
- end
- end
-})
-
-stairsplus_can_it_stack = function(itemstack, placer, pointed_thing)
- return false
---[[
- if pointed_thing.type ~= "node" then
- return itemstack
- end
-
- -- If it's being placed on an another similar one, replace it with
- -- a full block
- local slabpos = nil
- local slabnode = nil
- local p1 = pointed_thing.above
- p1 = {x = p1.x, y = p1.y - 1, z = p1.z}
- local n1 = minetest.env:get_node(p1)
- if n1.name == modname .. ":slab_" .. subname then
- slabpos = p1
- slabnode = n1
- end
- if slabpos then
- -- Remove the slab at slabpos
- minetest.env:remove_node(slabpos)
- -- Make a fake stack of a single item and try to place it
- local fakestack = ItemStack(recipeitem)
- pointed_thing.above = slabpos
- fakestack = minetest.item_place(fakestack, placer, pointed_thing)
- -- If the item was taken from the fake stack, decrement original
- if not fakestack or fakestack:is_empty() then
- itemstack:take_item(1)
- -- Else put old node back
- else
- minetest.env:set_node(slabpos, slabnode)
- end
- return itemstack
- end
-
- if n1.name == modname .. ":slab_" .. subname .. "_quarter" then
- slabpos = p1
- slabnode = n1
- end
- if slabpos then
- -- Remove the slab at slabpos
- minetest.env:remove_node(slabpos)
- -- Make a fake stack of a single item and try to place it
- local fakestack = ItemStack(modname .. ":slab_" .. subname .. "_three_quarter")
- pointed_thing.above = slabpos
- fakestack = minetest.item_place(fakestack, placer, pointed_thing)
- -- If the item was taken from the fake stack, decrement original
- if not fakestack or fakestack:is_empty() then
- itemstack:take_item(1)
- -- Else put old node back
- else
- minetest.env:set_node(slabpos, slabnode)
- end
- return itemstack
- end
-
- -- Otherwise place regularly
- return minetest.item_place(itemstack, placer, pointed_thing)
-
-]]--
-
-end
-
-local function get_nodedef_field(nodename, fieldname)
- if not minetest.registered_nodes[nodename] then
- return nil
- end
- return minetest.registered_nodes[nodename][fieldname]
-end
-
-function stairsplus_rotate_and_place(itemstack, placer, pointed_thing, onwall)
-
- local node = minetest.env:get_node(pointed_thing.under)
-
- if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].on_rightclick then
-
- local above = pointed_thing.above
- local under = pointed_thing.under
- local top = {x=under.x, y=under.y+1, z=under.z}
-
- local pitch = placer:get_look_pitch()
- local node = minetest.env:get_node(above)
- local fdir = minetest.dir_to_facedir(placer:get_look_dir())
- local wield_name = itemstack:get_name()
-
- local slab = string.find(wield_name, "slab")
- local panel = string.find(wield_name, "panel")
- local micro = string.find(wield_name, "micro")
- local iswall = (above.x ~= under.x) or (above.z ~= under.z)
- local isceiling = (above.x == under.x) and (above.z == under.z) and (pitch > 0)
-
- if get_nodedef_field(minetest.env:get_node(under).name, "buildable_to") then
- if slab then fdir = 0 end
- minetest.env:add_node(under, {name = wield_name, param2 = fdir }) -- place right side up
- elseif not get_nodedef_field(minetest.env:get_node(above).name, "buildable_to") then
- return
- elseif onwall or (iswall and (slab or panel)) then
- if slab then
- minetest.env:add_node(above, {name = wield_name, param2 = dirs2[fdir+2] }) -- place with wall slab rotation
- else
- minetest.env:add_node(above, {name = wield_name, param2 = dirs3[fdir+2] }) -- place with wall panel/micro rotation
- end
- elseif isceiling then
- local nfdir = dirs1[fdir+2]
- if slab then nfdir = 22 end
- minetest.env:add_node(above, {name = wield_name, param2 = nfdir }) -- place upside down variant
- else
- if slab then fdir = 0 end
- minetest.env:add_node(above, {name = wield_name, param2 = fdir }) -- place right side up
- end
-
- if not stairsplus_expect_infinite_stacks then
- itemstack:take_item()
- return itemstack
- end
- else
- minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer)
- end
-end
-
-function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
- register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
- register_slab( modname, subname, recipeitem, groups, images, description, drop, light)
- register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
- register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
- register_6dfacedir_conversion(modname, subname)
-end
-
--- Default stairs/slabs/panels/microblocks
-
-register_stair_slab_panel_micro("moreblocks", "wood", "default:wood",
- {not_in_creative_inventory=1,snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- {"default_wood.png"},
- "Wooden",
- "wood",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "stone", "default:stone",
- {not_in_creative_inventory=1,cracky=3},
- {"default_stone.png"},
- "Stone",
- "cobble",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "cobble", "default:cobble",
- {not_in_creative_inventory=1,cracky=3},
- {"default_cobble.png"},
- "Cobblestone",
- "cobble",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "mossycobble", "default:mossycobble",
- {not_in_creative_inventory=1,cracky=3},
- {"default_mossycobble.png"},
- "Mossy Cobblestone",
- "mossycobble",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "brick", "default:brick",
- {not_in_creative_inventory=1,cracky=3},
- {"default_brick.png"},
- "Brick",
- "brick",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "sandstone", "default:sandstone",
- {not_in_creative_inventory=1,crumbly=2,cracky=2},
- {"default_sandstone.png"},
- "Sandstone",
- "sandstone",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "steelblock", "default:steelblock",
- {not_in_creative_inventory=1,cracky=1,level=2},
- {"default_steel_block.png"},
- "Steel Block",
- "steelblock",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "goldblock", "default:goldblock",
- {not_in_creative_inventory=1,cracky=1},
- {"default_gold_block.png"},
- "Gold Block",
- "goldblock",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "copperblock", "default:copperblock",
- {not_in_creative_inventory=1,cracky=1,level=2},
- {"default_copper_block.png"},
- "Copper Block",
- "copperblock",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "bronzeblock", "default:bronzeblock",
- {not_in_creative_inventory=1,cracky=1,level=2},
- {"default_bronze_block.png"},
- "Bronze Block",
- "bronzeblock",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "diamondblock", "default:diamondblock",
- {not_in_creative_inventory=1,cracky=1,level=3},
- {"default_diamond_block.png"},
- "Diamond Block",
- "diamondblock",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "desert_stone", "default:desert_stone",
- {not_in_creative_inventory=1,cracky=3},
- {"default_desert_stone.png"},
- "Desert Stone",
- "desert_stone",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "glass", "default:glass",
- {not_in_creative_inventory=1,snappy=2,cracky=3,oddly_breakable_by_hand=3},
- {"moreblocks_glass_stairsplus.png"},
- "Glass",
- "glass",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "tree", "default:tree",
- {not_in_creative_inventory=1,tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- {"default_tree_top.png", "default_tree_top.png", "default_tree.png"},
- "Tree",
- "tree",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "jungletree", "default:jungletree",
- {not_in_creative_inventory=1,tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- {"default_jungletree_top.png", "default_jungletree_top.png", "default_jungletree.png"},
- "Jungle Tree",
- "jungletree",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "obsidian", "default:obsidian",
- {not_in_creative_inventory=1,cracky=1,level=2},
- {"default_obsidian.png"},
- "Obsidian",
- "obsidian",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "obsidian_glass", "default:obsidian_glass",
- {not_in_creative_inventory=1,cracky=3,oddly_breakable_by_hand=3},
- {"moreblocks_obsidian_glass_stairsplus.png"},
- "Obsidian Glass",
- "obsidian_glass",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "stonebrick", "default:stonebrick",
- {not_in_creative_inventory=1,cracky=3},
- {"default_stone_brick.png"},
- "Stone Bricks",
- "stone_bricks",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "desert_stonebrick", "default:desert_stonebrick",
- {not_in_creative_inventory=1,cracky=3},
- {"default_desert_stone_brick.png"},
- "Desert Stone Bricks",
- "desert_stonebrick",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "sandstonebrick", "default:sandstonebrick",
- {not_in_creative_inventory=1,cracky=3},
- {"default_sandstone_brick.png"},
- "Sandstone Bricks",
- "sandstonebrick",
- 0)
-
--- More Blocks stairs/slabs/panels/microblocks
-
-register_stair_slab_panel_micro("moreblocks", "circle_stone_bricks", "moreblocks:circle_stone_bricks",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_circle_stone_bricks.png"},
- "Circle Stone Bricks",
- "circle_stone_bricks",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "iron_stone_bricks", "moreblocks:iron_stone_bricks",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_iron_stone_bricks.png"},
- "Iron Stone Bricks",
- "iron_stone_bricks",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "stone_tile", "moreblocks:stone_tile",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_stone_tile.png"},
- "Stonesquare",
- "stone_tile",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "split_stone_tile", "moreblocks:split_stone_tile",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_split_stone_tile_top.png", "moreblocks_split_stone_tile.png"},
- "Split Stonesquare",
- "split_stone_tile",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "jungle_wood", "default:junglewood",
- {not_in_creative_inventory=1,snappy=1, choppy=2, oddly_breakable_by_hand=2,flammable=3},
- {"default_junglewood.png"},
- "Jungle Wood",
- "jungle_wood",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "plankstone", "moreblocks:plankstone",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_plankstone.png", "moreblocks_plankstone.png", "moreblocks_plankstone.png",
- "moreblocks_plankstone.png", "moreblocks_plankstone.png^[transformR90", "moreblocks_plankstone.png^[transformR90"},
- "Plankstone",
- "plankstone",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "coal_checker", "moreblocks:coal_checker",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_coal_checker.png", "moreblocks_coal_checker.png", "moreblocks_coal_checker.png",
- "moreblocks_coal_checker.png", "moreblocks_coal_checker.png^[transformR90", "moreblocks_coal_checker.png^[transformR90"},
- "Coal Checker",
- "coal_checker",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "iron_checker", "moreblocks:iron_checker",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_iron_checker.png", "moreblocks_iron_checker.png", "moreblocks_iron_checker.png",
- "moreblocks_iron_checker.png", "moreblocks_iron_checker.png^[transformR90", "moreblocks_iron_checker.png^[transformR90"},
- "Iron Checker",
- "iron_checker",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "cactus_checker", "moreblocks:cactus_checker",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png",
- "moreblocks_cactus_checker.png", "moreblocks_cactus_checker.png^[transformR90", "moreblocks_cactus_checker.png^[transformR90"},
- "Cactus Checker",
- "cactus_checker",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "coal_stone", "moreblocks:coal_stone",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_coal_stone.png"},
- "Coal Stone",
- "coal_stone",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "iron_stone", "moreblocks:iron_stone",
- {not_in_creative_inventory=1,cracky=3},
- {"moreblocks_iron_stone.png"},
- "Iron Stone",
- "iron_stone",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "glow_glass", "moreblocks:glow_glass",
- {not_in_creative_inventory=1,snappy=2,cracky=3,oddly_breakable_by_hand=3},
- {"moreblocks_glow_glass_stairsplus.png"},
- "Glow Glass",
- "glow_glass",
- 11)
-
-register_stair_slab_panel_micro("moreblocks", "super_glow_glass", "moreblocks:super_glow_glass",
- {not_in_creative_inventory=1,snappy=2, cracky=3, oddly_breakable_by_hand=3},
- {"moreblocks_super_glow_glass_stairsplus.png"},
- "Super Glow Glass",
- "super_glow_glass",
- 15)
-
-register_stair_slab_panel_micro("moreblocks", "coal_glass", "moreblocks:coal_glass",
- {not_in_creative_inventory=1,snappy=2, cracky=3, oddly_breakable_by_hand=3},
- {"moreblocks_coal_glass_stairsplus.png"},
- "Coal Glass",
- "coal_glass",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "iron_glass", "moreblocks:iron_glass",
- {not_in_creative_inventory=1,snappy=2,cracky=3,oddly_breakable_by_hand=3},
- {"moreblocks_iron_glass_stairsplus.png"},
- "Iron Glass",
- "iron_glass",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "wood_tile", "moreblocks:wood_tile",
- {not_in_creative_inventory=1,snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- {"moreblocks_wood_tile.png", "moreblocks_wood_tile.png", "moreblocks_wood_tile.png",
- "moreblocks_wood_tile.png", "moreblocks_wood_tile.png^[transformR90", "moreblocks_wood_tile.png^[transformR90"},
- "Wooden Tile",
- "wood_tile",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "wood_tile_center", "moreblocks:wood_tile_center",
- {not_in_creative_inventory=1,snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- {"moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png",
- "moreblocks_wood_tile_center.png", "moreblocks_wood_tile_center.png^[transformR90", "moreblocks_wood_tile_center.png^[transformR90"},
- "Centered Wooden Tile",
- "wood_tile_center",
- 0)
-
-register_stair_slab_panel_micro("moreblocks", "wood_tile_full", "moreblocks:wood_tile_full",
- {not_in_creative_inventory=1,snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
- {"moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png",
- "moreblocks_wood_tile_full.png", "moreblocks_wood_tile_full.png^[transformR90", "moreblocks_wood_tile_full.png^[transformR90"},
- "Full Wooden Tile",
- "wood_tile_full",
- 0)
diff --git a/stairsplus/API.md b/stairsplus/API.md
new file mode 100644
index 0000000..2db0f2b
--- /dev/null
+++ b/stairsplus/API.md
@@ -0,0 +1,24 @@
+API documentation for Stairs+
+=============================
+
+* `stairsplus:register_all(modname, subname, recipeitem, fields)`
+ Registers a stair, slab, panel, microblock, and any other types of
+ nodes to be added in the future.
+ This also registers the node with the circular saw.
+ Example:
+ ```lua
+ stairsplus:register_all("moreblocks", "wood", "defaut:wood", {
+ description = "Wooden",
+ tiles = {"default_wood.png"},
+ groups = {oddly_breakabe_by_hand=1},
+ sounds = default.node_sound_wood_defaults(),
+ })
+ ```
+The following register only a particular type of microblock.
+You will probably never want to use them directly:
+
+* `stairsplus:register_stair(modname, subname, recipeitem, fields)`
+* `stairsplus:register_slab(modname, subname, recipeitem, fields)`
+* `stairsplus:register_panel(modname, subname, recipeitem, fields)`
+* `stairsplus:register_micro(modname, subname, recipeitem, fields)`
+
diff --git a/stairsplus/aliases.lua b/stairsplus/aliases.lua
index 3fcd867..c235d34 100644
--- a/stairsplus/aliases.lua
+++ b/stairsplus/aliases.lua
@@ -1,43 +1,52 @@
-function register_stairsplus_alias(modname, origname, newname)
-minetest.register_alias(modname .. ":slab_" .. origname, "moreblocks:slab_" .. newname)
-minetest.register_alias(modname .. ":slab_" .. origname .. "_inverted", "moreblocks:slab_" .. newname .. "_inverted")
-minetest.register_alias(modname .. ":slab_" .. origname .. "_wall", "moreblocks:slab_" .. newname .. "_wall")
-minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter", "moreblocks:slab_" .. newname .. "_quarter")
-minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_inverted", "moreblocks:slab_" .. newname .. "_quarter_inverted")
-minetest.register_alias(modname .. ":slab_" .. origname .. "_quarter_wall", "moreblocks:slab_" .. newname .. "_quarter_wall")
-minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter", "moreblocks:slab_" .. newname .. "_three_quarter")
-minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_inverted", "moreblocks:slab_" .. newname .. "_three_quarter_inverted")
-minetest.register_alias(modname .. ":slab_" .. origname .. "_three_quarter_wall", "moreblocks:slab_" .. newname .. "_three_quarter_wall")
-minetest.register_alias(modname .. ":stair_" .. origname, "moreblocks:stair_" .. newname)
-minetest.register_alias(modname .. ":stair_" .. origname .. "_inverted", "moreblocks:stair_" .. newname .. "_inverted")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_wall", "moreblocks:stair_" .. newname .. "_wall")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", "moreblocks:stair_" .. newname .. "_wall_half")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", "moreblocks:stair_" .. newname .. "_wall_half_inverted")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_half", "moreblocks:stair_" .. newname .. "_half")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_half_inverted", "moreblocks:stair_" .. newname .. "_half_inverted")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half", "moreblocks:stair_" .. newname .. "_right_half")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_right_half_inverted", "moreblocks:stair_" .. newname .. "_right_half_inverted")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half", "moreblocks:stair_" .. newname .. "_wall_half")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_wall_half_inverted", "moreblocks:stair_" .. newname .. "_wall_half_inverted")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_inner", "moreblocks:stair_" .. newname .. "_inner")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_inner_inverted", "moreblocks:stair_" .. newname .. "_inner_inverted")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_outer", "moreblocks:stair_" .. newname .. "_outer")
-minetest.register_alias(modname .. ":stair_" .. origname .. "_outer_inverted", "moreblocks:stair_" .. newname .. "_outer_inverted")
-minetest.register_alias(modname .. ":panel_" .. origname .. "_bottom", "moreblocks:panel_" .. newname .. "_bottom")
-minetest.register_alias(modname .. ":panel_" .. origname .. "_top", "moreblocks:panel_" .. newname .. "_top")
-minetest.register_alias(modname .. ":panel_" .. origname .. "_vertical", "moreblocks:panel_" .. newname .. "_vertical")
-minetest.register_alias(modname .. ":micro_" .. origname .. "_bottom", "moreblocks:micro_" .. newname .. "_bottom")
-minetest.register_alias(modname .. ":micro_" .. origname .. "_top", "moreblocks:micro_" .. newname .. "_top")
+--[[
+More Blocks: alias definitions
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+local function register_stairsplus_alias(modname, origname, newname)
+ minetest.register_alias(modname.. ":slab_" ..origname, "moreblocks:slab_" ..newname)
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_inverted", "moreblocks:slab_" ..newname.. "_inverted")
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_wall", "moreblocks:slab_" ..newname.. "_wall")
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter", "moreblocks:slab_" ..newname.. "_quarter")
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter_inverted", "moreblocks:slab_" ..newname.. "_quarter_inverted")
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_quarter_wall", "moreblocks:slab_" ..newname.. "_quarter_wall")
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter", "moreblocks:slab_" ..newname.. "_three_quarter")
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter_inverted", "moreblocks:slab_" ..newname.. "_three_quarter_inverted")
+ minetest.register_alias(modname.. ":slab_" ..origname.. "_three_quarter_wall", "moreblocks:slab_" ..newname.. "_three_quarter_wall")
+ minetest.register_alias(modname.. ":stair_" ..origname, "moreblocks:stair_" ..newname)
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_inverted", "moreblocks:stair_" ..newname.. "_inverted")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_wall", "moreblocks:stair_" ..newname.. "_wall")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half", "moreblocks:stair_" ..newname.. "_wall_half")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half_inverted", "moreblocks:stair_" ..newname.. "_wall_half_inverted")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_half", "moreblocks:stair_" ..newname.. "_half")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_half_inverted", "moreblocks:stair_" ..newname.. "_half_inverted")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_right_half", "moreblocks:stair_" ..newname.. "_right_half")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_right_half_inverted", "moreblocks:stair_" ..newname.. "_right_half_inverted")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half", "moreblocks:stair_" ..newname.. "_wall_half")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_wall_half_inverted", "moreblocks:stair_" ..newname.. "_wall_half_inverted")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_inner", "moreblocks:stair_" ..newname.. "_inner")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_inner_inverted", "moreblocks:stair_" ..newname.. "_inner_inverted")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_outer", "moreblocks:stair_" ..newname.. "_outer")
+ minetest.register_alias(modname.. ":stair_" ..origname.. "_outer_inverted", "moreblocks:stair_" ..newname.. "_outer_inverted")
+ minetest.register_alias(modname.. ":panel_" ..origname.. "_bottom", "moreblocks:panel_" ..newname.. "_bottom")
+ minetest.register_alias(modname.. ":panel_" ..origname.. "_top", "moreblocks:panel_" ..newname.. "_top")
+ minetest.register_alias(modname.. ":panel_" ..origname.. "_vertical", "moreblocks:panel_" ..newname.. "_vertical")
+ minetest.register_alias(modname.. ":micro_" ..origname.. "_bottom", "moreblocks:micro_" ..newname.. "_bottom")
+ minetest.register_alias(modname.. ":micro_" ..origname.. "_top", "moreblocks:micro_" ..newname.. "_top")
end
register_stairsplus_alias("stairsplus", "stone", "stone")
register_stairsplus_alias("stairsplus", "wood", "wood")
+register_stairsplus_alias("stairsplus", "pinewood", "pinewood")
register_stairsplus_alias("stairsplus", "cobble", "cobble")
register_stairsplus_alias("stairsplus", "brick", "brick")
register_stairsplus_alias("stairsplus", "sandstone", "sandstone")
register_stairsplus_alias("stairsplus", "glass", "glass")
register_stairsplus_alias("stairsplus", "tree", "tree")
register_stairsplus_alias("stairsplus", "jungletree", "jungletree")
+register_stairsplus_alias("stairsplus", "pinetree", "pinetree")
register_stairsplus_alias("stairsplus", "desert_stone", "desert_stone")
register_stairsplus_alias("stairsplus", "steelblock", "steelblock")
register_stairsplus_alias("stairsplus", "mossycobble", "mossycobble")
diff --git a/stairsplus_convert.lua b/stairsplus/conversion.lua
similarity index 54%
rename from stairsplus_convert.lua
rename to stairsplus/conversion.lua
index 7d6b94b..13966b6 100644
--- a/stairsplus_convert.lua
+++ b/stairsplus/conversion.lua
@@ -1,50 +1,56 @@
+--[[
+More Blocks: conversion
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
-- Function to convert all stairs/slabs/etc nodes from
-- inverted, wall, etc to regular + 6d facedir
-local dirs1 = { 21, 20, 23, 22, 21 }
-local dirs2 = { 15, 8, 17, 6, 15 }
-local dirs3 = { 14, 11, 16, 5, 14 }
+local dirs1 = {21, 20, 23, 22, 21}
+local dirs2 = {15, 8, 17, 6, 15}
+local dirs3 = {14, 11, 16, 5, 14}
-function register_6dfacedir_conversion(modname, material)
+function stairsplus:register_6dfacedir_conversion(modname, material)
--print("Register stairsplus 6d facedir conversion")
--print('ABM for '..modname..' "'..material..'"')
local objects_list1 = {
- modname..":slab_" .. material .. "_inverted",
- modname..":slab_" .. material .. "_quarter_inverted",
- modname..":slab_" .. material .. "_three_quarter_inverted",
- modname..":stair_" .. material .. "_inverted",
- modname..":stair_" .. material .. "_wall",
- modname..":stair_" .. material .. "_wall_half",
- modname..":stair_" .. material .. "_wall_half_inverted",
- modname..":stair_" .. material .. "_half_inverted",
- modname..":stair_" .. material .. "_right_half_inverted",
- modname..":panel_" .. material .. "_vertical",
- modname..":panel_" .. material .. "_top",
+ modname.. ":slab_" ..material.. "_inverted",
+ modname.. ":slab_" ..material.. "_quarter_inverted",
+ modname.. ":slab_" ..material.. "_three_quarter_inverted",
+ modname.. ":stair_" ..material.. "_inverted",
+ modname.. ":stair_" ..material.. "_wall",
+ modname.. ":stair_" ..material.. "_wall_half",
+ modname.. ":stair_" ..material.. "_wall_half_inverted",
+ modname.. ":stair_" ..material.. "_half_inverted",
+ modname.. ":stair_" ..material.. "_right_half_inverted",
+ modname.. ":panel_" ..material.. "_vertical",
+ modname.. ":panel_" ..material.. "_top",
}
local objects_list2 = {
- modname..":slab_" .. material .. "_wall",
- modname..":slab_" .. material .. "_quarter_wall",
- modname..":slab_" .. material .. "_three_quarter_wall",
- modname..":stair_" .. material .. "_inner_inverted",
- modname..":stair_" .. material .. "_outer_inverted",
- modname..":micro_" .. material .. "_top"
+ modname.. ":slab_" ..material.. "_wall",
+ modname.. ":slab_" ..material.. "_quarter_wall",
+ modname.. ":slab_" ..material.. "_three_quarter_wall",
+ modname.. ":stair_" ..material.. "_inner_inverted",
+ modname.. ":stair_" ..material.. "_outer_inverted",
+ modname.. ":micro_" ..material.. "_top"
}
- for j in ipairs(objects_list1) do
+ for _, object in pairs(objects_list1) do
local flip_upside_down = false
local flip_to_wall = false
- local object = objects_list1[j]
- local dest_object = objects_list1[j]
+ local dest_object = object
if string.find(dest_object, "_inverted") then
flip_upside_down = true
dest_object = string.gsub(dest_object, "_inverted", "")
end
- if string.find(dest_object, "_top") then
+ if string.find(object, "_top") then
flip_upside_down = true
dest_object = string.gsub(dest_object, "_top", "")
end
@@ -65,34 +71,33 @@ function register_6dfacedir_conversion(modname, material)
dest_object = string.gsub(dest_object, "_right_half", "_half")
end
- --print(" +---> convert "..object)
- --print(" | to "..dest_object)
+ --print(" +---> convert " ..object)
+ --print(" | to " ..dest_object)
minetest.register_abm({
- nodenames = { object },
+ nodenames = {object},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
local fdir = node.param2 or 0
if flip_upside_down and not flip_to_wall then
- nfdir = dirs1[fdir+2]
+ nfdir = dirs1[fdir + 2]
elseif flip_to_wall and not flip_upside_down then
- nfdir = dirs2[fdir+1]
+ nfdir = dirs2[fdir + 1]
elseif flip_to_wall and flip_upside_down then
- nfdir = dirs3[fdir+2]
+ nfdir = dirs3[fdir + 2]
end
- minetest.env:add_node(pos, {name = dest_object, param2 = nfdir})
+ minetest.set_node(pos, {name = dest_object, param2 = nfdir})
end
})
end
- for j in ipairs(objects_list2) do
+ for _, object in pairs(objects_list2) do
local flip_upside_down = false
local flip_to_wall = false
- local object = objects_list2[j]
- local dest_object = objects_list2[j]
+ local dest_object = object
if string.find(dest_object, "_inverted") then
flip_upside_down = true
@@ -109,11 +114,11 @@ function register_6dfacedir_conversion(modname, material)
dest_object = string.gsub(dest_object, "_wall", "")
end
- --print(" +---> convert "..object)
- --print(" | to "..dest_object)
+ --print(" +---> convert " ..object)
+ --print(" | to " ..dest_object)
minetest.register_abm({
- nodenames = { object },
+ nodenames = {object},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)
@@ -121,13 +126,14 @@ function register_6dfacedir_conversion(modname, material)
local nfdir = 20
if flip_upside_down and not flip_to_wall then
- nfdir = dirs1[fdir+1]
+ nfdir = dirs1[fdir + 1]
elseif flip_to_wall and not flip_upside_down then
- nfdir = dirs2[fdir+2]
+ nfdir = dirs2[fdir + 2]
end
- minetest.env:add_node(pos, {name = dest_object, param2 = nfdir})
+ minetest.set_node(pos, {name = dest_object, param2 = nfdir})
end
})
end
end
+
diff --git a/stairsplus/init.lua b/stairsplus/init.lua
new file mode 100644
index 0000000..1f2cefe
--- /dev/null
+++ b/stairsplus/init.lua
@@ -0,0 +1,91 @@
+--[[
+More Blocks: Stairs+
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+-- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
+
+local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"
+
+stairsplus = {}
+stairsplus.expect_infinite_stacks = false
+
+if not minetest.get_modpath("unified_inventory")
+and minetest.setting_getbool("creative_mode") then
+ stairsplus.expect_infinite_stacks = true
+end
+
+function stairsplus.copytable(orig)
+ local orig_type = type(orig)
+ local copy
+ if orig_type == 'table' then
+ copy = {}
+ for orig_key, orig_value in next, orig, nil do
+ copy[stairsplus.copytable(orig_key)] = stairsplus.copytable(orig_value)
+ end
+ setmetatable(copy, stairsplus.copytable(getmetatable(orig)))
+ else
+ copy = orig
+ end
+ return copy
+end
+
+function stairsplus:prepare_groups(groups)
+ local result = {}
+ if groups then
+ for k, v in pairs(groups) do
+ if k ~= "wood" and k ~= "stone" then
+ result[k] = v
+ end
+ end
+ end
+ if not moreblocks.config.stairsplus_in_creative_inventory then
+ result.not_in_creative_inventory = 1
+ end
+ return result
+end
+
+function stairsplus:register_all(modname, subname, recipeitem, fields)
+ self:register_stair(modname, subname, recipeitem, fields)
+ self:register_slab (modname, subname, recipeitem, fields)
+ self:register_slope(modname, subname, recipeitem, fields)
+ self:register_panel(modname, subname, recipeitem, fields)
+ self:register_micro(modname, subname, recipeitem, fields)
+ -- self:register_6dfacedir_conversion(modname, subname) -- Not needed as of Q3 2013, uncomment to fix old maps.
+end
+
+function stairsplus:register_alias_all(modname_old, subname_old, modname_new, subname_new)
+ self:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
+ self:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
+ self:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
+ self:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
+ self:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
+end
+function stairsplus:register_alias_force_all(modname_old, subname_old, modname_new, subname_new)
+ self:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new)
+ self:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new)
+ self:register_slope_alias_force(modname_old, subname_old, modname_new, subname_new)
+ self:register_panel_alias_force(modname_old, subname_old, modname_new, subname_new)
+ self:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
+end
+
+function register_stair_slab_panel_micro(modname, subname, recipeitem, groups, images, description, drop, light)
+ stairsplus:register_all(modname, subname, recipeitem, {
+ groups = groups,
+ tiles = images,
+ description = description,
+ drop = drop,
+ light_source = light
+ })
+end
+
+-- dofile(modpath.. "/aliases.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
+-- dofile(modpath.. "/conversion.lua") -- Not needed as of Q2 2013, uncomment to fix old maps.
+dofile(modpath .. "/stairs.lua")
+dofile(modpath .. "/slabs.lua")
+dofile(modpath .. "/slopes.lua")
+dofile(modpath .. "/panels.lua")
+dofile(modpath .. "/microblocks.lua")
+dofile(modpath .. "/registrations.lua")
diff --git a/stairsplus/microblocks.lua b/stairsplus/microblocks.lua
index 2a1943a..a457d10 100644
--- a/stairsplus/microblocks.lua
+++ b/stairsplus/microblocks.lua
@@ -1,43 +1,153 @@
--- Load translation library if intllib is installed
-
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
- else
- S = function ( s ) return s end
-end
+--[[
+More Blocks: microblock definitions
--- Node will be called <modname>micro_<subname>
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
-function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
+local S = moreblocks.intllib
+
+-- Node will be called <modname>:micro_<subname>
- minetest.register_node(":"..modname .. ":micro_" .. subname, {
- description = S("%s Microblock"):format(S(description)),
- drawtype = "nodebox",
+function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
+ stairsplus:register_micro(modname, subname, recipeitem, {
+ groups = groups,
tiles = images,
+ description = description,
+ drop = drop,
light_source = light,
- drop = modname .. ":micro_" .. drop,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
+ sounds = default.node_sound_stone_defaults(),
+ })
+end
+
+local microblocks_defs = {
+ [""] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
},
- selection_box = {
+ },
+ ["_1"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0, -0.4375, 0.5},
+ },
+ },
+ ["_2"] = {
+ node_box = {
type = "fixed",
- fixed = {-0.5, -0.5, 0, 0, 0, 0.5},
+ fixed = {-0.5, -0.5, 0, 0, -0.375, 0.5},
},
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
+ },
+ ["_4"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0, -0.25, 0.5},
+ },
+ },
+ ["_12"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0, 0.25, 0.5},
+ },
+ },
+ ["_14"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0, 0.375, 0.5},
+ },
+ },
+ ["_15"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0, 0.4375, 0.5},
+ },
+ }
+}
- minetest.register_alias(modname..":micro_"..subname.."_bottom", modname..":micro_"..subname)
+function stairsplus:register_micro_alias(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(microblocks_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate)
+ end
end
+function stairsplus:register_micro_alias_force(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(microblocks_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias_force(modname_old .. ":micro_" .. subname_old .. alternate, modname_new .. ":micro_" .. subname_new .. alternate)
+ end
+end
+
+function stairsplus:register_micro(modname, subname, recipeitem, fields)
+ local defs = stairsplus.copytable(microblocks_defs)
+ local desc = S("%s Microblock"):format(fields.description)
+ for alternate, def in pairs(defs) do
+ for k, v in pairs(fields) do
+ def[k] = v
+ end
+ def.drawtype = "nodebox"
+ def.paramtype = "light"
+ def.paramtype2 = "facedir"
+ def.on_place = minetest.rotate_node
+ def.groups = stairsplus:prepare_groups(fields.groups)
+ def.description = desc
+ if fields.drop and not (type(fields.drop) == "table") then
+ def.drop = modname.. ":micro_" ..fields.drop..alternate
+ end
+ minetest.register_node(":" ..modname.. ":micro_" ..subname..alternate, def)
+ end
+ minetest.register_alias(modname.. ":micro_" ..subname.. "_bottom", modname.. ":micro_" ..subname)
+
+ circular_saw.known_nodes[recipeitem] = {modname, subname}
+
+ -- Some saw-less recipes:
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":micro_" .. subname .. " 7",
+ recipe = {modname .. ":stair_" .. subname .. "_inner"},
+ })
+
+ minetest.register_craft({
+ output = modname .. ":micro_" .. subname .. " 6",
+ type = "shapeless",
+ recipe = {modname .. ":stair_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":micro_" .. subname .. " 5",
+ recipe = {modname .. ":stair_" .. subname .. "_outer"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":micro_" .. subname .. " 4",
+ recipe = {modname .. ":slab_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":micro_" .. subname .. " 4",
+ recipe = {modname .. ":stair_" .. subname .. "_alt"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":micro_" .. subname .. " 3",
+ recipe = {modname .. ":stair_" .. subname .. "_right_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":micro_" .. subname .. " 2",
+ recipe = {modname .. ":panel_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
+ })
+end
diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua
index 8a00b7f..314939b 100644
--- a/stairsplus/panels.lua
+++ b/stairsplus/panels.lua
@@ -1,42 +1,133 @@
--- Load translation library if intllib is installed
-
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
- else
- S = function ( s ) return s end
-end
+--[[
+More Blocks: panel definitions
--- Node will be called <modname>panel_<subname>
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
-function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
+local S = moreblocks.intllib
+
+-- Node will be called <modname>:panel_<subname>
- minetest.register_node(":" .. modname .. ":panel_" .. subname, {
- description = S("%s Panel"):format(S(description)),
- drawtype = "nodebox",
+function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
+ stairsplus:register_panel(modname, subname, recipeitem, {
+ groups = groups,
tiles = images,
+ description = description,
+ drop = drop,
light_source = light,
- drop = modname .. ":panel_" .. drop,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
+ sounds = default.node_sound_stone_defaults(),
+ })
+end
+
+local panels_defs = {
+ [""] = {
node_box = {
type = "fixed",
fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
},
- selection_box = {
+ },
+ ["_1"] = {
+ node_box = {
type = "fixed",
- fixed = {-0.5, -0.5, 0, 0.5, 0, 0.5},
+ fixed = {-0.5, -0.5, 0, 0.5, -0.4375, 0.5},
},
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
+ },
+ ["_2"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0.5, -0.375, 0.5},
+ },
+ },
+ ["_4"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0.5, -0.25, 0.5},
+ },
+ },
+ ["_12"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0.5, 0.25, 0.5},
+ },
+ },
+ ["_14"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0.5, 0.375, 0.5},
+ },
+ },
+ ["_15"] = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, 0, 0.5, 0.4375, 0.5},
+ },
+ }
+}
- minetest.register_alias(modname..":panel_"..subname.."_bottom", modname..":panel_"..subname)
+function stairsplus:register_panel_alias(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(panels_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate)
+ end
end
+function stairsplus:register_panel_alias_force(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(panels_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias_force(modname_old .. ":panel_" .. subname_old .. alternate, modname_new .. ":panel_" .. subname_new .. alternate)
+ end
+end
+
+function stairsplus:register_panel(modname, subname, recipeitem, fields)
+ local defs = stairsplus.copytable(panels_defs)
+ local desc = S("%s Panel"):format(fields.description)
+ for alternate, def in pairs(defs) do
+ for k, v in pairs(fields) do
+ def[k] = v
+ end
+ def.drawtype = "nodebox"
+ def.paramtype = "light"
+ def.paramtype2 = "facedir"
+ def.on_place = minetest.rotate_node
+ def.description = desc
+ def.groups = stairsplus:prepare_groups(fields.groups)
+ if fields.drop and not (type(fields.drop) == "table") then
+ def.drop = modname.. ":panel_" ..fields.drop..alternate
+ end
+ minetest.register_node(":" ..modname.. ":panel_" ..subname..alternate, def)
+ end
+ minetest.register_alias(modname.. ":panel_" ..subname.. "_bottom", modname.. ":panel_" ..subname)
+
+ circular_saw.known_nodes[recipeitem] = {modname, subname}
+
+ -- Some saw-less recipes:
+
+ minetest.register_craft({
+ output = modname .. ":panel_" .. subname .. " 12",
+ recipe = {
+ {recipeitem, ""},
+ {recipeitem, recipeitem},
+ },
+ })
+
+ minetest.register_craft({
+ output = modname .. ":panel_" .. subname .. " 12",
+ recipe = {
+ {"", recipeitem},
+ {recipeitem, recipeitem},
+ },
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":panel_" .. subname,
+ recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
+ })
+end
diff --git a/stairsplus/registrations.lua b/stairsplus/registrations.lua
new file mode 100644
index 0000000..13a9be7
--- /dev/null
+++ b/stairsplus/registrations.lua
@@ -0,0 +1,65 @@
+--[[
+More Blocks: registrations
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+local default_nodes = { -- Default stairs/slabs/panels/microblocks:
+ "stone",
+ "cobble",
+ "mossycobble",
+ "brick",
+ "sandstone",
+ "steelblock",
+ "goldblock",
+ "copperblock",
+ "bronzeblock",
+ "diamondblock",
+ "desert_stone",
+ "desert_cobble",
+ "meselamp",
+ "glass",
+ "tree",
+ "wood",
+ "jungletree",
+ "junglewood",
+ "pine_tree",
+ "pine_wood",
+ "acacia_tree",
+ "acacia_wood",
+ "aspen_tree",
+ "aspen_wood",
+ "obsidian",
+ "obsidian_glass",
+ "stonebrick",
+ "desert_stonebrick",
+ "sandstonebrick",
+ "obsidianbrick",
+}
+
+for _, name in pairs(default_nodes) do
+ local nodename = "default:" .. name
+ local ndef = minetest.registered_nodes[nodename]
+ if ndef then
+ local drop
+ if type(ndef.drop) == "string" then
+ drop = ndef.drop:sub(9)
+ end
+
+ local tiles = ndef.tiles
+ if #ndef.tiles > 1 and ndef.drawtype:find("glass") then
+ tiles = { ndef.tiles[1] }
+ end
+
+ stairsplus:register_all("moreblocks", name, nodename, {
+ description = ndef.description,
+ drop = drop,
+ groups = ndef.groups,
+ sounds = ndef.sounds,
+ tiles = tiles,
+ sunlight_propagates = true,
+ light_source = ndef.light_source
+ })
+ end
+end
diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua
index 458c8b9..2acdd41 100644
--- a/stairsplus/slabs.lua
+++ b/stairsplus/slabs.lua
@@ -1,127 +1,224 @@
--- Load translation library if intllib is installed
+--[[
+More Blocks: slab definitions
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
- else
- S = function ( s ) return s end
-end
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
--- Node will be called <modname>slab_<subname>
+local S = moreblocks.intllib
-function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
+-- Node will be called <modname>:slab_<subname>
- minetest.register_node(":" .. modname .. ":slab_" .. subname, {
- description = S("%s Slab"):format(S(description)),
- drawtype = "nodebox",
+function register_slab(modname, subname, recipeitem, groups, images, description, drop, light)
+ stairsplus:register_slab(modname, subname, recipeitem, {
+ groups = groups,
tiles = images,
+ description = description,
+ drop = drop,
light_source = light,
- drop = modname .. ":slab_" .. drop,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- },
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- },
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
})
+end
- minetest.register_node(":stairs:slab_" .. subname, {
- description = S("%s Slab"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- drop = modname .. ":slab_" .. drop,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- },
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- },
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
+local slabs_defs = {
+ [""] = 8,
+ ["_quarter"] = 4,
+ ["_three_quarter"] = 12,
+ ["_1"] = 1,
+ ["_2"] = 2,
+ ["_14"] = 14,
+ ["_15"] = 15,
+}
- minetest.register_node(":"..modname .. ":slab_" .. subname .. "_quarter", {
- description = S("%s Slab"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- light_source = light,
- drop = modname .. ":slab_" .. drop .. "_quarter",
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
- },
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
- },
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
+function stairsplus:register_slab_alias(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(slabs_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
+ end
+end
- minetest.register_node(":"..modname .. ":slab_" .. subname .. "_three_quarter", {
- description = S("%s Slab"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- light_source = light,
- drop = modname .. ":slab_" .. drop .. "_three_quarter",
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
- node_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
- },
- selection_box = {
- type = "fixed",
- fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5},
- },
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
+function stairsplus:register_slab_alias_force(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(slabs_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias_force(modname_old .. ":slab_" .. subname_old .. alternate, modname_new .. ":slab_" .. subname_new .. alternate)
+ end
+end
+
+function stairsplus:register_slab(modname, subname, recipeitem, fields)
+ local defs = stairsplus.copytable(slabs_defs)
+ local desc_base = S("%s Slab"):format(fields.description)
+ for alternate, num in pairs(defs) do
+ local def = {
+ node_box = {
+ type = "fixed",
+ fixed = {-0.5, -0.5, -0.5, 0.5, (num/16)-0.5, 0.5},
+ }
+ }
+ for k, v in pairs(fields) do
+ def[k] = v
end
- })
+ def.drawtype = "nodebox"
+ def.paramtype = "light"
+ def.paramtype2 = "facedir"
+ def.on_place = minetest.rotate_node
+ def.description = ("%s (%d/16)"):format(desc_base, num)
+ def.groups = stairsplus:prepare_groups(fields.groups)
+ if fields.drop and not (type(fields.drop) == "table") then
+ def.drop = modname.. ":slab_" .. fields.drop .. alternate
+ end
+ minetest.register_node(":" .. modname .. ":slab_" .. subname .. alternate, def)
+ end
+ minetest.register_alias("stairs:slab_" .. subname, modname .. ":slab_" .. subname)
- -- Unregister default recipes
+ circular_saw.known_nodes[recipeitem] = {modname, subname}
- minetest.register_craft({
- output = "moreblocks:nothing 1",
- recipe = {
- {recipeitem, recipeitem, recipeitem},
- },
- })
-end
+ -- Some saw-less recipes:
+
+ minetest.register_craft({
+ output = modname .. ":slab_" .. subname .. " 6",
+ recipe = {{recipeitem, recipeitem, recipeitem}},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname,
+ recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
+ })
+
+ -- uncomment this rule when conflict is no longer likely to happen
+ -- https://github.com/minetest/minetest/issues/2881
+ -- minetest.register_craft({
+ -- type = "shapeless",
+ -- output = modname .. ":slab_" .. subname,
+ -- recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
+ -- })
+
+ -- then remove these two
+ minetest.register_craft({
+ output = modname .. ":slab_" .. subname,
+ recipe = {{modname .. ":panel_" .. subname, modname .. ":panel_" .. subname}},
+ })
+
+ minetest.register_craft({
+ output = modname .. ":slab_" .. subname,
+ recipe = {
+ {modname .. ":panel_" .. subname},
+ {modname .. ":panel_" .. subname},
+ },
+ })
+ ------------------------------
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_quarter"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_2"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slab_" .. subname .. "_15", modname .. ":slab_" .. subname .. "_1"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname,
+ recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname,
+ recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname,
+ recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_quarter",
+ recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_quarter",
+ recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_2",
+ recipe = {modname .. ":slab_" .. subname .. "_1", modname .. ":slab_" .. subname .. "_1"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_three_quarter",
+ recipe = {modname .. ":slab_" .. subname, modname .. ":slab_" .. subname .. "_quarter"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_three_quarter",
+ recipe = {modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter", modname .. ":slab_" .. subname .. "_quarter"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_three_quarter",
+ recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_14",
+ recipe = {modname .. ":slab_" .. subname .. "_three_quarter", modname .. ":slab_" .. subname .. "_2"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_14",
+ recipe = {modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2", modname .. ":slab_" .. subname .. "_2"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. "_15",
+ recipe = {modname .. ":slab_" .. subname .. "_14", modname .. ":slab_" .. subname .. "_1"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname .. " 3",
+ recipe = {modname .. ":stair_" .. subname, modname .. ":stair_" .. subname},
+ })
+end
diff --git a/stairsplus/slopes.lua b/stairsplus/slopes.lua
new file mode 100644
index 0000000..da524b6
--- /dev/null
+++ b/stairsplus/slopes.lua
@@ -0,0 +1,362 @@
+--[[
+More Blocks: slope definitions
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+local S = moreblocks.intllib
+
+local box_slope = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
+ {-0.5, -0.25, -0.25, 0.5, 0, 0.5},
+ {-0.5, 0, 0, 0.5, 0.25, 0.5},
+ {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5}
+ }
+}
+
+local box_slope_half = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
+ {-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
+ {-0.5, -0.25, 0, 0.5, -0.125, 0.5},
+ {-0.5, -0.125, 0.25, 0.5, 0, 0.5},
+ }
+}
+
+local box_slope_half_raised = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
+ {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
+ {-0.5, 0.25, 0, 0.5, 0.375, 0.5},
+ {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
+ }
+}
+
+--==============================================================
+
+local box_slope_inner = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
+ {-0.5, -0.5, -0.25, 0.5, 0, 0.5},
+ {-0.5, -0.5, -0.5, 0.25, 0, 0.5},
+ {-0.5, 0, -0.5, 0, 0.25, 0.5},
+ {-0.5, 0, 0, 0.5, 0.25, 0.5},
+ {-0.5, 0.25, 0.25, 0.5, 0.5, 0.5},
+ {-0.5, 0.25, -0.5, -0.25, 0.5, 0.5},
+ }
+}
+
+local box_slope_inner_half = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
+ {-0.5, -0.375, -0.25, 0.5, -0.25, 0.5},
+ {-0.5, -0.375, -0.5, 0.25, -0.25, 0.5},
+ {-0.5, -0.25, -0.5, 0, -0.125, 0.5},
+ {-0.5, -0.25, 0, 0.5, -0.125, 0.5},
+ {-0.5, -0.125, 0.25, 0.5, 0, 0.5},
+ {-0.5, -0.125, -0.5, -0.25, 0, 0.5},
+ }
+}
+
+local box_slope_inner_half_raised = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
+ {-0.5, 0.125, -0.25, 0.5, 0.25, 0.5},
+ {-0.5, 0.125, -0.5, 0.25, 0.25, 0.5},
+ {-0.5, 0.25, -0.5, 0, 0.375, 0.5},
+ {-0.5, 0.25, 0, 0.5, 0.375, 0.5},
+ {-0.5, 0.375, 0.25, 0.5, 0.5, 0.5},
+ {-0.5, 0.375, -0.5, -0.25, 0.5, 0.5},
+ }
+}
+
+--==============================================================
+
+local box_slope_outer = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5},
+ {-0.5, -0.25, -0.25, 0.25, 0, 0.5},
+ {-0.5, 0, 0, 0, 0.25, 0.5},
+ {-0.5, 0.25, 0.25, -0.25, 0.5, 0.5}
+ }
+}
+
+local box_slope_outer_half = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5},
+ {-0.5, -0.375, -0.25, 0.25, -0.25, 0.5},
+ {-0.5, -0.25, 0, 0, -0.125, 0.5},
+ {-0.5, -0.125, 0.25, -0.25, 0, 0.5}
+ }
+}
+
+local box_slope_outer_half_raised = {
+ type = "fixed",
+ fixed = {
+ {-0.5, -0.5, -0.5, 0.5, 0.125, 0.5},
+ {-0.5, 0.125, -0.25, 0.25, 0.25, 0.5},
+ {-0.5, 0.25, 0, 0, 0.375, 0.5},
+ {-0.5, 0.375, 0.25, -0.25, 0.5, 0.5}
+ }
+}
+
+-- Node will be called <modname>:slope_<subname>
+
+function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
+ stairsplus:register_slope(modname, subname, recipeitem, {
+ groups = groups,
+ tiles = images,
+ description = description,
+ drop = drop,
+ light_source = light,
+ sounds = default.node_sound_stone_defaults(),
+ })
+end
+
+local slopes_defs = {
+ [""] = {
+ mesh = "moreblocks_slope.obj",
+ collision_box = box_slope,
+ selection_box = box_slope,
+
+ },
+ ["_half"] = {
+ mesh = "moreblocks_slope_half.obj",
+ collision_box = box_slope_half,
+ selection_box = box_slope_half,
+ },
+ ["_half_raised"] = {
+ mesh = "moreblocks_slope_half_raised.obj",
+ collision_box = box_slope_half_raised,
+ selection_box = box_slope_half_raised,
+ },
+
+ --==============================================================
+
+ ["_inner"] = {
+ mesh = "moreblocks_slope_inner.obj",
+ collision_box = box_slope_inner,
+ selection_box = box_slope_inner,
+ },
+ ["_inner_half"] = {
+ mesh = "moreblocks_slope_inner_half.obj",
+ collision_box = box_slope_inner_half,
+ selection_box = box_slope_inner_half,
+ },
+ ["_inner_half_raised"] = {
+ mesh = "moreblocks_slope_inner_half_raised.obj",
+ collision_box = box_slope_inner_half_raised,
+ selection_box = box_slope_inner_half_raised,
+ },
+
+ --==============================================================
+
+ ["_inner_cut"] = {
+ mesh = "moreblocks_slope_inner_cut.obj",
+ collision_box = box_slope_inner,
+ selection_box = box_slope_inner,
+ },
+ ["_inner_cut_half"] = {
+ mesh = "moreblocks_slope_inner_cut_half.obj",
+ collision_box = box_slope_inner_half,
+ selection_box = box_slope_inner_half,
+ },
+ ["_inner_cut_half_raised"] = {
+ mesh = "moreblocks_slope_inner_cut_half_raised.obj",
+ collision_box = box_slope_inner_half_raised,
+ selection_box = box_slope_inner_half_raised,
+ },
+
+ --==============================================================
+
+ ["_outer"] = {
+ mesh = "moreblocks_slope_outer.obj",
+ collision_box = box_slope_outer,
+ selection_box = box_slope_outer,
+ },
+ ["_outer_half"] = {
+ mesh = "moreblocks_slope_outer_half.obj",
+ collision_box = box_slope_outer_half,
+ selection_box = box_slope_outer_half,
+ },
+ ["_outer_half_raised"] = {
+ mesh = "moreblocks_slope_outer_half_raised.obj",
+ collision_box = box_slope_outer_half_raised,
+ selection_box = box_slope_outer_half_raised,
+ },
+
+ --==============================================================
+
+ ["_outer_cut"] = {
+ mesh = "moreblocks_slope_outer_cut.obj",
+ collision_box = box_slope_outer,
+ selection_box = box_slope_outer,
+ },
+ ["_outer_cut_half"] = {
+ mesh = "moreblocks_slope_outer_cut_half.obj",
+ collision_box = box_slope_outer_half,
+ selection_box = box_slope_outer_half,
+ },
+ ["_outer_cut_half_raised"] = {
+ mesh = "moreblocks_slope_outer_cut_half_raised.obj",
+ collision_box = box_slope_outer_half_raised,
+ selection_box = box_slope_outer_half_raised,
+ },
+ ["_cut"] = {
+ mesh = "moreblocks_slope_cut.obj",
+ collision_box = box_slope_outer,
+ selection_box = box_slope_outer,
+ },
+}
+
+function stairsplus:register_slope_alias(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(slopes_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate)
+ end
+end
+
+function stairsplus:register_slope_alias_force(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(slopes_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias_force(modname_old .. ":slope_" .. subname_old .. alternate, modname_new .. ":slope_" .. subname_new .. alternate)
+ end
+end
+
+function stairsplus:register_slope(modname, subname, recipeitem, fields)
+ local defs = stairsplus.copytable(slopes_defs)
+ local desc = S("%s Slope"):format(fields.description)
+ for alternate, def in pairs(defs) do
+ for k, v in pairs(fields) do
+ def[k] = v
+ end
+ def.drawtype = "mesh"
+ def.paramtype = "light"
+ def.paramtype2 = "facedir"
+ def.on_place = minetest.rotate_node
+ def.description = desc
+ def.groups = stairsplus:prepare_groups(fields.groups)
+ if fields.drop and not (type(fields.drop) == "table") then
+ def.drop = modname.. ":slope_" ..fields.drop..alternate
+ end
+ minetest.register_node(":" ..modname.. ":slope_" ..subname..alternate, def)
+ end
+
+ circular_saw.known_nodes[recipeitem] = {modname, subname}
+
+ -- Some saw-less recipes:
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname, modname .. ":slope_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half_raised"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
+ modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_outer", modname .. ":slope_" .. subname .. "_inner"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half_raised"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_outer_half_raised", modname .. ":slope_" .. subname .. "_inner_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_outer_cut", modname .. ":slope_" .. subname .. "_inner_cut"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half_raised"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = recipeitem,
+ recipe = {modname .. ":slope_" .. subname .. "_cut", modname .. ":slope_" .. subname .. "_cut"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname,
+ recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname,
+ recipe = {modname .. ":slope_" .. subname .. "_outer_half", modname .. ":slope_" .. subname .. "_inner_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slab_" .. subname,
+ recipe = {modname .. ":slope_" .. subname .. "_outer_cut_half", modname .. ":slope_" .. subname .. "_inner_cut_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slope_" .. subname .. "_half_raised",
+ recipe = {modname .. ":slope_" .. subname .. "_half", modname .. ":slope_" .. subname .. "_half",
+ modname .. ":slope_" .. subname .. "_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slope_" .. subname .. "_half_raised",
+ recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slope_" .. subname .. "_inner_half_raised",
+ recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slope_" .. subname .. "_outer_half_raised",
+ recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_outer_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":slope_" .. subname .. "_inner_cut_half_raised",
+ recipe = {modname .. ":slab_" .. subname, modname .. ":slope_" .. subname .. "_inner_cut_half"},
+ })
+end
diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua
index ae06e73..6609466 100644
--- a/stairsplus/stairs.lua
+++ b/stairsplus/stairs.lua
@@ -1,56 +1,27 @@
--- Load translation library if intllib is installed
-
-local S
-if (minetest.get_modpath("intllib")) then
- dofile(minetest.get_modpath("intllib").."/intllib.lua")
- S = intllib.Getter(minetest.get_current_modname())
- else
- S = function ( s ) return s end
-end
+--[[
+More Blocks: stair definitions
+
+Copyright (c) 2011-2015 Calinou and contributors.
+Licensed under the zlib license. See LICENSE.md for more information.
+--]]
+
+local S = moreblocks.intllib
-- Node will be called <modname>:stair_<subname>
function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
-
- minetest.register_node(":" .. modname .. ":stair_" .. subname, {
- description = S("%s Stairs"):format(S(description)),
- drawtype = "nodebox",
+ stairsplus:register_stair(modname, subname, recipeitem, {
+ groups = groups,
tiles = images,
+ description = description,
+ drop = drop,
light_source = light,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
- node_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
- },
- },
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
- },
- },
sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
})
+end
- minetest.register_node(":stairs:stair_" .. subname, {
- description = S("%s Stairs"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = {cracky=3, not_in_creative_inventory=1},
+local stairs_defs = {
+ [""] = {
node_box = {
type = "fixed",
fixed = {
@@ -58,30 +29,8 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{-0.5, 0, 0, 0.5, 0.5, 0.5},
},
},
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
- },
- },
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
-
- minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_half", {
- description = S("%s Stairs"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- light_source = light,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
+ },
+ ["_half"] = {
node_box = {
type = "fixed",
fixed = {
@@ -89,30 +38,8 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{-0.5, 0, 0, 0, 0.5, 0.5},
},
},
- selection_box = {
- type = "fixed",
- fixed = {
- {-0.5, -0.5, -0.5, 0, 0, 0.5},
- {-0.5, 0, 0, 0, 0.5, 0.5},
- },
- },
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
-
- minetest.register_node(":"..modname .. ":stair_" .. subname .. "_right_half", {
- description = S("%s Stairs"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- light_source = light,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
+ },
+ ["_right_half" ]= {
node_box = {
type = "fixed",
fixed = {
@@ -120,115 +47,104 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
{0, 0, 0, 0.5, 0.5, 0.5},
},
},
- selection_box = {
+ },
+ ["_inner"] = {
+ node_box = {
type = "fixed",
fixed = {
- {0, -0.5, -0.5, 0.5, 0, 0.5},
- {0, 0, 0, 0.5, 0.5, 0.5},
+ {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
+ {-0.5, 0, 0, 0.5, 0.5, 0.5},
+ {-0.5, 0, -0.5, 0, 0.5, 0},
},
},
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
-
- minetest.register_node(":"..modname .. ":stair_" .. subname .. "_inner", {
- description = S("%s Stairs"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- light_source = light,
- drop = modname .. ":stair_" .. drop .. "_inner",
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
+ },
+ ["_outer"] = {
node_box = {
type = "fixed",
fixed = {
{-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
- {-0.5, 0, -0.5, 0, 0.5, 0},
+ {-0.5, 0, 0, 0, 0.5, 0.5},
},
},
- selection_box = {
+ },
+ ["_alt"] = {
+ node_box = {
type = "fixed",
fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
+ {-0.5, -0.5, -0.5, 0.5, 0, 0},
{-0.5, 0, 0, 0.5, 0.5, 0.5},
- {-0.5, 0, -0.5, 0, 0.5, 0},
},
},
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
-
- minetest.register_node(":"..modname .. ":stair_" .. subname .. "_outer", {
- description = S("%s Stairs"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- light_source = light,
- drop = modname .. ":stair_" .. drop .. "_outer",
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
+ },
+ ["_alt_1"] = {
node_box = {
type = "fixed",
fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0, 0.5, 0.5},
+ {-0.5, -0.0625, -0.5, 0.5, 0, 0},
+ {-0.5, 0.4375, 0, 0.5, 0.5, 0.5},
},
},
- selection_box = {
+ },
+ ["_alt_2"] = {
+ node_box = {
type = "fixed",
fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0.5},
- {-0.5, 0, 0, 0, 0.5, 0.5},
+ {-0.5, -0.125, -0.5, 0.5, 0, 0},
+ {-0.5, 0.375, 0, 0.5, 0.5, 0.5},
},
},
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
- end
- })
-
- minetest.register_node(":" .. modname .. ":stair_" .. subname .. "_alt", {
- description = S("%s Stairs"):format(S(description)),
- drawtype = "nodebox",
- tiles = images,
- light_source = light,
- paramtype = "light",
- paramtype2 = "facedir",
- sunlight_propagates = true,
- groups = groups,
+ },
+ ["_alt_4"] = {
node_box = {
type = "fixed",
fixed = {
- {-0.5, -0.5, -0.5, 0.5, 0, 0},
- {-0.5, 0, 0, 0.5, 0.5, 0.5},
+ {-0.5, -0.25, -0.5, 0.5, 0, 0},
+ {-0.5, 0.25, 0, 0.5, 0.5, 0.5},
},
},
- sounds = default.node_sound_stone_defaults(),
- on_place = function(itemstack, placer, pointed_thing)
- local keys=placer:get_player_control()
- stairsplus_rotate_and_place(itemstack, placer, pointed_thing, keys["sneak"])
- return itemstack
+ },
+}
+
+function stairsplus:register_stair_alias(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(stairs_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate)
+ end
+end
+
+function stairsplus:register_stair_alias_force(modname_old, subname_old, modname_new, subname_new)
+ local defs = stairsplus.copytable(stairs_defs)
+ for alternate, def in pairs(defs) do
+ minetest.register_alias_force(modname_old .. ":stair_" .. subname_old .. alternate, modname_new .. ":stair_" .. subname_new .. alternate)
+ end
+end
+
+function stairsplus:register_stair(modname, subname, recipeitem, fields)
+ local defs = stairsplus.copytable(stairs_defs)
+ local desc = S("%s Stairs"):format(fields.description)
+ for alternate, def in pairs(defs) do
+ for k, v in pairs(fields) do
+ def[k] = v
end
- })
+ def.drawtype = "nodebox"
+ def.paramtype = "light"
+ def.paramtype2 = "facedir"
+ def.on_place = minetest.rotate_node
+ def.description = desc
+ def.groups = stairsplus:prepare_groups(fields.groups)
+ if fields.drop and not (type(fields.drop) == "table") then
+ def.drop = modname .. ":stair_" .. fields.drop .. alternate
+ end
+ minetest.register_node(":" .. modname .. ":stair_" .. subname .. alternate, def)
+ end
+ minetest.register_alias("stairs:stair_" .. subname, modname .. ":stair_" .. subname)
- -- Unregister default recipes
+ circular_saw.known_nodes[recipeitem] = {modname, subname}
+
+ -- Some saw-less recipes:
minetest.register_craft({
- output = "moreblocks:nothing 1",
+ output = modname .. ":stair_" .. subname .. " 8",
recipe = {
{recipeitem, "", ""},
{recipeitem, recipeitem, ""},
@@ -237,12 +153,87 @@ function register_stair(modname, subname, recipeitem, groups, images, descriptio
})
minetest.register_craft({
- output = "moreblocks:nothing 1",
+ output = modname .. ":stair_" .. subname .. " 8",
recipe = {
{"", "", recipeitem},
{"", recipeitem, recipeitem},
{recipeitem, recipeitem, recipeitem},
},
})
-end
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname,
+ recipe = {modname .. ":panel_" .. subname, modname .. ":slab_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname,
+ recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname .. "_outer",
+ recipe = {modname .. ":micro_" .. subname, modname .. ":slab_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname .. "_half",
+ recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname .. "_half",
+ recipe = {modname .. ":panel_" .. subname, modname .. ":micro_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname .. "_right_half",
+ recipe = {modname .. ":stair_" .. subname .. "_half"},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname,
+ recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname .. "_inner",
+ recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname .. "_outer",
+ recipe = {modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname, modname .. ":micro_" .. subname},
+ })
+
+ minetest.register_craft({
+ type = "shapeless",
+ output = modname .. ":stair_" .. subname,
+ recipe = {modname .. ":panel_" .. subname, modname .. ":panel_" .. subname, modname .. ":panel_" .. subname},
+ })
+
+ minetest.register_craft({ -- See mirrored variation of the recipe below.
+ output = modname .. ":stair_" .. subname .. "_alt",
+ recipe = {
+ {modname .. ":panel_" .. subname, ""},
+ {"" , modname .. ":panel_" .. subname},
+ },
+ })
+
+ minetest.register_craft({ -- Mirrored variation of the recipe above.
+ output = modname .. ":stair_" .. subname .. "_alt",
+ recipe = {
+ {"" , modname .. ":panel_" .. subname},
+ {modname .. ":panel_" .. subname, ""},
+ },
+ })
+end
diff --git a/textures/default_brick.png b/textures/default_brick.png
new file mode 100644
index 0000000..9c76033
Binary files /dev/null and b/textures/default_brick.png differ
diff --git a/textures/default_fence_overlay.png b/textures/default_fence_overlay.png
new file mode 100644
index 0000000..780e736
Binary files /dev/null and b/textures/default_fence_overlay.png differ
diff --git a/textures/invisible.png b/textures/invisible.png
new file mode 100644
index 0000000..4b5b302
Binary files /dev/null and b/textures/invisible.png differ
diff --git a/textures/moreblocks_cactus_brick.png b/textures/moreblocks_cactus_brick.png
index bdd4b92..0e8c2c9 100644
Binary files a/textures/moreblocks_cactus_brick.png and b/textures/moreblocks_cactus_brick.png differ
diff --git a/textures/moreblocks_cactus_checker.png b/textures/moreblocks_cactus_checker.png
index 0e55b0a..99c2677 100644
Binary files a/textures/moreblocks_cactus_checker.png and b/textures/moreblocks_cactus_checker.png differ
diff --git a/textures/moreblocks_circle_stone_bricks.png b/textures/moreblocks_circle_stone_bricks.png
index 03bbcbb..4ca0134 100644
Binary files a/textures/moreblocks_circle_stone_bricks.png and b/textures/moreblocks_circle_stone_bricks.png differ
diff --git a/textures/moreblocks_circular_saw_bottom.png b/textures/moreblocks_circular_saw_bottom.png
index c472a8b..1522829 100644
Binary files a/textures/moreblocks_circular_saw_bottom.png and b/textures/moreblocks_circular_saw_bottom.png differ
diff --git a/textures/moreblocks_circular_saw_side.png b/textures/moreblocks_circular_saw_side.png
index a557095..ce9e16f 100644
Binary files a/textures/moreblocks_circular_saw_side.png and b/textures/moreblocks_circular_saw_side.png differ
diff --git a/textures/moreblocks_circular_saw_top.png b/textures/moreblocks_circular_saw_top.png
index cec4aaa..96f3350 100644
Binary files a/textures/moreblocks_circular_saw_top.png and b/textures/moreblocks_circular_saw_top.png differ
diff --git a/textures/moreblocks_clean_glass.png b/textures/moreblocks_clean_glass.png
index 906a3c1..140ee2b 100644
Binary files a/textures/moreblocks_clean_glass.png and b/textures/moreblocks_clean_glass.png differ
diff --git a/textures/moreblocks_clean_glass_detail.png b/textures/moreblocks_clean_glass_detail.png
new file mode 100644
index 0000000..71414e8
Binary files /dev/null and b/textures/moreblocks_clean_glass_detail.png differ
diff --git a/textures/moreblocks_coal_checker.png b/textures/moreblocks_coal_checker.png
index 4da7746..3df90c3 100644
Binary files a/textures/moreblocks_coal_checker.png and b/textures/moreblocks_coal_checker.png differ
diff --git a/textures/moreblocks_coal_glass.png b/textures/moreblocks_coal_glass.png
index d7c830d..5cb7227 100644
Binary files a/textures/moreblocks_coal_glass.png and b/textures/moreblocks_coal_glass.png differ
diff --git a/textures/moreblocks_coal_glass_detail.png b/textures/moreblocks_coal_glass_detail.png
new file mode 100644
index 0000000..5ea081f
Binary files /dev/null and b/textures/moreblocks_coal_glass_detail.png differ
diff --git a/textures/moreblocks_coal_glass_stairsplus.png b/textures/moreblocks_coal_glass_stairsplus.png
index 0441cec..8086a28 100644
Binary files a/textures/moreblocks_coal_glass_stairsplus.png and b/textures/moreblocks_coal_glass_stairsplus.png differ
diff --git a/textures/moreblocks_coal_stone.png b/textures/moreblocks_coal_stone.png
index 95db8fa..1e514ed 100644
Binary files a/textures/moreblocks_coal_stone.png and b/textures/moreblocks_coal_stone.png differ
diff --git a/textures/moreblocks_coal_stone_bricks.png b/textures/moreblocks_coal_stone_bricks.png
new file mode 100644
index 0000000..366e445
Binary files /dev/null and b/textures/moreblocks_coal_stone_bricks.png differ
diff --git a/textures/moreblocks_cobble_compressed.png b/textures/moreblocks_cobble_compressed.png
new file mode 100644
index 0000000..94d02b5
Binary files /dev/null and b/textures/moreblocks_cobble_compressed.png differ
diff --git a/textures/moreblocks_copperpatina.png b/textures/moreblocks_copperpatina.png
new file mode 100644
index 0000000..1b971dc
Binary files /dev/null and b/textures/moreblocks_copperpatina.png differ
diff --git a/textures/moreblocks_empty_bookshelf.png b/textures/moreblocks_empty_bookshelf.png
index 56fc713..af874d7 100644
Binary files a/textures/moreblocks_empty_bookshelf.png and b/textures/moreblocks_empty_bookshelf.png differ
diff --git a/textures/moreblocks_fence_jungle_wood.png b/textures/moreblocks_fence_jungle_wood.png
index 63a39ee..b59db10 100644
Binary files a/textures/moreblocks_fence_jungle_wood.png and b/textures/moreblocks_fence_jungle_wood.png differ
diff --git a/textures/moreblocks_fence_wood.png b/textures/moreblocks_fence_wood.png
index 0b99f0e..e3510c5 100644
Binary files a/textures/moreblocks_fence_wood.png and b/textures/moreblocks_fence_wood.png differ
diff --git a/textures/moreblocks_glass.png b/textures/moreblocks_glass.png
index ade0196..912b029 100644
Binary files a/textures/moreblocks_glass.png and b/textures/moreblocks_glass.png differ
diff --git a/textures/moreblocks_glass_stairsplus.png b/textures/moreblocks_glass_stairsplus.png
index d222b62..b879ec3 100644
Binary files a/textures/moreblocks_glass_stairsplus.png and b/textures/moreblocks_glass_stairsplus.png differ
diff --git a/textures/moreblocks_glow_glass.png b/textures/moreblocks_glow_glass.png
index 84991fa..843bebf 100644
Binary files a/textures/moreblocks_glow_glass.png and b/textures/moreblocks_glow_glass.png differ
diff --git a/textures/moreblocks_glow_glass_detail.png b/textures/moreblocks_glow_glass_detail.png
new file mode 100644
index 0000000..ea67bc3
Binary files /dev/null and b/textures/moreblocks_glow_glass_detail.png differ
diff --git a/textures/moreblocks_glow_glass_stairsplus.png b/textures/moreblocks_glow_glass_stairsplus.png
index 235179c..cdb8044 100644
Binary files a/textures/moreblocks_glow_glass_stairsplus.png and b/textures/moreblocks_glow_glass_stairsplus.png differ
diff --git a/textures/moreblocks_grey_bricks.png b/textures/moreblocks_grey_bricks.png
new file mode 100644
index 0000000..9839ca2
Binary files /dev/null and b/textures/moreblocks_grey_bricks.png differ
diff --git a/textures/moreblocks_iron_checker.png b/textures/moreblocks_iron_checker.png
index f852884..d27f4df 100644
Binary files a/textures/moreblocks_iron_checker.png and b/textures/moreblocks_iron_checker.png differ
diff --git a/textures/moreblocks_iron_glass.png b/textures/moreblocks_iron_glass.png
index ad5cd1e..51be0d6 100644
Binary files a/textures/moreblocks_iron_glass.png and b/textures/moreblocks_iron_glass.png differ
diff --git a/textures/moreblocks_iron_glass_detail.png b/textures/moreblocks_iron_glass_detail.png
new file mode 100644
index 0000000..2b8fc12
Binary files /dev/null and b/textures/moreblocks_iron_glass_detail.png differ
diff --git a/textures/moreblocks_iron_glass_stairsplus.png b/textures/moreblocks_iron_glass_stairsplus.png
index b41cba7..52e3bf3 100644
Binary files a/textures/moreblocks_iron_glass_stairsplus.png and b/textures/moreblocks_iron_glass_stairsplus.png differ
diff --git a/textures/moreblocks_iron_stone.png b/textures/moreblocks_iron_stone.png
index 657c4b2..20c42f3 100644
Binary files a/textures/moreblocks_iron_stone.png and b/textures/moreblocks_iron_stone.png differ
diff --git a/textures/moreblocks_iron_stone_bricks.png b/textures/moreblocks_iron_stone_bricks.png
index 1b0ed5c..1f817f8 100644
Binary files a/textures/moreblocks_iron_stone_bricks.png and b/textures/moreblocks_iron_stone_bricks.png differ
diff --git a/textures/moreblocks_jungle_wood.png b/textures/moreblocks_jungle_wood.png
deleted file mode 100644
index ebc6485..0000000
Binary files a/textures/moreblocks_jungle_wood.png and /dev/null differ
diff --git a/textures/moreblocks_junglestick.png b/textures/moreblocks_junglestick.png
index afe5892..7c6c462 100644
Binary files a/textures/moreblocks_junglestick.png and b/textures/moreblocks_junglestick.png differ
diff --git a/textures/moreblocks_obsidian_glass_stairsplus.png b/textures/moreblocks_obsidian_glass_stairsplus.png
index eb758f1..3eb22d0 100644
Binary files a/textures/moreblocks_obsidian_glass_stairsplus.png and b/textures/moreblocks_obsidian_glass_stairsplus.png differ
diff --git a/textures/moreblocks_plankstone.png b/textures/moreblocks_plankstone.png
index ac866b8..b1a65c5 100644
Binary files a/textures/moreblocks_plankstone.png and b/textures/moreblocks_plankstone.png differ
diff --git a/textures/moreblocks_plankstone_2.png b/textures/moreblocks_plankstone_2.png
index 52656b0..953c2f5 100644
Binary files a/textures/moreblocks_plankstone_2.png and b/textures/moreblocks_plankstone_2.png differ
diff --git a/textures/moreblocks_rope.png b/textures/moreblocks_rope.png
index 55967a6..19787fe 100644
Binary files a/textures/moreblocks_rope.png and b/textures/moreblocks_rope.png differ
diff --git a/textures/moreblocks_split_stone_tile.png b/textures/moreblocks_split_stone_tile.png
index 579e5ac..d7d69af 100644
Binary files a/textures/moreblocks_split_stone_tile.png and b/textures/moreblocks_split_stone_tile.png differ
diff --git a/textures/moreblocks_split_stone_tile_alt.png b/textures/moreblocks_split_stone_tile_alt.png
new file mode 100644
index 0000000..9d11b4f
Binary files /dev/null and b/textures/moreblocks_split_stone_tile_alt.png differ
diff --git a/textures/moreblocks_split_stone_tile_top.png b/textures/moreblocks_split_stone_tile_top.png
index 76e39df..3c8eb6d 100644
Binary files a/textures/moreblocks_split_stone_tile_top.png and b/textures/moreblocks_split_stone_tile_top.png differ
diff --git a/textures/moreblocks_stone_bricks.png b/textures/moreblocks_stone_bricks.png
deleted file mode 100644
index 52c8ca8..0000000
Binary files a/textures/moreblocks_stone_bricks.png and /dev/null differ
diff --git a/textures/moreblocks_stone_tile.png b/textures/moreblocks_stone_tile.png
index 20b070e..c2083ea 100644
Binary files a/textures/moreblocks_stone_tile.png and b/textures/moreblocks_stone_tile.png differ
diff --git a/textures/moreblocks_super_glow_glass.png b/textures/moreblocks_super_glow_glass.png
index 65e09f4..a9d4c5f 100644
Binary files a/textures/moreblocks_super_glow_glass.png and b/textures/moreblocks_super_glow_glass.png differ
diff --git a/textures/moreblocks_super_glow_glass_detail.png b/textures/moreblocks_super_glow_glass_detail.png
new file mode 100644
index 0000000..e321a5c
Binary files /dev/null and b/textures/moreblocks_super_glow_glass_detail.png differ
diff --git a/textures/moreblocks_super_glow_glass_stairsplus.png b/textures/moreblocks_super_glow_glass_stairsplus.png
index b8a6657..9118c78 100644
Binary files a/textures/moreblocks_super_glow_glass_stairsplus.png and b/textures/moreblocks_super_glow_glass_stairsplus.png differ
diff --git a/textures/moreblocks_sweeper.png b/textures/moreblocks_sweeper.png
index e901ef0..34f1cde 100644
Binary files a/textures/moreblocks_sweeper.png and b/textures/moreblocks_sweeper.png differ
diff --git a/textures/moreblocks_tar.png b/textures/moreblocks_tar.png
new file mode 100644
index 0000000..e1eb427
Binary files /dev/null and b/textures/moreblocks_tar.png differ
diff --git a/textures/moreblocks_trap_glass.png b/textures/moreblocks_trap_glass.png
index e0d1c26..25c3387 100644
Binary files a/textures/moreblocks_trap_glass.png and b/textures/moreblocks_trap_glass.png differ
diff --git a/textures/moreblocks_trap_glow_glass.png b/textures/moreblocks_trap_glow_glass.png
new file mode 100644
index 0000000..1096dd7
Binary files /dev/null and b/textures/moreblocks_trap_glow_glass.png differ
diff --git a/textures/moreblocks_trap_stone.png b/textures/moreblocks_trap_stone.png
index 05a2531..764aa81 100644
Binary files a/textures/moreblocks_trap_stone.png and b/textures/moreblocks_trap_stone.png differ
diff --git a/textures/moreblocks_trap_super_glow_glass.png b/textures/moreblocks_trap_super_glow_glass.png
new file mode 100644
index 0000000..fef974b
Binary files /dev/null and b/textures/moreblocks_trap_super_glow_glass.png differ
diff --git a/textures/moreblocks_tree_stairsplus.png b/textures/moreblocks_tree_stairsplus.png
new file mode 100644
index 0000000..60100c9
Binary files /dev/null and b/textures/moreblocks_tree_stairsplus.png differ
diff --git a/textures/moreblocks_wood.png b/textures/moreblocks_wood.png
deleted file mode 100644
index 66f2b72..0000000
Binary files a/textures/moreblocks_wood.png and /dev/null differ
diff --git a/textures/moreblocks_wood_tile.png b/textures/moreblocks_wood_tile.png
index c05a56f..d0faa3d 100644
Binary files a/textures/moreblocks_wood_tile.png and b/textures/moreblocks_wood_tile.png differ
diff --git a/textures/moreblocks_wood_tile_center.png b/textures/moreblocks_wood_tile_center.png
index 7b8f822..02b0f84 100644
Binary files a/textures/moreblocks_wood_tile_center.png and b/textures/moreblocks_wood_tile_center.png differ
diff --git a/textures/moreblocks_wood_tile_down.png b/textures/moreblocks_wood_tile_down.png
deleted file mode 100644
index aedddfb..0000000
Binary files a/textures/moreblocks_wood_tile_down.png and /dev/null differ
diff --git a/textures/moreblocks_wood_tile_flipped.png b/textures/moreblocks_wood_tile_flipped.png
deleted file mode 100644
index 66eb5a6..0000000
Binary files a/textures/moreblocks_wood_tile_flipped.png and /dev/null differ
diff --git a/textures/moreblocks_wood_tile_full.png b/textures/moreblocks_wood_tile_full.png
index 0c28e92..7ec7f05 100644
Binary files a/textures/moreblocks_wood_tile_full.png and b/textures/moreblocks_wood_tile_full.png differ
diff --git a/textures/moreblocks_wood_tile_left.png b/textures/moreblocks_wood_tile_left.png
deleted file mode 100644
index b84166f..0000000
Binary files a/textures/moreblocks_wood_tile_left.png and /dev/null differ
diff --git a/textures/moreblocks_wood_tile_right.png b/textures/moreblocks_wood_tile_right.png
deleted file mode 100644
index 883f44c..0000000
Binary files a/textures/moreblocks_wood_tile_right.png and /dev/null differ
diff --git a/textures/moreblocks_wood_tile_up.png b/textures/moreblocks_wood_tile_up.png
index 6221910..3f6a2f2 100644
Binary files a/textures/moreblocks_wood_tile_up.png and b/textures/moreblocks_wood_tile_up.png differ
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/minetest-mod-moreblocks.git
More information about the Pkg-games-commits
mailing list