mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 02:00:37 +01:00
Merge branch 'crabman77-global_vars'
This commit is contained in:
commit
69c009aa4a
@ -1,4 +1,4 @@
|
||||
worldedit = worldedit or {}
|
||||
worldedit = {}
|
||||
local minetest = minetest --local copy of global
|
||||
|
||||
local get_pointed = function(pos, nearest, distance)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -68,7 +68,7 @@ local sled = {
|
||||
visual = "mesh",
|
||||
mesh = "sled.x",
|
||||
textures = {"sled.png"},
|
||||
HUD,
|
||||
HUD = nil,
|
||||
|
||||
driver = nil,
|
||||
sliding = false,
|
||||
|
@ -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]
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user