diff --git a/build/iOS/MultiCraft/MultiCraft/Info.plist b/build/iOS/MultiCraft/MultiCraft/Info.plist index 152c62b40..6aaa8734c 100755 --- a/build/iOS/MultiCraft/MultiCraft/Info.plist +++ b/build/iOS/MultiCraft/MultiCraft/Info.plist @@ -17,9 +17,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 1.1.18 + 1.1.20 CFBundleVersion - 30 + 33 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/build/iOS/Podfile b/build/iOS/Podfile index 0016a1c09..4908e28cb 100755 --- a/build/iOS/Podfile +++ b/build/iOS/Podfile @@ -2,12 +2,14 @@ project 'MultiCraft/MultiCraft.xcodeproj' platform :ios, '8.0' target 'MultiCraft' do + source 'https://github.com/appodeal/CocoaPods.git' + source 'https://github.com/CocoaPods/Specs.git' + pod 'SSZipArchive' pod 'SDVersion' - - pod 'Appodeal/Core', '2.4.3-Beta6' - pod 'Appodeal/Interstitial', '2.4.3-Beta6' - pod 'Appodeal/Video', '2.4.3-Beta6' + pod 'Appodeal/Core', '2.4.5.1-Beta' + pod 'Appodeal/Interstitial', '2.4.5.1-Beta' + pod 'Appodeal/Video', '2.4.5.1-Beta' pod 'PersonalizedAdConsent', :git => 'https://github.com/MultiCraftProject/googleads-consent-sdk-ios' end diff --git a/build/iOS/deps/irrlicht.sh b/build/iOS/deps/irrlicht.sh index 869ac1ec5..069f18afe 100755 --- a/build/iOS/deps/irrlicht.sh +++ b/build/iOS/deps/irrlicht.sh @@ -3,7 +3,7 @@ . sdk.sh [ ! -d irrlicht-src ] && \ - svn co -r 5604 svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es irrlicht-src + svn co -r 5622 svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es irrlicht-src cd irrlicht-src/ diff --git a/builtin/mainmenu/dlg_create_world.lua b/builtin/mainmenu/dlg_create_world.lua index 6ddb2b213..87f15500b 100644 --- a/builtin/mainmenu/dlg_create_world.lua +++ b/builtin/mainmenu/dlg_create_world.lua @@ -46,30 +46,22 @@ local function create_world_formspec(dialogdata) current_seed = core.formspec_escape(current_seed) local retval = - "size[11.5,3,false]" .. + "size[11.5,3.75,false]" .. + "background[0,0;11.5,3;" .. core.formspec_escape(defaulttexturedir .. + "bg_dialog.png") .. ";true]" .. "label[2,0;" .. fgettext("World name") .. "]".. "field[4.5,0.4;6,0.5;te_world_name;;]" .. "label[2,1;" .. fgettext("Seed") .. "]".. "field[4.5,1.4;6,0.5;te_seed;;".. current_seed .. "]" .. - --"label[2,2;" .. fgettext("Mapgen") .. "]".. - --"dropdown[4.2,2;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" .. + "label[2,2;" .. fgettext("Mapgen") .. "]".. + "dropdown[4.2,2;6.3;dd_mapgen;" .. mglist .. ";" .. selindex .. "]" .. "dropdown[600.2,6;6.3;games;" .. gamemgr.gamelist() .. ";1]" .. - "button[3.25,2.6;2.5,0.5;world_create_confirm;" .. fgettext("Create") .. "]" .. - "button[5.75,2.6;2.5,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" - - if #gamemgr.games == 0 then - retval = retval .. "box[2,4;8,1;#ff8800]label[2.25,4;" .. - fgettext("You have no subgames installed.") .. "]label[2.25,4.4;" .. - fgettext("Download one from minetest.net") .. "]" - elseif #gamemgr.games == 1 and gamemgr.games[1].id == "minimal" then - retval = retval .. "box[1.75,4;8.7,1;#ff8800]label[2,4;" .. - fgettext("Warning: The minimal development test is meant for developers.") .. "]label[2,4.4;" .. - fgettext("Download a subgame, such as minetest_game, from minetest.net") .. "]" - end + "button[3.25,3.4;2.5,0.5;world_create_confirm;" .. fgettext("Create") .. "]" .. + "button[5.75,3.4;2.5,0.5;world_create_cancel;" .. fgettext("Cancel") .. "]" return retval diff --git a/builtin/mainmenu/dlg_delete_world.lua b/builtin/mainmenu/dlg_delete_world.lua index bb0eac210..8ab68912c 100644 --- a/builtin/mainmenu/dlg_delete_world.lua +++ b/builtin/mainmenu/dlg_delete_world.lua @@ -18,11 +18,14 @@ local function delete_world_formspec(dialogdata) local retval = - "size[10,2.5,false]" .. - "label[0.5,0.5;" .. - fgettext("Delete World \"$1\"?", dialogdata.delete_name) .. "]" .. - "button[0.5,1.5;2.5,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" .. - "button[7.0,1.5;2.5,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]" + "size[11.5,3.75,false]" .. + "background[0,0;11.5,3;" .. core.formspec_escape(defaulttexturedir .. + "bg_dialog.png") .. ";true]" .. + "label[5,1.4;" .. + fgettext("Delete World") .. "]" .. + "label[5,1.8;" .. fgettext("\"$1\"?", dialogdata.delete_name) .. "]" .. + "button[3.25,3.4;2.5,0.5;world_delete_confirm;" .. fgettext("Delete") .. "]" .. + "button[5.75,3.4;2.5,0.5;world_delete_cancel;" .. fgettext("Cancel") .. "]" return retval end diff --git a/builtin/mainmenu/tab_credits.lua b/builtin/mainmenu/tab_credits.lua index 1f5cde18f..42d8de88c 100644 --- a/builtin/mainmenu/tab_credits.lua +++ b/builtin/mainmenu/tab_credits.lua @@ -22,6 +22,8 @@ local multicraft_developers = { "Bektur Mambetov (ubulem) ", "Alexander Zavrin (Ransom.00)", "sfan5 ", + "stujones11 Stuart Jones ", + "And other people who helped make the world better!", } local core_developers = { @@ -99,8 +101,8 @@ return { "label[0.1,0.5;https://github.com/MultiCraftProject]" .. "label[0.1,1.0;LGPLv3.0+ and CC-BY-SA 3.0]" .. "tablecolumns[color;text]" .. - "tableoptions[background=#00000000;highlight=#00000000;border=false]" .. - "table[0,1.6;11.75,3.5;list_credits;" .. + "tableoptions[background=#999999;highlight=#00000000;border=true]" .. + "table[0,1.6;11.8,3.8;list_credits;" .. "#FFFF00," .. fgettext("MultiCraft Developers") .. ",," .. buildCreditList(multicraft_developers) .. ",,," .. "#FFFF00," .. fgettext("Minetest Developers") .. ",," .. diff --git a/builtin/mainmenu/tab_online.lua b/builtin/mainmenu/tab_online.lua index fd919a2ff..b19cfb29c 100644 --- a/builtin/mainmenu/tab_online.lua +++ b/builtin/mainmenu/tab_online.lua @@ -33,33 +33,33 @@ local function get_formspec(tabview, name, tabdata) local retval = -- Search - "field[0.15,0.075;5.91,1;te_search;;" .. core.formspec_escape(tabdata.search_for) .. "]" .. - "button[5.62,-0.25;1.5,1;btn_mp_search;" .. fgettext("Search") .. "]" .. - "image_button[6.97,-.165;.83,.83;" .. core.formspec_escape(defaulttexturedir .. "refresh.png") - .. ";btn_mp_refresh;" .. fgettext("") .. "]" .. + "field[0.2,0.1;5.81,1;te_search;;" .. core.formspec_escape(tabdata.search_for) .. "]" .. + "button[5.62,-0.22;1.5,1;btn_mp_search;" .. fgettext("Search") .. "]" .. + "image_button[6.97,-0.125;.83,.83;" .. core.formspec_escape(defaulttexturedir .. "refresh.png") + .. ";btn_mp_refresh;" .. "]" .. -- Address / Port - "label[7.75,-0.25;" .. fgettext("Address / Port") .. "]" .. - "field[8,0.65;3.25,0.5;te_address;;" .. + "label[7.75,-0.3;" .. fgettext("Address / Port") .. "]" .. + "field[8,0.6;3.2,0.5;te_address;;" .. core.formspec_escape(core.settings:get("address")) .. "]" .. - "field[11.1,0.65;1.4,0.5;te_port;;" .. + "field[11.1,0.6;1.35,0.5;te_port;;" .. core.formspec_escape(core.settings:get("remote_port")) .. "]" .. -- Name / Password - "label[7.75,0.95;" .. fgettext("Name / Password") .. "]" .. - "field[8,1.85;2.9,0.5;te_name;;" .. + "label[7.75,0.85;" .. fgettext("Name / Password") .. "]" .. + "field[8,1.75;2.85,0.5;te_name;;" .. core.formspec_escape(core.settings:get("name")) .. "]" .. - "pwdfield[10.73,1.85;1.77,0.5;te_pwd;]" .. + "pwdfield[10.73,1.75;1.72,0.5;te_pwd;]" .. -- Description Background - "box[7.73,2.25;4.25,2.6;#999999]".. + "box[7.7,2.1;4.25,2.65;#999999]".. -- Connect - "button[10.1,5.15;2,0.5;btn_mp_connect;" .. fgettext("Connect") .. "]" + "button[9.9,5;2.25,0.5;btn_mp_connect;" .. fgettext("Connect") .. "]" if tabdata.fav_selected and fav_selected then if gamedata.fav then - retval = retval .. "button[7.75,5.15;2.3,0.5;btn_delete_favorite;" .. + retval = retval .. "button[7.7,5;2.3,0.5;btn_delete_favorite;" .. fgettext("Del. Favorite") .. "]" end if fav_selected.description then @@ -81,7 +81,7 @@ local function get_formspec(tabview, name, tabdata) image_column(fgettext("PvP enabled"), "pvp") .. ",padding=0.25;" .. "color,span=1;" .. "text,padding=1]" .. - "table[-0.15,0.8;7.75,4.75;favourites;" + "table[-0.09,0.7;7.7,4.9;favourites;" if menudata.search_result then for i = 1, #menudata.search_result do diff --git a/builtin/mainmenu/tab_settings.lua b/builtin/mainmenu/tab_settings.lua index 745b5c0d1..c755d6853 100644 --- a/builtin/mainmenu/tab_settings.lua +++ b/builtin/mainmenu/tab_settings.lua @@ -122,58 +122,6 @@ local function antialiasing_fname_to_name(fname) return 0 end -local function dlg_confirm_reset_formspec(data) - return "size[8,3]" .. - "label[1,1;" .. fgettext("Are you sure to reset your singleplayer world?") .. "]" .. - "button[1,2;2.6,0.5;dlg_reset_singleplayer_confirm;" .. fgettext("Yes") .. "]" .. - "button[4,2;2.8,0.5;dlg_reset_singleplayer_cancel;" .. fgettext("No") .. "]" -end - -local function dlg_confirm_reset_btnhandler(this, fields, dialogdata) - - if fields["dlg_reset_singleplayer_confirm"] ~= nil then - local worldlist = core.get_worlds() - local found_singleplayerworld = false - - for i = 1, #worldlist do - if worldlist[i].name == "singleplayerworld" then - found_singleplayerworld = true - gamedata.worldindex = i - end - end - - if found_singleplayerworld then - core.delete_world(gamedata.worldindex) - end - - core.create_world("singleplayerworld", 1) - worldlist = core.get_worlds() - found_singleplayerworld = false - - for i = 1, #worldlist do - if worldlist[i].name == "singleplayerworld" then - found_singleplayerworld = true - gamedata.worldindex = i - end - end - end - - this.parent:show() - this:hide() - this:delete() - return true -end - -local function showconfirm_reset(tabview) - local new_dlg = dialog_create("reset_spworld", - dlg_confirm_reset_formspec, - dlg_confirm_reset_btnhandler, - nil) - new_dlg:set_parent(tabview) - tabview:hide() - new_dlg:show() -end - local function formspec(tabview, name, tabdata) local tab_string = "box[0,0;3.5,4.5;#999999]" .. @@ -207,11 +155,7 @@ local function formspec(tabview, name, tabdata) "checkbox[8,0;cb_shaders;" .. fgettext("Shaders") .. ";" .. dump(core.settings:get_bool("enable_shaders")) .. "]" - if PLATFORM == "Android" or PLATFORM == "iOS" then - tab_string = tab_string .. - "button[8,4.75;3.75,0.5;btn_reset_singleplayer;" - .. fgettext("Reset singleplayer world") .. "]" - else + if PLATFORM ~= "Android" or PLATFORM ~= "iOS" then tab_string = tab_string .. "button[8,4.85;3.75,0.5;btn_change_keys;" .. fgettext("Change keys") .. "]" @@ -343,10 +287,6 @@ local function handle_settings_buttons(this, fields, tabname, tabdata) core.settings:set("touchtarget", fields["cb_touchscreen_target"]) return true end - if fields["btn_reset_singleplayer"] then - showconfirm_reset(this) - return true - end --Note dropdowns have to be handled LAST! local ddhandled = false diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp index 3e36e0e2d..506e7a0af 100644 --- a/src/defaultsettings.cpp +++ b/src/defaultsettings.cpp @@ -160,13 +160,12 @@ void set_default_settings(Settings *settings) settings->setDefault("selectionbox_color", "(255,255,255)"); settings->setDefault("selectionbox_width", "4"); settings->setDefault("selectionbox_color", "(0,0,0)"); - settings->setDefault("selectionbox_width", "2"); settings->setDefault("node_highlighting", "box"); settings->setDefault("crosshair_color", "(255,255,255)"); settings->setDefault("crosshair_alpha", "255"); settings->setDefault("hud_scaling", "1.0"); settings->setDefault("gui_scaling", "1.0"); - settings->setDefault("gui_scaling_filter", "true"); + settings->setDefault("gui_scaling_filter", "false"); settings->setDefault("gui_scaling_filter_txr2img", "true"); settings->setDefault("desynchronize_mapblock_texture_animation", "true"); settings->setDefault("hud_hotbar_max_width", "1.0"); @@ -378,29 +377,29 @@ void set_default_settings(Settings *settings) settings->setDefault("touchtarget", "true"); settings->setDefault("touchscreen_threshold", "20"); settings->setDefault("fixed_virtual_joystick", "true"); - settings->setDefault("max_block_generate_distance", "3"); - settings->setDefault("pause_fps_max", "5"); settings->setDefault("doubletap_jump", "true"); - settings->setDefault("client_mapblock_limit", "250"); - settings->setDefault("active_block_range", "1"); - settings->setDefault("chunksize", "3"); settings->setDefault("gui_scaling_filter_txr2img", "false"); settings->setDefault("max_simultaneous_block_sends_per_client", "5"); settings->setDefault("abm_interval", "2.0"); - settings->setDefault("cloud_radius", "6"); settings->setDefault("client_unload_unused_data_timeout", "60"); settings->setDefault("curl_verify_cert", "false"); #endif #ifdef __ANDROID__ settings->setDefault("viewing_range", "35"); + settings->setDefault("pause_fps_max", "5"); settings->setDefault("smooth_lighting", "false"); settings->setDefault("selectionbox_width", "6"); settings->setDefault("emergequeue_limit_diskonly", "8"); settings->setDefault("emergequeue_limit_generate", "8"); + settings->setDefault("chunksize", "3"); + settings->setDefault("active_block_range", "1"); + settings->setDefault("max_block_generate_distance", "3"); + settings->setDefault("client_mapblock_limit", "250"); settings->setDefault("enable_3d_clouds", "false"); + settings->setDefault("cloud_radius", "6"); settings->setDefault("inventory_image_hack", "false"); - + // set font_path settings->setDefault("mono_font_path", "/system/fonts/DroidSansMono.ttf"); settings->setDefault("fallback_font_path", "/system/fonts/DroidSans.ttf"); @@ -421,7 +420,6 @@ void set_default_settings(Settings *settings) // tablets settings->setDefault("hud_scaling", "0.85"); settings->setDefault("gui_scaling", "1.2"); - settings->setDefault("mouse_sensitivity", "0.2"); } // Auto-detect language on Android @@ -434,32 +432,20 @@ void set_default_settings(Settings *settings) #endif #ifdef __IOS__ - settings->setDefault("viewing_range", "50"); - settings->setDefault("selectionbox_width", "3"); - settings->setDefault("smooth_lighting", "true"); + // set font_path settings->setDefault("mono_font_path", porting::getDataPath("fonts" DIR_DELIM "retrovillenc.ttf")); settings->setDefault("fallback_font_path", porting::getDataPath("fonts" DIR_DELIM "retrovillenc.ttf")); - // iPad - settings->setDefault("hud_scaling", "0.8"); - settings->setDefault("gui_scaling", "1.1"); - settings->setDefault("mouse_sensitivity", "0.2"); - + // set the size of the elements depending on the screen size if ([SDVersion deviceSize] == Screen3Dot5inch) { // 3.5" (old iPhone's) - settings->setDefault("viewing_range", "25"); settings->setDefault("hud_scaling", "0.5"); settings->setDefault("gui_scaling", "1.0"); - settings->setDefault("mouse_sensitivity", "0.2"); - settings->setDefault("enable_3d_clouds", "false"); - settings->setDefault("smooth_lighting", "false"); } else if ([SDVersion deviceSize] == Screen4inch) { // 4" (iPhone 5) settings->setDefault("hud_scaling", "0.5"); settings->setDefault("gui_scaling", "1.2"); settings->setDefault("mouse_sensitivity", "0.23"); - settings->setDefault("enable_3d_clouds", "false"); - settings->setDefault("smooth_lighting", "false"); } else if ([SDVersion deviceSize] == Screen4Dot7inch) { // 4.7" (iPhone) settings->setDefault("hud_scaling", "0.6"); @@ -472,11 +458,43 @@ void set_default_settings(Settings *settings) settings->setDefault("mouse_sensitivity", "0.3"); } else if ([SDVersion deviceSize] == Screen5Dot8inch) { // 5.8" (iPhone X) - settings->setDefault("viewing_range", "75"); settings->setDefault("hud_scaling", "0.7"); settings->setDefault("gui_scaling", "1.3"); settings->setDefault("mouse_sensitivity", "0.3"); settings->setDefault("hud_move_upwards", "15"); + } else { + // iPad + settings->setDefault("hud_scaling", "0.8"); + settings->setDefault("gui_scaling", "1.1"); + } + + // set the optimal settings depending on the model + if (([SDVersion deviceVersion] == iPhone4S) || ([SDVersion deviceVersion] == iPhone5) || ([SDVersion deviceVersion] == iPhone5S) || ([SDVersion deviceVersion] == iPhone6) || ([SDVersion deviceVersion] == iPhone6Plus) || ([SDVersion deviceVersion] == iPodTouch5Gen) || ([SDVersion deviceVersion] == iPad2) || ([SDVersion deviceVersion] == iPad3) || ([SDVersion deviceVersion] == iPadMini) || ([SDVersion deviceVersion] == iPadMini2)) { + // minimal settings + settings->setDefault("smooth_lighting", "false"); + settings->setDefault("viewing_range", "25"); + settings->setDefault("enable_3d_clouds", "false"); + settings->setDefault("cloud_radius", "6"); + settings->setDefault("pause_fps_max", "5"); + settings->setDefault("chunksize", "3"); + settings->setDefault("client_mapblock_limit", "250"); + settings->setDefault("active_block_range", "1"); + settings->setDefault("max_block_generate_distance", "2"); + } else if (([SDVersion deviceVersion] == iPhone6S) || ([SDVersion deviceVersion] == iPhone6SPlus) || ([SDVersion deviceVersion] == iPhoneSE) || ([SDVersion deviceVersion] == iPhone7) || ([SDVersion deviceVersion] == iPhone7Plus) || ([SDVersion deviceVersion] == iPodTouch6Gen) || ([SDVersion deviceVersion] == iPad4) || ([SDVersion deviceVersion] == iPadMini3) || ([SDVersion deviceVersion] == iPadMini4) || ([SDVersion deviceVersion] == iPadAir)) { + // medium settings + settings->setDefault("viewing_range", "50"); + settings->setDefault("chunksize", "3"); + settings->setDefault("cloud_radius", "6"); + settings->setDefault("client_mapblock_limit", "500"); + settings->setDefault("active_block_range", "1"); + settings->setDefault("max_block_generate_distance", "3"); + } else { +/*} else if (([SDVersion deviceVersion] == iPhone8) || ([SDVersion deviceVersion] == iPhone8Plus) || ([SDVersion deviceVersion] == iPhoneX) || ([SDVersion deviceVersion] == iPadPro9Dot7Inch) || ()([SDVersion deviceVersion] == iPadPro12Dot9Inch) || ([SDVersion deviceVersion] == iPadPro10Dot5Inch) || ([SDVersion deviceVersion] == iPadAir2) || ([SDVersion deviceVersion] == iPad5)|| ([SDVersion deviceVersion] == iPad6)) {*/ + // high settings + settings->setDefault("viewing_range", "75"); + settings->setDefault("client_mapblock_limit", "1000"); + settings->setDefault("active_block_range", "2"); + settings->setDefault("max_block_generate_distance", "5"); } // Auto-detect language on iOS diff --git a/textures/base/bg_common.png b/textures/base/bg_common.png index 046effa6d..edf8229e7 100644 Binary files a/textures/base/bg_common.png and b/textures/base/bg_common.png differ diff --git a/textures/base/bg_dialog.png b/textures/base/bg_dialog.png new file mode 100644 index 000000000..5a278dc08 Binary files /dev/null and b/textures/base/bg_dialog.png differ diff --git a/textures/base/bg_local.png b/textures/base/bg_local.png index 8d8a6eeff..e296ba7ac 100644 Binary files a/textures/base/bg_local.png and b/textures/base/bg_local.png differ diff --git a/games/default/files/default/textures/crack_anylength.png b/textures/base/crack_anylength.png similarity index 100% rename from games/default/files/default/textures/crack_anylength.png rename to textures/base/crack_anylength.png diff --git a/textures/base/empty.png b/textures/base/empty.png index eb0eee79c..02b4a0c75 100644 Binary files a/textures/base/empty.png and b/textures/base/empty.png differ diff --git a/textures/base/escape.png b/textures/base/escape.png index 40e38eba0..ade9d18ad 100644 Binary files a/textures/base/escape.png and b/textures/base/escape.png differ diff --git a/textures/base/local_creative_true_btn.png b/textures/base/local_creative_true_btn.png index 198fe53b5..afc0933fe 100644 Binary files a/textures/base/local_creative_true_btn.png and b/textures/base/local_creative_true_btn.png differ diff --git a/textures/base/up_three.png b/textures/base/up_three.png index 267e5277e..c42ae4c55 100644 Binary files a/textures/base/up_three.png and b/textures/base/up_three.png differ