mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-11-18 08:10:38 +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 minetest = minetest --local copy of global
|
||||||
|
|
||||||
local get_pointed = function(pos, nearest, distance)
|
local get_pointed = function(pos, nearest, distance)
|
||||||
@ -100,4 +100,4 @@ worldedit.raytrace = function(pos, dir, callback)
|
|||||||
intersectz = intersectz + componentz
|
intersectz = intersectz + componentz
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
-------------------------------------------------------
|
-------------------------------------------------------
|
||||||
|
|
||||||
local S
|
local S
|
||||||
if (intllib) then
|
if (minetest.get_modpath("intllib")) then
|
||||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
S = intllib.Getter(minetest.get_current_modname())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
|
@ -695,4 +695,4 @@ if override_original == true then
|
|||||||
minetest.punch_node(pos)
|
minetest.punch_node(pos)
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||||
S = 0
|
S = 0
|
||||||
if (intllib) then
|
if (minetest.get_modpath("intllib")) then
|
||||||
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
S = intllib.Getter(minetest.get_current_modname())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
@ -41,7 +41,7 @@ function food.support(group, item)
|
|||||||
if idx <= 1 then
|
if idx <= 1 then
|
||||||
error("[Food Error] food.support - error in item name ('" .. item .. "')")
|
error("[Food Error] food.support - error in item name ('" .. item .. "')")
|
||||||
end
|
end
|
||||||
mod = string.sub(item, 1, idx - 1)
|
local mod = string.sub(item, 1, idx - 1)
|
||||||
|
|
||||||
if not minetest.get_modpath(mod) then
|
if not minetest.get_modpath(mod) then
|
||||||
if food.debug then
|
if food.debug then
|
||||||
@ -60,7 +60,7 @@ function food.support(group, item)
|
|||||||
food.disable(group)
|
food.disable(group)
|
||||||
|
|
||||||
-- Add group
|
-- Add group
|
||||||
g = {}
|
local g = {}
|
||||||
if data.groups then
|
if data.groups then
|
||||||
for k, v in pairs(data.groups) do
|
for k, v in pairs(data.groups) do
|
||||||
g[k] = v
|
g[k] = v
|
||||||
|
@ -8,7 +8,8 @@ moreblocks = {}
|
|||||||
-- Load translation library if intllib is installed
|
-- Load translation library if intllib is installed
|
||||||
|
|
||||||
local S -- 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())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local S -- 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())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local S -- 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())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local S -- 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())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
local S -- 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())
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
|
@ -68,7 +68,7 @@ local sled = {
|
|||||||
visual = "mesh",
|
visual = "mesh",
|
||||||
mesh = "sled.x",
|
mesh = "sled.x",
|
||||||
textures = {"sled.png"},
|
textures = {"sled.png"},
|
||||||
HUD,
|
HUD = nil,
|
||||||
|
|
||||||
driver = nil,
|
driver = nil,
|
||||||
sliding = false,
|
sliding = false,
|
||||||
|
@ -264,7 +264,7 @@ local snow_nodes = {
|
|||||||
"snow_brick",
|
"snow_brick",
|
||||||
"snow_cobble",
|
"snow_cobble",
|
||||||
}
|
}
|
||||||
|
local drop = nil
|
||||||
for _, name in pairs(snow_nodes) do
|
for _, name in pairs(snow_nodes) do
|
||||||
local nodename = "snow:"..name
|
local nodename = "snow:"..name
|
||||||
local ndef = minetest.registered_nodes[nodename]
|
local ndef = minetest.registered_nodes[nodename]
|
||||||
|
@ -48,7 +48,7 @@ local function loadConfig(path)
|
|||||||
io.close(file)
|
io.close(file)
|
||||||
for line in io.lines(path) do
|
for line in io.lines(path) do
|
||||||
if line:sub(1,1) ~= "#" then
|
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 i and v then
|
||||||
if v == "true" then v = true end
|
if v == "true" then v = true end
|
||||||
if v == "false" then v = false end
|
if v == "false" then v = false end
|
||||||
|
@ -11,7 +11,8 @@ local players = {}
|
|||||||
local staminaHud = {}
|
local staminaHud = {}
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
playerName = player:get_player_name()
|
local playerName = player:get_player_name()
|
||||||
|
print("playename: " ..playerName)
|
||||||
players[playerName] = {
|
players[playerName] = {
|
||||||
sprinting = false,
|
sprinting = false,
|
||||||
timeOut = 0,
|
timeOut = 0,
|
||||||
@ -30,7 +31,7 @@ minetest.register_on_joinplayer(function(player)
|
|||||||
}
|
}
|
||||||
end)
|
end)
|
||||||
minetest.register_on_leaveplayer(function(player)
|
minetest.register_on_leaveplayer(function(player)
|
||||||
playerName = player:get_player_name()
|
local playerName = player:get_player_name()
|
||||||
players[playerName] = nil
|
players[playerName] = nil
|
||||||
end)
|
end)
|
||||||
minetest.register_globalstep(function(dtime)
|
minetest.register_globalstep(function(dtime)
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local S
|
local S
|
||||||
if intllib then
|
if (minetest.get_modpath("intllib")) then
|
||||||
S = intllib.Getter()
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
end
|
end
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
-- License: GPLv3
|
-- License: GPLv3
|
||||||
|
|
||||||
local S
|
local S
|
||||||
if intllib then
|
if (minetest.get_modpath("intllib")) then
|
||||||
S = intllib.Getter()
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local S
|
local S
|
||||||
if intllib then
|
if (minetest.get_modpath("intllib")) then
|
||||||
S = intllib.Getter()
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
end
|
end
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
local S
|
local S
|
||||||
if intllib then
|
if (minetest.get_modpath("intllib")) then
|
||||||
S = intllib.Getter()
|
dofile(minetest.get_modpath("intllib").."/intllib.lua")
|
||||||
|
S = intllib.Getter(minetest.get_current_modname())
|
||||||
else
|
else
|
||||||
S = function(s) return s end
|
S = function(s) return s end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user