Add translations, Game translated into Russian
This commit is contained in:
parent
6bacc39092
commit
e7b084d434
@ -7,6 +7,9 @@ end
|
||||
|
||||
-- Helper functions
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
local function get_look_yaw(pos)
|
||||
local rotation = minetest.get_node(pos).param2
|
||||
if rotation > 3 then
|
||||
@ -150,7 +153,7 @@ function beds.on_rightclick(pos, player)
|
||||
if beds.player[name] then
|
||||
lay_down(player, nil, nil, false)
|
||||
end
|
||||
minetest.chat_send_player(name, "You can only sleep at night.")
|
||||
minetest.chat_send_player(name, S("You can only sleep at night."))
|
||||
return
|
||||
end
|
||||
|
||||
|
@ -4,10 +4,13 @@ beds.bed_position = {}
|
||||
beds.pos = {}
|
||||
beds.spawn = {}
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
beds.formspec = "size[8,11;true]" ..
|
||||
"no_prepend[]" ..
|
||||
default.gui_bg..
|
||||
"button_exit[2,10;4,0.75;leave;Leave Bed]"
|
||||
"button_exit[2,10;4,0.75;leave;" .. S("Leave Bed") .. "]"
|
||||
|
||||
local modpath = minetest.get_modpath("beds")
|
||||
|
||||
|
2
files/beds/locale/ru.txt
Normal file
2
files/beds/locale/ru.txt
Normal file
@ -0,0 +1,2 @@
|
||||
Leave Bed = Покинуть Кровать
|
||||
You can only sleep at night. = Вы можете спать только ночью.
|
@ -13,6 +13,9 @@ minetest.register_craft({
|
||||
bucket = {}
|
||||
bucket.liquids = {}
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
local function check_protection(pos, name, text)
|
||||
if minetest.is_protected(pos, name) then
|
||||
minetest.log("action", (name ~= "" and name or "A mod")
|
||||
@ -98,7 +101,7 @@ function bucket.register_liquid(source, flowing, itemname, inventory_image, name
|
||||
|
||||
if minetest.is_singleplayer() ~= true then
|
||||
if pointed_thing.under.y > 8 then
|
||||
minetest.chat_send_player(player_name, "Too much liquid is bad, right?", true)
|
||||
minetest.chat_send_player(player_name, S("Too much liquid is bad, right?"), true)
|
||||
return itemstack
|
||||
end
|
||||
end
|
||||
|
1
files/bucket/locale/ru.txt
Normal file
1
files/bucket/locale/ru.txt
Normal file
@ -0,0 +1 @@
|
||||
Too much liquid is bad, right? = Слишком много жидкости это плохо, верно?
|
@ -1,23 +1,26 @@
|
||||
dye = {}
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
-- Make dye names and descriptions available globally
|
||||
|
||||
dye.dyes = {
|
||||
{"black", "Black"},
|
||||
{"blue", "Blue"},
|
||||
{"brown", "Brown"},
|
||||
{"cyan", "Cyan"},
|
||||
{"dark_green", "Dark Green"},
|
||||
{"dark_grey", "Dark Grey"},
|
||||
{"green", "Green"},
|
||||
{"grey", "Grey"},
|
||||
{"magenta", "Magenta"},
|
||||
{"orange", "Orange"},
|
||||
{"pink", "Pink"},
|
||||
{"red", "Red"},
|
||||
{"violet", "Violet"},
|
||||
{"white", "White"},
|
||||
{"yellow", "Yellow"},
|
||||
{"black", S("Black"), S("Black2"), S("Black3")},
|
||||
{"blue", S("Blue"), S("Blue2"), S("Blue3")},
|
||||
{"brown", S("Brown"), S("Brown2"), S("Brown3")},
|
||||
{"cyan", S("Cyan"), S("Cyan2"), S("Cyan3")},
|
||||
{"dark_green", S("Dark Green"), S("Dark Green2"), S("Dark Green3")},
|
||||
{"dark_grey", S("Dark Grey"), S("Dark Grey2"), S("Dark Grey3")},
|
||||
{"green", S("Green"), S("Green2"), S("Green3")},
|
||||
{"grey", S("Grey"), S("Grey2"), S("Grey3")},
|
||||
{"magenta", S("Magenta"), S("Magenta2"), S("Magenta3")},
|
||||
{"orange", S("Orange"), S("Orange2"), S("Orange3")},
|
||||
{"pink", S("Pink"), S("Pink2"), S("Pink3")},
|
||||
{"red", S("Red"), S("Red2"), S("Red3")},
|
||||
{"violet", S("Violet"), S("Violet2"), S("Violet3")},
|
||||
{"white", S("White"), S("White2"), S("White3")},
|
||||
{"yellow", S("Yellow"), S("Yellow2"), S("Yellow3")},
|
||||
}
|
||||
|
||||
-- Define items
|
||||
@ -30,7 +33,7 @@ for _, row in ipairs(dye.dyes) do
|
||||
|
||||
minetest.register_craftitem("dye:" .. name, {
|
||||
inventory_image = "dye_" .. name .. ".png",
|
||||
description = description .. " Dye",
|
||||
description = description .. " " .. S("Dye"),
|
||||
groups = groups
|
||||
})
|
||||
|
||||
|
45
files/dye/locale/en.txt
Normal file
45
files/dye/locale/en.txt
Normal file
@ -0,0 +1,45 @@
|
||||
Black = Black
|
||||
Black2 = Black
|
||||
Black3 = Black
|
||||
Blue = Blue
|
||||
Blue2 = Blue
|
||||
Blue3 = Blue
|
||||
Brown = Brown
|
||||
Brown2 = Brown
|
||||
Brown3 = Brown
|
||||
Cyan = Cyan
|
||||
Cyan2 = Cyan
|
||||
Cyan3 = Cyan
|
||||
Dark Green = Dark Green
|
||||
Dark Green2 = Dark Green
|
||||
Dark Green3 = Dark Green
|
||||
Dark Grey = Dark Grey
|
||||
Dark Grey2 = Dark Grey
|
||||
Dark Grey3 = Dark Grey
|
||||
Green = Green
|
||||
Green2 = Green
|
||||
Green3 = Green
|
||||
Grey = Grey
|
||||
Grey2 = Grey
|
||||
Grey3 = Grey
|
||||
Magenta = Magenta
|
||||
Magenta2 = Magenta
|
||||
Magenta3 = Magenta
|
||||
Orange = Orange
|
||||
Orange2 = Orange
|
||||
Orange3 = Orange
|
||||
Pink = Pink
|
||||
Pink2 = Pink
|
||||
Pink3 = Pink
|
||||
Red = Red
|
||||
Red2 = Red
|
||||
Red3 = Red
|
||||
Violet = Violet
|
||||
Violet2 = Violet
|
||||
Violet3 = Violet
|
||||
White = White
|
||||
White2 = White
|
||||
White3 = White
|
||||
Yellow = Yellow
|
||||
Yellow2 = Yellow
|
||||
Yellow3 = Yellow
|
46
files/dye/locale/ru.txt
Normal file
46
files/dye/locale/ru.txt
Normal file
@ -0,0 +1,46 @@
|
||||
Black = Чёрный
|
||||
Black2 = Чёрная
|
||||
Black3 = Чёрное
|
||||
Blue = Синий
|
||||
Blue2 = Синяя
|
||||
Blue3 = Синее
|
||||
Brown = Коричневый
|
||||
Brown2 = Коричневая
|
||||
Brown3 = Коричневое
|
||||
Cyan = Сине-зелёный
|
||||
Cyan2 = Сине-зелёная
|
||||
Cyan3 = Сине-зелёное
|
||||
Dark Green = Тёмно-зелёный
|
||||
Dark Green2 = Тёмно-зелёная
|
||||
Dark Green3 = Тёмно-зелёное
|
||||
Dark Grey = Тёмно-серый
|
||||
Dark Grey2 = Тёмно-серая
|
||||
Dark Grey3 = Тёмно-серое
|
||||
Green = Зелёный
|
||||
Green2 = Зелёная
|
||||
Green3 = Зелёное
|
||||
Grey = Серый
|
||||
Grey2 = Серая
|
||||
Grey3 = Серое
|
||||
Magenta = Пурпурный
|
||||
Magenta2 = Пурпурная
|
||||
Magenta3 = Пурпурное
|
||||
Orange = Оранжевый
|
||||
Orange2 = Оранжевая
|
||||
Orange3 = Оранжевое
|
||||
Pink = Розовый
|
||||
Pink2 = Розовая
|
||||
Pink3 = Розовое
|
||||
Red = Красный
|
||||
Red2 = Красная
|
||||
Red3 = Красное
|
||||
Violet = Фиолетовый
|
||||
Violet2 = Фиолетовая
|
||||
Violet3 = Фиолетовое
|
||||
White = Белый
|
||||
White2 = Белая
|
||||
White3 = Белое
|
||||
Yellow = Жёлтый
|
||||
Yellow2 = Жёлтая
|
||||
Yellow3 = Жёлтое
|
||||
Dye = Краситель
|
331
files/locales/locale/ru.txt
Normal file
331
files/locales/locale/ru.txt
Normal file
@ -0,0 +1,331 @@
|
||||
#3d_armor
|
||||
|
||||
|
||||
|
||||
#beds
|
||||
Bed = Кровать
|
||||
|
||||
|
||||
#bluestone
|
||||
Bluestone Torch = Синий Факел
|
||||
Stone Button = Каменная Кнопка
|
||||
Wood Button = Деревянная Кнопка
|
||||
Delayer = Делайер
|
||||
Lamp = Лампа
|
||||
Glue = Клей
|
||||
Bluestone Block = Блюстоун Блок
|
||||
Noteblock = Звуковой Блок
|
||||
Piston = Поршень
|
||||
Sticky Piston = Липкий Поршень
|
||||
Solar Panel = Солнечная Панель
|
||||
Lever = Рычаг
|
||||
Bluestone = Блюстоун
|
||||
|
||||
|
||||
#boats
|
||||
Boat = Лодка
|
||||
|
||||
|
||||
#bonemeal
|
||||
Bone Meal = Костная Мука
|
||||
|
||||
|
||||
#bucket
|
||||
Empty Bucket = Пустое Ведро
|
||||
Water Bucket = Ведро Воды
|
||||
River Water Bucket = Ведро Речной Воды
|
||||
Lava Bucket = Ведро Лавы
|
||||
Milk Bucket = Ведро Молока
|
||||
|
||||
|
||||
#carts
|
||||
Cart (Sneak+Click to pick up) = Вагонетка (Приседание+Нажатие чтобы взять)
|
||||
Rail = Рельсы
|
||||
Powered Rail = Электрические Рельсы
|
||||
Brake Rail = Рельсы Торможеня
|
||||
Start-stop rail = Старт-стоп Рельсы
|
||||
Detector rail = Рельсы с Датчиком
|
||||
|
||||
|
||||
#colored
|
||||
Hardened Clay = Обожжённая Глина
|
||||
|
||||
|
||||
#creative || inventory
|
||||
Set Home = Установить Дом
|
||||
Go Home = Идти Домой
|
||||
|
||||
|
||||
#default
|
||||
Chest = Сундук
|
||||
Furnace = Печка
|
||||
Torch = Факел
|
||||
|
||||
Stick = Палка
|
||||
Paper = Бумага
|
||||
Book = Книга
|
||||
Book With Text = Книга с Текстом
|
||||
Coal Lump = Уголь
|
||||
Charcoal Lump = Древесный Уголь
|
||||
Diamond = Алмаз
|
||||
Clay Lump = Кусок Глины
|
||||
Steel Ingot = Стальной Слиток
|
||||
Gold Ingot = Золотой Слиток
|
||||
Emerald = Изумруд
|
||||
Clay Brick = Глинянный Кирпич
|
||||
Gunpowder = Порох
|
||||
Bone = Кость
|
||||
Glowstone Dust = Светящаяся Пыль
|
||||
Raw Fish = Сырая Рыба
|
||||
Cooked Fish = Приготовленная Рыба
|
||||
Sugar = Сахар
|
||||
Quartz Crystal = Кварцевый Кристалл
|
||||
Flint = Кремень
|
||||
Snowball = Снежка
|
||||
|
||||
Stone = Камень
|
||||
Cobblestone = Булыжник
|
||||
Stone Brick = Каменный Кирпич
|
||||
Mossy Cobblestone = Мшистый булыжник
|
||||
Stone Brick Carved = Нарезной Каменный Кирпич
|
||||
Stone Brick Cracked = Треснувший Каменный Кирпич
|
||||
Mossy Stone Brick = Мшистый Каменный Кирпич
|
||||
Sandstone = Песчанник
|
||||
Smooth Sandstone = Гладкий Песчанник
|
||||
Red Sandstone = Красный Песчанник
|
||||
Red Sandstone Smooth = Красный Гладкий Песчанник
|
||||
Red Sandstone Carved = Красный Нарезной Песчанник
|
||||
Obsidian = Обсидиан
|
||||
Bedrock = Коренная Порода
|
||||
Dirt = Земля
|
||||
Dirt with Grass = Земля с Травой
|
||||
Dirt with Grass and Footsteps = Земля с Травой и Шагами
|
||||
Dirt with Dry Grass = Земля с Сухой Травой
|
||||
Dirt with Snow = Земля со Снегом
|
||||
Sand = Песок
|
||||
Gravel = Гравий
|
||||
Red Sand = Красный Песок
|
||||
Clay = Глина
|
||||
Hardened Clay = Твёрдая Глина
|
||||
Snow = Снег
|
||||
Snow Block = Снежный Блок
|
||||
Ice = Лёд
|
||||
Packed Ice = Упакованный Лёд
|
||||
Apple Tree = Яблочное Дерево
|
||||
Apple Wood Planks = Доски Яблока
|
||||
Apple Tree Sapling = Деревце Яблони
|
||||
Apple Tree Leaves = Яблочные Листья
|
||||
Apple = Яблоко
|
||||
Golden Apple = Золотое Яблоко
|
||||
Jungle Tree = Джунгли-дерево
|
||||
Jungle Wood Planks = Доски из Джунгли-дерева
|
||||
Jungle Tree Leaves = Листья Джунгли-дерева
|
||||
Jungle Tree Sapling = Деревце Джунгли-дерева
|
||||
Pine Tree = Дерево Сосны
|
||||
Pine Wood Planks = Доски из Сосны
|
||||
Pine Needles = Сосновые Иголки
|
||||
Pine Tree Sapling = Деревце Сосны
|
||||
Acacia Tree = Дерево Акации
|
||||
Acacia Wood Planks = Доски из Акации
|
||||
Acacia Tree Leaves = Листья Акации
|
||||
Acacia Tree Sapling = Деревце Акации
|
||||
Birch Tree = Дерево Берёзы
|
||||
Birch Wood Planks = Доски из Берёзы
|
||||
Birch Tree Leaves = Листья Берёзы
|
||||
Birch Tree Sapling = Деревце Берёзы
|
||||
Coal Ore = Угольная Руда
|
||||
Coal Block = Блок Угля
|
||||
Iron Ore = Железная Руда
|
||||
Steel Block = Стальной Блок
|
||||
Lapis Lazuli Block = Блок Лазурита
|
||||
Bluestone Ore = Блюстоун Руда
|
||||
Lapis Lazuli Ore = Лазуритовая Руда
|
||||
Gold Ore = Золотая Руда
|
||||
Gold Block = Золотой Блок
|
||||
Emerald Ore = Изумрудная Руда
|
||||
Emerald Block = Изумрудный Блок
|
||||
Diamonds in Stone = Алмаз в Камне
|
||||
Diamond Block = Алмазный Блок
|
||||
Cactus = Кактус
|
||||
Sugarcane = Сахарный Тростник
|
||||
Dry Shrub = Сухой Куст
|
||||
Jungle Grass = Джунгли-трава
|
||||
Grass = Трава
|
||||
Dry Grass = Сухая Трава
|
||||
Bookshelf = Книжный Шкаф
|
||||
Wooden Ladder = Деревянная Лестница
|
||||
Apple Wood Fence = Яблочный Деревянный Забор
|
||||
Vines = Лоза
|
||||
Glass = Стекло
|
||||
Brick Block = Кирпичный Блок
|
||||
Glowstone = Светящийся Камень
|
||||
Slime Block = Блок Слизи
|
||||
Quartz Ore = Кварцевая руда
|
||||
Quartz Block = Кварцевый Блок
|
||||
Chiseled Quartz = Высеченный Кварц
|
||||
Quartz Pillar = Кварцевый Столб
|
||||
|
||||
Wooden Pickaxe = Деревянная Кирка
|
||||
Stone Pickaxe = Каменный Кирка
|
||||
Steel Pickaxe = Стальная Кирка
|
||||
Gold Pickaxe = Золотая Кирка
|
||||
Diamond Pickaxe = Алмазная Кирка
|
||||
Wooden Shovel = Деревянная Лопата
|
||||
Stone Shovel = Каменный Лопата
|
||||
Steel Shovel = Стальная Лопата
|
||||
Gold Shovel = Золотая Лопата
|
||||
Diamond Shovel = Алмазная Лопата
|
||||
Wooden Axe = Деревянный Топор
|
||||
Stone Axe = Каменный Топор
|
||||
Steel Axe = Стальной Топор
|
||||
Gold Axe = Золотой Топор
|
||||
Diamond Axe = Алмазный Топор
|
||||
Wooden Sword = Деревянный Меч
|
||||
Stone Sword = Каменный Меч
|
||||
Steel Sword = Стальной Меч
|
||||
Gold Sword = Золотой Меч
|
||||
Diamond Sword = Алмазный Меч
|
||||
Fishing Pole = Удочка
|
||||
|
||||
|
||||
#doors
|
||||
Apple Wood Door = Дверь из Дерева Яблока
|
||||
Acacia Wood Door = Дверь из Дерева Акации
|
||||
Birch Wood Door = Дверь из Дерева Берёзы
|
||||
Jungle Wood Door = Дверь из Джунгли-Дерева
|
||||
Pine Wood Door = Дверь из Дерева Сосны
|
||||
Steel Door = Стальная Дверь
|
||||
Wooden Trapdoor = Деревянный Люк
|
||||
Steel Trapdoor = Стальной Люк
|
||||
Owned by = Владелец
|
||||
|
||||
|
||||
#farming
|
||||
Wheat Seed = Семена Пшеницы
|
||||
Flour = Мука
|
||||
Bread = Хлеб
|
||||
String = Нить
|
||||
Straw = Солома
|
||||
Wooden Hoe = Деревянная Мотыга
|
||||
Stone Hoe = Каменная Мотыга
|
||||
Steel Hoe = Стальная Мотыга
|
||||
Gold Hoe = Золотая Мотыга
|
||||
Diamond Hoe = Алмазная Мотыга
|
||||
|
||||
|
||||
#fire
|
||||
Flint and Steel = Огниво
|
||||
|
||||
|
||||
#flowers
|
||||
|
||||
|
||||
#flowerpot
|
||||
Flowerpot = Цветочный Горшок
|
||||
|
||||
|
||||
#furniture
|
||||
Chair = Стул
|
||||
Table = Стол
|
||||
Small Table = Маленький Стол
|
||||
Tiny Table = Столик
|
||||
Bench = Скамейка
|
||||
Bedside Table = Прикроватный Стол
|
||||
End Table = Тумбочка
|
||||
Coffee Table = Кофейный Столик
|
||||
|
||||
|
||||
#itemframe
|
||||
Item frame = Рамка
|
||||
|
||||
|
||||
#mobs_redo
|
||||
(Tamed) = (Прирученн.)
|
||||
Name Tag = Именная Метка
|
||||
Leather = Кожа
|
||||
Raw Meat = Сырое Мясо
|
||||
Cooked Meat = Приготовленное Мясо
|
||||
Raw Pork = Сырая Свинина
|
||||
Cooked Pork = Приготовленная Свинина
|
||||
Raw Rabbit = Сырая Крольчатина
|
||||
Cooked Rabbit = Приготовленный Кролик
|
||||
Rabbit Hide = Кролик
|
||||
Chicken Egg = Куриное Яйцо
|
||||
Fried Egg = Жаренное Яйцо
|
||||
Raw Chicken = Сырая Курица
|
||||
Cooked Chicken = Приготовленная Курица
|
||||
Cheese = Сыр
|
||||
Cheese Block = Блок Сыра
|
||||
Rotten Flesh = Гнилая Плоть
|
||||
Steel Shears = Стальные Ножницы
|
||||
Cobweb = Паутина
|
||||
Mob Protection Rune = Защита Моба
|
||||
|
||||
Bear Egg = Яйцо Спавна Медведя
|
||||
Bunny Egg = Яйцо Спавна Кролика
|
||||
Chicken Egg = Яйцо Спавна Курицы
|
||||
Cow Egg = Яйцо Спавна Коровы
|
||||
Wolf's Egg = Яйцо Спавна Волка
|
||||
Dog Egg = Яйцо Спавна Собаки
|
||||
Cat's Egg = Яйцо Спавна Кошки
|
||||
Pig Egg = Яйцо Спавна Свиньи
|
||||
Sheep Egg = Яйцо Спавна Овцы
|
||||
Skeleton Egg = Яйцо Спавна Скелета
|
||||
Spider Egg = Яйцо Спавна Паука
|
||||
Small Spider Egg = Яйцо Спавна Маленького Паука
|
||||
Zombie Head = Голова Зомби
|
||||
|
||||
#vessels
|
||||
Potion Shelf = Шкаф с Зельями
|
||||
Empty Glass Bottle = Пустой Стеклянный Бутыль
|
||||
|
||||
|
||||
#signs
|
||||
Sign = Табличка
|
||||
|
||||
|
||||
#sponge
|
||||
Sponge = Губка
|
||||
Wet Sponge = Влажная Губка
|
||||
|
||||
|
||||
#throwing
|
||||
Bow = Лук
|
||||
Bow with arrow = Лук со Стрелой
|
||||
Arrow = Стрела
|
||||
|
||||
|
||||
#walls
|
||||
Cobblestone Wall = Стена из Булыжника
|
||||
Mossy Cobblestone Wall = Стена из Мшистого Булыжника
|
||||
|
||||
|
||||
#watch
|
||||
Watch = Часы
|
||||
|
||||
|
||||
#wool
|
||||
Wool = Шерсть
|
||||
|
||||
|
||||
#workbench
|
||||
Workbench = Верстак
|
||||
Hammer = Молот
|
||||
|
||||
Micropanel = (Половина Мини-панели)
|
||||
Microslab = (Мини-панель)
|
||||
Thinstair = (Тонкая Лестница)
|
||||
Cube = (Кубик)
|
||||
Panel = (Половина Панели)
|
||||
Slab = (Панель)
|
||||
Doublepanel = (Двойная Панель)
|
||||
Halfstair = (Половина Ступенек)
|
||||
Outerstair = (Внешние Ступеньки)
|
||||
Stair = (Ступеньки)
|
||||
Slope = (Уклон)
|
||||
Innerstair = (Внутренние Ступеньки)
|
||||
|
||||
|
||||
#xpanes
|
||||
Glass Pane = Стеклянная Панель
|
||||
Steel Bars = Стальная Решётка
|
@ -8,6 +8,9 @@ mobs = {
|
||||
invis = minetest.global_exists("invisibility") and invisibility or {},
|
||||
}
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
-- creative check
|
||||
function mobs.is_creative(name)
|
||||
return creative or minetest.check_player_privs(name, {creative = true})
|
||||
@ -3793,7 +3796,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
|
||||
-- register new spawn egg containing mob information
|
||||
minetest.register_craftitem(mob .. "_set", {
|
||||
|
||||
description = desc.." (Tamed)",
|
||||
description = Sl(desc) .. " " .. Sl("(Tamed)"),
|
||||
inventory_image = invimg,
|
||||
groups = {spawn_egg = 2, not_in_creative_inventory = 1},
|
||||
stack_max = 1,
|
||||
@ -3820,7 +3823,7 @@ function mobs:register_egg(mob, desc, background, addegg, no_creative)
|
||||
|
||||
-- register old stackable mob egg
|
||||
minetest.register_craftitem(mob, {
|
||||
description = desc,
|
||||
description = Sl(desc),
|
||||
inventory_image = invimg,
|
||||
groups = grp,
|
||||
stack_max = 1,
|
||||
|
@ -4,4 +4,3 @@ playerphysics?
|
||||
default?
|
||||
flowers?
|
||||
farming?
|
||||
intllib?
|
||||
|
@ -1,14 +1,10 @@
|
||||
-- Boilerplate to support localized strings if intllib mod is installed.
|
||||
local S
|
||||
if minetest.get_modpath("intllib") then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function(s) return s end
|
||||
end
|
||||
local ppa = minetest.get_modpath("playerphysics")
|
||||
|
||||
pep = {}
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
-- Whether to use mole (true, false or minetest.is_singleplayer())
|
||||
pep.mole = minetest.is_singleplayer()
|
||||
|
||||
@ -60,8 +56,8 @@ function pep.register_potion(potiondef)
|
||||
end
|
||||
|
||||
minetest.register_craftitem("pep:"..potiondef.basename, {
|
||||
description = string.format(S("Glass Bottle (%s)"), potiondef.contentstring),
|
||||
_doc_items_longdesc = potiondef.longdesc,
|
||||
description = S(potiondef.contentstring),
|
||||
_doc_items_longdesc = S(potiondef.longdesc),
|
||||
_doc_items_usagehelp = S("Hold it in your hand, then left-click to drink it."),
|
||||
inventory_image = "pep_"..potiondef.basename..".png",
|
||||
wield_image = "pep_"..potiondef.basename..".png",
|
||||
@ -237,7 +233,7 @@ playereffects.register_effect_type("pepregen", S("Regeneration"), "pep_regen.png
|
||||
end,
|
||||
nil, nil, nil, 2
|
||||
)
|
||||
playereffects.register_effect_type("pepregen2", S("Strong regeneration"), "pep_regen2.png", {"health"},
|
||||
playereffects.register_effect_type("pepregen2", S("Strong regener."), "pep_regen2.png", {"health"},
|
||||
function(player)
|
||||
player:set_hp(player:get_hp()+2)
|
||||
end,
|
||||
@ -260,85 +256,85 @@ playereffects.register_effect_type("pepmole", S("Mole mode"), "pep_mole.png", {"
|
||||
|
||||
pep.register_potion({
|
||||
basename = "speedplus",
|
||||
contentstring = S("Running Potion"),
|
||||
longdesc = S("Drinking it will make you run faster for 30 seconds."),
|
||||
contentstring = "Running Potion",
|
||||
longdesc = "Drinking it will make you run faster for 30 seconds.",
|
||||
effect_type = "pepspeedplus",
|
||||
duration = 30,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "speedminus",
|
||||
contentstring = S("Slug Potion"),
|
||||
longdesc = S("Drinking it will make you walk slower for 30 seconds."),
|
||||
contentstring = "Slug Potion",
|
||||
longdesc = "Drinking it will make you walk slower for 30 seconds.",
|
||||
effect_type = "pepspeedminus",
|
||||
duration = 30,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "speedreset",
|
||||
contentstring = S("Speed Neutralizer"),
|
||||
longdesc = S("Drinking it will stop all speed effects you may currently have."),
|
||||
contentstring = "Speed Neutralizer Potion",
|
||||
longdesc = "Drinking it will stop all speed effects you may currently have.",
|
||||
effect_type = "pepspeedreset",
|
||||
duration = 0
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "breath",
|
||||
contentstring = S("Air Potion"),
|
||||
longdesc = S("Drinking it gives you breath underwater for 30 seconds."),
|
||||
contentstring = "Air Potion",
|
||||
longdesc = "Drinking it gives you breath underwater for 30 seconds.",
|
||||
effect_type = "pepbreath",
|
||||
duration = 30,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "regen",
|
||||
contentstring = S("Weak Healing Potion"),
|
||||
longdesc = S("Drinking it makes you regenerate health. Every 2 seconds, you get 1 HP, 10 times in total."),
|
||||
contentstring = "Weak Healing Potion",
|
||||
longdesc = "Drinking it makes you regenerate health. Every 2 seconds, you get 1 HP, 15 times in total.",
|
||||
effect_type = "pepregen",
|
||||
duration = 10,
|
||||
duration = 15,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "regen2",
|
||||
contentstring = S("Strong Healing Potion"),
|
||||
longdesc = S("Drinking it makes you regenerate health quickly. Every second you get 2 HP, 10 times in total."),
|
||||
contentstring = "Strong Healing Potion",
|
||||
longdesc = "Drinking it makes you regenerate health quickly. Every second you get 2 HP, 15 times in total.",
|
||||
effect_type = "pepregen2",
|
||||
duration = 10,
|
||||
duration = 15,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "grav0",
|
||||
contentstring = S("Non-Gravity Potion"),
|
||||
longdesc = S("When you drink this potion, gravity stops affecting you, as if you were in space. The effect lasts for 20 seconds."),
|
||||
contentstring = "Non-Gravity Potion",
|
||||
longdesc = "When you drink this potion, gravity stops affecting you, as if you were in space. The effect lasts for 20 seconds.",
|
||||
effect_type = "pepgrav0",
|
||||
duration = 20,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "gravreset",
|
||||
contentstring = S("Gravity Neutralizer"),
|
||||
longdesc = S("Drinking it will stop all gravity effects you currently have."),
|
||||
contentstring = "Gravity Neutralizer Potion",
|
||||
longdesc = "Drinking it will stop all gravity effects you currently have.",
|
||||
effect_type = "pepgravreset",
|
||||
duration = 0,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "jumpplus",
|
||||
contentstring = S("High Jumping Potion"),
|
||||
longdesc = S("Drinking it will make you jump higher for 30 seconds."),
|
||||
contentstring = "High Jumping Potion",
|
||||
longdesc = "Drinking it will make you jump higher for 30 seconds.",
|
||||
effect_type = "pepjumpplus",
|
||||
duration = 30,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "jumpminus",
|
||||
contentstring = S("Low Jumping Potion"),
|
||||
longdesc = S("Drinking it will make you jump lower for 30 seconds."),
|
||||
contentstring = "Low Jumping Potion",
|
||||
longdesc = "Drinking it will make you jump lower for 30 seconds.",
|
||||
effect_type = "pepjumpminus",
|
||||
duration = 30,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "jumpreset",
|
||||
contentstring = S("Jump Neutralizer"),
|
||||
longdesc = S("Drinking it will stop all jumping effects you may currently have."),
|
||||
contentstring = "Jump Neutralizer Potion",
|
||||
longdesc = "Drinking it will stop all jumping effects you may currently have.",
|
||||
effect_type = "pepjumpreset",
|
||||
duration = 0,
|
||||
})
|
||||
pep.register_potion({
|
||||
basename = "mole",
|
||||
contentstring = S("Mole Potion"),
|
||||
longdesc = S("Drinking it will start an effect which will magically attempt to mine any two blocks in front of you horizontally, as if you were using a steel pickaxe on them. The effect lasts for 18 seconds."),
|
||||
contentstring = "Mole Potion",
|
||||
longdesc = "Drinking it will start an effect which will magically attempt to mine any two blocks in front of you horizontally, as if you were using a steel pickaxe on them. The effect lasts for 18 seconds.",
|
||||
effect_type = "pepmole",
|
||||
duration = 18,
|
||||
})
|
||||
|
@ -45,6 +45,8 @@ playereffects.use_autosave = false
|
||||
-- The time interval between autosaves, in seconds (only used when use_autosave is true)
|
||||
playereffects.autosave_time = 10
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
--[=[ Load inactive_effects and last_effect_id from playereffects, if this file exists ]=]
|
||||
if playereffects.save then
|
||||
@ -452,10 +454,10 @@ function playereffects.hud_update(player)
|
||||
local repeat_interval = playereffects.effect_types[effect.effect_type_id].repeat_interval
|
||||
if(repeat_interval ~= nil) then
|
||||
local repeat_interval_time_left = os.difftime(effect.repeat_interval_start_time + effect.repeat_interval_time_left, now)
|
||||
player:hud_change(hudinfo.text_id, "text", description .. " ("..tostring(effect.time_left).."/"..tostring(repeat_interval_time_left) .. "s)")
|
||||
player:hud_change(hudinfo.text_id, "text", description .. " ("..tostring(effect.time_left).."/"..tostring(repeat_interval_time_left) .. " " .. S("s") .. ")")
|
||||
else
|
||||
local time_left = os.difftime(effect.start_time + effect.time_left, now)
|
||||
player:hud_change(hudinfo.text_id, "text", description .. " ("..tostring(time_left).." s)")
|
||||
player:hud_change(hudinfo.text_id, "text", description .. " ("..tostring(time_left).. " " .. S("s") .. ")")
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -495,9 +497,9 @@ function playereffects.hud_effect(effect_type_id, player, pos, time_left, repeat
|
||||
local description = playereffects.effect_types[effect_type_id].description
|
||||
local text
|
||||
if(repeat_interval_time_left ~= nil) then
|
||||
text = description .. " ("..tostring(time_left).."/"..tostring(repeat_interval_time_left) .. "s )"
|
||||
text = description .. " ("..tostring(time_left).."/"..tostring(repeat_interval_time_left) .. " " .. S("s") .. ")"
|
||||
else
|
||||
text = description .. " ("..tostring(time_left).." s)"
|
||||
text = description .. " ("..tostring(time_left).." " .. S("s") .. ")"
|
||||
end
|
||||
text_id = player:hud_add({
|
||||
hud_elem_type = "text",
|
||||
@ -519,7 +521,7 @@ function playereffects.hud_effect(effect_type_id, player, pos, time_left, repeat
|
||||
text = playereffects.effect_types[effect_type_id].icon,
|
||||
alignment = { x = -1, y=0 },
|
||||
direction = 0,
|
||||
offset = { x = -200, y = pos*30 },
|
||||
offset = { x = -230, y = pos*30 },
|
||||
})
|
||||
end
|
||||
else
|
||||
|
@ -1,8 +1,11 @@
|
||||
sethome = {}
|
||||
|
||||
-- Intllib
|
||||
local S = intllib.make_gettext_pair()
|
||||
|
||||
sethome.set = function(name, pos)
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if not player or not pos then
|
||||
if not player or not minetest.is_valid_pos(pos) then
|
||||
return false
|
||||
end
|
||||
player:set_attribute("sethome:home", minetest.pos_to_string(pos))
|
||||
@ -39,9 +42,9 @@ minetest.register_chatcommand("home", {
|
||||
description = "Teleport you to your home point",
|
||||
func = function(name)
|
||||
if sethome.go(name) then
|
||||
return true, green("Teleported to home!")
|
||||
return true, green(S("Teleported to home!"))
|
||||
end
|
||||
return false, red("Set a home using /sethome")
|
||||
return false, red(S("Set a home using /sethome"))
|
||||
end,
|
||||
})
|
||||
|
||||
@ -51,9 +54,9 @@ minetest.register_chatcommand("sethome", {
|
||||
name = name or "" -- fallback to blank name if nil
|
||||
local player = minetest.get_player_by_name(name)
|
||||
if player and sethome.set(name, player:get_pos()) then
|
||||
return true, green("Home set!")
|
||||
return true, green(S("Home set!"))
|
||||
end
|
||||
return false, red("Player not found!")
|
||||
return false, red(S("Player not found!"))
|
||||
end,
|
||||
})
|
||||
|
||||
@ -64,13 +67,13 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||
local player_name = player:get_player_name()
|
||||
if fields.sethome_set then
|
||||
sethome.set(player_name, player:get_pos())
|
||||
minetest.chat_send_player(player_name, green("Home set!"))
|
||||
minetest.chat_send_player(player_name, green(S("Home set!")))
|
||||
elseif fields.sethome_go then
|
||||
if sethome.go(player_name) then
|
||||
sethome.go(player_name)
|
||||
minetest.chat_send_player(player_name, green("Teleported to home!"))
|
||||
minetest.chat_send_player(player_name, green(S("Teleported to home!")))
|
||||
else
|
||||
minetest.chat_send_player(player_name, red("Home is not set!"))
|
||||
minetest.chat_send_player(player_name, red(S("Home is not set!")))
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
5
files/sethome/locale/ru.txt
Normal file
5
files/sethome/locale/ru.txt
Normal file
@ -0,0 +1,5 @@
|
||||
Teleported to home! = Телепортировано домой!
|
||||
Set a home using /sethome = Установите дом используя /sethome
|
||||
Home set! = Дом установлен!
|
||||
Player not found! = Игрок не найден!
|
||||
Home is not set! = Дом не установлен!
|
Loading…
x
Reference in New Issue
Block a user