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

Handle multiple game versions from Curse #2616

Merged
merged 1 commit into from Dec 26, 2018

Conversation

HebaruSan
Copy link
Member

Background

Curse lets mod authors select multiple game versions (this list appears upon hovering the "+9" with the mouse):

image

This data appears in a versions property in the API:

https://api.cfwidget.com/project/283006

"versions":["1.2","1.2.1","1.2.2","1.3","1.3.1","1.4.0","1.4.1","1.4.2","1.4.3","1.4.4"]

Problem

Currently Netkan ignores those values; instead, the single game version from the version property in the API is used, and any broader compatibility can only be set with a $vref or with overrides.

I think the quirks of the selection of the value of that property somehow caused KSP-CKAN/NetKAN#6622.

Changes

Now we parse the full game version list. This is done with by adding a new CurseFile.versions property and extending JsonConvertKSPVersion to support arrays.

If there are multiple game versions, we set ksp_version_min to the earliest and ksp_version_max to the latest. Otherwise the single game version is set to ksp_version, as before.

Fixes KSP-CKAN/NetKAN#6622 better than KSP-CKAN/NetKAN#6674 did (the latter can now be reverted).

@HebaruSan HebaruSan added Pull request Netkan Issues affecting the netkan data labels Dec 18, 2018
@politas politas merged commit cf77a1a into KSP-CKAN:master Dec 26, 2018
politas added a commit that referenced this pull request Dec 26, 2018
@HebaruSan HebaruSan deleted the fix/curse-min-max branch December 26, 2018 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Netkan Issues affecting the netkan data Pull request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants