Update builtin and base textures
@ -86,8 +86,7 @@ local function get_formspec(self)
|
|||||||
|
|
||||||
formspec = formspec ..
|
formspec = formspec ..
|
||||||
string.format("size[%f,%f,%s]",tsize.width,tsize.height,
|
string.format("size[%f,%f,%s]",tsize.width,tsize.height,
|
||||||
dump(self.fixed_size)) ..
|
dump(self.fixed_size)) .. get_bg(tsize, tabname)
|
||||||
get_bg(tsize, tabname)
|
|
||||||
|
|
||||||
end
|
end
|
||||||
formspec = formspec .. self:tab_header()
|
formspec = formspec .. self:tab_header()
|
||||||
|
@ -114,13 +114,11 @@ function ui.update()
|
|||||||
else
|
else
|
||||||
error_title = fgettext("An error occurred:")
|
error_title = fgettext("An error occurred:")
|
||||||
end
|
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
|
if core.settings:get("maintab_LAST") == "local" and
|
||||||
tonumber(core.settings:get("connect_time")) < os.time() - 30 then
|
tonumber(core.settings:get("connect_time")) < os.time() - 30 then
|
||||||
restart_btn = "]button[6,4.6;3,0.5;btn_reconnect_no;" .. fgettext("Close") .. "]" ..
|
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") .. "]"
|
"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
|
end
|
||||||
formspec = "size[12,5]" ..
|
formspec = "size[12,5]" ..
|
||||||
"label[0.5,0;" .. error_title ..
|
"label[0.5,0;" .. error_title ..
|
||||||
@ -211,7 +209,7 @@ core.button_handler = function(fields)
|
|||||||
gamedata.do_reconnect = true
|
gamedata.do_reconnect = true
|
||||||
core.start()
|
core.start()
|
||||||
return
|
return
|
||||||
elseif fields["btn_reconnect_no"] or fields["btn_error_confirm"] then
|
elseif fields["btn_reconnect_no"] then
|
||||||
gamedata.errormessage = nil
|
gamedata.errormessage = nil
|
||||||
gamedata.reconnect_requested = false
|
gamedata.reconnect_requested = false
|
||||||
ui.update()
|
ui.update()
|
||||||
|
@ -357,7 +357,7 @@ core.register_node(":air", {
|
|||||||
})
|
})
|
||||||
|
|
||||||
core.register_node(":ignore", {
|
core.register_node(":ignore", {
|
||||||
description = "Ignore (you hacker you!)",
|
description = "Ignore",
|
||||||
inventory_image = "ignore.png",
|
inventory_image = "ignore.png",
|
||||||
wield_image = "ignore.png",
|
wield_image = "ignore.png",
|
||||||
drawtype = "airlike",
|
drawtype = "airlike",
|
||||||
@ -682,6 +682,7 @@ core.register_globalstep(function(dtime)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Compatibility for on_mapgen_init()
|
-- Compatibility for on_mapgen_init()
|
||||||
--
|
--
|
||||||
|
@ -41,10 +41,10 @@ local utf8path = scriptdir .. "utf8lib" .. DIR_DELIM
|
|||||||
dofile(commonpath .. "strict.lua")
|
dofile(commonpath .. "strict.lua")
|
||||||
dofile(commonpath .. "serialize.lua")
|
dofile(commonpath .. "serialize.lua")
|
||||||
dofile(commonpath .. "misc_helpers.lua")
|
dofile(commonpath .. "misc_helpers.lua")
|
||||||
|
dofile(utf8path .. "init.lua")
|
||||||
|
|
||||||
if INIT == "game" then
|
if INIT == "game" then
|
||||||
dofile(intlpath .. "init.lua")
|
dofile(intlpath .. "init.lua")
|
||||||
dofile(utf8path .. "init.lua")
|
|
||||||
dofile(gamepath .. "init.lua")
|
dofile(gamepath .. "init.lua")
|
||||||
elseif INIT == "mainmenu" then
|
elseif INIT == "mainmenu" then
|
||||||
local mm_script = core.settings:get("main_menu_script")
|
local mm_script = core.settings:get("main_menu_script")
|
||||||
|
@ -158,8 +158,9 @@ function intllib.make_gettext_pair(modname)
|
|||||||
if gettext_getters[modname] then
|
if gettext_getters[modname] then
|
||||||
return unpack(gettext_getters[modname])
|
return unpack(gettext_getters[modname])
|
||||||
end
|
end
|
||||||
local localedir = core.get_modpath(modname).."/locale"
|
local modpath = core.get_modpath(modname) and core.get_modpath(modname)
|
||||||
local catalogs = gettext.load_catalogs(localedir)
|
local localedir = modpath and modpath.."/locale"
|
||||||
|
local catalogs = localedir and gettext.load_catalogs(localedir) or {}
|
||||||
local getter = Getter(modname)
|
local getter = Getter(modname)
|
||||||
local function gettext_func(msgid, ...)
|
local function gettext_func(msgid, ...)
|
||||||
local msgstr = (catgettext(catalogs, msgid)
|
local msgstr = (catgettext(catalogs, msgid)
|
||||||
@ -191,8 +192,9 @@ function intllib.get_strings(modname, langcode)
|
|||||||
modname = modname or core.get_current_modname()
|
modname = modname or core.get_current_modname()
|
||||||
local msgstr = intllib.strings[modname]
|
local msgstr = intllib.strings[modname]
|
||||||
if not msgstr then
|
if not msgstr then
|
||||||
local modpath = core.get_modpath(modname)
|
local modpath = core.get_modpath(modname) and core.get_modpath(modname)
|
||||||
msgstr = { }
|
msgstr = { }
|
||||||
|
if modpath then
|
||||||
for _, l in ipairs(get_locales(langcode)) do
|
for _, l in ipairs(get_locales(langcode)) do
|
||||||
local t = intllib.load_strings(modpath.."/locale/"..l..".txt") or { }
|
local t = intllib.load_strings(modpath.."/locale/"..l..".txt") or { }
|
||||||
for k, v in pairs(t) do
|
for k, v in pairs(t) do
|
||||||
@ -201,5 +203,6 @@ function intllib.get_strings(modname, langcode)
|
|||||||
end
|
end
|
||||||
intllib.strings[modname] = msgstr
|
intllib.strings[modname] = msgstr
|
||||||
end
|
end
|
||||||
|
end
|
||||||
return msgstr
|
return msgstr
|
||||||
end
|
end
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
local function create_world_formspec()
|
local function create_world_formspec()
|
||||||
local mapgens = core.get_mapgen_names()
|
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 current_mg = core.settings:get("mg_name")
|
||||||
local gameid = core.settings:get("menu_last_game")
|
local gameid = core.settings:get("menu_last_game")
|
||||||
|
|
||||||
@ -34,7 +34,6 @@ local function create_world_formspec()
|
|||||||
end
|
end
|
||||||
mglist = mglist:sub(1, -2)
|
mglist = mglist:sub(1, -2)
|
||||||
|
|
||||||
current_seed = core.formspec_escape(current_seed)
|
|
||||||
local retval =
|
local retval =
|
||||||
"size[12,6,false]" ..
|
"size[12,6,false]" ..
|
||||||
"bgcolor[#00000000]" ..
|
"bgcolor[#00000000]" ..
|
||||||
|
@ -24,6 +24,7 @@ local multicraft_developers = {
|
|||||||
"sfan5 <sfan5@live.de>",
|
"sfan5 <sfan5@live.de>",
|
||||||
"Stuart Jones (stujones11) <stujones111@gmail.com>",
|
"Stuart Jones (stujones11) <stujones111@gmail.com>",
|
||||||
"Jean-Patrick Guerrero (kilbith) <jeanpatrick.guerrero@gmail.com>",
|
"Jean-Patrick Guerrero (kilbith) <jeanpatrick.guerrero@gmail.com>",
|
||||||
|
"Jake Gustafson (poikilos)",
|
||||||
"And other people who helped make the world better!"
|
"And other people who helped make the world better!"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,10 +97,11 @@ return {
|
|||||||
caption = fgettext("Credits"),
|
caption = fgettext("Credits"),
|
||||||
cbf_formspec = function()
|
cbf_formspec = function()
|
||||||
local version = core.get_version()
|
local version = core.get_version()
|
||||||
return "label[0.1,-0.1;MultiCraft Open Source Project, ver. " .. version.string .. "]" ..
|
return "label[0.1,-0.1;" ..
|
||||||
"label[0.1,0.3;Copyright (C) 2014-2019 MultiCraft Development Team]" ..
|
"MultiCraft Open Source Project, ver. " .. version.string .. "\n" ..
|
||||||
"label[0.1,0.7;Home page: http://multicraft.world]" ..
|
"Copyright (C) 2014-2020 MultiCraft Development Team\n" ..
|
||||||
"label[0.1,1.1;Licence: LGPLv3.0+ and CC-BY-SA 4.0]" ..
|
"Licence: LGPLv3.0+ and CC-BY-SA 4.0\n" ..
|
||||||
|
"Home page: http://multicraft.world]" ..
|
||||||
"tablecolumns[color;text]" ..
|
"tablecolumns[color;text]" ..
|
||||||
"tableoptions[background=#999999;highlight=#00000000;border=true]" ..
|
"tableoptions[background=#999999;highlight=#00000000;border=true]" ..
|
||||||
"table[0,1.6;11.8,3.8;list_credits;" ..
|
"table[0,1.6;11.8,3.8;list_credits;" ..
|
||||||
|
@ -18,24 +18,30 @@
|
|||||||
local function get_formspec()
|
local function get_formspec()
|
||||||
local index = filterlist.get_current_index(menudata.worldlist,
|
local index = filterlist.get_current_index(menudata.worldlist,
|
||||||
tonumber(core.settings:get("mainmenu_last_selected_world")))
|
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 =
|
local retval =
|
||||||
"image_button[0,4.84;3.31,0.92;" ..
|
"image_button[0,4.84;3.31,0.92;" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
core.formspec_escape(defaulttexturedir ..
|
||||||
"blank.png") .. ";world_delete;;true;false]" ..
|
"blank.png") .. ";world_delete;;true;false]" ..
|
||||||
|
"tooltip[world_delete;".. fgettext("Delete") .. "]" ..
|
||||||
"image_button[3.14,4.84;3.3,0.92;" ..
|
"image_button[3.14,4.84;3.3,0.92;" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
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;" ..
|
"image_button[6.72,1.43;4.96,1.41;" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
core.formspec_escape(defaulttexturedir ..
|
||||||
"blank.png") .. ";play;;true;false]" ..
|
"blank.png") .. ";play;;true;false]" ..
|
||||||
|
"tooltip[play;".. fgettext("Play Game") .. "]" ..
|
||||||
|
|
||||||
"image_button[7.33,3.09;3.73,0.86;" ..
|
"image_button[7.33,3.09;3.73,0.86;" ..
|
||||||
core.formspec_escape(defaulttexturedir ..
|
core.formspec_escape(defaulttexturedir ..
|
||||||
creative_checkbox) ..
|
creative_checkbox) ..
|
||||||
".png;cb_creative_mode;;true;false]" ..
|
".png;cb_creative_mode;;true;false]" ..
|
||||||
|
"tooltip[cb_creative_mode;".. fgettext("Creative mode") .. "]" ..
|
||||||
|
|
||||||
"tableoptions[background=#27233F;border=false]" ..
|
"tableoptions[background=#27233F;border=false]" ..
|
||||||
"table[-0.01,0;6.28,4.64;sp_worlds;" ..
|
"table[-0.01,0;6.28,4.64;sp_worlds;" ..
|
||||||
menu_render_worldlist() ..
|
menu_render_worldlist() ..
|
||||||
@ -60,6 +66,7 @@ local function get_formspec()
|
|||||||
core.formspec_escape(core.settings:get("name")) .. "]" ..
|
core.formspec_escape(core.settings:get("name")) .. "]" ..
|
||||||
"pwdfield[9.6,0.6;2.8,0.5;te_passwd;;]"
|
"pwdfield[9.6,0.6;2.8,0.5;te_passwd;;]"
|
||||||
end
|
end
|
||||||
|
|
||||||
return retval
|
return retval
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -182,7 +189,7 @@ local function main_button_handler(this, fields, name)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
if fields["world_configure"] ~= nil then
|
--[[if fields["world_configure"] ~= nil then
|
||||||
local selected = core.get_table_index("sp_worlds")
|
local selected = core.get_table_index("sp_worlds")
|
||||||
if selected ~= nil then
|
if selected ~= nil then
|
||||||
local configdialog =
|
local configdialog =
|
||||||
@ -197,7 +204,7 @@ local function main_button_handler(this, fields, name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
return true
|
return true
|
||||||
end
|
end]]
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -62,8 +62,8 @@ local function get_formspec(_, _, tabdata)
|
|||||||
-- Connect
|
-- Connect
|
||||||
"image_button[8.8,4.88;3.3,0.9;" ..
|
"image_button[8.8,4.88;3.3,0.9;" ..
|
||||||
core.formspec_escape(defaulttexturedir .. "blank.png")
|
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
|
local pwd = password_save and core.formspec_escape(core.settings:get("password")) or password_tmp
|
||||||
-- Password
|
-- Password
|
||||||
|
@ -135,7 +135,7 @@ function utf8charbytes(s, i)
|
|||||||
end
|
end
|
||||||
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
|
-- replace UTF-8 characters based on a mapping table
|
||||||
local function utf8replace(s, mapping)
|
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 |