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

Mods updates system #54

Merged
merged 1 commit into from
Jun 12, 2023
Merged

Mods updates system #54

merged 1 commit into from
Jun 12, 2023

Conversation

BadRyuner
Copy link
Collaborator

@BadRyuner BadRyuner commented Jun 11, 2023

During the loading of mods checks for updates for the mod, if the developer has provided a link to a special link.
Also allows you to update the mod with the click of a button. Unfortunately, the changes will only apply after restarting the game.

Special file: https://github.com/BadRyuner/PulsarBotIntegration/blob/master/Version.json
How to provide: https://github.com/BadRyuner/PulsarBotIntegration/blob/master/Mod.cs#L27

How it looks in the game:
image
(!) - means this mod is outdated.

To indicate a new version, the modder only needs to update his Version.json on the master branch of the mod by changing Version and DownloadLink.

@BadRyuner BadRyuner requested a review from Nagord June 11, 2023 15:30
Copy link
Member

@Nagord Nagord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Took a quick skim, everything looks fine.

The old ModID string should have been marked obsolete for cases where devs added it, but it shouldn't have been implemented by anyone yet.

Additionally, it looks like the updater might crash if the expected information isn't found (mod.VersionLink points to the wrong location, file.Version doesn't exist). This crash is dependent on JsonConvert.DeserializeObject returning a VersionFile object with empty strings or simply crashing if the expected values aren't found. I haven't tested at this time, but if these are issues we'll deal with them in upcoming commits.

@BadRyuner BadRyuner merged commit a5454ce into PULSAR-Modders:master Jun 12, 2023
@BadRyuner BadRyuner deleted the Updates branch June 12, 2023 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants