Merge remote-tracking branch 'upstream/master'

This commit is contained in:
bri cassa 2021-06-20 17:33:07 +02:00
commit 132a362f85
2 changed files with 7 additions and 1 deletions

View File

@ -177,8 +177,14 @@ load_home()
function ui.set_home(player, pos) function ui.set_home(player, pos)
local player_name = player:get_player_name() local player_name = player:get_player_name()
ui.home_pos[player_name] = vector.round(pos) ui.home_pos[player_name] = vector.round(pos)
-- save the home data from the table to the file -- save the home data from the table to the file
local output = io.open(ui.home_filename, "w") local output = io.open(ui.home_filename, "w")
if not output then
minetest.log("warning", "[unified_inventory] Failed to save file: "
.. ui.home_filename)
return
end
for k, v in pairs(ui.home_pos) do for k, v in pairs(ui.home_pos) do
output:write(v.x.." "..v.y.." "..v.z.." "..k.."\n") output:write(v.x.." "..v.y.." "..v.z.." "..k.."\n")
end end

View File

@ -54,7 +54,7 @@ function ui.get_formspec(player, page)
if not pagedef then if not pagedef then
return "" -- Invalid page name return "" -- Invalid page name
end end
local formspec = { local formspec = {
"formspec_version[4]", "formspec_version[4]",
"size["..ui_peruser.formw..","..ui_peruser.formh.."]", "size["..ui_peruser.formw..","..ui_peruser.formh.."]",