invisible mod with russian

This commit is contained in:
Aleksandr Avdeev 2024-05-15 01:07:45 +05:00 committed by Koldun
parent a2a6504219
commit 796a5291ba
Signed by: Koldun
GPG Key ID: 53DE683337F5D25F
2 changed files with 12 additions and 4 deletions

View File

@ -1,8 +1,10 @@
local S = minetest.get_translator("invisible")
minetest.register_alias("i", "invisible:tool")
invisible = { time = 0, armor = minetest.get_modpath("3d_armor")}
minetest.register_privilege("invisible", {
description = "Allows the player to become invisible.",
description = S("Allows the player to become invisible."),
give_to_singleplayer = false,
})
@ -21,7 +23,7 @@ invisible.toggle=function(user,sneak)
visual_size = {x=0, y=0},
pointable=false,
})
minetest.chat_send_player(name, "invisible on")
minetest.chat_send_player(name, S("invisible on"))
else
user:set_nametag_attributes({color = {a = 255, r = 255, g = 255, b = 255}})
user:set_properties({
@ -37,7 +39,7 @@ invisible.toggle=function(user,sneak)
armor:update_inventory(user)
end
minetest.chat_send_player(name, "invisible off")
minetest.chat_send_player(name, S("invisible off"))
end
else
@ -52,7 +54,7 @@ invisible.toggle=function(user,sneak)
end
minetest.register_tool("invisible:tool", {
description = "invisible",
description = S("invisible"),
inventory_image = "default_stick.png",
groups = {not_in_creative_inventory=1},
on_use = function(itemstack, user, pointed_thing)

6
locale/invisible.ru.tr Normal file
View File

@ -0,0 +1,6 @@
# textdomain: invisible
Allows the player to become invisible.=Позволяет игроку стать невидимкой.
invisible on=режим невидимки включен
invisible off=режим невидимки выключен
invisible=невидимка