Add licensing headers to all files, fix intllib global variable warnings.

This commit is contained in:
Calinou 2015-01-11 22:21:33 +01:00
parent 41bb46fb36
commit b5d62de9d8
18 changed files with 153 additions and 44 deletions

View File

@ -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("sweeper", "moreblocks:sweeper")
minetest.register_alias("circular_saw", "moreblocks:circular_saw") minetest.register_alias("circular_saw", "moreblocks:circular_saw")
minetest.register_alias("jungle_stick", "moreblocks:jungle_stick") 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:oerkkiblock", "default:mossycobble")
minetest.register_alias("moreblocks:screwdriver", "screwdriver:screwdriver") 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:stone_bricks", "default:stonebrick")
minetest.register_alias("moreblocks:stonebrick", "default:stonebrick") minetest.register_alias("moreblocks:stonebrick", "default:stonebrick")
minetest.register_alias("moreblocks:junglewood", "default:junglewood") minetest.register_alias("moreblocks:junglewood", "default:junglewood")
minetest.register_alias("moreblocks:jungle_wood", "default:junglewood") minetest.register_alias("moreblocks:jungle_wood", "default:junglewood")
for _, t in pairs(circular_saw.names) do for _, t in pairs(circular_saw.names) do
minetest.register_alias("moreblocks:" ..t[1].. "_jungle_wood" ..t[2], minetest.register_alias("moreblocks:" .. t[1] .. "_jungle_wood" .. t[2],
"moreblocks:" ..t[1].. "_junglewood" ..t[2]) "moreblocks:" .. t[1] .. "_junglewood" .. t[2])
end end
minetest.register_alias("moreblocks:horizontaltree", "moreblocks:horizontal_tree") minetest.register_alias("moreblocks:horizontaltree", "moreblocks:horizontal_tree")
minetest.register_alias("moreblocks:horizontaljungletree", "moreblocks:horizontal_jungle_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:splitstonesquare","moreblocks:split_stone_tile")
minetest.register_alias("moreblocks:allfacestree","moreblocks:all_faces_tree") 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} local horizontal_tree_convert_facedir = {7, 12, 9, 18}
minetest.register_abm({ minetest.register_abm({

View File

@ -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 S = moreblocks.intllib
circular_saw = {} circular_saw = {}

View File

@ -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 = {} moreblocks.config = {}
local function getbool_default(setting, default) local function getbool_default(setting, default)

View File

@ -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({ minetest.register_craft({
output = "default:stick", output = "default:stick",
@ -448,7 +455,6 @@ minetest.register_craft({
} }
}) })
minetest.register_craft({ minetest.register_craft({
type = "cooking", output = "moreblocks:tar", recipe = "default:gravel", type = "cooking", output = "moreblocks:tar", recipe = "default:gravel",
}) })

View File

@ -4,7 +4,7 @@
By Calinou, with the help of ShadowNinja and VanessaE. By Calinou, with the help of ShadowNinja and VanessaE.
Copyright (c) 2011-2015 Calinou and contributors. 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.
====================================================================== ======================================================================
--]] --]]

View File

@ -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 S = moreblocks.intllib
local sound_wood = default.node_sound_wood_defaults() local sound_wood = default.node_sound_wood_defaults()

View File

@ -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 local S = moreblocks.gettext

View File

@ -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: -- Redefinitions of some default crafting recipes:
minetest.register_craft({ minetest.register_craft({

View File

@ -1,6 +1,5 @@
API documentation for Stairs+ API documentation for Stairs+
================================ =============================
- - - - - - - - - - - - - - - -
* `stairsplus:register_all(modname, subname, recipeitem, fields)` * `stairsplus:register_all(modname, subname, recipeitem, fields)`
Registers a stair, slab, panel, microblock, and any other types of Registers a stair, slab, panel, microblock, and any other types of

View File

@ -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) local function register_stairsplus_alias(modname, origname, newname)
minetest.register_alias(modname.. ":slab_" ..origname, "moreblocks:slab_" ..newname) minetest.register_alias(modname.. ":slab_" ..origname, "moreblocks:slab_" ..newname)

View File

@ -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 -- Function to convert all stairs/slabs/etc nodes from
-- inverted, wall, etc to regular + 6d facedir -- inverted, wall, etc to regular + 6d facedir

View File

@ -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 <modname>:{stair,slab,panel,micro}_<subname> -- Nodes will be called <modname>:{stair,slab,panel,micro}_<subname>
local modpath = minetest.get_modpath("moreblocks").. "/stairsplus" local modpath = minetest.get_modpath("moreblocks").. "/stairsplus"

View File

@ -1,9 +1,13 @@
local S -- Load translation library if intllib is installed: --[[
if intllib then ======================================================================
S = intllib.Getter(minetest.get_current_modname()) This file is part of More Blocks.
else
S = function(s) return s end Copyright (c) 2011-2015 Calinou and contributors.
end Licensed under the zlib license. See LICENSE.md for more information.
======================================================================
--]]
local S = moreblocks.intllib
-- Node will be called <modname>:micro_<subname> -- Node will be called <modname>:micro_<subname>

View File

@ -1,9 +1,13 @@
local S -- Load translation library if intllib is installed: --[[
if intllib then ======================================================================
S = intllib.Getter(minetest.get_current_modname()) This file is part of More Blocks.
else
S = function(s) return s end Copyright (c) 2011-2015 Calinou and contributors.
end Licensed under the zlib license. See LICENSE.md for more information.
======================================================================
--]]
local S = moreblocks.intllib
-- Node will be called <modname>:panel_<subname> -- Node will be called <modname>:panel_<subname>

View File

@ -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: local default_nodes = { -- Default stairs/slabs/panels/microblocks:
"stone", "stone",
"cobble", "cobble",

View File

@ -1,9 +1,13 @@
local S -- Load translation library if intllib is installed: --[[
if intllib then ======================================================================
S = intllib.Getter(minetest.get_current_modname()) This file is part of More Blocks.
else
S = function(s) return s end Copyright (c) 2011-2015 Calinou and contributors.
end Licensed under the zlib license. See LICENSE.md for more information.
======================================================================
--]]
local S = moreblocks.intllib
-- Node will be called <modname>:slab_<subname> -- Node will be called <modname>:slab_<subname>

View File

@ -1,9 +1,13 @@
local S -- Load translation library if intllib is installed: --[[
if intllib then ======================================================================
S = intllib.Getter(minetest.get_current_modname()) This file is part of More Blocks.
else
S = function(s) return s end Copyright (c) 2011-2015 Calinou and contributors.
end Licensed under the zlib license. See LICENSE.md for more information.
======================================================================
--]]
local S = moreblocks.intllib
local box_slope = { local box_slope = {
type = "fixed", type = "fixed",

View File

@ -1,9 +1,13 @@
local S -- Load translation library if intllib is installed: --[[
if intllib then ======================================================================
S = intllib.Getter(minetest.get_current_modname()) This file is part of More Blocks.
else
S = function(s) return s end Copyright (c) 2011-2015 Calinou and contributors.
end Licensed under the zlib license. See LICENSE.md for more information.
======================================================================
--]]
local S = moreblocks.intllib
-- Node will be called <modname>:stair_<subname> -- Node will be called <modname>:stair_<subname>