From 6a795320a70376f0c4ce363e23a3cae61180ccf6 Mon Sep 17 00:00:00 2001 From: Ombridride Date: Sun, 2 Nov 2014 20:26:31 +0100 Subject: [PATCH] Many Bugfixs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- mods/areas/api.lua | 5 +++-- mods/beginners_chest/init.lua | 6 +++--- mods/u_skins/u_skins/players.lua | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) mode change 100755 => 100644 mods/areas/api.lua mode change 100755 => 100644 mods/u_skins/u_skins/players.lua diff --git a/mods/areas/api.lua b/mods/areas/api.lua old mode 100755 new mode 100644 index 7b10a878..0afd72ed --- a/mods/areas/api.lua +++ b/mods/areas/api.lua @@ -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 diff --git a/mods/beginners_chest/init.lua b/mods/beginners_chest/init.lua index f317c97b..ae0e8e93 100644 --- a/mods/beginners_chest/init.lua +++ b/mods/beginners_chest/init.lua @@ -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) diff --git a/mods/u_skins/u_skins/players.lua b/mods/u_skins/u_skins/players.lua old mode 100755 new mode 100644 index a2303002..fae667a6 --- a/mods/u_skins/u_skins/players.lua +++ b/mods/u_skins/u_skins/players.lua @@ -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