Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: ♻️ reworked mod uninstall detection #298

Conversation

KANAjetzt
Copy link
Member

@KANAjetzt KANAjetzt commented Jun 24, 2023

  • Added zip_name and zip_path to ModData
  • The functions responsible for loading zip files now return a dictionary containing the zip data:
zip_data = {
"mod_id": "path/to/zip/file.zip"
}
  • New util ModLoaderPath.get_dir_paths_in_dir()
    Used in load_zips_in_folder() to map the zip file path to the correct mod.
  • User Profiles now store the path to the zip file associated with each mod
  • Issue ModLoaderUserProfile - Mods are getting deleted from the mod_list when they are disabled and Steam Workshop support is enabled. #288 has been resolved by implementing a check to verify the existence of the mod's zip file.
    c587953 Note: This allows to verify if the mod is still installed by confirming the existence of the zip file. However, this check is only performed when the mod is not loaded and a path to the zip file exists. This ensures that mods are not deleted from the profile when running in the editor. It's important to note that this new check may cause mods to appear in user profiles even if they are currently not loaded. To determine if a mod is actually loaded, you should also check ModLoaderStore.mod_data or use ModLoaderMod.is_mod_loaded().

depends on #297
closes #288

@KANAjetzt KANAjetzt added bug Something isn't working enhancement New feature or request labels Jun 24, 2023
@KANAjetzt KANAjetzt added this to the v6.0.1 milestone Jun 24, 2023
@KANAjetzt KANAjetzt requested review from ithinkandicode, Qubus0, otDan and a team June 24, 2023 08:50
@KANAjetzt KANAjetzt force-pushed the refactor_user_profile_detect_uninstall branch from c587953 to 09cd2f0 Compare June 24, 2023 09:09
This allows to verify if the mod is still installed by confirming the existence of the zip file. However, this check is only performed when the mod is not loaded and a path to the zip file exists. This ensures that mods are not deleted from the profile when running in the editor. It's important to note that this new check may cause mods to appear in user profiles even if they are currently not loaded. To determine if a mod is actually loaded, you should also check `ModLoaderStore.mod_data` or use `ModLoaderMod.is_mod_loaded()`.

closes GodotModding#288
@KANAjetzt KANAjetzt self-assigned this Jun 27, 2023
@KANAjetzt KANAjetzt added this pull request to the merge queue Jun 27, 2023
Merged via the queue into GodotModding:development with commit ee7312a Jun 27, 2023
@KANAjetzt KANAjetzt deleted the refactor_user_profile_detect_uninstall branch June 27, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants