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

Allow PQS cache file location to be explicitly specified #43

Merged
merged 1 commit into from Jun 7, 2015
Merged

Allow PQS cache file location to be explicitly specified #43

merged 1 commit into from Jun 7, 2015

Conversation

dbent
Copy link
Contributor

@dbent dbent commented Jun 6, 2015

This allows Body configuration nodes to optionally specify a cacheFile property, which is a GameData relative path to the file to be used for the PQS cache. If not specified, the current behavior is used.

This will allow mods to distribute/build the cache files inside their own directories, making mod management easier for users.

I tested this by downloading the latest Kopernicus release, replacing the assembly with one built from this version of the code, editing the Kopernicus example planet to have a cacheFile property, and then observing Kopernicus writing the cache file to the specified location.

@dbent
Copy link
Contributor Author

dbent commented Jun 7, 2015

As a concrete example of how this would be helpful see KSP-CKAN/NetKAN#1533. The Sigma mod modifies one of OPM's planets and provides a new cache file, which it does right now by overwriting it. This means in order to properly support it in CKAN, the planet has to split off from OPM and two mods have to be made to provide it. This is worse for players that perform a manual installation, because if they wish to uninstall Sigma they have to remember to remove the cache file it provides and replace it with the one from OPM.

With this change, Sigma would just have to provide a MM patch editing the cache file location, no overwrite necessary. On uninstallation the patch file would disappear and Kopernicus would revert to using the default cache file or whatever OPM points to.

@StollD
Copy link
Member

StollD commented Jun 7, 2015

Thanks! But, next time, please submit the pull to the development branch, and not to master :)

StollD pushed a commit that referenced this pull request Jun 7, 2015
Allow PQS cache file location to be explicitly specified
@StollD StollD merged commit 06ce983 into Kopernicus:master Jun 7, 2015
@dbent
Copy link
Contributor Author

dbent commented Jun 7, 2015

Thanks. FYI, you can set GitHub's default branch, which would be used for things like pull requests and what branch people are on after a clone.

@dbent dbent deleted the custom_cache_location branch June 7, 2015 14:00
@StollD
Copy link
Member

StollD commented Jun 7, 2015 via email

@dbent
Copy link
Contributor Author

dbent commented Jun 7, 2015

Ah, carry on. :)

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.

None yet

2 participants