Move armor.get_translator to API

This commit is contained in:
Olivier Dragon 2020-08-31 00:00:18 -04:00 committed by Buckaroo Banzai
parent 4dc9a81ec2
commit 7fc9966945
2 changed files with 7 additions and 8 deletions

@ -1,5 +1,5 @@
-- support for i18n
local S = armor.get_translator
local S = minetest.get_translator(minetest.get_current_modname())
local skin_previews = {}
local use_player_monoids = minetest.global_exists("player_monoids")
@ -75,6 +75,7 @@ armor = {
},
migrate_old_inventory = true,
version = "0.4.13",
get_translator = S
}
armor.config = {

@ -5,14 +5,12 @@ local last_punch_time = {}
local pending_players = {}
local timer = 0
-- local functions
local S = minetest.get_translator(minetest.get_current_modname())
local F = minetest.formspec_escape
armor.get_translator = S
dofile(modpath.."/api.lua")
-- local functions
local F = minetest.formspec_escape
local S = armor.get_translator
-- integration test
if minetest.settings:get_bool("enable_3d_armor_integration_test") then
dofile(modpath.."/integration_test.lua")