From b5d62de9d812ac531011f50ee7d6081c5c3d0b6a Mon Sep 17 00:00:00 2001 From: Calinou Date: Sun, 11 Jan 2015 22:21:33 +0100 Subject: [PATCH] Add licensing headers to all files, fix intllib global variable warnings. --- aliases.lua | 23 ++++++++++++++--------- circular_saw.lua | 9 +++++++++ config.lua | 9 +++++++++ crafting.lua | 10 ++++++++-- init.lua | 2 +- nodes.lua | 9 +++++++++ ownership.lua | 8 ++++++++ redefinitions.lua | 9 +++++++++ stairsplus/API.md | 3 +-- stairsplus/aliases.lua | 8 ++++++++ stairsplus/conversion.lua | 9 +++++++++ stairsplus/init.lua | 9 +++++++++ stairsplus/microblocks.lua | 16 ++++++++++------ stairsplus/panels.lua | 16 ++++++++++------ stairsplus/registrations.lua | 9 +++++++++ stairsplus/slabs.lua | 16 ++++++++++------ stairsplus/slopes.lua | 16 ++++++++++------ stairsplus/stairs.lua | 16 ++++++++++------ 18 files changed, 153 insertions(+), 44 deletions(-) diff --git a/aliases.lua b/aliases.lua index df820c3..2c0939a 100644 --- a/aliases.lua +++ b/aliases.lua @@ -1,24 +1,30 @@ --- More Blocks aliases +--[[ +====================================================================== +This file is part of More Blocks. +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("circular_saw", "moreblocks:circular_saw") minetest.register_alias("jungle_stick", "moreblocks:jungle_stick") --- 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") for _, t in pairs(circular_saw.names) do - minetest.register_alias("moreblocks:" ..t[1].. "_jungle_wood" ..t[2], - "moreblocks:" ..t[1].. "_junglewood" ..t[2]) + 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") @@ -51,8 +57,7 @@ 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). - +-- ABM for horizontal trees (fix facedir): local horizontal_tree_convert_facedir = {7, 12, 9, 18} minetest.register_abm({ diff --git a/circular_saw.lua b/circular_saw.lua index 361eee5..ab278f3 100644 --- a/circular_saw.lua +++ b/circular_saw.lua @@ -1,3 +1,12 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +Copyright (c) 2011-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +====================================================================== +--]] + local S = moreblocks.intllib circular_saw = {} diff --git a/config.lua b/config.lua index e5db086..3154298 100644 --- a/config.lua +++ b/config.lua @@ -1,3 +1,12 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +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) diff --git a/crafting.lua b/crafting.lua index d8a006d..3d3964b 100644 --- a/crafting.lua +++ b/crafting.lua @@ -1,4 +1,11 @@ --- Crafting +--[[ +====================================================================== +This file is part of More Blocks. + +Copyright (c) 2011-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +====================================================================== +--]] minetest.register_craft({ output = "default:stick", @@ -448,7 +455,6 @@ minetest.register_craft({ } }) - minetest.register_craft({ type = "cooking", output = "moreblocks:tar", recipe = "default:gravel", }) diff --git a/init.lua b/init.lua index d25e14c..f30bc60 100644 --- a/init.lua +++ b/init.lua @@ -4,7 +4,7 @@ By Calinou, with the help of ShadowNinja and VanessaE. Copyright (c) 2011-2015 Calinou and contributors. -Licensed under the zlib license. See LICENSE.txt for more information. +Licensed under the zlib license. See LICENSE.md for more information. ====================================================================== --]] diff --git a/nodes.lua b/nodes.lua index ad411be..e93aa13 100644 --- a/nodes.lua +++ b/nodes.lua @@ -1,3 +1,12 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +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() diff --git a/ownership.lua b/ownership.lua index 9cd4cb3..7228fc8 100644 --- a/ownership.lua +++ b/ownership.lua @@ -1,3 +1,11 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +Copyright (c) 2011-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +====================================================================== +--]] local S = moreblocks.gettext diff --git a/redefinitions.lua b/redefinitions.lua index d97f7d1..5efd81d 100644 --- a/redefinitions.lua +++ b/redefinitions.lua @@ -1,3 +1,12 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +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({ diff --git a/stairsplus/API.md b/stairsplus/API.md index a98ec81..2db0f2b 100644 --- a/stairsplus/API.md +++ b/stairsplus/API.md @@ -1,6 +1,5 @@ API documentation for Stairs+ -================================ -- - - - - - - - - - - - - - - - +============================= * `stairsplus:register_all(modname, subname, recipeitem, fields)` Registers a stair, slab, panel, microblock, and any other types of diff --git a/stairsplus/aliases.lua b/stairsplus/aliases.lua index 9ad0e76..18561b1 100644 --- a/stairsplus/aliases.lua +++ b/stairsplus/aliases.lua @@ -1,3 +1,11 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +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) diff --git a/stairsplus/conversion.lua b/stairsplus/conversion.lua index fda30c7..30c31ac 100644 --- a/stairsplus/conversion.lua +++ b/stairsplus/conversion.lua @@ -1,3 +1,12 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +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 diff --git a/stairsplus/init.lua b/stairsplus/init.lua index 9717039..6ef5391 100644 --- a/stairsplus/init.lua +++ b/stairsplus/init.lua @@ -1,3 +1,12 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +Copyright (c) 2011-2015 Calinou and contributors. +Licensed under the zlib license. See LICENSE.md for more information. +====================================================================== +--]] + -- Nodes will be called :{stair,slab,panel,micro}_ local modpath = minetest.get_modpath("moreblocks").. "/stairsplus" diff --git a/stairsplus/microblocks.lua b/stairsplus/microblocks.lua index aac69ee..ccffa53 100644 --- a/stairsplus/microblocks.lua +++ b/stairsplus/microblocks.lua @@ -1,9 +1,13 @@ -local S -- Load translation library if intllib is installed: -if intllib then - S = intllib.Getter(minetest.get_current_modname()) -else - S = function(s) return s end -end +--[[ +====================================================================== +This file is part of More Blocks. + +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 :micro_ diff --git a/stairsplus/panels.lua b/stairsplus/panels.lua index f93f1cf..409197a 100644 --- a/stairsplus/panels.lua +++ b/stairsplus/panels.lua @@ -1,9 +1,13 @@ -local S -- Load translation library if intllib is installed: -if intllib then - S = intllib.Getter(minetest.get_current_modname()) -else - S = function(s) return s end -end +--[[ +====================================================================== +This file is part of More Blocks. + +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 :panel_ diff --git a/stairsplus/registrations.lua b/stairsplus/registrations.lua index aa77c72..4db376d 100644 --- a/stairsplus/registrations.lua +++ b/stairsplus/registrations.lua @@ -1,3 +1,12 @@ +--[[ +====================================================================== +This file is part of More Blocks. + +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", diff --git a/stairsplus/slabs.lua b/stairsplus/slabs.lua index 034df52..f2618ac 100644 --- a/stairsplus/slabs.lua +++ b/stairsplus/slabs.lua @@ -1,9 +1,13 @@ -local S -- Load translation library if intllib is installed: -if intllib then - S = intllib.Getter(minetest.get_current_modname()) -else - S = function(s) return s end -end +--[[ +====================================================================== +This file is part of More Blocks. + +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 :slab_ diff --git a/stairsplus/slopes.lua b/stairsplus/slopes.lua index 4ba7a2d..e973914 100644 --- a/stairsplus/slopes.lua +++ b/stairsplus/slopes.lua @@ -1,9 +1,13 @@ -local S -- Load translation library if intllib is installed: -if intllib then - S = intllib.Getter(minetest.get_current_modname()) -else - S = function(s) return s end -end +--[[ +====================================================================== +This file is part of More Blocks. + +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", diff --git a/stairsplus/stairs.lua b/stairsplus/stairs.lua index 1690d85..d3337ea 100644 --- a/stairsplus/stairs.lua +++ b/stairsplus/stairs.lua @@ -1,9 +1,13 @@ -local S -- Load translation library if intllib is installed: -if intllib then - S = intllib.Getter(minetest.get_current_modname()) -else - S = function(s) return s end -end +--[[ +====================================================================== +This file is part of More Blocks. + +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 :stair_