Skip to content

Commit

Permalink
Allow installation to the @thumbs folders
Browse files Browse the repository at this point in the history
fixes #1404
  • Loading branch information
Postremus committed Sep 7, 2015
1 parent 0b06492 commit 28b2635
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
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 28b2635

Please sign in to comment.