add translate ru
This commit is contained in:
parent
8f390d3b34
commit
952d900255
@ -1,4 +1,4 @@
|
||||
|
||||
local S = minetest.get_translator("rangedweapons")
|
||||
|
||||
minetest.register_craftitem("rangedweapons:pin", {
|
||||
wield_scale = {x=2.5,y=2.5,z=1.0},
|
||||
@ -51,7 +51,7 @@ minetest.register_craftitem("rangedweapons:hand_grenade", {
|
||||
on_secondary_use = function(itemstack, user, pointed_thing)
|
||||
if minetest.find_node_near(user:get_pos(), 10,"rangedweapons:antigun_block")
|
||||
then
|
||||
minetest.chat_send_player(user:get_player_name(), "" ..core.colorize("#ff0000","Grenades are prohibited in this area!"))
|
||||
minetest.chat_send_player(user:get_player_name(), "" ..core.colorize("#ff0000",S("Grenades are prohibited in this area!")))
|
||||
return itemstack
|
||||
end
|
||||
|
||||
|
10
init.lua
10
init.lua
@ -1,4 +1,4 @@
|
||||
|
||||
local S = minetest.get_translator("rangedweapons")
|
||||
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
|
||||
@ -53,7 +53,7 @@ if math.random(1, chance) == 1 then
|
||||
local skill_num = p_meta:get_int(skill)
|
||||
if skill_num < max_gun_efficiency then
|
||||
p_meta:set_int(skill, skill_num + 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#25c200","You've improved your skill with this type of gun!"))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#25c200",S("You've improved your skill with this type of gun!")))
|
||||
end
|
||||
end
|
||||
|
||||
@ -238,7 +238,7 @@ rangedweapons_yeet = function(itemstack, player)
|
||||
|
||||
if minetest.find_node_near(player:get_pos(), 10,"rangedweapons:antigun_block")
|
||||
then
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","throwable weapons are prohibited in this area!"))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("throwable weapons are prohibited in this area!")))
|
||||
else
|
||||
|
||||
local ThrowCaps = itemstack:get_definition().RW_throw_capabilities
|
||||
@ -337,7 +337,7 @@ rangedweapons_shoot_gun = function(itemstack, player)
|
||||
if minetest.find_node_near(player:get_pos(), 10,"rangedweapons:antigun_block")
|
||||
then
|
||||
minetest.sound_play("rangedweapons_empty", {pos = player:get_pos()})
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Guns are prohibited in this area!"))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Guns are prohibited in this area!")))
|
||||
|
||||
else
|
||||
|
||||
@ -520,7 +520,7 @@ rangedweapons_shoot_powergun = function(itemstack, player)
|
||||
if minetest.find_node_near(player:get_pos(), 10,"rangedweapons:antigun_block")
|
||||
then
|
||||
minetest.sound_play("rangedweapons_empty", {pos = player:get_pos()})
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Guns are prohibited in this area!"))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Guns are prohibited in this area!")))
|
||||
else
|
||||
local power_cooldown = 0
|
||||
local power_consumption = 0
|
||||
|
27
locale/rangedweapons.ru.tr
Normal file
27
locale/rangedweapons.ru.tr
Normal file
@ -0,0 +1,27 @@
|
||||
# textdomain: rangedweapons
|
||||
|
||||
Grenades are prohibited in this area!=Гранаты в этой зоне запрещены!
|
||||
You've improved your skill with this type of gun!=Вы улучшили свои навыки обращения с этим типом оружия!
|
||||
throwable weapons are prohibited in this area!=метательное оружие в этой зоне запрещено!
|
||||
Guns are prohibited in this area!=Оружие в этой зоне запрещено!
|
||||
Gun efficiency: increases damage, accuracy and crit chance.=Эффективность оружия: увеличивает урон, точность и шанс критического удара.
|
||||
Handgun efficiency:=Эффективность пистолета:
|
||||
M.Pistol efficiency:=Эффективность M.Pistol:
|
||||
S.M.G efficiency:=Эффективность S.M.G:
|
||||
Shotgun efficiency:=Эффективность дробовика:
|
||||
Heavy.MG efficiency:=Эффективность Heavy.MG:
|
||||
A.rifle efficiency:=А. Эффективность винтовки:
|
||||
Revl./mgn. efficiency:=Оборот/мгн. эффективность:
|
||||
Rifle efficiency:=Эффективность винтовки:
|
||||
Throwing efficiency:=Эффективность броска:
|
||||
Handgun skill degraded!=Умение обращаться с огнестрельным оружием ухудшилось!
|
||||
Machine Pistol skill degraded!=Навык стрельбы из пистолета-пулемета ухудшился!
|
||||
S.M.G skill degraded!=Навыки S.M.G ухудшились!
|
||||
Shotgun skill degraded!=Навык дробовика ухудшился!
|
||||
Heavy.MG skill degraded!=Навык Heavy.MG ухудшился!
|
||||
A.Rifle skill degraded!=A. Навык стрельбы из винтовки ухудшился!
|
||||
Revolver/magnum skill degraded!=Навык револьвера/магнума ухудшился!
|
||||
Rifle skill degraded!=Навык стрельбы снизился!
|
||||
Throwing skill degraded!=Навык броска ухудшился!
|
||||
|
||||
|
40
skills.lua
40
skills.lua
@ -1,3 +1,5 @@
|
||||
local S = minetest.get_translator("rangedweapons")
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
local meta = player:get_meta()
|
||||
if meta:get_int("handgun_skill") == 0
|
||||
@ -54,25 +56,25 @@ local rifle = meta:get_int("rifle_skill")
|
||||
local throw = meta:get_int("throw_skill")
|
||||
minetest.show_formspec(name, "rangedweapons:gunskills_form",
|
||||
"size[11,7]"..
|
||||
"label[0,0;Gun efficiency: increases damage, accuracy and crit chance.]"..
|
||||
"label[0,0;"..S("Gun efficiency: increases damage, accuracy and crit chance.").."]"..
|
||||
"image[0,1;1,1;rangedweapons_handgun_img.png]"..
|
||||
"label[1,1.2;Handgun efficiency: " .. handguns .. "%]"..
|
||||
"label[1,1.2;"..S("Handgun efficiency:").. " " .. handguns .. "%]"..
|
||||
"image[0,2;1,1;rangedweapons_machinepistol_img.png]"..
|
||||
"label[1,2.2;M.Pistol efficiency: " .. mps .. "%]"..
|
||||
"label[1,2.2;"..S("M.Pistol efficiency:") .. " " .. mps .. "%]"..
|
||||
"image[0,3;1,1;rangedweapons_smg_img.png]"..
|
||||
"label[1,3.2;S.M.G efficiency: " .. smgs .. "%]"..
|
||||
"label[1,3.2;"..S("S.M.G efficiency:") .. " " .. smgs .. "%]"..
|
||||
"image[0,4;1,1;rangedweapons_shotgun_img.png]"..
|
||||
"label[1,4.2;Shotgun efficiency: " .. shotguns .. "%]"..
|
||||
"label[1,4.2;"..S("Shotgun efficiency:") .. " " .. shotguns .. "%]"..
|
||||
"image[0,5;1,1;rangedweapons_heavy_img.png]"..
|
||||
"label[1,5.2;Heavy.MG efficiency: " .. heavy .. "%]"..
|
||||
"label[1,5.2;"..S("Heavy.MG efficiency:") .. " " .. heavy .. "%]"..
|
||||
"image[0,6;1,1;rangedweapons_arifle_img.png]"..
|
||||
"label[1,6.2;A.rifle efficiency: " .. arifle .. "%]"..
|
||||
"label[1,6.2;"..S("A.rifle efficiency:") .. " " .. arifle .. "%]"..
|
||||
"image[5,1;1,1;rangedweapons_revolver_img.png]"..
|
||||
"label[6,1.2;Revl./mgn. efficiency: " .. revolver .. "%]"..
|
||||
"label[6,1.2;"..S("Revl./mgn. efficiency:") .. " " .. revolver .. "%]"..
|
||||
"image[5,2;1,1;rangedweapons_rifle_img.png]"..
|
||||
"label[6,2.2;Rifle efficiency: " .. rifle .. "%]"..
|
||||
"label[6,2.2;"..S("Rifle efficiency:") .. " " .. rifle .. "%]"..
|
||||
"image[5,3;1,1;rangedweapons_yeetable_img.png]"..
|
||||
"label[6,3.2;Throwing efficiency: " .. throw .. "%]"..
|
||||
"label[6,3.2;"..S("Throwing efficiency:") .. " " .. throw .. "%]"..
|
||||
"button_exit[9,0;2,1;exit;Done]")
|
||||
|
||||
end
|
||||
@ -99,55 +101,55 @@ local throw = meta:get_int("throw_skill")
|
||||
if math.random(1, 40) == 1 then
|
||||
if handguns > min_gun_efficiency then
|
||||
meta:set_int("handgun_skill", handguns - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Handgun skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Handgun skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if mps > min_gun_efficiency then
|
||||
meta:set_int("mp_skill", mps - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Machine Pistol skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Machine Pistol skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if smgs > min_gun_efficiency then
|
||||
meta:set_int("smg_skill", smgs - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","S.M.G skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("S.M.G skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if shotguns > min_gun_efficiency then
|
||||
meta:set_int("shotgun_skill", shotguns - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Shotgun skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Shotgun skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if heavy > min_gun_efficiency then
|
||||
meta:set_int("heavy_skill", heavy - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Heavy.MG skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Heavy.MG skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if arifle > min_gun_efficiency then
|
||||
meta:set_int("arifle_skill", arifle - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","A.Rifle skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("A.Rifle skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if revolver > min_gun_efficiency then
|
||||
meta:set_int("revolver_skill", revolver - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Revolver/magnum skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Revolver/magnum skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if rifle > min_gun_efficiency then
|
||||
meta:set_int("rifle_skill", rifle - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Rifle skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Rifle skill degraded!")))
|
||||
end
|
||||
end
|
||||
if math.random(1, 40) == 1 then
|
||||
if throw > min_gun_efficiency then
|
||||
meta:set_int("throw_skill", throw - 1)
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000","Throwing skill degraded! "))
|
||||
minetest.chat_send_player(player:get_player_name(), "" ..core.colorize("#ff0000",S("Throwing skill degraded!")))
|
||||
end
|
||||
end
|
||||
timer = 0
|
||||
|
Loading…
Reference in New Issue
Block a user