Skip to content

Commit

Permalink
display message when debug-install-issues is used on non-Battle.net i…
Browse files Browse the repository at this point in the history
…nstalls

closes #176
  • Loading branch information
ZingBallyhoo committed Jan 12, 2024
1 parent 2f49ac7 commit da5918e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 0 additions & 8 deletions DataTool/Helper/Logger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,10 @@ public static void Log(string syntax, params object[] payload) {
TankLib.Helpers.Logger.Info(null, syntax, payload);
}

public static void ErrorLog() {
Console.Error.WriteLine();
}

public static void ErrorLog(string syntax) {
TankLib.Helpers.Logger.Error(null, syntax);
}

public static void ErrorLog(string syntax, params object[] payload) {
TankLib.Helpers.Logger.Error(null, syntax, payload);
}

public static void WarnLog(string syntax) {
TankLib.Helpers.Logger.Warn(null, syntax);
}
Expand Down
8 changes: 6 additions & 2 deletions DataTool/ToolLogic/Dbg/DebugInstallIssues.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@
using TACTLib.Core.Key;
using TACTLib.Core.Product.Tank;
using TankLib;
using TankLib.Helpers;
using TankLib.TACT;
using CKey=TACTLib.Core.Key.FullKey;
using EKey=TACTLib.Core.Key.TruncatedKey;

namespace DataTool.ToolLogic.Dbg;

[Tool("debug-install-issues", Description = "Collect debugging information about the game install", CustomFlags = typeof(ListFlags), UtilNoArchiveNeeded = true)]
[Tool("debug-install-issues", Description = "Collect debugging information about the game install", CustomFlags = typeof(ListFlags), UtilNoArchiveNeeded = true, IsSensitive = true)]
class DebugInstallIssues : ITool {
public void Parse(ICLIFlags toolFlags) {
const string filename = "install-issues.txt";
Expand All @@ -45,7 +46,10 @@ public void Parse(ICLIFlags toolFlags) {
var client = new ClientHandler(Program.Flags.OverwatchDirectory, args);
LoadHelper.PostLoad(client);

var dynamicContainer = (ContainerHandler) client.ContainerHandler!;
if (client.ContainerHandler is not ContainerHandler dynamicContainer) {
Logger.Error("DebugInstallIssues", "This mode is only relevant for Battle.net installs");
return;
}

int overwatchAssetCount = 0;
var nonResidentOverwatchAssetCount = 0;
Expand Down

0 comments on commit da5918e

Please sign in to comment.