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 ;
2020-03-22 15:50:53 +00:00
using Wabbajack.Common ;
2019-12-04 04:12:08 +00:00
using Wabbajack.Common.StatusFeed ;
namespace Wabbajack.Lib.CompilationSteps.CompilationErrors
{
public class InvalidGameESMError : AErrorMessage
{
2020-03-22 15:50:53 +00:00
public Hash Hash { get ; }
2020-03-25 22:30:43 +00:00
public AbsolutePath PathToFile { get ; }
2019-12-04 04:12:08 +00:00
private readonly CleanedESM _esm ;
2020-03-25 12:47:25 +00:00
public RelativePath GameFileName = > _esm . To . FileName ;
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 = >
2020-03-25 12:47:25 +00:00
$ @ "This modlist is setup to perform automatic cleaning of the stock game file {(string)GameFileName} in order to perform this cleaning Wabbajack must first verify that the
2019-12-05 05:11:15 +00:00
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 . ";
}
2020-03-25 22:30:43 +00:00
public InvalidGameESMError ( CleanedESM esm , Hash hash , AbsolutePath path )
2019-12-04 04:12:08 +00:00
{
2019-12-05 05:11:15 +00:00
Hash = hash ;
PathToFile = path ;
2019-12-04 04:12:08 +00:00
_esm = esm ;
}
}
}