Skip to content

Commit 01ce542

Browse files
committed
Merge #4443 Report number of filtered files in install
2 parents 4a6cf87 + 7bbd4e4 commit 01ce542

File tree

257 files changed

+15340
-3270
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

257 files changed

+15340
-3270
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ All notable changes to this project will be documented in this file.
3030
- [Netkan] Exclude internal .ckan files from `install_size` (#4348 by: HebaruSan)
3131
- [Core] Generate and tidy up XML docs for Core (#4351 by: HebaruSan)
3232
- [Core] Use setter instead of reflection to set max transaction timeout (#4365 by: doinkythederp; reviewed: HebaruSan)
33-
- [Build] Coverage and more tests (#4383, #4396, #4408, #4420, #4422, #4423, #4425, #4426, #4429, #4435, #4439, #4440, #4441 by: HebaruSan)
33+
- [Build] Coverage and more tests (#4383, #4396, #4408, #4420, #4422, #4423, #4425, #4426, #4429, #4435, #4439, #4440, #4441, #4443 by: HebaruSan)
3434
- [Multiple] Switch Inflator from Mono to dotnet (#4387 by: HebaruSan)
3535
- [Multiple] Migrate metadata tester from Mono to dotnet (#4390 by: HebaruSan)
3636
- [Multiple] Writethrough when saving files, add Netkan tests (#4392 by: HebaruSan)

Cmdline/Action/Available.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public int RunCommand(CKAN.GameInstance instance, object raw_options)
3535
}
3636

3737
user.RaiseMessage(Properties.Resources.AvailableHeader,
38-
instance.game.ShortName,
38+
instance.Game.ShortName,
3939
instance.Version()?.ToString() ?? "");
4040
user.RaiseMessage("");
4141

Cmdline/Action/Compat.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ private bool List(CKAN.GameInstance instance)
174174
Actual: true),
175175
1)
176176
: Enumerable.Empty<(GameVersion Version, bool Actual)>())
177-
.Concat(instance.GetCompatibleVersions()
177+
.Concat(instance.CompatibleVersions
178178
.OrderDescending()
179179
.Select(v => (Version: v,
180180
Actual: false)))
@@ -233,7 +233,7 @@ private bool Add(CompatAddOptions addOptions,
233233
string.Join(", ", badVers));
234234
return false;
235235
}
236-
instance.SetCompatibleVersions(instance.GetCompatibleVersions()
236+
instance.SetCompatibleVersions(instance.CompatibleVersions
237237
.Concat(goodVers)
238238
.Distinct()
239239
.ToList());
@@ -269,7 +269,7 @@ private bool Forget(CompatForgetOptions forgetOptions,
269269
string.Join(", ", rmActualVers));
270270
return false;
271271
}
272-
instance.SetCompatibleVersions(instance.GetCompatibleVersions()
272+
instance.SetCompatibleVersions(instance.CompatibleVersions
273273
.Except(goodVers)
274274
.ToList());
275275
List(instance);

Cmdline/Action/Filter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ private static IGame GetGame(string? gameId, CKAN.GameInstance instance)
244244
gameId,
245245
string.Join(" ", KnownGames.AllGameShortNames())));
246246
}
247-
return instance.game;
247+
return instance.Game;
248248
}
249249

250250
[ExcludeFromCodeCoverage]

Cmdline/Action/GameInstance.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,17 +250,17 @@ private int ListInstalls()
250250
{
251251
var output = Manager?.Instances.Values
252252
.OrderByDescending(i => i.Name == Manager.AutoStartInstance)
253-
.ThenByDescending(i => i.game.FirstReleaseDate)
253+
.ThenByDescending(i => i.Game.FirstReleaseDate)
254254
.ThenByDescending(i => i.Version() ?? GameVersion.Any)
255255
.ThenBy(i => i.Name)
256256
.Select(i => new Tuple<string, string, string, string, string>(
257257
i.Name,
258-
i.game.ShortName,
258+
i.Game.ShortName,
259259
i.Version()?.ToString() ?? Properties.Resources.InstanceListNoVersion,
260260
i.Name == Manager.AutoStartInstance
261261
? Properties.Resources.InstanceListYes
262262
: Properties.Resources.InstanceListNo,
263-
Platform.FormatPath(i.GameDir())))
263+
Platform.FormatPath(i.GameDir)))
264264
.ToList();
265265

