mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2025-07-16 15:20:39 +02:00
Compare commits
26 Commits
master
...
6f132186ab
Author | SHA1 | Date | |
---|---|---|---|
6f132186ab | |||
cb6e602497 | |||
aa04d4539f | |||
a977ec47fd | |||
8c56e27c94 | |||
6da71e1819 | |||
9649c0ed0e | |||
4633a276a2 | |||
1ac54a017d | |||
4c4fb3ba88 | |||
9d66a21271 | |||
15a84bdbf4 | |||
838c67ae86 | |||
132a362f85 | |||
03b077cd1b | |||
829b38c6fc | |||
70fdb8556b | |||
497c632b24 | |||
46eeb36784 | |||
9a31609cfd | |||
8e6a3740ae | |||
1fd87f5c51 | |||
e5dc9ed53a | |||
4bf5f22696 | |||
4f666f93d0 | |||
264833ed41 |
@ -1,6 +1,6 @@
|
||||
unused_args = false
|
||||
allow_defined_top = true
|
||||
max_line_length = 131
|
||||
max_line_length = 999
|
||||
|
||||
globals = {
|
||||
"unified_inventory",
|
||||
@ -11,9 +11,8 @@ read_globals = {
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
"dump",
|
||||
"core", "minetest",
|
||||
"minetest", "vector",
|
||||
"ItemStack", "datastorage",
|
||||
"vector",
|
||||
|
||||
"hb",
|
||||
"doors",
|
||||
|
2
init.lua
2
init.lua
@ -199,3 +199,5 @@ if minetest.settings:get_bool("unified_inventory_waypoints") ~= false then
|
||||
dofile(modpath.."/waypoints.lua")
|
||||
end
|
||||
dofile(modpath.."/legacy.lua") -- mod compatibility
|
||||
|
||||
minetest.log("action", "[unified_inventory] loaded.")
|
||||
|
@ -143,21 +143,18 @@ local function formspec_add_categories(player, formspec, ui_peruser)
|
||||
if ui.current_category[player_name] == category.name then
|
||||
scale = 1
|
||||
end
|
||||
formspec[n] = formspec_button(ui_peruser, "category_"..category.name, category.symbol, categories_pos,
|
||||
{column-1, 0}, scale, category.label)
|
||||
formspec[n] = formspec_button(ui_peruser, "category_"..category.name, category.symbol, categories_pos, {column-1, 0}, scale, category.label)
|
||||
n = n + 1
|
||||
end
|
||||
end
|
||||
if category_count > ui_peruser.pagecols and scroll_offset > 0 then
|
||||
-- prev
|
||||
formspec[n] = formspec_button(ui_peruser, "prev_category", "ui_left_icon.png", categories_scroll_pos,
|
||||
{ui_peruser.pagecols - 2, 0}, 0.8, S("Scroll categories left"))
|
||||
formspec[n] = formspec_button(ui_peruser, "prev_category", "ui_left_icon.png", categories_scroll_pos, {ui_peruser.pagecols - 2, 0}, 0.8, S("Scroll categories left"))
|
||||
n = n + 1
|
||||
end
|
||||
if category_count > ui_peruser.pagecols and category_count - scroll_offset > ui_peruser.pagecols then
|
||||
-- next
|
||||
formspec[n] = formspec_button(ui_peruser, "next_category", "ui_right_icon.png", categories_scroll_pos,
|
||||
{ui_peruser.pagecols - 1, 0}, 0.8, S("Scroll categories right"))
|
||||
formspec[n] = formspec_button(ui_peruser, "next_category", "ui_right_icon.png", categories_scroll_pos, {ui_peruser.pagecols - 1, 0}, 0.8, S("Scroll categories right"))
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -1,23 +1,23 @@
|
||||
# textdomain: unified_inventory
|
||||
Mixing=Мешать
|
||||
Cooking=Готовить
|
||||
Cooking=Варить
|
||||
Digging=Копать
|
||||
Bags=Сумки
|
||||
Bag @1=Сумка @1
|
||||
Small Bag=Малая сумка
|
||||
Medium Bag=Средняя сумка
|
||||
Large Bag=Большая сумка
|
||||
All Items=Все предметы
|
||||
Misc. Items=Разн. предметы
|
||||
Plant Life=Растения
|
||||
Building Materials=Стройматериалы
|
||||
Tools=Инструменты
|
||||
Minerals and Metals=Металлы и минералы
|
||||
Environment and Worldgen=Окружение и генер.мира
|
||||
Lighting=Освещение
|
||||
All Items=
|
||||
Misc. Items=
|
||||
Plant Life=
|
||||
Building Materials=
|
||||
Tools=
|
||||
Minerals and Metals=
|
||||
Environment and Worldgen=
|
||||
Lighting=
|
||||
and = и
|
||||
Scroll categories left=Листать влево
|
||||
Scroll categories right=Листать вправо
|
||||
Scroll categories left=
|
||||
Scroll categories right=
|
||||
Search=Поиск
|
||||
Reset search and display everything=Сброс поиска, показать всё
|
||||
First page=Первая страница
|
||||
@ -32,7 +32,7 @@ Page=Страница
|
||||
@1 of @2=@1 из @2
|
||||
Filter=Фильтр
|
||||
Can use the creative inventory=Можно использовать инвентарь творческого режима
|
||||
Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=Отображает инвентарь в полном режиме, если простой режим установлен глобально
|
||||
Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=
|
||||
Crafting Grid=Решетка крафта
|
||||
Crafting Guide=Книга рецептов
|
||||
Set home position=Установить позицию дома
|
||||
@ -59,11 +59,11 @@ Result=Результат
|
||||
Ingredient=Состав
|
||||
Show next recipe=Следующий рецепт
|
||||
Show next usage=Следующее использование
|
||||
Show previous recipe=Предыдущий рецепт
|
||||
Show previous usage=Предыдущая страница
|
||||
Show previous recipe=Прошлый рецепт
|
||||
Show previous usage=Прошлая страница
|
||||
@1 (@2)=
|
||||
Give me:=Дай мне:
|
||||
This recipe is too@@large to be displayed.=Этот рецепт слишком большой
|
||||
This recipe is too@@large to be displayed.=
|
||||
To craft grid:=На решeтку крафта:
|
||||
All=Все
|
||||
Crafting=Крафт
|
||||
@ -76,10 +76,10 @@ Waypoints=Путевые точки
|
||||
Select Waypoint #@1=Выбрать путевую точку №@1
|
||||
Waypoint @1=Путевая точка @1
|
||||
Set waypoint to current location=Установить путевую точку по текущей позиции
|
||||
Hide waypoint=Скрыть точку
|
||||
Show waypoint=Показать точку
|
||||
Hide coordinates=Скрыть координаты
|
||||
Show coordinates=Показать координаты
|
||||
Hide waypoint=
|
||||
Show waypoint=
|
||||
Hide coordinates=
|
||||
Show coordinates=
|
||||
Change color of waypoint display=Поменять цвет путевой точки
|
||||
Edit waypoint name=Переименовать путевую точку
|
||||
Waypoint active=Путевая точка включена
|
||||
@ -88,4 +88,13 @@ Finish editing=Закончить редакцию
|
||||
World position=Позиция мира
|
||||
Name=Имя
|
||||
HUD text color=Цвет текста HUDа
|
||||
Category:=Категории:
|
||||
|
||||
|
||||
##### not used anymore #####
|
||||
|
||||
invisible=невидимой
|
||||
visible=видимой
|
||||
Make waypoint @1=Сделать путевую точку @1
|
||||
Disable=Выключить
|
||||
Enable=Включить
|
||||
@1 display of waypoint coordinates=@1 показ координат путевых точек
|
||||
|
@ -1,92 +0,0 @@
|
||||
# textdomain: unified_inventory
|
||||
Replaces the default inventory and adds a number of features, such as a crafting guide=Замінює стандартний інвентар та додає ряд особливостей, таких як книга рецептів
|
||||
Mixing=Перемішати
|
||||
Cooking=Виплавити
|
||||
Digging=Викопати
|
||||
Bags=Сумки
|
||||
Bag @1=Сумка @1
|
||||
Small Bag=Мала сумка
|
||||
Medium Bag=Середня сумка
|
||||
Large Bag=Велика сумка
|
||||
All Items=Все
|
||||
Misc. Items=Різне
|
||||
Plant Life=Рослини
|
||||
Building Materials=Будматеріали
|
||||
Tools=Інструменти
|
||||
Minerals and Metals=Руди й метали
|
||||
Environment and Worldgen=Оточення та генерація світу
|
||||
Lighting=Освітлення
|
||||
and = та
|
||||
Scroll categories left=Ліворуч
|
||||
Scroll categories right=Праворуч
|
||||
Search=Пошук
|
||||
Reset search and display everything=Скинути пошук та відобразити усе
|
||||
First page=Перша сторінка
|
||||
Back three pages=3 сторінки назад
|
||||
Back one page=Попередня сторінка
|
||||
Forward one page=Наступна сторінка
|
||||
Forward three pages=3 сторінки вперед
|
||||
Last page=Остання сторінка
|
||||
No matching items=Не знайдено предметів
|
||||
No matches.=Немає результатів.
|
||||
Page=Сторінка
|
||||
@1 of @2=@1 з @2
|
||||
Filter=Фільтр
|
||||
Can use the creative inventory=Можна використовувати творчий інвентар
|
||||
Forces Unified Inventory to be displayed in Full mode if Lite mode is configured globally=Відображає повний режим, якщо простий режим сконфігуровано глобально
|
||||
Crafting Grid=Сітка майстрування
|
||||
Crafting Guide=Книга рецептів
|
||||
Set home position=Встановити позицію дому
|
||||
Home position set to: @1=Тепер дім розташований по координатам: @1
|
||||
You don't have the "home" privilege!=У вас немає привілею "home"!
|
||||
Go home=Додому
|
||||
Set time to day=День
|
||||
Time of day set to 6am=Час встановлено на 6:00
|
||||
You don't have the settime privilege!=Ви не можете встановлювати час (нема привілею "settime")
|
||||
Set time to night=Ніч
|
||||
Time of day set to 9pm=Час встановлено на 21:00
|
||||
Clear inventory=Очистити інвентар
|
||||
This button has been disabled outside of creative mode to prevent accidental inventory trashing.@nUse the trash slot instead.=Цю кнопку було вимкнено в творчому режимі, щоб запобігти випадковому очищенню інвентаря.@nВикористовуйте слот смітника натомість.
|
||||
Inventory cleared!=Інвентар очищено!
|
||||
Trash:=Смітник:
|
||||
Refill:=Заповнити:
|
||||
Any item belonging to the @1 group=Будь-який елемент із групи @1
|
||||
Any item belonging to the groups @1=Будь-який елемент із груп @1
|
||||
Recipe @1 of @2=Рецепт @1 із @2
|
||||
Usage @1 of @2=Використання @1 із @2
|
||||
No recipes=Немає рецептів
|
||||
No usages=Ніде не використовується
|
||||
Result=Результат
|
||||
Ingredient=Інгредієнт
|
||||
Show next recipe=Наступний рецепт
|
||||
Show next usage=Наступне використання
|
||||
Show previous recipe=Попередній рецепт
|
||||
Show previous usage=Попереднє використання
|
||||
@1 (@2)=@1 (@2)
|
||||
Give me:=Дай мені:
|
||||
This recipe is too@@large to be displayed.=Цей рецепт надто великий, щоб його відобразити
|
||||
To craft grid:=На сітку крафту:
|
||||
All=Все
|
||||
Crafting=Крафт
|
||||
White=Білий
|
||||
Yellow=Жовтий
|
||||
Red=Червоний
|
||||
Green=Зелений
|
||||
Blue=Синій
|
||||
Waypoints=Геомітки
|
||||
Select Waypoint #@1=Вибрати геомітку №@1
|
||||
Waypoint @1=Геомітка @1
|
||||
Set waypoint to current location=Встановити тут
|
||||
Hide waypoint=Сховати геомітку
|
||||
Show waypoint=Показати геомітку
|
||||
Hide coordinates=Сховати координати
|
||||
Show coordinates=Показати координати
|
||||
Change color of waypoint display=Змінити колір геомітки
|
||||
Edit waypoint name=Перейменувати геомітку
|
||||
Waypoint active=Геомітку показано
|
||||
Waypoint inactive=Геомітку приховано
|
||||
Finish editing=Закінчити редагування
|
||||
World position=Світова позиція
|
||||
Name=Назва
|
||||
HUD text color=Колір тексту
|
||||
Category:=Категорії:
|
51
register.lua
51
register.lua
@ -41,55 +41,6 @@ ui.register_button("craftguide", {
|
||||
tooltip = S("Crafting Guide")
|
||||
})
|
||||
|
||||
ui.register_button("home_gui_set", {
|
||||
type = "image",
|
||||
image = "ui_sethome_icon.png",
|
||||
tooltip = S("Set home position"),
|
||||
hide_lite=true,
|
||||
action = function(player)
|
||||
local player_name = player:get_player_name()
|
||||
if minetest.check_player_privs(player_name, {home=true}) then
|
||||
ui.set_home(player, player:get_pos())
|
||||
local home = ui.home_pos[player_name]
|
||||
if home ~= nil then
|
||||
minetest.sound_play("dingdong",
|
||||
{to_player=player_name, gain = 1.0})
|
||||
minetest.chat_send_player(player_name,
|
||||
S("Home position set to: @1", minetest.pos_to_string(home)))
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name,
|
||||
S("You don't have the \"home\" privilege!"))
|
||||
ui.set_inventory_formspec(player, ui.current_page[player_name])
|
||||
end
|
||||
end,
|
||||
condition = function(player)
|
||||
return minetest.check_player_privs(player:get_player_name(), {home=true})
|
||||
end,
|
||||
})
|
||||
|
||||
ui.register_button("home_gui_go", {
|
||||
type = "image",
|
||||
image = "ui_gohome_icon.png",
|
||||
tooltip = S("Go home"),
|
||||
hide_lite=true,
|
||||
action = function(player)
|
||||
local player_name = player:get_player_name()
|
||||
if minetest.check_player_privs(player_name, {home=true}) then
|
||||
if ui.go_home(player) then
|
||||
minetest.sound_play("teleport", {to_player = player_name})
|
||||
end
|
||||
else
|
||||
minetest.chat_send_player(player_name,
|
||||
S("You don't have the \"home\" privilege!"))
|
||||
ui.set_inventory_formspec(player, ui.current_page[player_name])
|
||||
end
|
||||
end,
|
||||
condition = function(player)
|
||||
return minetest.check_player_privs(player:get_player_name(), {home=true})
|
||||
end,
|
||||
})
|
||||
|
||||
ui.register_button("misc_set_day", {
|
||||
type = "image",
|
||||
image = "ui_sun_icon.png",
|
||||
@ -329,7 +280,7 @@ ui.register_page("craftguide", {
|
||||
local giveme_form =
|
||||
"label[" .. (give_x + 0.1) .. "," .. (craftguidey + 2.7) .. ";" .. F(S("Give me:")) .. "]" ..
|
||||
"button[" .. (give_x) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_1;1]"
|
||||
if item_def and item_def.type ~= "tool" then
|
||||
if item_def.type ~= "tool" then
|
||||
giveme_form = giveme_form ..
|
||||
"button[" .. (give_x + 0.8) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_10;10]" ..
|
||||
"button[" .. (give_x + 1.6) .. "," .. (craftguidey + 2.9) .. ";0.75,0.5;craftguide_giveme_99;99]"
|
||||
|
@ -164,8 +164,7 @@ ui.register_page("waypoints", {
|
||||
},
|
||||
{
|
||||
"toggle_display_pos",
|
||||
waypoint.display_pos and "ui_green_icon_background.png^ui_xyz_icon.png" or
|
||||
"ui_red_icon_background.png^ui_xyz_icon.png^(ui_no.png^[transformR90)",
|
||||
waypoint.display_pos and "ui_green_icon_background.png^ui_xyz_icon.png" or "ui_red_icon_background.png^ui_xyz_icon.png^(ui_no.png^[transformR90)",
|
||||
waypoint.display_pos and S("Hide coordinates") or S("Show coordinates")
|
||||
},
|
||||
{
|
||||
@ -255,7 +254,7 @@ local function update_hud(player, waypoints, temp, i)
|
||||
end
|
||||
if waypoint.active then
|
||||
temp.hud = player:hud_add({
|
||||
[core.features.hud_def_type_field and "type" or "hud_elem_type"] = "waypoint",
|
||||
hud_elem_type = "waypoint",
|
||||
number = hud_colors[waypoint.color or 1][2] ,
|
||||
name = name,
|
||||
text = "m",
|
||||
|
Reference in New Issue
Block a user