MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / _load_embedded_zips

Method _load_embedded_zips

utility/gdre_settings.cpp:839–870  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

837}
838
839Error 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
872Error GDRESettings::post_load_patch_translation() {
873 if (!is_pack_loaded()) {

Callers

nothing calls this directly

Calls 4

is_zip_file_packFunction · 0.85
push_backMethod · 0.80
sizeMethod · 0.45
get_fileMethod · 0.45

Tested by

no test coverage detected