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

KSP 1 labels are applied to KSP 2 mods #3824

Closed
tjanke42 opened this issue Apr 16, 2023 · 2 comments · Fixed by #3885
Closed

KSP 1 labels are applied to KSP 2 mods #3824

tjanke42 opened this issue Apr 16, 2023 · 2 comments · Fixed by #3885
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI

Comments

@tjanke42
Copy link

tjanke42 commented Apr 16, 2023

If a label is applied to a mod for KSP1, CKAN auto-applies that same label to a similarly named mod for KSP2.

Specifically, I've applied the label "installed" to the KSP1 mod "KSP Resonant Orbit Calculator" by Linuxgurugamer. When I added KSP2 as a game instance to CKAN, I found the label was already applied to the KSP2 mod "Resonant Orbit Calculator" by Schlosrat.

The name of the mods are similar but not identical (one is a substring of the other's) but even if they were identical, CKAN should recognize they are not the same mod. These are different mods for different games by different authors.

This is low priority right now, I would think, as the number of KSP2 mods is currently quite limited, but as the number grows, this could get annoying. Hope it isn't a great deal of work to fix. Thanks, and you guys are awesome!

@HebaruSan HebaruSan added Bug Something is not working as intended GUI Issues affecting the interactive GUI labels Apr 16, 2023
@HebaruSan
Copy link
Member

Thanks for the report! Yes, we'll need to figure out how to make labels per-game (or per-instance?). Right now they're stored in %LOCALAPPDATA%\CKAN\labels.json and shared everywhere.

We could try to split them into separate files, or we could add a game property to the JSON objects.

https://github.com/KSP-CKAN/CKAN/blob/master/GUI/Labels/ModuleLabel.cs

The name of the mods are similar but not identical (one is a substring of the other's)

We don't use the name, though; we use the identifier, and those two mods do have exactly identical identifiers:

@tjanke42
Copy link
Author

tjanke42 commented Apr 18, 2023

I see - relying on the authors (or whomever submits the info) to create unique identifiers. Probably works in 99.99..% of cases.
And every method I can think of to generate a truly unique identifier for each mod creates issues of its own.

Having a game property in the json is probably a good idea, regardless of this specific issue. Other than that, make it general knowledge that this is a consideration, rely on the commmunity?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working as intended GUI Issues affecting the interactive GUI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants