diff --git a/builtin/fstk/tabview.lua b/builtin/fstk/tabview.lua index f0db7b3e..45d37b1f 100644 --- a/builtin/fstk/tabview.lua +++ b/builtin/fstk/tabview.lua @@ -86,8 +86,7 @@ local function get_formspec(self) formspec = formspec .. string.format("size[%f,%f,%s]",tsize.width,tsize.height, - dump(self.fixed_size)) .. - get_bg(tsize, tabname) + dump(self.fixed_size)) .. get_bg(tsize, tabname) end formspec = formspec .. self:tab_header() diff --git a/builtin/fstk/ui.lua b/builtin/fstk/ui.lua index 584125de..8ec60fcf 100644 --- a/builtin/fstk/ui.lua +++ b/builtin/fstk/ui.lua @@ -114,13 +114,11 @@ function ui.update() else error_title = fgettext("An error occurred:") end - local restart_btn + local restart_btn = "]button[4.5,4.6;3,0.5;btn_reconnect_no;" .. fgettext("Close") .. "]" if core.settings:get("maintab_LAST") == "local" and tonumber(core.settings:get("connect_time")) < os.time() - 30 then restart_btn = "]button[6,4.6;3,0.5;btn_reconnect_no;" .. fgettext("Close") .. "]" .. "button[3,4.6;3,0.5;btn_reconnect_yes;" .. fgettext("Restart") .. "]" - else - restart_btn = "]button[4.5,4.6;3,0.5;btn_error_confirm;" .. fgettext("Close") .. "]" end formspec = "size[12,5]" .. "label[0.5,0;" .. error_title .. @@ -211,7 +209,7 @@ core.button_handler = function(fields) gamedata.do_reconnect = true core.start() return - elseif fields["btn_reconnect_no"] or fields["btn_error_confirm"] then + elseif fields["btn_reconnect_no"] then gamedata.errormessage = nil gamedata.reconnect_requested = false ui.update() diff --git a/builtin/game/register.lua b/builtin/game/register.lua index 96a739d0..44d9230e 100644 --- a/builtin/game/register.lua +++ b/builtin/game/register.lua @@ -357,7 +357,7 @@ core.register_node(":air", { }) core.register_node(":ignore", { - description = "Ignore (you hacker you!)", + description = "Ignore", inventory_image = "ignore.png", wield_image = "ignore.png", drawtype = "airlike", @@ -682,6 +682,7 @@ core.register_globalstep(function(dtime) end end) + -- -- Compatibility for on_mapgen_init() -- diff --git a/builtin/init.lua b/builtin/init.lua index 8f820a51..f42e097a 100644 --- a/builtin/init.lua +++ b/builtin/init.lua @@ -41,10 +41,10 @@ local utf8path = scriptdir .. "utf8lib" .. DIR_DELIM dofile(commonpath .. "strict.lua") dofile(commonpath .. "serialize.lua") dofile(commonpath .. "misc_helpers.lua") +dofile(utf8path .. "init.lua") if INIT == "game" then dofile(intlpath .. "init.lua") - dofile(utf8path .. "init.lua") dofile(gamepath .. "init.lua") elseif INIT == "mainmenu" then local mm_script = core.settings:get("main_menu_script") diff --git a/builtin/intllib/init.lua b/builtin/intllib/init.lua index 03dd7d9f..dac75555 100644 --- a/builtin/intllib/init.lua +++ b/builtin/intllib/init.lua @@ -158,8 +158,9 @@ function intllib.make_gettext_pair(modname) if gettext_getters[modname] then return unpack(gettext_getters[modname]) end - local localedir = core.get_modpath(modname).."/locale" - local catalogs = gettext.load_catalogs(localedir) + local modpath = core.get_modpath(modname) and core.get_modpath(modname) + local localedir = modpath and modpath.."/locale" + local catalogs = localedir and gettext.load_catalogs(localedir) or {} local getter = Getter(modname) local function gettext_func(msgid, ...) local msgstr = (catgettext(catalogs, msgid) @@ -191,8 +192,9 @@ function intllib.get_strings(modname, langcode) modname = modname or core.get_current_modname() local msgstr = intllib.strings[modname] if not msgstr then - local modpath = core.get_modpath(modname) + local modpath = core.get_modpath(modname) and core.get_modpath(modname) msgstr = { } + if modpath then for _, l in ipairs(get_locales(langcode)) do local t = intllib.load_strings(modpath.."/locale/"..l..".txt") or { } for k, v in pairs(t) do @@ -200,6 +202,7 @@ function intllib.get_strings(modname, langcode) end end intllib.strings[modname] = msgstr + end end return msgstr end diff --git a/builtin/mainmenu/dlg_create_world.lua b/builtin/mainmenu/dlg_create_world.lua index 33334380..b8532f01 100644 --- a/builtin/mainmenu/dlg_create_world.lua +++ b/builtin/mainmenu/dlg_create_world.lua @@ -18,7 +18,7 @@ local function create_world_formspec() local mapgens = core.get_mapgen_names() - local current_seed = core.settings:get("fixed_map_seed") or "" + local current_seed = core.formspec_escape(core.settings:get("fixed_map_seed")) or "" local current_mg = core.settings:get("mg_name") local gameid = core.settings:get("menu_last_game") @@ -34,7 +34,6 @@ local function create_world_formspec() end mglist = mglist:sub(1, -2) - current_seed = core.formspec_escape(current_seed) local retval = "size[12,6,false]" .. "bgcolor[#00000000]" .. diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_credits.lua index b6196c2b..0d118214 100644 --- a/builtin/mainmenu/tab_credits.lua +++ b/builtin/mainmenu/tab_credits.lua @@ -24,6 +24,7 @@ local multicraft_developers = { "sfan5 ", "Stuart Jones (stujones11) ", "Jean-Patrick Guerrero (kilbith) ", + "Jake Gustafson (poikilos)", "And other people who helped make the world better!" } @@ -96,10 +97,11 @@ return { caption = fgettext("Credits"), cbf_formspec = function() local version = core.get_version() - return "label[0.1,-0.1;MultiCraft Open Source Project, ver. " .. version.string .. "]" .. - "label[0.1,0.3;Copyright (C) 2014-2019 MultiCraft Development Team]" .. - "label[0.1,0.7;Home page: http://multicraft.world]" .. - "label[0.1,1.1;Licence: LGPLv3.0+ and CC-BY-SA 4.0]" .. + return "label[0.1,-0.1;" .. + "MultiCraft Open Source Project, ver. " .. version.string .. "\n" .. + "Copyright (C) 2014-2020 MultiCraft Development Team\n" .. + "Licence: LGPLv3.0+ and CC-BY-SA 4.0\n" .. + "Home page: http://multicraft.world]" .. "tablecolumns[color;text]" .. "tableoptions[background=#999999;highlight=#00000000;border=true]" .. "table[0,1.6;11.8,3.8;list_credits;" .. diff --git a/builtin/mainmenu/tab_local.lua b/builtin/mainmenu/tab_local.lua index 66475465..c0394f07 100644 --- a/builtin/mainmenu/tab_local.lua +++ b/builtin/mainmenu/tab_local.lua @@ -18,24 +18,30 @@ local function get_formspec() local index = filterlist.get_current_index(menudata.worldlist, tonumber(core.settings:get("mainmenu_last_selected_world"))) + local creative_checkbox = core.settings:get_bool("creative_mode") and + "local_creative_checkbox" or "blank" local retval = "image_button[0,4.84;3.31,0.92;" .. core.formspec_escape(defaulttexturedir .. "blank.png") .. ";world_delete;;true;false]" .. + "tooltip[world_delete;".. fgettext("Delete") .. "]" .. "image_button[3.14,4.84;3.3,0.92;" .. core.formspec_escape(defaulttexturedir .. - "blank.png") .. ";world_create;;true;false]" + "blank.png") .. ";world_create;;true;false]" .. + "tooltip[world_create;".. fgettext("New") .. "]" .. - local creative_checkbox = core.settings:get_bool("creative_mode") and "local_creative_checkbox" or "blank" - retval = retval .. "image_button[6.72,1.43;4.96,1.41;" .. core.formspec_escape(defaulttexturedir .. "blank.png") .. ";play;;true;false]" .. + "tooltip[play;".. fgettext("Play Game") .. "]" .. + "image_button[7.33,3.09;3.73,0.86;" .. core.formspec_escape(defaulttexturedir .. creative_checkbox) .. ".png;cb_creative_mode;;true;false]" .. + "tooltip[cb_creative_mode;".. fgettext("Creative mode") .. "]" .. + "tableoptions[background=#27233F;border=false]" .. "table[-0.01,0;6.28,4.64;sp_worlds;" .. menu_render_worldlist() .. @@ -60,6 +66,7 @@ local function get_formspec() core.formspec_escape(core.settings:get("name")) .. "]" .. "pwdfield[9.6,0.6;2.8,0.5;te_passwd;;]" end + return retval end @@ -182,7 +189,7 @@ local function main_button_handler(this, fields, name) return true end - if fields["world_configure"] ~= nil then +--[[if fields["world_configure"] ~= nil then local selected = core.get_table_index("sp_worlds") if selected ~= nil then local configdialog = @@ -197,7 +204,7 @@ local function main_button_handler(this, fields, name) end return true - end + end]] end -------------------------------------------------------------------------------- diff --git a/builtin/mainmenu/tab_online.lua b/builtin/mainmenu/tab_online.lua index e268dbe3..04d48fcf 100644 --- a/builtin/mainmenu/tab_online.lua +++ b/builtin/mainmenu/tab_online.lua @@ -62,8 +62,8 @@ local function get_formspec(_, _, tabdata) -- Connect "image_button[8.8,4.88;3.3,0.9;" .. core.formspec_escape(defaulttexturedir .. "blank.png") - .. ";btn_mp_connect;;true;false]" - + .. ";btn_mp_connect;;true;false]" .. + "tooltip[btn_mp_connect;".. fgettext("Connect") .. "]" local pwd = password_save and core.formspec_escape(core.settings:get("password")) or password_tmp -- Password diff --git a/builtin/utf8lib/init.lua b/builtin/utf8lib/init.lua index f42975a4..e78d1af1 100644 --- a/builtin/utf8lib/init.lua +++ b/builtin/utf8lib/init.lua @@ -135,7 +135,7 @@ function utf8charbytes(s, i) end end -dofile(core.get_builtin_path() .. DIR_DELIM .. "utf8lib" .. DIR_DELIM .. "utf8data.lua") +dofile(core.get_builtin_path() .. "utf8lib" .. DIR_DELIM .. "utf8data.lua") -- replace UTF-8 characters based on a mapping table local function utf8replace(s, mapping) diff --git a/textures/base/bg_online.png b/textures/base/bg_online.png index 3b116ca6..37966557 100644 Binary files a/textures/base/bg_online.png and b/textures/base/bg_online.png differ diff --git a/textures/base/camera_btn.png b/textures/base/camera_btn.png index 208bbe83..82beaa79 100755 Binary files a/textures/base/camera_btn.png and b/textures/base/camera_btn.png differ diff --git a/textures/base/down_btn.png b/textures/base/down_btn.png index ea9b147a..208b7d16 100644 Binary files a/textures/base/down_btn.png and b/textures/base/down_btn.png differ diff --git a/textures/base/right_press.png b/textures/base/right_press.png index bfde9cfe..2f29379b 100755 Binary files a/textures/base/right_press.png and b/textures/base/right_press.png differ diff --git a/textures/base/trash.png b/textures/base/trash.png index 7719a2f3..4c0572e4 100644 Binary files a/textures/base/trash.png and b/textures/base/trash.png differ diff --git a/textures/base/up_two_btn.png b/textures/base/up_two_btn.png index 340bb6f1..4dc7a3f8 100644 Binary files a/textures/base/up_two_btn.png and b/textures/base/up_two_btn.png differ