mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
Move suffix generation
This commit is contained in:
@@ -572,31 +572,13 @@ namespace SabreTools.DatItems.Formats
|
||||
/// Fill any missing size and hash information from another Rom
|
||||
/// </summary>
|
||||
/// <param name="other">Rom to fill information from</param>
|
||||
public void FillMissingInformation(Rom other) => _rom?.FillMissingHashes(other?._rom);
|
||||
public void FillMissingInformation(Rom other) => _rom.FillMissingHashes(other?._rom);
|
||||
|
||||
/// <summary>
|
||||
/// Get unique duplicate suffix on name collision
|
||||
/// </summary>
|
||||
/// <returns>String representing the suffix</returns>
|
||||
public string GetDuplicateSuffix()
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(CRC))
|
||||
return $"_{CRC}";
|
||||
else if (!string.IsNullOrWhiteSpace(MD5))
|
||||
return $"_{MD5}";
|
||||
else if (!string.IsNullOrWhiteSpace(SHA1))
|
||||
return $"_{SHA1}";
|
||||
else if (!string.IsNullOrWhiteSpace(SHA256))
|
||||
return $"_{SHA256}";
|
||||
else if (!string.IsNullOrWhiteSpace(SHA384))
|
||||
return $"_{SHA384}";
|
||||
else if (!string.IsNullOrWhiteSpace(SHA512))
|
||||
return $"_{SHA512}";
|
||||
else if (!string.IsNullOrWhiteSpace(SpamSum))
|
||||
return $"_{SpamSum}";
|
||||
else
|
||||
return "_1";
|
||||
}
|
||||
public string GetDuplicateSuffix() => _rom.GetDuplicateSuffix();
|
||||
|
||||
/// <summary>
|
||||
/// Returns if the Rom contains any hashes
|
||||
|
||||
Reference in New Issue
Block a user