From 7e4ee95d910e37ab15c74619cc28ae95ec0843e7 Mon Sep 17 00:00:00 2001 From: MoNTE48 Date: Fri, 21 Feb 2020 15:01:39 +0100 Subject: [PATCH] Update builtin and base textures --- builtin/fstk/tabview.lua | 3 +-- builtin/fstk/ui.lua | 6 ++---- builtin/game/register.lua | 3 ++- builtin/init.lua | 2 +- builtin/intllib/init.lua | 9 ++++++--- builtin/mainmenu/dlg_create_world.lua | 3 +-- builtin/mainmenu/tab_credits.lua | 10 ++++++---- builtin/mainmenu/tab_local.lua | 17 ++++++++++++----- builtin/mainmenu/tab_online.lua | 4 ++-- builtin/utf8lib/init.lua | 2 +- textures/base/bg_online.png | Bin 2683 -> 2682 bytes textures/base/camera_btn.png | Bin 337 -> 332 bytes textures/base/down_btn.png | Bin 269 -> 268 bytes textures/base/right_press.png | Bin 573 -> 571 bytes textures/base/trash.png | Bin 234 -> 232 bytes textures/base/up_two_btn.png | Bin 236 -> 234 bytes 16 files changed, 34 insertions(+), 25 deletions(-) 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 3b116ca62a387caf16a54430c3442b05d924a321..37966557002d11e60e31b9b218c1286e1e9fc27c 100644 GIT binary patch delta 880 zcmew@@=Ihwq9co^i(^Oy#m3q$14Jfd9AmJs0CU@Q9&> z`CZ{Rdugek`?Va*tG->2u9tBz2kPz;=KIjUYpHrWC=^OWefS;%mHPB$fr2EV2oydE zMPEMq=e9C$uwYm&0}8SkGIet78|0i{EH{|Hf1|}Jb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m)OoPQt4*q;ajie;MxMD z(`6jy==4oXDA;r4{AMnYJq2qv7chtl@EKT4n{sL4GLW|)v^ax8vRT>hyxT*D7|Ztk z#kMtbx#t%|)B}T!L6xmNTr|Nm{O|g1dv7sz37NRi25k=Z505Ks>hx?aKnY^OYi)V3 zwLJE^ zUu?@uVe!H+?MuDpa~t#OQycTn&-;A6M1T*R{#N|D{HoEk+&SaY&z;wE3K@XTVLQzD z)BC}-LyUPv8}2?@VJ6dX6c|Gfm2e=Q*Db_UjN{41OvkZ2HV37 UZf?_laD!w$UHx3vIVCg!0IKVBM*si- diff --git a/textures/base/camera_btn.png b/textures/base/camera_btn.png index 208bbe83ff4aeffba8bf83fe7f108b03a96ed1bc..82beaa791df9e891754e26784e410b789f2d34b0 100755 GIT binary patch delta 285 zcmV+&0pkAA0?Y!CIDe<7r(|SgJv}{$h=~9H{{R30mR(dg00006bW%=Jn1ZeV%&xB> z2-W}q0MtoDK~#9!?b9)J1TheUVN+NNOW`PpLMRLcQ5XtCK`8Uqa_QXjY#p`#*J_OG z%f|hA3C0+!zXBHS@4@v7z`H#61^^(>rVXAN-edXz!YrB&LVp)PkVH=sgbr{gfy{^m zNQ-0O4uBcO3;-6#0MhIkR8??VNoauC!IV^D!lDBT&w_du6QCO4S|Vct#_HEOSR#{> zBDi`7EWrpea`g_dC?In7a&G_&sXWQO1^VASxc_K@%|-|OYV!Y z|NpMrknWNI007iUL_t(|0qxT&wRdc?rfCyT1Y!?(f0%3c$NO_XYq!&!!EY8s2020Dr_PTneIaeEXe7R?oH7BX5s#$1r8e>@N?{KaF}}uoW-bv oKX$tpz>o71FSLb#N&!jFeE5Uz@|9)PMs zV69qDz*-2bm;x>_paC#ebO}%p1V|&WB8LRhZvZ@Iss!>2Kr3!D)kVOb4nZ@&%fQe9 gMod?MO*y844-6~Wzyj_|MgRZ+07*qoM6N<$f=C`jDF6Tf delta 179 zcmV;k08Iak0*wNYVt8;U<#%XwjGVusj9s= ztNv4>c~X?u|H7>^0N5?y0KnGr@sqD*I0BjO+wjQy0e}t9cgkEVuRaWCfXNW@I3IvH zrwk#F@dQN35C-c2i4Br~aaGv?5(V_VxYBn!fT92^v)2|F1uR5l_G*0qTBA_k*V_Ov h`4Y9a0cyF|10M`4*}(DO4)Xv2002ovPDHLkV1mUzPDKC! diff --git a/textures/base/right_press.png b/textures/base/right_press.png index bfde9cfe28e3e2535d3d914bca81374c647de01a..2f29379b603be80945283846c7f77ef7534d2e5c 100755 GIT binary patch delta 399 zcmV;A0dW4k1iJ)~k{3%$OH@=;nwpxGm6e^HosNF7zyJUMCy}Wqf4;!Lz9~E)J^%m# zOG!jQRCr$9*V%5uFcgGgoTb@_T@seCQwrt%->{=&MT6u@y(q_u`rXej#1?x-WK067 zm<3YEvOIqiDgiK%h%k|51(cu{V8mxQuBsXup&yvfQ!p^jYtgn1SnHf>fC=D>#~iG1 z5HBD@@h+^07bptOf1?GMz`SWVjvZJmFb7T<=(@hw4%Bs?H(>4acnKY72dZkdYTL53 zVjPkLKr66bZ#MpebI#fh{ERv=3@QQ6q3^Ml0BvC>R01;J@5i@|fi0;94u|9MbUL4x z-~&6sscztM;oJ{~;hzPj|0%@(CQk0x7$%&vz&Uk7Auxe|ZRN;MrU^ftdA#`bfT16N z=R=<7M4Ui)(ENa_csw)%ob#~#3Afw*e!W_75GUYs34Dp*!twV2>OajHNWegF>3Uhf tm@vV)ABPvu*9Dje=Lv8eT)tls_y$hzlxePWbd&%9002ovPDHLkV1iNJxwilS delta 401 zcmV;C0dD@g1ib{1k{6wwol8qgR8&-&nwpiBmCSua^#A|>D3PfrfB(L~z`kHyqN4x+ z0Zd6mK~#7F<<|v{BS8>E(Pl<7Gu;1%8_HHIR%Xf?dcuMDgSM+IBHMPr71kLSJkR$7 zp%RdUMBqH(c_Bog7ht5x@O^QdKq~YDS>}Qb?RyfD=P49LS*iw@0DkkBLm^5q7m%T- zL?O%t!jN-g0VXg{e^ZW42kIJg;FN(*r`y#IB#G}g|F-{+d(Z*xKp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