mirror of
https://github.com/minetest-mods/3d_armor.git
synced 2024-08-20 04:54:09 +02:00
Move armor.get_translator to API
This commit is contained in:
parent
4dc9a81ec2
commit
7fc9966945
@ -1,5 +1,5 @@
|
|||||||
-- support for i18n
|
-- support for i18n
|
||||||
local S = armor.get_translator
|
local S = minetest.get_translator(minetest.get_current_modname())
|
||||||
|
|
||||||
local skin_previews = {}
|
local skin_previews = {}
|
||||||
local use_player_monoids = minetest.global_exists("player_monoids")
|
local use_player_monoids = minetest.global_exists("player_monoids")
|
||||||
@ -74,7 +74,8 @@ armor = {
|
|||||||
on_destroy = {},
|
on_destroy = {},
|
||||||
},
|
},
|
||||||
migrate_old_inventory = true,
|
migrate_old_inventory = true,
|
||||||
version = "0.4.13",
|
version = "0.4.13",
|
||||||
|
get_translator = S
|
||||||
}
|
}
|
||||||
|
|
||||||
armor.config = {
|
armor.config = {
|
||||||
|
@ -5,14 +5,12 @@ local last_punch_time = {}
|
|||||||
local pending_players = {}
|
local pending_players = {}
|
||||||
local timer = 0
|
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")
|
dofile(modpath.."/api.lua")
|
||||||
|
|
||||||
|
-- local functions
|
||||||
|
local F = minetest.formspec_escape
|
||||||
|
local S = armor.get_translator
|
||||||
|
|
||||||
-- integration test
|
-- integration test
|
||||||
if minetest.settings:get_bool("enable_3d_armor_integration_test") then
|
if minetest.settings:get_bool("enable_3d_armor_integration_test") then
|
||||||
dofile(modpath.."/integration_test.lua")
|
dofile(modpath.."/integration_test.lua")
|
||||||
|
Loading…
Reference in New Issue
Block a user