Skip to content

Commit

Permalink
Merge #1448: Allow installation to @thumbs
Browse files Browse the repository at this point in the history
* Postremus/install_thumbs:
  Allow installation to the @thumbs folders fixes #1404
  • Loading branch information
pjf committed Dec 13, 2015
2 parents 0aca3a4 + 28b2635 commit dbb5fc0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to this project will be documented in this file.
- [Core] `find` and `find_regexp` install directives will match files as well as directories if the `find_matches_files` field is set to `true`. (dbent #1241)
- [Core/GUI] Missing directories in `Ships` will be recreated as needed. (Wetmelon, #1525)
- [Core] Framework added to allow fuzzy version checking, including "you're on your own" comparisons where KSP version checks are disabled. (pjf #1499)
- [Core] Thumbs subdirectories in `Ships` can now be directly targeted by install stanzas. (Postremus, #1448)

### Internal

Expand Down
9 changes: 9 additions & 0 deletions Core/ModuleInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,15 @@ internal static List<InstallableFile> FindInstallableFiles(ModuleInstallDescript
case "Ships/SPH":
installDir = ksp == null ? null : ksp.ShipsSph();
break;
case "Ships/@thumbs":
installDir = ksp == null ? null : ksp.ShipsThumbs();
break;
case "Ships/@thumbs/VAB":
installDir = ksp == null ? null : ksp.ShipsThumbsVAB();
break;
case "Ships/@thumbs/SPH":
installDir = ksp == null ? null : ksp.ShipsThumbsSPH();
break;
default:
throw new BadInstallLocationKraken("Unknown install_to " + stanza.install_to);
}
Expand Down
2 changes: 1 addition & 1 deletion Spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ three source directives:
In addition a destination directive *must* be provided:

- `install_to`: The location where this section should be installed.
Valid values for this entry are `GameData`, `Ships`, `Ships/SPH`(**v1.12**), `Ships/VAB`(**v1.12**), `Tutorial`, `Scenarios` (**v1.14**)
Valid values for this entry are `GameData`, `Ships`, `Ships/SPH`(**v1.12**), `Ships/VAB`(**v1.12**), `Ships/@thumbs/VAB`(**v1.16**), `Ships/@thumbs/SPH`(**v1.16**), `Tutorial`, `Scenarios` (**v1.14**)
and `GameRoot` (which should be used sparingly, if at all).
Paths will be preserved, but directories will *only*
be created when installing to `GameData`, `Tutorial`, or `Scenarios`.
Expand Down
3 changes: 3 additions & 0 deletions Tests/Core/ModuleInstaller.cs
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ public void ModuleManagerInstancesAreDecoupled()
[TestCase("Ships")]
[TestCase("Ships/VAB")]
[TestCase("Ships/SPH")]
[TestCase("Ships/@thumbs")]
[TestCase("Ships/@thumbs/VAB")]
[TestCase("Ships/@thumbs/SPH")]
public void AllowsInstallsToShipsDirectories(string directory)
{
// Arrange
Expand Down

0 comments on commit dbb5fc0

Please sign in to comment.