diff --git a/mods/WorldEdit/worldedit_infinity/init.lua b/mods/WorldEdit/worldedit_infinity/init.lua index fa1c5f6d..6001e3e9 100755 --- a/mods/WorldEdit/worldedit_infinity/init.lua +++ b/mods/WorldEdit/worldedit_infinity/init.lua @@ -1,4 +1,4 @@ -worldedit = worldedit or {} +worldedit = {} local minetest = minetest --local copy of global local get_pointed = function(pos, nearest, distance) @@ -100,4 +100,4 @@ worldedit.raytrace = function(pos, dir, callback) intersectz = intersectz + componentz end end -end \ No newline at end of file +end diff --git a/mods/awards/init.lua b/mods/awards/init.lua index 7b0a5bd8..237091a6 100755 --- a/mods/awards/init.lua +++ b/mods/awards/init.lua @@ -5,7 +5,7 @@ ------------------------------------------------------- local S -if (intllib) then +if (minetest.get_modpath("intllib")) then dofile(minetest.get_modpath("intllib").."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else diff --git a/mods/fences/init.lua b/mods/fences/init.lua index af0cd283..82c8da9e 100755 --- a/mods/fences/init.lua +++ b/mods/fences/init.lua @@ -695,4 +695,4 @@ if override_original == true then minetest.punch_node(pos) end }) -end \ No newline at end of file +end diff --git a/mods/food/api.lua b/mods/food/api.lua index 19d019f6..0ef89dc3 100755 --- a/mods/food/api.lua +++ b/mods/food/api.lua @@ -8,7 +8,7 @@ -- Boilerplate to support localized strings if intllib mod is installed. S = 0 -if (intllib) then +if (minetest.get_modpath("intllib")) then dofile(minetest.get_modpath("intllib").."/intllib.lua") S = intllib.Getter(minetest.get_current_modname()) else @@ -41,7 +41,7 @@ function food.support(group, item) if idx <= 1 then error("[Food Error] food.support - error in item name ('" .. item .. "')") end - mod = string.sub(item, 1, idx - 1) + local mod = string.sub(item, 1, idx - 1) if not minetest.get_modpath(mod) then if food.debug then @@ -60,7 +60,7 @@ function food.support(group, item) food.disable(group) -- Add group - g = {} + local g = {} if data.groups then for k, v in pairs(data.groups) do g[k] = v diff --git a/mods/moreblocks/init.lua b/mods/moreblocks/init.lua index 81802518..a86a38ea 100755 --- a/mods/moreblocks/init.lua +++ b/mods/moreblocks/init.lua @@ -8,7 +8,8 @@ moreblocks = {} -- Load translation library if intllib is installed local S -- Load translation library if intllib is installed: -if intllib then +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 diff --git a/mods/moreblocks/stairsplus/microblocks.lua b/mods/moreblocks/stairsplus/microblocks.lua index aac69ee7..f88ed12e 100755 --- a/mods/moreblocks/stairsplus/microblocks.lua +++ b/mods/moreblocks/stairsplus/microblocks.lua @@ -1,5 +1,6 @@ local S -- Load translation library if intllib is installed: -if intllib then +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 diff --git a/mods/moreblocks/stairsplus/panels.lua b/mods/moreblocks/stairsplus/panels.lua index f93f1cf3..73b283ed 100755 --- a/mods/moreblocks/stairsplus/panels.lua +++ b/mods/moreblocks/stairsplus/panels.lua @@ -1,5 +1,6 @@ local S -- Load translation library if intllib is installed: -if intllib then +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 diff --git a/mods/moreblocks/stairsplus/slabs.lua b/mods/moreblocks/stairsplus/slabs.lua index bbae96b3..9c31745d 100755 --- a/mods/moreblocks/stairsplus/slabs.lua +++ b/mods/moreblocks/stairsplus/slabs.lua @@ -1,5 +1,6 @@ local S -- Load translation library if intllib is installed: -if intllib then +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 diff --git a/mods/moreblocks/stairsplus/stairs.lua b/mods/moreblocks/stairsplus/stairs.lua index b921d081..a4f54e39 100755 --- a/mods/moreblocks/stairsplus/stairs.lua +++ b/mods/moreblocks/stairsplus/stairs.lua @@ -1,5 +1,6 @@ local S -- Load translation library if intllib is installed: -if intllib then +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 diff --git a/mods/snow/src/sled.lua b/mods/snow/src/sled.lua index 69ac1748..3d6fbb0a 100755 --- a/mods/snow/src/sled.lua +++ b/mods/snow/src/sled.lua @@ -68,7 +68,7 @@ local sled = { visual = "mesh", mesh = "sled.x", textures = {"sled.png"}, - HUD, + HUD = nil, driver = nil, sliding = false, diff --git a/mods/snow/src/stairsplus.lua b/mods/snow/src/stairsplus.lua index 011fd851..c143c31d 100755 --- a/mods/snow/src/stairsplus.lua +++ b/mods/snow/src/stairsplus.lua @@ -264,7 +264,7 @@ local snow_nodes = { "snow_brick", "snow_cobble", } - +local drop = nil for _, name in pairs(snow_nodes) do local nodename = "snow:"..name local ndef = minetest.registered_nodes[nodename] diff --git a/mods/snow/src/util.lua b/mods/snow/src/util.lua index 20fdd2dd..1ddf4f95 100755 --- a/mods/snow/src/util.lua +++ b/mods/snow/src/util.lua @@ -48,7 +48,7 @@ local function loadConfig(path) io.close(file) for line in io.lines(path) do if line:sub(1,1) ~= "#" then - i, v = line:match("^(%S*) = (%S*)") + local i, v = line:match("^(%S*) = (%S*)") if i and v then if v == "true" then v = true end if v == "false" then v = false end diff --git a/mods/sprint/esprint.lua b/mods/sprint/esprint.lua index 4f50025c..4ae36218 100755 --- a/mods/sprint/esprint.lua +++ b/mods/sprint/esprint.lua @@ -11,7 +11,8 @@ local players = {} local staminaHud = {} minetest.register_on_joinplayer(function(player) - playerName = player:get_player_name() + local playerName = player:get_player_name() + print("playename: " ..playerName) players[playerName] = { sprinting = false, timeOut = 0, @@ -30,7 +31,7 @@ minetest.register_on_joinplayer(function(player) } end) minetest.register_on_leaveplayer(function(player) - playerName = player:get_player_name() + local playerName = player:get_player_name() players[playerName] = nil end) minetest.register_globalstep(function(dtime) diff --git a/mods/unified_inventory/api.lua b/mods/unified_inventory/api.lua index 1ab19fc6..7bf12672 100755 --- a/mods/unified_inventory/api.lua +++ b/mods/unified_inventory/api.lua @@ -1,6 +1,7 @@ local S -if intllib then - S = intllib.Getter() +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 diff --git a/mods/unified_inventory/bags.lua b/mods/unified_inventory/bags.lua index 10196f59..057eeb47 100755 --- a/mods/unified_inventory/bags.lua +++ b/mods/unified_inventory/bags.lua @@ -4,8 +4,9 @@ -- License: GPLv3 local S -if intllib then - S = intllib.Getter() +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 diff --git a/mods/unified_inventory/internal.lua b/mods/unified_inventory/internal.lua index 281653e4..ae6aa32f 100755 --- a/mods/unified_inventory/internal.lua +++ b/mods/unified_inventory/internal.lua @@ -1,6 +1,7 @@ local S -if intllib then - S = intllib.Getter() +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 diff --git a/mods/unified_inventory/register.lua b/mods/unified_inventory/register.lua index bc379ee1..1b7e0677 100755 --- a/mods/unified_inventory/register.lua +++ b/mods/unified_inventory/register.lua @@ -1,6 +1,7 @@ local S -if intllib then - S = intllib.Getter() +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