From 03669d816895d5b23109c9683ef9a38abe82b1ba Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Sat, 21 Mar 2015 17:33:52 +0100 Subject: [PATCH] Updated moreblocks mod - Removed copies of license, merge conflicts' garbage - Added warnings about modifications made by us --- .../{LICENSE.md~HEAD => LICENSE.md} | 0 mods/moreblocks/LICENSE.md~Moreblocks' update | 14 ----- mods/moreblocks/crafting.lua | 22 ++++--- mods/moreblocks/redefinitions.lua | 4 +- mods/moreblocks/stairsplus/registrations.lua | 36 +++++------ mods/moreblocks/stairsplus/slabs.lua | 61 +++++-------------- 6 files changed, 51 insertions(+), 86 deletions(-) rename mods/moreblocks/{LICENSE.md~HEAD => LICENSE.md} (100%) delete mode 100644 mods/moreblocks/LICENSE.md~Moreblocks' update diff --git a/mods/moreblocks/LICENSE.md~HEAD b/mods/moreblocks/LICENSE.md similarity index 100% rename from mods/moreblocks/LICENSE.md~HEAD rename to mods/moreblocks/LICENSE.md diff --git a/mods/moreblocks/LICENSE.md~Moreblocks' update b/mods/moreblocks/LICENSE.md~Moreblocks' update deleted file mode 100644 index 45c5ff5a..00000000 --- a/mods/moreblocks/LICENSE.md~Moreblocks' update +++ /dev/null @@ -1,14 +0,0 @@ -zlib license -============ - -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.** - -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: - -1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source distribution. diff --git a/mods/moreblocks/crafting.lua b/mods/moreblocks/crafting.lua index dc859a85..0faa8a37 100644 --- a/mods/moreblocks/crafting.lua +++ b/mods/moreblocks/crafting.lua @@ -26,6 +26,7 @@ minetest.register_craft({ {"default:stick", "default:stick", "default:stick"}, {"default:stick", "default:stick", "default:stick"}, {"default:stick", "default:stick", "default:stick"} + -- MODIFICATION MADE FOR MFF ^ } }) @@ -443,11 +444,12 @@ minetest.register_craft({ recipe = { {"default:cobble"}, {"default:cobble"}, + -- MODIFICATION MADE FOR MFF } }) minetest.register_craft({ - output = "default:cobble 2", + output = "default:cobble 2", -- MODIFICATION MADE FOR MFF recipe = { {"moreblocks:cobble_compressed"}, } @@ -457,11 +459,13 @@ minetest.register_craft({ type = "cooking", output = "moreblocks:tar", recipe = "default:gravel", }) -minetest.register_craft({ - output = "moreblocks:circular_saw", - recipe = { - { "", "default:steel_ingot", "" }, - { "group:wood", "group:wood", "group:wood"}, - { "group:wood", "", "group:wood"}, - } -}) +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", "" }, + { "group:wood", "group:wood", "group:wood"}, + { "group:wood", "", "group:wood"}, + } + }) +end diff --git a/mods/moreblocks/redefinitions.lua b/mods/moreblocks/redefinitions.lua index da1722cd..6987f1b4 100644 --- a/mods/moreblocks/redefinitions.lua +++ b/mods/moreblocks/redefinitions.lua @@ -46,7 +46,9 @@ minetest.register_craft({ additional_wear = -0.15, -- Tool repair buff (15% bonus instead of 2%). }) --- Redefinitions of some default nodes: +-- Redefinitions of some default nodes +-- =================================== + -- Let there be light. This makes some nodes let light pass through: minetest.override_item("default:ladder", { paramtype = "light", diff --git a/mods/moreblocks/stairsplus/registrations.lua b/mods/moreblocks/stairsplus/registrations.lua index 7b38b13b..c6111c44 100644 --- a/mods/moreblocks/stairsplus/registrations.lua +++ b/mods/moreblocks/stairsplus/registrations.lua @@ -35,24 +35,26 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks: for _, name in pairs(default_nodes) do local nodename = "default:" .. name local ndef = minetest.registered_nodes[nodename] - local groups = {} - for k, v in pairs(ndef.groups) - -- Ignore wood and stone groups to not make them usable in crafting: - do if k ~= "wood" and k ~= "stone" then - groups[k] = v + if ndef then + local groups = {} + for k, v in pairs(ndef.groups) + -- Ignore wood and stone groups to not make them usable in crafting: + do if k ~= "wood" and k ~= "stone" then + groups[k] = v + end end + local drop + if type(ndef.drop) == "string" then + drop = ndef.drop:sub(9) + end + stairsplus:register_all("moreblocks", name, nodename, { + description = ndef.description, + drop = drop, + groups = groups, + sounds = ndef.sounds, + tiles = ndef.tiles, + sunlight_propagates = true, + }) end - local drop - if type(ndef.drop) == "string" then - drop = ndef.drop:sub(9) - end - stairsplus:register_all("moreblocks", name, nodename, { - description = ndef.description, - drop = drop, - groups = groups, - sounds = ndef.sounds, - tiles = ndef.tiles, - sunlight_propagates = true, - }) end diff --git a/mods/moreblocks/stairsplus/slabs.lua b/mods/moreblocks/stairsplus/slabs.lua index 68ba5200..9777ac2a 100644 --- a/mods/moreblocks/stairsplus/slabs.lua +++ b/mods/moreblocks/stairsplus/slabs.lua @@ -22,51 +22,22 @@ end function stairsplus:register_slab(modname, subname, recipeitem, fields) local defs = { - [""] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0, 0.5}, - }, - }, - ["_quarter"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.25, 0.5}, - }, - }, - ["_three_quarter"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.25, 0.5}, - }, - }, - ["_1"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.4375, 0.5}, - }, - }, - ["_2"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, -0.375, 0.5}, - }, - }, - ["_14"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.375, 0.5}, - }, - }, - ["_15"] = { - node_box = { - type = "fixed", - fixed = {-0.5, -0.5, -0.5, 0.5, 0.4375, 0.5}, - }, - }, + [""] = 8, + ["_quarter"] = 4, + ["_three_quarter"] = 12, + ["_1"] = 1, + ["_2"] = 2, + ["_14"] = 14, + ["_15"] = 15, } - local desc = S("%s Slab"):format(fields.description) - for alternate, def in pairs(defs) do + 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}, + } + } def.drawtype = "nodebox" def.paramtype = "light" def.paramtype2 = "facedir" @@ -74,7 +45,7 @@ function stairsplus:register_slab(modname, subname, recipeitem, fields) for k, v in pairs(fields) do def[k] = v end - def.description = desc + def.description = ("%s (%d/16)"):format(desc_base, num) if fields.drop then def.drop = modname.. ":slab_" .. fields.drop .. alternate end