2019-12-04 04:12:08 +00:00
using System ;
using System.Collections.Generic ;
using System.Linq ;
using System.Text ;
using System.Threading.Tasks ;
using Alphaleonis.Win32.Filesystem ;
using Wabbajack.Common.StatusFeed ;
namespace Wabbajack.Lib.CompilationSteps.CompilationErrors
{
public class InvalidGameESMError : AErrorMessage
{
2019-12-05 05:11:15 +00:00
public string Hash { get ; }
public string PathToFile { get ; }
2019-12-04 04:12:08 +00:00
private readonly CleanedESM _esm ;
2019-12-05 05:11:15 +00:00
public string GameFileName = > Path . GetFileName ( _esm . To ) ;
2019-12-04 04:12:08 +00:00
public override string ShortDescription
{
get = >
2019-12-05 05:11:15 +00:00
$"Game file {GameFileName} has a hash of {Hash} which does not match the expected value of {_esm.SourceESMHash}" ;
2019-12-04 04:12:08 +00:00
}
public override string ExtendedDescription
{
get = >
2019-12-05 05:11:15 +00:00
$ @ "This modlist is setup to perform automatic cleaning of the stock game file {GameFileName} in order to perform this cleaning Wabbajack must first verify that the
source file is in the correct state . It seems that the file in your game directory has a hash of { Hash } instead of the expect hash of { _esm . SourceESMHash } . This could be caused by
2019-12-04 04:12:08 +00:00
the modlist expecting a different of the game than you currently have installed , or perhaps you have already cleaned the file . You could attempt to fix this error by re - installing
the game , and then attempting to re - install this modlist . Also verify that the version of the game you have installed matches the version expected by this modlist . ";
}
public InvalidGameESMError ( CleanedESM esm , string hash , string path )
{
2019-12-05 05:11:15 +00:00
Hash = hash ;
PathToFile = path ;
2019-12-04 04:12:08 +00:00
_esm = esm ;
}
}
}