From 3e2e2df3ed94188b33eab0b1b71c5643e02ca622 Mon Sep 17 00:00:00 2001 From: Maksim Date: Sun, 17 Apr 2022 12:44:11 +0200 Subject: [PATCH] Minor changes --- .luacheckrc | 1 - chatcommands.lua | 1 - init.lua | 10 +--------- internal.lua | 1 - 4 files changed, 1 insertion(+), 12 deletions(-) diff --git a/.luacheckrc b/.luacheckrc index 9d1b83e..2f735d3 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -9,7 +9,6 @@ read_globals = { "PseudoRandom", "ItemStack", "AreaStore", "default", - "intllib", "hud", "mesecon", table = { fields = { "copy", "getn", "indexof" } } diff --git a/chatcommands.lua b/chatcommands.lua index 8e6f97b..2dddb7d 100644 --- a/chatcommands.lua +++ b/chatcommands.lua @@ -432,7 +432,6 @@ minetest.register_chatcommand("areas_cleanup", { total = total + 1 end areas:save() - areas:populateStore() return true, S("Total areas: @1, Removed: @2 areas. New count: @3.", total, count, (total - count)) diff --git a/init.lua b/init.lua index 9330fb7..8040c3c 100644 --- a/init.lua +++ b/init.lua @@ -4,15 +4,7 @@ areas = {} -local translator = minetest.get_translator -local S = translator and translator("areas") or intllib.make_gettext_pair() - -if translator and not minetest.is_singleplayer() then - local lang = minetest.settings:get("language") - if lang and lang == "ru" then - S = intllib.make_gettext_pair() - end -end +local S = minetest.get_translator_auto({"ru"}) areas.S = S diff --git a/internal.lua b/internal.lua index eaec8d7..e73d838 100644 --- a/internal.lua +++ b/internal.lua @@ -125,7 +125,6 @@ function areas:remove(id, recurse) -- The subarea parent will be niled out if the -- removed area does not have a parent self.areas[cid].parent = parent - end end