1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-16 07:20:31 +01:00

Merge branch 'master' of github.com:Ombridride/minetest-minetestforfun-server

This commit is contained in:
Ombridride 2015-06-30 19:45:23 +02:00
commit 16c5c0a61f
42 changed files with 639 additions and 188 deletions

View File

@ -105,6 +105,8 @@ elseif minetest.get_modpath("unified_inventory") then
unified_inventory.register_button("armor", { unified_inventory.register_button("armor", {
type = "image", type = "image",
image = "inventory_plus_armor.png", image = "inventory_plus_armor.png",
tooltip = "Armor inventory",
show_with = false, --Modif MFF (Crabman 30/06/2015)
}) })
unified_inventory.register_page("armor", { unified_inventory.register_page("armor", {
get_formspec = function(player) get_formspec = function(player)

View File

@ -77,6 +77,8 @@ if unified_inventory then --unified inventory installed
unified_inventory.register_button("worldedit_gui", { unified_inventory.register_button("worldedit_gui", {
type = "image", type = "image",
image = "inventory_plus_worldedit_gui.png", image = "inventory_plus_worldedit_gui.png",
tooltip = "Worldedit GUI",
show_with = "worldedit", --Modiff MFF (Crabman 30/06/2015)
}) })
minetest.register_on_player_receive_fields(function(player, formname, fields) minetest.register_on_player_receive_fields(function(player, formname, fields)

View File

@ -386,6 +386,55 @@ if minetest.get_modpath("food") ~= nil then
end end
-- player-action based hunger changes -- player-action based hunger changes
local exhausting_items = {
["helmet"] = {
["wood"] = 1,
["cactus"] = 2,
["steel"] = 4,
["bronze"] = 5,
["gold"] = 6,
["diamond"] = 3,
["mithril"] = 1
},
["chestplate"] = {
["wood"] = 1,
["cactus"] = 2,
["steel"] = 4,
["bronze"] = 5,
["gold"] = 6,
["diamond"] = 3,
["mithril"] = 1
},
["leggings"] = {
["wood"] = 1,
["cactus"] = 2,
["steel"] = 4,
["bronze"] = 5,
["gold"] = 6,
["diamond"] = 3,
["mithril"] = 1
},
["boots"] = {
["wood"] = 1,
["cactus"] = 2,
["steel"] = 4,
["bronze"] = 5,
["gold"] = 6,
["diamond"] = 3,
["mithril"] = 1
},
["shield"] = {
["wood"] = 1,
["cactus"] = 2,
["steel"] = 4,
["bronze"] = 5,
["gold"] = 6,
["diamond"] = 3,
["mithril"] = 1
}
}
function hbhunger.handle_node_actions(pos, oldnode, player, ext) function hbhunger.handle_node_actions(pos, oldnode, player, ext)
if not player or not player:is_player() then if not player or not player:is_player() then
return return
@ -403,6 +452,23 @@ function hbhunger.handle_node_actions(pos, oldnode, player, ext)
new = HUNGER_EXHAUST_MOVE new = HUNGER_EXHAUST_MOVE
end end
exhaus = exhaus + new exhaus = exhaus + new
-- Armor's exhaus
if minetest.get_modpath("3d_armor") then
local name, inv, arminv, pos = armor:get_valid_player(player, "[exhaus]")
local armorinv = arminv:get_list("armor")
-- table.foreach(armorinv, print)
for index, stack in ipairs(armorinv) do
if stack:get_count() > 0 then
local itemname = stack:get_name():split(":")[2]:split("_")[1]
local itemmaterial = stack:get_name():split(":")[2]:split("_")[2]
exhaus = exhaus + (exhausting_items[itemname][itemmaterial] or 0)/10 -- 0 is admin armor
-- Value is divided by 5 to give a larger scale to our values, without having to high nor
-- too low exhausting factor
end
end
end
if exhaus > HUNGER_EXHAUST_LVL then if exhaus > HUNGER_EXHAUST_LVL then
exhaus = 0 exhaus = 0
local h = tonumber(hbhunger.hunger[name]) local h = tonumber(hbhunger.hunger[name])

View File

@ -321,7 +321,12 @@ function load_blacklist()
end end
minetest.log("action", "[interact] Blacklist created") minetest.log("action", "[interact] Blacklist created")
end end
interact.blacklist = minetest.deserialize(file:read()) local line = file:read()
if not line then
interact.blacklist = {}
else
interact.blacklist = minetest.deserialize(line)
end
minetest.log("action", "[interact] Blacklist loaded") minetest.log("action", "[interact] Blacklist loaded")
file:close() file:close()
end end

View File

@ -216,6 +216,8 @@ end
unified_inventory.register_button("runes", { unified_inventory.register_button("runes", {
type = "image", type = "image",
image = "runes_heal_major.png", image = "runes_heal_major.png",
tooltip = "Rune inventory",
show_with = false, --Modif MFF (Crabman 30/06/2015)
}) })
unified_inventory.register_page("runes", { unified_inventory.register_page("runes", {
get_formspec = function(player) get_formspec = function(player)

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -173,6 +173,7 @@ if (minetest.get_modpath("unified_inventory")) then
type = "image", type = "image",
image = "soundset_menu_icon.png", image = "soundset_menu_icon.png",
tooltip = "sounds menu ", tooltip = "sounds menu ",
show_with = false, --Modif MFF (Crabman 30/06/2015)
action = function(player) action = function(player)
local name = player:get_player_name() local name = player:get_player_name()
if not name then return end if not name then return end

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -84,6 +84,8 @@ unified_inventory.register_page("u_skins", {
unified_inventory.register_button("u_skins", { unified_inventory.register_button("u_skins", {
type = "image", type = "image",
image = "u_skins_button.png", image = "u_skins_button.png",
tooltip = "Skin inventory",
show_with = false, -- modif MFF (Crabman 30/06/2015)
}) })
-- Create all of the skin-picker pages. -- Create all of the skin-picker pages.

View File

@ -32,7 +32,8 @@ unified_inventory.register_page("bags", {
unified_inventory.register_button("bags", { unified_inventory.register_button("bags", {
type = "image", type = "image",
image = "ui_bags_icon.png", image = "ui_bags_icon.png",
tooltip = S("Bags") tooltip = S("Bags"),
show_with = false, --Modif MFF (Crabman 30/06/2015)
}) })
for i = 1, 4 do for i = 1, 4 do
@ -133,7 +134,7 @@ minetest.register_tool("unified_inventory:bag_large", {
minetest.register_craft({ minetest.register_craft({
output = "unified_inventory:bag_small", output = "unified_inventory:bag_small",
recipe = { recipe = {
{"", "default:stick", ""}, {"", "group:stick", ""},
{"group:wood", "group:wood", "group:wood"}, {"group:wood", "group:wood", "group:wood"},
{"group:wood", "group:wood", "group:wood"}, {"group:wood", "group:wood", "group:wood"},
}, },
@ -143,8 +144,8 @@ minetest.register_craft({
output = "unified_inventory:bag_medium", output = "unified_inventory:bag_medium",
recipe = { recipe = {
{"", "", ""}, {"", "", ""},
{"default:stick", "unified_inventory:bag_small", "default:stick"}, {"group:stick", "unified_inventory:bag_small", "group:stick"},
{"default:stick", "unified_inventory:bag_small", "default:stick"}, {"group:stick", "unified_inventory:bag_small", "group:stick"},
}, },
}) })
@ -152,8 +153,8 @@ minetest.register_craft({
output = "unified_inventory:bag_large", output = "unified_inventory:bag_large",
recipe = { recipe = {
{"", "", ""}, {"", "", ""},
{"default:stick", "unified_inventory:bag_medium", "default:stick"}, {"group:stick", "unified_inventory:bag_medium", "group:stick"},
{"default:stick", "unified_inventory:bag_medium", "default:stick"}, {"group:stick", "unified_inventory:bag_medium", "group:stick"},
}, },
}) })

View File

@ -68,11 +68,11 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
-- Inventory page controls -- Inventory page controls
local start = math.floor( local start = math.floor(
unified_inventory.current_index[player_name] / 80 + 1) unified_inventory.current_index[player_name] / unified_inventory.items_per_page + 1)
local start_i = start local start_i = start
local pagemax = math.floor( local pagemax = math.floor(
(#unified_inventory.filtered_items_list[player_name] - 1) (#unified_inventory.filtered_items_list[player_name] - 1)
/ (80) + 1) / (unified_inventory.items_per_page) + 1)
if fields.start_list then if fields.start_list then
start_i = 1 start_i = 1
@ -101,7 +101,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if not (start_i == start) then if not (start_i == start) then
minetest.sound_play("paperflip1", minetest.sound_play("paperflip1",
{to_player=player_name, gain = 1.0}) {to_player=player_name, gain = 1.0})
unified_inventory.current_index[player_name] = (start_i - 1) * 80 + 1 unified_inventory.current_index[player_name] = (start_i - 1) * unified_inventory.items_per_page + 1
unified_inventory.set_inventory_formspec(player, unified_inventory.set_inventory_formspec(player,
unified_inventory.current_page[player_name]) unified_inventory.current_page[player_name])
end end

View File

@ -4,35 +4,65 @@ local modpath = minetest.get_modpath(minetest.get_current_modname())
local worldpath = minetest.get_worldpath() local worldpath = minetest.get_worldpath()
-- Data tables definitions -- Data tables definitions
unified_inventory = {} unified_inventory = {
unified_inventory.activefilter = {} activefilter = {},
unified_inventory.active_search_direction = {} active_search_direction = {},
unified_inventory.alternate = {} alternate = {},
unified_inventory.current_page = {} current_page = {},
unified_inventory.current_searchbox = {} current_searchbox = {},
unified_inventory.current_index = {} current_index = {},
unified_inventory.current_item = {} current_item = {},
unified_inventory.current_craft_direction = {} current_craft_direction = {},
unified_inventory.registered_craft_types = {} registered_craft_types = {},
unified_inventory.crafts_for = { usage = {}, recipe = {} } crafts_for = {usage = {}, recipe = {} },
unified_inventory.players = {} players = {},
unified_inventory.items_list_size = 0 items_list_size = 0,
unified_inventory.items_list = {} items_list = {},
unified_inventory.filtered_items_list_size = {} filtered_items_list_size = {},
unified_inventory.filtered_items_list = {} filtered_items_list = {},
unified_inventory.pages = {} pages = {},
unified_inventory.buttons = {} buttons = {},
-- Homepos stuff -- Homepos stuff
unified_inventory.home_pos = {} home_pos = {},
unified_inventory.home_filename = home_filename = worldpath.."/unified_inventory_home.home",
worldpath.."/unified_inventory_home.home"
-- Default inventory page -- Default inventory page
unified_inventory.default = "craft" default = "craft",
-- intllib
gettext = rawget(_G, "intllib") and intllib.Getter() or function(s) return s end,
-- "Lite" mode
lite_mode = minetest.setting_getbool("unified_inventory_lite"),
pagecols = 8,
pagerows = 10,
page_y = 0,
formspec_y = 1,
main_button_x = 0,
main_button_y = 9,
craft_result_x = 0.3,
craft_result_y = 0.5,
form_header_y = 0
}
if unified_inventory.lite_mode then
unified_inventory.pagecols = 4
unified_inventory.pagerows = 6
unified_inventory.page_y = 0.25
unified_inventory.formspec_y = 0.47
unified_inventory.main_button_x = 8.2
unified_inventory.main_button_y = 6.5
unified_inventory.craft_result_x = 2.8
unified_inventory.craft_result_y = 3.4
unified_inventory.form_header_y = -0.1
end
unified_inventory.items_per_page = unified_inventory.pagecols * unified_inventory.pagerows
-- Disable default creative inventory -- Disable default creative inventory
if creative_inventory then if rawget(_G, "creative_inventory") then
function creative_inventory.set_creative_formspec(player, start_i, pagenum) function creative_inventory.set_creative_formspec(player, start_i, pagenum)
return return
end end
@ -43,8 +73,13 @@ dofile(modpath.."/api.lua")
dofile(modpath.."/internal.lua") dofile(modpath.."/internal.lua")
dofile(modpath.."/callbacks.lua") dofile(modpath.."/callbacks.lua")
dofile(modpath.."/register.lua") dofile(modpath.."/register.lua")
dofile(modpath.."/bags.lua")
if not unified_inventory.lite_mode then
dofile(modpath.."/bags.lua")
end
dofile(modpath.."/item_names.lua") dofile(modpath.."/item_names.lua")
if minetest.get_modpath("datastorage") then
if minetest.get_modpath("datastorage") and not unified_inventory.lite_mode then
dofile(modpath.."/waypoints.lua") dofile(modpath.."/waypoints.lua")
end end

View File

@ -30,10 +30,16 @@ function unified_inventory.get_formspec(player, page)
local pagedef = unified_inventory.pages[page] local pagedef = unified_inventory.pages[page]
local formspec = "size[14,10]" local formspec = "size[14,10]"
local fsdata = nil
-- Background -- Background
formspec = formspec .. "background[-0.19,-0.25;14.4,10.75;ui_form_bg.png]" formspec = formspec .. "background[-0.19,-0.25;14.4,10.75;ui_form_bg.png]"
if unified_inventory.lite_mode then
formspec = "size[11,7.7]"
formspec = formspec .. "background[-0.19,-0.2;11.4,8.4;ui_form_bg.png]"
end
local fsdata = nil
-- Current page -- Current page
if unified_inventory.pages[page] then if unified_inventory.pages[page] then
fsdata = pagedef.get_formspec(player) fsdata = pagedef.get_formspec(player)
@ -42,23 +48,39 @@ function unified_inventory.get_formspec(player, page)
return "" -- Invalid page name return "" -- Invalid page name
end end
local privs = minetest.get_player_privs(player_name) --Modif MFF (Crabman 30/06/2015) DEBUT,12 buttons max by row and not show if player has not privs requiered
local button_row = 0
local button_col = 0
local i = 1
-- Main buttons -- Main buttons
for i, def in pairs(unified_inventory.buttons) do for _, def in pairs(unified_inventory.buttons) do
local tooltip = def.tooltip or "" if (def.show_with == nil or def.show_with == false) or (privs[def.show_with] and privs[def.show_with] == true) then
if def.type == "image" then if unified_inventory.lite_mode and i > 4 then
formspec = formspec.."image_button[" button_row = 1
..(0.65 * (i - 1))..",9;0.8,0.8;" button_col = 1
..minetest.formspec_escape(def.image)..";" elseif not unified_inventory.lite_mode and i > 12 then
..minetest.formspec_escape(def.name)..";]" button_row = 1
.."tooltip["..minetest.formspec_escape(def.name) i = 1
..";"..tooltip.."]" end
local tooltip = def.tooltip or ""
if def.type == "image" then
formspec = formspec.."image_button["
..( unified_inventory.main_button_x + 0.65 * (i - 1) - button_col * 0.65 * 4)
..","..(unified_inventory.main_button_y + button_row * 0.7)..";0.8,0.8;"
..minetest.formspec_escape(def.image)..";"
..minetest.formspec_escape(def.name)..";]"
.."tooltip["..minetest.formspec_escape(def.name)
..";"..tooltip.."]"
end
i = i + 1
end end
end end --Modif MFF (Crabman 30/06/2015) FIN
if fsdata.draw_inventory ~= false then if fsdata.draw_inventory ~= false then
-- Player inventory -- Player inventory
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec .. "list[current_player;main;0,4.5;8,4;]" formspec = formspec .. "list[current_player;main;0,"..(unified_inventory.formspec_y + 3.5)..";8,4;]"
end end
if fsdata.draw_item_list == false then if fsdata.draw_item_list == false then
@ -67,67 +89,95 @@ function unified_inventory.get_formspec(player, page)
-- Controls to flip items pages -- Controls to flip items pages
local start_x = 9.2 local start_x = 9.2
formspec = formspec
.. "image_button[" .. (start_x + 0.6 * 0)
.. ",9;.8,.8;ui_skip_backward_icon.png;start_list;]"
.. "tooltip[start_list;" .. minetest.formspec_escape(S("First page")) .. "]"
.. "image_button[" .. (start_x + 0.6 * 1) if not unified_inventory.lite_mode then
.. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;]" formspec = formspec
.. "tooltip[rewind3;" .. minetest.formspec_escape(S("Back three pages")) .. "]" .. "image_button[" .. (start_x + 0.6 * 0)
.. ",9;.8,.8;ui_skip_backward_icon.png;start_list;]"
.. "tooltip[start_list;" .. minetest.formspec_escape(S("First page")) .. "]"
.. "image_button[" .. (start_x + 0.6 * 2) .. "image_button[" .. (start_x + 0.6 * 1)
.. ",9;.8,.8;ui_left_icon.png;rewind1;]" .. ",9;.8,.8;ui_doubleleft_icon.png;rewind3;]"
.. "tooltip[rewind1;" .. minetest.formspec_escape(S("Back one page")) .. "]" .. "tooltip[rewind3;" .. minetest.formspec_escape(S("Back three pages")) .. "]"
.. "image_button[" .. (start_x + 0.6 * 2)
.. ",9;.8,.8;ui_left_icon.png;rewind1;]"
.. "tooltip[rewind1;" .. minetest.formspec_escape(S("Back one page")) .. "]"
.. "image_button[" .. (start_x + 0.6 * 3) .. "image_button[" .. (start_x + 0.6 * 3)
.. ",9;.8,.8;ui_right_icon.png;forward1;]" .. ",9;.8,.8;ui_right_icon.png;forward1;]"
.. "tooltip[forward1;" .. minetest.formspec_escape(S("Forward one page")) .. "]" .. "tooltip[forward1;" .. minetest.formspec_escape(S("Forward one page")) .. "]"
.. "image_button[" .. (start_x + 0.6 * 4)
.. ",9;.8,.8;ui_doubleright_icon.png;forward3;]"
.. "tooltip[forward3;" .. minetest.formspec_escape(S("Forward three pages")) .. "]"
.. "image_button[" .. (start_x + 0.6 * 4) .. "image_button[" .. (start_x + 0.6 * 5)
.. ",9;.8,.8;ui_doubleright_icon.png;forward3;]" .. ",9;.8,.8;ui_skip_forward_icon.png;end_list;]"
.. "tooltip[forward3;" .. minetest.formspec_escape(S("Forward three pages")) .. "]" .. "tooltip[end_list;" .. minetest.formspec_escape(S("Last page")) .. "]"
else
.. "image_button[" .. (start_x + 0.6 * 5) formspec = formspec
.. ",9;.8,.8;ui_skip_forward_icon.png;end_list;]" .. "image_button[" .. (8.2 + 0.65 * 0)
.. "tooltip[end_list;" .. minetest.formspec_escape(S("Last page")) .. "]" .. ",5.8;.8,.8;ui_skip_backward_icon.png;start_list;]"
.. "tooltip[start_list;" .. minetest.formspec_escape(S("First page")) .. "]"
.. "image_button[" .. (8.2 + 0.65 * 1)
.. ",5.8;.8,.8;ui_left_icon.png;rewind1;]"
.. "tooltip[rewind1;" .. minetest.formspec_escape(S("Back one page")) .. "]"
.. "image_button[" .. (8.2 + 0.65 * 2)
.. ",5.8;.8,.8;ui_right_icon.png;forward1;]"
.. "tooltip[forward1;" .. minetest.formspec_escape(S("Forward one page")) .. "]"
.. "image_button[" .. (8.2 + 0.65 * 3)
.. ",5.8;.8,.8;ui_skip_forward_icon.png;end_list;]"
.. "tooltip[end_list;" .. minetest.formspec_escape(S("Last page")) .. "]"
end
-- Search box -- Search box
formspec = formspec .. "field[9.5,8.325;3,1;searchbox;;"
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]" if not unified_inventory.lite_mode then
formspec = formspec .. "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]" formspec = formspec .. "field[9.5,8.325;3,1;searchbox;;"
.. "tooltip[searchbutton;" ..S("Search") .. "]" .. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
formspec = formspec .. "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]"
.. "tooltip[searchbutton;" ..S("Search") .. "]"
else
formspec = formspec .. "field[8.5,5.225;2.2,1;searchbox;;"
.. minetest.formspec_escape(unified_inventory.current_searchbox[player_name]) .. "]"
formspec = formspec .. "image_button[10.3,5;.8,.8;ui_search_icon.png;searchbutton;]"
.. "tooltip[searchbutton;" ..S("Search") .. "]"
end
local no_matches = "No matching items"
if unified_inventory.lite_mode then
no_matches = "No matches."
end
-- Items list -- Items list
if #unified_inventory.filtered_items_list[player_name] == 0 then if #unified_inventory.filtered_items_list[player_name] == 0 then
formspec = formspec.."label[8.2,0;" .. S("No matching items") .. "]" formspec = formspec.."label[8.2,"..unified_inventory.form_header_y..";" .. S(no_matches) .. "]"
else else
local dir = unified_inventory.active_search_direction[player_name] local dir = unified_inventory.active_search_direction[player_name]
local list_index = unified_inventory.current_index[player_name] local list_index = unified_inventory.current_index[player_name]
local page = math.floor(list_index / (80) + 1) local page = math.floor(list_index / (unified_inventory.items_per_page) + 1)
local pagemax = math.floor( local pagemax = math.floor(
(#unified_inventory.filtered_items_list[player_name] - 1) (#unified_inventory.filtered_items_list[player_name] - 1)
/ (80) + 1) / (unified_inventory.items_per_page) + 1)
local item = {} local item = {}
for y = 0, 9 do for y = 0, unified_inventory.pagerows - 1 do
for x = 0, 7 do for x = 0, unified_inventory.pagecols - 1 do
local name = unified_inventory.filtered_items_list[player_name][list_index] local name = unified_inventory.filtered_items_list[player_name][list_index]
if minetest.registered_items[name] then if minetest.registered_items[name] then
formspec = formspec.."item_image_button[" formspec = formspec.."item_image_button["
..(8.2 + x * 0.7).."," ..(8.2 + x * 0.7)..","
..(1 + y * 0.7)..";.81,.81;" ..(unified_inventory.formspec_y + unified_inventory.page_y + y * 0.7)..";.81,.81;"
..name..";item_button_"..dir.."_" ..name..";item_button_"..dir.."_"
..unified_inventory.mangle_for_formspec(name)..";]" ..unified_inventory.mangle_for_formspec(name)..";]"
list_index = list_index + 1 list_index = list_index + 1
end
end end
end end
end formspec = formspec.."label[8.2,"..unified_inventory.form_header_y..";"..S("Page") .. ": "
formspec = formspec.."label[8.2,0;"..S("Page") .. ": "
.. S("%s of %s"):format(page,pagemax).."]" .. S("%s of %s"):format(page,pagemax).."]"
end end
if unified_inventory.activefilter[player_name] ~= "" then if unified_inventory.activefilter[player_name] ~= "" then
formspec = formspec.."label[8.2,0.4;" .. S("Filter") .. ":]" formspec = formspec.."label[8.2,"..(unified_inventory.form_header_y + 0.4)..";" .. S("Filter") .. ":]"
formspec = formspec.."label[9,0.4;"..minetest.formspec_escape(unified_inventory.activefilter[player_name]).."]" formspec = formspec.."label[9.1,"..(unified_inventory.form_header_y + 0.4)..";"..minetest.formspec_escape(unified_inventory.activefilter[player_name]).."]"
end end
return formspec return formspec
end end
@ -141,6 +191,7 @@ end
--apply filter to the inventory list (create filtered copy of full one) --apply filter to the inventory list (create filtered copy of full one)
function unified_inventory.apply_filter(player, filter, search_dir) function unified_inventory.apply_filter(player, filter, search_dir)
if not player then return false end
local player_name = player:get_player_name() local player_name = player:get_player_name()
local lfilter = string.lower(filter) local lfilter = string.lower(filter)
local ffilter local ffilter

View File

@ -0,0 +1,72 @@
# Translation by kilbith
# Template
### bags.lua ###
Bags = Sacs
Bag 1 = Sac 1
Bag 2 = Sac 2
Bag 3 = Sac 3
Bag 4 = Sac 4
Small Bag = Petit sac
Medium Bag = Sac moyen
Large Bag = Grand sac
### inernal.lua ###
First page = 1ère page
Back three pages = 3 pages en arrière
Back one page = Page précédente
Forward one page = Page suivante
Forward three pages = 3 pages en avant
Last page = Dernière page
No matching items = Aucun élément correspondant
Page = Page
%s of %s = %s de %s
Filter = Filtre
Search = Rechercher
### register.lua ###
Can use the creative inventory = Vous pouvez utiliser l'inventaire créatif
Home position set to: %s = Position de votre base fixée à : %s
Time of day set to 6am = Heure fixée à 6h
You don't have the settime priviledge! = Vous n'avez pas le privilège 'settime' !
Time of day set to 9pm = Heure fixée à 21h
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Ce bouton a été désactivé en dehors du mode créatif pour éviter des saccages dans l'inventaire.\nUtilisez plutôt la case poubelle.
Inventory Cleared! = Inventaire vidé !
Crafting = Création
Trash: = Poubelle :
Refill: = Remplir :
Crafting Guide = Guide de création
Method: = Méthode :
Result: %s = Résultat : %s
crafting = fabrication
shapeless crafting = fabrication sans forme
cooking = cuisson
alloy cooking = cuisson des métaux
Copy to craft grid: = Copier sur la grille de création
All = Tout
Recipe %s of %s = Recette %s de %d
Alternate = Alternative
Crafting Grid = Grille de création
### waypoints.lua ###
White = Blanc
Yellow = Jaune
Red = Rouge
Green = Vert
Blue = Bleu
Waypoints = Point de passage
Waypoint active = Point de passage actif
Waypoint inactive = Point de passage inactif
World position = Position dans le monde
Name = Nom
HUD text color = Couleur de texte du HUD
Edit waypoint name = Editer le nom du point de passage
Rename waypoint = Renommer le point de passage
Change color of waypoint display = Changer la couleur du point de passage
Set waypoint to current location = Marquer un point de passage à la position actuelle
Make waypoint visible = Rendre visible le point de passage
Make waypoint invisible = Rendre invisible le point de passage
Disable display of waypoint coordinates = Masquer les coordonnées des points de passages
Enable display of waypoint coordinates = Montrer les coordonnées des points de passages
Finish editing = Terminer l'édition
Select Waypoint #%d = Choisir un point de passage #%d

View File

@ -0,0 +1,76 @@
# Translation by eternal_sorrow
# Template
### bags.lua ###
Bags = Сумки
Bag 1 = Сумка 1
Bag 2 = Сумка 2
Bag 3 = Сумка 3
Bag 4 = Сумка 4
Small Bag = Малая сумка
Medium Bag = Средняя сумка
Large Bag = Большая сумка
### inernal.lua ###
First page = Первая страница
Back three pages = Назад на три страницы
Back one page = Назад на одну страницу
Forward one page = Вперед на одну страницу
Forward three pages = Вперед на три страницы
Last page = Последняя страница
No matching items = Совпадений нет
Page = Страница
%s of %s = %s из %s
Filter = Фильтр
Search = Поиск
### register.lua ###
Can use the creative inventory = Можно использовать инвентарь творческого режима
Home position set to: %s = Дом теперь расположен по коодинатам: %s
Time of day set to 6am = Установлено время 6 утра
You don't have the settime priviledge! = Вам не разрешено устанавливать время!
Time of day set to 9pm = Установлено время 9 вечера
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Эта кнопка отключена вне творческого режима, чтобы предотвратить случайное уничтожение предметов.\nИспользуйте слот корзины вместо нее.
Inventory Cleared! = Инвентарь очищен!
Crafting = Крафт
Trash: = Корзина:
Refill: = Размножить:
Crafting Guide = Книга рецептов
Method: = Способ:
Result: %s = Результат: %s
crafting = крафт
shapeless crafting = бесформенный крафт
cooking = жарка
alloy cooking = приготовление сплавов
Copy to craft grid: = В решетку крафта:
All = Все
Recipe %s of %s = Рецепт %s из %s
Alternate = Следующий
Crafting Grid = Решетка крафта
Go home = Отправиться домой
Set time to day = День
Set time to night = Ночь
Clear inventory = Очистить инвентарь
### waypoints.lua ###
White = Белый
Yellow = Желтый
Red = Красный
Green = Зелёный
Blue = Синий
Waypoints = Путевые точки
Waypoint active = Путевая точка активна
Waypoint inactive = Путевая точка неактивна
World position = Позиция
Name = Имя
HUD text color = Цвет текста
Edit waypoint name = Редактировать имя путевой точки
Rename waypoint = Переименовать путевую точку
Change color of waypoint display = Изменить цвет путевой точки
Set waypoint to current location = Установить путевую точку в текущем местоположении
Make waypoint visible = Сделать путевую точку видимой
Make waypoint invisible = Сделать путевую точку невидимой
Disable display of waypoint coordinates = Отключить отображение координат путевой точки
Enable display of waypoint coordinates = Включить отображение координат путевой точки
Finish editing = Завершить редактирование
Select Waypoint #%d = Выбрать путевую точку №%d

View File

@ -0,0 +1,72 @@
# Translation by Mahmutelmas06@hotmail.com
# Template
### bags.lua ###
Bags = Çantalarım
Bag 1 = 1. Çanta
Bag 2 = 2. Çanta
Bag 3 = 3. Çanta
Bag 4 = 4. Çanta
Small Bag = Küçük Çanta
Medium Bag = Çanta
Large Bag = Büyük Çanta
### inernal.lua ###
First page = İlk Sayfa
Back three pages = 3 Sayfa Gerile
Back one page = Geri
Forward one page = İleri
Forward three pages = 3 Sayfa İlerile
Last page = Son Sayfa
No matching items = Eşleşme yok
Page = Sayfa
%s of %s = %s dan %s
Filter = Süzgeç
Search = Ara
### register.lua ###
Can use the creative inventory = Yaratıcı envanteri kullanabilir
Home position set to: %s = Yeni eviniz: %s
Time of day set to 6am = Saat 06:00 olarak ayarlandı
You don't have the settime priviledge = Saati düzenleme yetkiniz yok!
Time of day set to 9pm = Saat 19:00 olarak ayarlandı
This button has been disabled outside of creative mode to prevent accidental inventory trashing.\nUse the trash slot instead. = Yaratıcı modu dışında iken bu tuş kullanılamaz.
Inventory Cleared! = Envanter temizlendi!
Crafting = Üretim
Trash: = Çöp
Refill: = Doldur
Crafting Guide = Kılavuz
Method: = Yöntem
Result: %s = Çıktı: %s
crafting = üretim
shapeless crafting = şekilsiz üretim
cooking = pişirme
alloy cooking = karıştırma
Copy to craft grid: = Üretim tablosuna kopyala
All = Tümü
Recipe %s of %s = %s dan %s tarifi
Alternate = Altarnatif
Crafting Grid = Üretim tablosu
### waypoints.lua ###
White = Beyaz
Yellow = Sarı
Red = Kırmızı
Green = Yeşil
Blue = Mavi
Waypoints = Konum Noktaları
Waypoint active = Konum Etkin
Waypoint inactive = Konum Devredışı
World position = Dünya konumu
Name = İsim
HUD text color = Metin rengi
Edit waypoint name = Konum Noktasını Düzenle
Rename waypoint = Konum Noktasını Adlandır
Change color of waypoint display = Konum Gösterge Rengi
Set waypoint to current location = Bulunduğun noktayı işaretle
Make waypoint visible = Konumlar görünür
Make waypoint invisible = Konumlar gözükmez
Disable display of waypoint coordinates = Koordinatları gizle
Enable display of waypoint coordinates = Koordinatları göster
Finish editing = Düzenleme bitti
Select Waypoint #%d = #%d konum noktası seç

View File

@ -33,81 +33,90 @@ trash:set_size("main", 1)
unified_inventory.register_button("craft", { unified_inventory.register_button("craft", {
type = "image", type = "image",
image = "ui_craft_icon.png", image = "ui_craft_icon.png",
tooltip = S("Crafting Grid") tooltip = S("Crafting Grid"),
show_with = false, --Modif MFF (Crabman 30/06/2015)
}) })
unified_inventory.register_button("craftguide", { unified_inventory.register_button("craftguide", {
type = "image", type = "image",
image = "ui_craftguide_icon.png", image = "ui_craftguide_icon.png",
tooltip = S("Crafting Guide") tooltip = S("Crafting Guide"),
show_with = false, --Modif MFF (Crabman 30/06/2015)
}) })
unified_inventory.register_button("home_gui_set", { if not unified_inventory.lite_mode then
type = "image", unified_inventory.register_button("home_gui_set", {
image = "ui_sethome_icon.png", type = "image",
tooltip = S("Set home position"), image = "ui_sethome_icon.png",
action = function(player) tooltip = S("Set home position"),
if home.sethome(player:get_player_name()) == true then show_with = "interact", --Modif MFF (Crabman 30/06/2015)
minetest.sound_play("dingdong", action = function(player)
if home.sethome(player:get_player_name()) == true then --modif MFF
minetest.sound_play("dingdong",
{to_player=player:get_player_name(), gain = 1.0}) {to_player=player:get_player_name(), gain = 1.0})
end end
end, end,
}) })
unified_inventory.register_button("home_gui_go", { unified_inventory.register_button("home_gui_go", {
type = "image", type = "image",
image = "ui_gohome_icon.png", image = "ui_gohome_icon.png",
tooltip = S("Go home"), tooltip = S("Go home"),
action = function(player) show_with = "interact", --Modif MFF (Crabman 30/06/2015)
if home.tohome(player:get_player_name()) == true then action = function(player)
minetest.sound_play("teleport", if home.tohome(player:get_player_name()) == true then --modif MFF
{to_player=player:get_player_name(), gain = 1.0}) minetest.sound_play("teleport",
end {to_player=player:get_player_name(), gain = 1.0})
end, end
}) end,
})
unified_inventory.register_button("misc_set_day", { unified_inventory.register_button("misc_set_day", {
type = "image", type = "image",
image = "ui_sun_icon.png", image = "ui_sun_icon.png",
tooltip = S("Set time to day"), tooltip = S("Set time to day"),
action = function(player) show_with = "settime", --Modif MFF (Crabman 30/06/2015)
local player_name = player:get_player_name() action = function(player)
if minetest.check_player_privs(player_name, {settime=true}) then local player_name = player:get_player_name()
minetest.sound_play("birds", if minetest.check_player_privs(player_name, {settime=true}) then
{to_player=player_name, gain = 1.0}) minetest.sound_play("birds",
minetest.set_timeofday((6000 % 24000) / 24000) {to_player=player_name, gain = 1.0})
minetest.chat_send_player(player_name, minetest.set_timeofday((6000 % 24000) / 24000)
S("Time of day set to 6am")) minetest.chat_send_player(player_name,
else S("Time of day set to 6am"))
minetest.chat_send_player(player_name, else
S("You don't have the settime priviledge!")) minetest.chat_send_player(player_name,
end
end,
})
unified_inventory.register_button("misc_set_night", {
type = "image",
image = "ui_moon_icon.png",
tooltip = S("Set time to night"),
action = function(player)
local player_name = player:get_player_name()
if minetest.check_player_privs(player_name, {settime=true}) then
minetest.sound_play("owl",
{to_player=player_name, gain = 1.0})
minetest.set_timeofday((21000 % 24000) / 24000)
minetest.chat_send_player(player_name,
S("Time of day set to 9pm"))
else
minetest.chat_send_player(player_name,
S("You don't have the settime priviledge!")) S("You don't have the settime priviledge!"))
end end
end, end,
}) })
unified_inventory.register_button("misc_set_night", {
type = "image",
image = "ui_moon_icon.png",
tooltip = S("Set time to night"),
show_with = "settime", --Modif MFF (Crabman 30/06/2015)
action = function(player)
local player_name = player:get_player_name()
if minetest.check_player_privs(player_name, {settime=true}) then
minetest.sound_play("owl",
{to_player=player_name, gain = 1.0})
minetest.set_timeofday((21000 % 24000) / 24000)
minetest.chat_send_player(player_name,
S("Time of day set to 9pm"))
else
minetest.chat_send_player(player_name,
S("You don't have the settime priviledge!"))
end
end,
})
end
unified_inventory.register_button("clear_inv", { unified_inventory.register_button("clear_inv", {
type = "image", type = "image",
image = "ui_trash_icon.png", image = "ui_trash_icon.png",
tooltip = S("Clear inventory"), tooltip = S("Clear inventory"),
show_with = "creative", --Modif MFF (Crabman 30/06/2015)
action = function(player) action = function(player)
local player_name = player:get_player_name() local player_name = player:get_player_name()
if not unified_inventory.is_creative(player_name) then if not unified_inventory.is_creative(player_name) then
@ -128,23 +137,22 @@ unified_inventory.register_button("clear_inv", {
unified_inventory.register_page("craft", { unified_inventory.register_page("craft", {
get_formspec = function(player, formspec) get_formspec = function(player, formspec)
local player_name = player:get_player_name() local player_name = player:get_player_name()
local formspec = "background[0,1;8,3;ui_crafting_form.png]" local formspec = "background[0,"..unified_inventory.formspec_y..";8,3;ui_crafting_form.png]"
formspec = formspec.."background[0,4.5;8,4;ui_main_inventory.png]" formspec = formspec.."background[0,"..(unified_inventory.formspec_y + 3.5)..";8,4;ui_main_inventory.png]"
formspec = formspec.."label[0,0;Crafting]" formspec = formspec.."label[0,"..unified_inventory.form_header_y..";Crafting]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
formspec = formspec.."list[current_player;craftpreview;6,1;1,1;]" formspec = formspec.."list[current_player;craftpreview;6,"..unified_inventory.formspec_y..";1,1;]"
formspec = formspec.."list[current_player;craft;2,1;3,3;]" formspec = formspec.."list[current_player;craft;2,"..unified_inventory.formspec_y..";3,3;]"
formspec = formspec.."label[7,2.5;" .. S("Trash:") .. "]" formspec = formspec.."label[7,"..(unified_inventory.formspec_y + 1.5)..";" .. S("Trash:") .. "]"
formspec = formspec.."list[detached:trash;main;7,3;1,1;]" formspec = formspec.."list[detached:trash;main;7,"..(unified_inventory.formspec_y + 2)..";1,1;]"
if unified_inventory.is_creative(player_name) then if unified_inventory.is_creative(player_name) then
formspec = formspec.."label[0,2.5;" .. S("Refill:") .. "]" formspec = formspec.."label[0,"..(unified_inventory.formspec_y + 1.5)..";" .. S("Refill:") .. "]"
formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."refill;main;0,3;1,1;]" formspec = formspec.."list[detached:"..minetest.formspec_escape(player_name).."refill;main;0,"..(unified_inventory.formspec_y +2)..";1,1;]"
end end
return {formspec=formspec} return {formspec=formspec}
end, end,
}) })
-- stack_image_button(): generate a form button displaying a stack of items -- stack_image_button(): generate a form button displaying a stack of items
-- --
-- Normally a simple item_image_button[] is used. If the stack contains -- Normally a simple item_image_button[] is used. If the stack contains
@ -170,9 +178,9 @@ local function stack_image_button(x, y, w, h, buttonname_prefix, item)
displayitem = group_item.item or "unknown" displayitem = group_item.item or "unknown"
selectitem = group_item.sole and displayitem or name selectitem = group_item.sole and displayitem or name
end end
local label = string.format("\n\n%s%7d", show_is_group and "G" or " ", count):gsub(" 1$", " .") local label = string.format("\n\n%s%7d", show_is_group and " G\n" or " ", count):gsub(" 1$", " .")
if label == "\n\n ." then label = "" end if label == "\n\n ." then label = "" end
return string.format("item_image_button[%u,%u;%u,%u;%s;%s;%s]", return string.format("item_image_button[%f,%f;%u,%u;%s;%s;%s]",
x, y, w, h, x, y, w, h,
minetest.formspec_escape(displayitem), minetest.formspec_escape(displayitem),
minetest.formspec_escape(buttonname_prefix..unified_inventory.mangle_for_formspec(selectitem)), minetest.formspec_escape(buttonname_prefix..unified_inventory.mangle_for_formspec(selectitem)),
@ -199,14 +207,18 @@ local other_dir = {
unified_inventory.register_page("craftguide", { unified_inventory.register_page("craftguide", {
get_formspec = function(player) get_formspec = function(player)
local player_name = player:get_player_name() local player_name = player:get_player_name()
local player_privs = minetest.get_player_privs(player_name)
local formspec = "" local formspec = ""
formspec = formspec.."background[0,4.5;8,4;ui_main_inventory.png]" formspec = formspec.."background[0,"..(unified_inventory.formspec_y + 3.5)..";8,4;ui_main_inventory.png]"
formspec = formspec.."label[0,0;" .. S("Crafting Guide") .. "]" formspec = formspec.."label[0,"..unified_inventory.form_header_y..";" .. S("Crafting Guide") .. "]"
formspec = formspec.."listcolors[#00000000;#00000000]" formspec = formspec.."listcolors[#00000000;#00000000]"
local item_name = unified_inventory.current_item[player_name] local item_name = unified_inventory.current_item[player_name]
if not item_name then return {formspec=formspec} end if not item_name then return {formspec=formspec} end
local dir = unified_inventory.current_craft_direction[player_name] local dir = unified_inventory.current_craft_direction[player_name]
local rdir
if dir == "recipe" then rdir = "usage" end
if dir == "usage" then rdir = "recipe" end
local crafts = unified_inventory.crafts_for[dir][item_name] local crafts = unified_inventory.crafts_for[dir][item_name]
local alternate = unified_inventory.alternate[player_name] local alternate = unified_inventory.alternate[player_name]
local alternates, craft local alternates, craft
@ -215,30 +227,42 @@ unified_inventory.register_page("craftguide", {
craft = crafts[alternate] craft = crafts[alternate]
end end
formspec = formspec.."background[0,1;8,3;ui_craftguide_form.png]" formspec = formspec.."background[0.5,"..(unified_inventory.formspec_y + 0.2)..";8,3;ui_craftguide_form.png]"
formspec = formspec.."textarea[0.3,0.6;10,1;;"..minetest.formspec_escape(role_text[dir]..": "..item_name)..";]" formspec = formspec.."textarea["..unified_inventory.craft_result_x..","..unified_inventory.craft_result_y
..";10,1;;"..minetest.formspec_escape(role_text[dir]..": "..item_name)..";]"
formspec = formspec..stack_image_button(0, unified_inventory.formspec_y, 1.1, 1.1, "item_button_"
.. rdir .. "_", ItemStack(item_name))
if not craft then if not craft then
formspec = formspec.."label[6,3.35;"..minetest.formspec_escape(no_recipe_text[dir]).."]" formspec = formspec.."label[5.5,"..(unified_inventory.formspec_y + 2.35)..";"
local no_pos = dir == "recipe" and 4 or 6 ..minetest.formspec_escape(no_recipe_text[dir]).."]"
local item_pos = dir == "recipe" and 6 or 4 local no_pos = dir == "recipe" and 4.5 or 6.5
formspec = formspec.."image["..no_pos..",1;1.1,1.1;ui_no.png]" local item_pos = dir == "recipe" and 6.5 or 4.5
formspec = formspec..stack_image_button(item_pos, 1, 1.1, 1.1, "item_button_"..other_dir[dir].."_", ItemStack(item_name)) formspec = formspec.."image["..no_pos..","..unified_inventory.formspec_y..";1.1,1.1;ui_no.png]"
formspec = formspec..stack_image_button(item_pos, unified_inventory.formspec_y, 1.1, 1.1, "item_button_"
..other_dir[dir].."_", ItemStack(item_name))
if player_privs.give == true then
formspec = formspec.."label[0,"..(unified_inventory.formspec_y + 2.10)..";" .. S("Give me:") .. "]"
.."button[0, "..(unified_inventory.formspec_y + 2.7)..";0.6,0.5;craftguide_giveme_1;1]"
.."button[0.6,"..(unified_inventory.formspec_y + 2.7)..";0.7,0.5;craftguide_giveme_10;10]"
.."button[1.3,"..(unified_inventory.formspec_y + 2.7)..";0.8,0.5;craftguide_giveme_99;99]"
end
return {formspec = formspec} return {formspec = formspec}
end end
local craft_type = unified_inventory.registered_craft_types[craft.type] or local craft_type = unified_inventory.registered_craft_types[craft.type] or
unified_inventory.craft_type_defaults(craft.type, {}) unified_inventory.craft_type_defaults(craft.type, {})
formspec = formspec.."label[6,3.35;" .. S("Method:") .. "]" if craft_type.icon then
formspec = formspec.."label[6,3.75;" formspec = formspec..string.format(" image[%f,%f;%f,%f;%s]",5.7,(unified_inventory.formspec_y + 0.05),0.5,0.5,craft_type.icon)
..minetest.formspec_escape(craft_type.description).."]" end
formspec = formspec..stack_image_button(6, 1, 1.1, 1.1, "item_button_usage_", ItemStack(craft.output)) formspec = formspec.."label[5.5,"..(unified_inventory.formspec_y + 1)..";" .. minetest.formspec_escape(craft_type.description).."]"
formspec = formspec..stack_image_button(6.5, unified_inventory.formspec_y, 1.1, 1.1, "item_button_usage_", ItemStack(craft.output))
local display_size = craft_type.dynamic_display_size and craft_type.dynamic_display_size(craft) or { width = craft_type.width, height = craft_type.height } local display_size = craft_type.dynamic_display_size and craft_type.dynamic_display_size(craft) or { width = craft_type.width, height = craft_type.height }
local craft_width = craft_type.get_shaped_craft_width and craft_type.get_shaped_craft_width(craft) or display_size.width local craft_width = craft_type.get_shaped_craft_width and craft_type.get_shaped_craft_width(craft) or display_size.width
-- This keeps recipes aligned to the right, -- This keeps recipes aligned to the right,
-- so that they're close to the arrow. -- so that they're close to the arrow.
local xoffset = 1 + (3 - display_size.width) local xoffset = 1.5 + (3 - display_size.width)
for y = 1, display_size.height do for y = 1, display_size.height do
for x = 1, display_size.width do for x = 1, display_size.width do
local item local item
@ -247,36 +271,63 @@ unified_inventory.register_page("craftguide", {
end end
if item then if item then
formspec = formspec..stack_image_button( formspec = formspec..stack_image_button(
xoffset + x, y, 1.1, 1.1, xoffset + x, unified_inventory.formspec_y - 1 + y, 1.1, 1.1,
"item_button_recipe_", "item_button_recipe_",
ItemStack(item)) ItemStack(item))
else else
-- Fake buttons just to make grid -- Fake buttons just to make grid
formspec = formspec.."image_button[" formspec = formspec.."image_button["
..tostring(xoffset + x)..","..tostring(y) ..tostring(xoffset + x)..","..tostring(unified_inventory.formspec_y - 1 + y)
..";1,1;ui_blank_image.png;;]" ..";1,1;ui_blank_image.png;;]"
end end
end end
end end
if craft_type.uses_crafting_grid then if craft_type.uses_crafting_grid then
formspec = formspec.."label[6,1.95;" .. S("Copy to craft grid:") .. "]" formspec = formspec.."label[0,"..(unified_inventory.formspec_y + 0.9)..";" .. S("To craft grid:") .. "]"
.."button[6,2.5;0.6,0.5;craftguide_craft_1;1]" .."button[0, "..(unified_inventory.formspec_y + 1.5)..";0.6,0.5;craftguide_craft_1;1]"
.."button[6.6,2.5;0.6,0.5;craftguide_craft_10;10]" .."button[0.6,"..(unified_inventory.formspec_y + 1.5)..";0.7,0.5;craftguide_craft_10;10]"
.."button[7.2,2.5;0.6,0.5;craftguide_craft_max;" .. S("All") .. "]" .."button[1.3,"..(unified_inventory.formspec_y + 1.5)..";0.8,0.5;craftguide_craft_max;" .. S("All") .. "]"
end
if player_privs.give then
formspec = formspec.."label[0,"..(unified_inventory.formspec_y + 2.1)..";" .. S("Give me:") .. "]"
.."button[0, "..(unified_inventory.formspec_y + 2.7)..";0.6,0.5;craftguide_giveme_1;1]"
.."button[0.6,"..(unified_inventory.formspec_y + 2.7)..";0.7,0.5;craftguide_giveme_10;10]"
.."button[1.3,"..(unified_inventory.formspec_y + 2.7)..";0.8,0.5;craftguide_giveme_99;99]"
end end
if alternates and alternates > 1 then if alternates and alternates > 1 then
formspec = formspec.."label[0,2.6;"..recipe_text[dir].." " formspec = formspec.."label[5.5,"..(unified_inventory.formspec_y + 1.6)..";"..recipe_text[dir].." "
..tostring(alternate).." of " ..tostring(alternate).." of "
..tostring(alternates).."]" ..tostring(alternates).."]"
.."button[0,3.15;2,1;alternate;" .. S("Alternate") .. "]" .."button[5.5,"..(unified_inventory.formspec_y + 2)..";2,1;alternate;" .. S("Alternate") .. "]"
end end
return {formspec = formspec} return {formspec = formspec}
end, end,
}) })
minetest.register_on_player_receive_fields(function(player, formname, fields) local function craftguide_giveme(player, formname, fields)
local amount
for k, v in pairs(fields) do
amount = k:match("craftguide_giveme_(.*)")
if amount then break end
end
if not amount then return end
amount = tonumber(amount)
if amount == 0 then return end
local player_name = player:get_player_name()
local output = unified_inventory.current_item[player_name]
if (not output) or (output == "") then return end
local player_inv = player:get_inventory()
player_inv:add_item("main", {name = output, count = amount})
end
local function craftguide_craft(player, formname, fields)
local amount local amount
for k, v in pairs(fields) do for k, v in pairs(fields) do
amount = k:match("craftguide_craft_(.*)") amount = k:match("craftguide_craft_(.*)")
@ -343,4 +394,16 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
player_inv:set_list("craft", craft_list) player_inv:set_list("craft", craft_list)
unified_inventory.set_inventory_formspec(player, "craft") unified_inventory.set_inventory_formspec(player, "craft")
end
minetest.register_on_player_receive_fields(function(player, formname, fields)
for k, v in pairs(fields) do
if k:match("craftguide_craft_") then
craftguide_craft(player, formname, fields)
break
elseif k:match("craftguide_giveme_") then
craftguide_giveme(player, formname, fields)
break
end
end
end) end)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 797 B

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 680 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

@ -112,6 +112,7 @@ unified_inventory.register_button("waypoints", {
type = "image", type = "image",
image = "ui_waypoints_icon.png", image = "ui_waypoints_icon.png",
tooltip = S("Waypoints"), tooltip = S("Waypoints"),
show_with = false, --Modif MFF (Crabman 30/06/2015)
}) })
local function update_hud(player, waypoints, temp, i) local function update_hud(player, waypoints, temp, i)
@ -184,7 +185,7 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
if fields["rename_waypoint"..i] then if fields["rename_waypoint"..i] then
hit = true hit = true
waypoints[i] = waypoints[i] or {} temp[i] = temp[i] or {}
temp[i].edit = true temp[i].edit = true
update_formspec = true update_formspec = true
end end

View File

@ -5,7 +5,7 @@ News de FR - MinetestForFun (Survival - PVP - Hardcore)
/!\ En effet, nous profitons de cette stabilitée pour préparer une grosse MAJ qui boulversera à jamais le gameplay de Minetest /!\ /!\ En effet, nous profitons de cette stabilitée pour préparer une grosse MAJ qui boulversera à jamais le gameplay de Minetest /!\
---Next merge--- (Remerciements : ???) ---Next merge--- (Remerciements : ???)
MaJ de "3d_armor" (drop des armurs fixé) MaJ de "3d_armor" (drop des armurs fixé, ajout d'un paramètre de "poids" augmentant la faim en fonction de l'armure portée)
MaJ de "homedecor" (nouveaux panneaux colorés) MaJ de "homedecor" (nouveaux panneaux colorés)
MaJ de "plantlife" MaJ de "plantlife"
MaJ de "mesecons" MaJ de "mesecons"