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