266266
if (output != null && user != null)
@@ -491,7 +491,7 @@ private int SetDefaultInstall(DefaultOptions options)
491491
? Enumerable.Empty<object>()
492492
: Enumerable.Repeat((object)Manager.Instances.IndexOfKey(defaultInstance), 1))
493493
.Concat(Manager.Instances.Select(kvp => string.Format("\"{0}\" - {1}",
494-
kvp.Key, kvp.Value.GameDir())))
494+
kvp.Key, kvp.Value.GameDir)))
495495
.ToArray());
496496
if (result < 0)
497497
{

Cmdline/Action/List.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ public int RunCommand(CKAN.GameInstance instance, object raw_options)
4444
{
4545
user.RaiseMessage("");
4646
user.RaiseMessage(Properties.Resources.ListGameFound,
47-
instance.game.ShortName,
48-
Platform.FormatPath(instance.GameDir()));
47+
instance.Game.ShortName,
48+
Platform.FormatPath(instance.GameDir));
4949
if (instance.Version() is GameVersion gv)
5050
{
5151
user.RaiseMessage("");
5252
user.RaiseMessage(Properties.Resources.ListGameVersion,
53-
instance.game.ShortName, gv);
53+
instance.Game.ShortName, gv);
5454
}
5555
user.RaiseMessage("");
5656
user.RaiseMessage(Properties.Resources.ListGameModulesHeader);

Cmdline/Action/Prompt.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public int RunCommand(object raw_options)
3838
Console.Write(
3939
manager.CurrentInstance != null
4040
? string.Format(Properties.Resources.PromptWithInstance,
41-
Meta.GetVersion(), manager.CurrentInstance.game.ShortName, manager.CurrentInstance.Version(), manager.CurrentInstance.Name)
41+
Meta.GetVersion(), manager.CurrentInstance.Game.ShortName, manager.CurrentInstance.Version(), manager.CurrentInstance.Name)
4242
: string.Format(Properties.Resources.PromptWithoutInstance, Meta.GetVersion())
4343
);
4444
}

Cmdline/Action/Repo.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ private int AvailableRepositories(string? userAgent)
200200
try
201201
{
202202
if (RepositoryList.DefaultRepositories(
203-
MainClass.GetGameInstance(Manager).game, userAgent)
203+
MainClass.GetGameInstance(Manager).Game, userAgent)
204204
is RepositoryList repoList)
205205
{
206206
var maxNameLen = repoList.repositories
@@ -217,7 +217,7 @@ private int AvailableRepositories(string? userAgent)
217217
catch
218218
{
219219
user.RaiseError(Properties.Resources.RepoAvailableFailed,
220-
MainClass.GetGameInstance(Manager).game.RepositoryListURL.ToString());
220+
MainClass.GetGameInstance(Manager).Game.RepositoryListURL.ToString());
221221
}
222222
return Exit.ERROR;
223223
}
@@ -273,7 +273,7 @@ private int AddRepository(RepoAddOptions options)
273273
if (options.uri == null)
274274
{
275275
if (RepositoryList.DefaultRepositories(
276-
MainClass.GetGameInstance(Manager).game, options.NetUserAgent)
276+
MainClass.GetGameInstance(Manager).Game, options.NetUserAgent)
277277
is RepositoryList repoList)
278278
{
279279
foreach (var candidate in repoList.repositories)
@@ -426,7 +426,7 @@ private int ForgetRepository(RepoForgetOptions options)
426426
private int DefaultRepository(RepoDefaultOptions options)
427427
{
428428
var inst = MainClass.GetGameInstance(Manager);
429-
var uri = options.uri ?? inst.game.DefaultRepositoryURL.ToString();
429+
var uri = options.uri ?? inst.Game.DefaultRepositoryURL.ToString();
430430

431431
log.DebugFormat("About to add repository '{0}' - '{1}'", Repository.default_ckan_repo_name, uri);
432432
RegistryManager manager = RegistryManager.Instance(inst, repoData);

Cmdline/Action/Search.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public int RunCommand(CKAN.GameInstance instance, object raw_options)
9595
foreach (CkanModule mod in matching_incompatible)
9696
{
9797
CkanModule.GetMinMaxVersions(new List<CkanModule> { mod } , out _, out _, out var mininstance, out var maxinstance);
98-
var gv = GameVersionRange.VersionSpan(instance.game,
98+
var gv = GameVersionRange.VersionSpan(instance.Game,
9999
mininstance ?? GameVersion.Any,
100100
maxinstance ?? GameVersion.Any)
101101
.ToString();

Cmdline/Action/Show.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public int RunCommand(CKAN.GameInstance instance, object raw_options)
6161
// No exact match found. Try to look for a close match for this KSP version.
6262
user.RaiseMessage(Properties.Resources.ShowNotInstalledOrCompatible,
6363
modName,
64-
instance.game.ShortName,
64+
instance.Game.ShortName,
6565
string.Join(", ", instance.VersionCriteria().Versions.Select(v => v.ToString())));
6666
user.RaiseMessage(Properties.Resources.ShowLookingForClose);
6767

@@ -336,7 +336,7 @@ private void ShowVersionTable(CKAN.GameInstance inst, List<CkanModule> modules)
336336
{
337337
CkanModule.GetMinMaxVersions(new List<CkanModule>() { m }, out _, out _,
338338
out GameVersion? minKsp, out GameVersion? maxKsp);
339-
return GameVersionRange.VersionSpan(inst.game,
339+
return GameVersionRange.VersionSpan(inst.Game,
340340
minKsp ?? GameVersion.Any,
341341
maxKsp ?? GameVersion.Any);
342342
}).ToList();

0 commit comments

Comments
 (0)