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

Detect Breaking Ground DLC #2768

Merged
merged 1 commit into from
May 31, 2019
Merged

Detect Breaking Ground DLC #2768

merged 1 commit into from
May 31, 2019

Conversation

dbent
Copy link
Member

@dbent dbent commented May 25, 2019

(Probably) Fixes #2765

Refactors the common logic of MakingHistoryDlcDetector into a StandardDlcDetectorBase and creates a new BreakingGroundDlcDetector.

Quoting from the documentation comment:

Base class for DLC Detectors that follow standard conventions.

"Standard conventions" is defined as detecting installation by the presence of directory with the name IdentifierBaseName in the [GameData]/SquadExpansion directory, detecting version by parsing a version line in a readme.txt file in the same directory, and having an identifier of IdentifierBaseName-DLC.

Assuming Breaking Ground in fact does follow these conventions then this should be all that's required to support it. This can probably be merged after Breaking Ground is released and we confirm that it does follow the conventions.

@dbent dbent requested a review from HebaruSan May 25, 2019 12:24
@Olympic1
Copy link
Member

FakeInstance should be reworked for the new DLC so it could create a fake install with both of them installed.

public void FakeInstance(string new_name, string new_path, KspVersion version, string dlcVersion = null)

The tests in CKAN/Tests/Core/Registry/Registry.cs shouldn't need an update if the naming convention stays the same.

@HebaruSan
Copy link
Member

Looks solid, will take it for a test drive once the DLC is released. 👍

@dbent
Copy link
Member Author

dbent commented May 30, 2019

@Olympic1 I'll probably add support for that this weekend.

@dbent dbent force-pushed the feature/breakingground-dlc branch from d1268ca to fa90680 Compare May 31, 2019 03:00
@dbent
Copy link
Member Author

dbent commented May 31, 2019

@HebaruSan StandardDlcDetectorBase now has an overloaded constructor which allows you to pass in a directoryBaseName. If the other ctor is used, directoryBaseName defaults to the same as identifierBaseName.

I've also removed the canonical version dictionary for... Serenity, as the first release is in fact 1.0.0 and not 1.0.

@HebaruSan
Copy link
Member

Confirmed that it detects the DLC correctly with the latest changes. 👍

@dbent, you mentioned updating the fake instance stuff. Are you planning to add that to this PR? If so, I can wait for further review, but otherwise I think this is ready to merge.

@dbent
Copy link
Member Author

dbent commented May 31, 2019

I'll do that in a separate PR.

@dbent dbent merged commit 9b4ffc8 into master May 31, 2019
@dbent dbent deleted the feature/breakingground-dlc branch May 31, 2019 13:40
@DasSkelett
Copy link
Member

@dbent, are you already working on the instance faking update? Else I could look into it tomorrow, if you'd prefer that.

@dbent
Copy link
Member Author

dbent commented Jun 2, 2019

@DasSkelett I have not, have at it.

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.

New DLC "Breaking Ground" will be out soon
4 participants