| 837 | } |
| 838 | |
| 839 | Error GDRESettings::_load_embedded_zips() { |
| 840 | // Load any embedded zips within the pck |
| 841 | auto zip_files = get_file_list({ "*.zip" }); |
| 842 | bool has_zips_to_load = false; |
| 843 | Error err = OK; |
| 844 | if (zip_files.size() > 0) { |
| 845 | Vector<String> pck_zip_files; |
| 846 | for (auto path : get_pack_paths()) { |
| 847 | if (path.has_extension("zip")) { |
| 848 | pck_zip_files.push_back(path.get_file().to_lower()); |
| 849 | } |
| 850 | } |
| 851 | for (auto zip_file : zip_files) { |
| 852 | if (is_zip_file_pack(zip_file) && !pck_zip_files.has(zip_file.get_file().to_lower())) { |
| 853 | Error load_err = load_pck(zip_file); |
| 854 | if (load_err == ERR_ALREADY_IN_USE) { |
| 855 | continue; |
| 856 | } else if (load_err) { |
| 857 | err = load_err; |
| 858 | } |
| 859 | has_zips_to_load = true; |
| 860 | ERR_CONTINUE_MSG(load_err, "Can't load embedded zip file: " + zip_file); |
| 861 | load_pack_uid_cache(); |
| 862 | load_pack_gdscript_cache(); |
| 863 | } |
| 864 | } |
| 865 | } |
| 866 | if (!has_zips_to_load) { |
| 867 | return ERR_UNAVAILABLE; |
| 868 | } |
| 869 | return err; |
| 870 | } |
| 871 | |
| 872 | Error GDRESettings::post_load_patch_translation() { |
| 873 | if (!is_pack_loaded()) { |
nothing calls this directly
no test coverage detected