mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2025-03-28 15:20:47 +01:00
Many Bugfixs
- Crash server avec flower_plus et areas - Beginners_chest ne fera plus des debug.txt de 100Mo par jours à cause de ces « print » si la zone n’est pas chargé - U_skins commentaire changé en 2min, correspondant au nouveau temps d’actualisation des skins
This commit is contained in:
parent
5b1be3e6ee
commit
6a795320a7
3
mods/areas/api.lua
Executable file → Normal file
3
mods/areas/api.lua
Executable file → Normal file
@ -1,4 +1,4 @@
|
|||||||
|
--
|
||||||
-- Returns a list of areas that include the provided position
|
-- Returns a list of areas that include the provided position
|
||||||
function areas:getAreasAtPos(pos)
|
function areas:getAreasAtPos(pos)
|
||||||
local a = {}
|
local a = {}
|
||||||
@ -20,6 +20,7 @@ function areas:canInteract(pos, name)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
local owned = false
|
local owned = false
|
||||||
|
if pos == nil then return not owned end -- pour éviter crash avec nénuphar
|
||||||
for _, area in pairs(self:getAreasAtPos(pos)) do
|
for _, area in pairs(self:getAreasAtPos(pos)) do
|
||||||
if area.owner == name or area.open then
|
if area.owner == name or area.open then
|
||||||
return true
|
return true
|
||||||
|
@ -17,10 +17,10 @@ minetest.register_globalstep(function(dtime)
|
|||||||
local chest = minetest.get_node(chest_position)
|
local chest = minetest.get_node(chest_position)
|
||||||
if chest.name ~= "default:chest" then
|
if chest.name ~= "default:chest" then
|
||||||
if chest.name == "ignore" then
|
if chest.name == "ignore" then
|
||||||
print("[b_chest] Unable to reload chest : area not loaded")
|
-- print("[b_chest] Unable to reload chest : area not loaded") -- c'est cool mais ça fait une boucle et un debug.txt de 40Mo
|
||||||
return
|
return
|
||||||
elseif chest.name ~= "air" then
|
elseif chest.name ~= "air" then
|
||||||
print("[b_chest] Unable to place chest : position still used")
|
-- print("[b_chest] Unable to place chest : position still used") -- c'est cool mais ça fait une boucle et un debug.txt de 40Mo
|
||||||
return
|
return
|
||||||
elseif chest.name == "air" then
|
elseif chest.name == "air" then
|
||||||
minetest.add_node(chest_position,{name = "default:chest"})
|
minetest.add_node(chest_position,{name = "default:chest"})
|
||||||
@ -30,6 +30,6 @@ minetest.register_globalstep(function(dtime)
|
|||||||
|
|
||||||
local meta = minetest.get_meta(chest_position)
|
local meta = minetest.get_meta(chest_position)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
inv:set_list("main",{[1] = "3d_armor:boots_steel", [2] = "default:pick_stone", [3] = "default:pick_steel", [32] = ""})
|
inv:set_list("main",{[1] = "3d_armor:boots_steel", [2] = "default:pick_stone", [3] = "default:sword_stone", [32] = ""})
|
||||||
interval_timer = 0
|
interval_timer = 0
|
||||||
end)
|
end)
|
||||||
|
2
mods/u_skins/u_skins/players.lua
Executable file → Normal file
2
mods/u_skins/u_skins/players.lua
Executable file → Normal file
@ -13,7 +13,7 @@ u_skins.load_players()
|
|||||||
local ttime = 0
|
local ttime = 0
|
||||||
minetest.register_globalstep(function(t)
|
minetest.register_globalstep(function(t)
|
||||||
ttime = ttime + t
|
ttime = ttime + t
|
||||||
if ttime < 120 then --every 6min'
|
if ttime < 120 then --every 2min'
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
ttime = 0
|
ttime = 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user