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

pick most recent fallback when map version doesn't have a config #46

Open
icewind1991 opened this issue Mar 28, 2023 · 3 comments
Open

Comments

@icewind1991
Copy link
Collaborator

When a specific map version doesn't have a config it looks for an other version of the map that does have a config, however it just picks the first one that matches. This can lead to a very outdated config being picked.

For example, when loading koth_bagel_rc6 it picks the config for koth_bagel_rc2 while koth_bagel_rc5 is available.

Ideally it some logic should be added to attempt and pick the closest/most recent version.

@TheBv
Copy link

TheBv commented Jun 7, 2023

I like the idea behind this but I'm not sure how to quantify "the most recent version"
For the closest match one could go ahead and use something like the levenshtein distance to get the closest match, but that could be somewhat unpredictable.
The only idea I have right now for the most recent version would be to sort the versions by name and use the "biggest" one.
This would work quite well for maps following the _a,_b,_rc naming scheme but could fail for other ones.
If there's any other ideas on how to achieve this let me know I would be willing to implement this.

@icewind1991
Copy link
Collaborator Author

Sorting by name wouldn't work for everything yes, but I think it should handle most cases properly and for the ones where the naming scheme doesn't sort properly it shouldn't make much of a difference compared to the current "random" pick.

@sapphonie
Copy link
Owner

probably could use regex to get the last number(s) of the map name

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

No branches or pull requests

3 participants