Update builtin and base textures
@ -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()
|
||||
|
@ -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()
|
||||
|
@ -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()
|
||||
--
|
||||
|
@ -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")
|
||||
|
@ -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
|
||||
|
@ -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]" ..
|
||||
|
@ -24,6 +24,7 @@ local multicraft_developers = {
|
||||
"sfan5 <sfan5@live.de>",
|
||||
"Stuart Jones (stujones11) <stujones111@gmail.com>",
|
||||
"Jean-Patrick Guerrero (kilbith) <jeanpatrick.guerrero@gmail.com>",
|
||||
"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;" ..
|
||||
|
@ -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
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 337 B After Width: | Height: | Size: 332 B |
Before Width: | Height: | Size: 269 B After Width: | Height: | Size: 268 B |
Before Width: | Height: | Size: 573 B After Width: | Height: | Size: 571 B |
Before Width: | Height: | Size: 234 B After Width: | Height: | Size: 232 B |
Before Width: | Height: | Size: 236 B After Width: | Height: | Size: 234 B |