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:
Ombridride 2014-11-02 20:26:31 +01:00
parent 5b1be3e6ee
commit 6a795320a7
3 changed files with 7 additions and 6 deletions

5
mods/areas/api.lua Executable file → Normal file
View File

@ -1,8 +1,8 @@
--
-- Returns a list of areas that include the provided position
function areas:getAreasAtPos(pos)
local a = {}
local px, py, pz = pos.x, pos.y, pos.z
local px, py, pz = pos.x, pos.y, pos.z
for id, area in pairs(self.areas) do
local ap1, ap2 = area.pos1, area.pos2
if px >= ap1.x and px <= ap2.x and
@ -20,6 +20,7 @@ function areas:canInteract(pos, name)
return true
end
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
if area.owner == name or area.open then
return true

View File

@ -17,10 +17,10 @@ minetest.register_globalstep(function(dtime)
local chest = minetest.get_node(chest_position)
if chest.name ~= "default:chest" 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
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
elseif chest.name == "air" then
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 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
end)

2
mods/u_skins/u_skins/players.lua Executable file → Normal file
View File

@ -13,7 +13,7 @@ u_skins.load_players()
local ttime = 0
minetest.register_globalstep(function(t)
ttime = ttime + t
if ttime < 120 then --every 6min'
if ttime < 120 then --every 2min'
return
end
ttime = 0