Core - Move InvalidDLCPackage class into DLCPackage.cs

This commit is contained in:
miku-666
2025-12-12 21:31:12 +01:00
parent e361a29b82
commit 57f3aa261a
4 changed files with 10 additions and 31 deletions

View File

@@ -82,7 +82,7 @@ namespace PckStudio.Core.DLC
DLCPackageType.MG01 => new DLCBattlePackage(name, identifier),
DLCPackageType.MG02 => new DLCMiniGamePackage(name, identifier, packageType, MiniGameId.Tumble),
DLCPackageType.MG03 => new DLCMiniGamePackage(name, identifier, packageType, MiniGameId.Glide),
DLCPackageType.Invalid => InvalidDLCPackage.Instance,
DLCPackageType.Invalid => DLCPackage.Invalid,
_ => throw new ArgumentException("Unable to create DLC Package of 'Unknown' type."),
};
@@ -102,7 +102,7 @@ namespace PckStudio.Core.DLC
throw new Exception($"{nameof(Platform)} is Unknown.");
if (!IsValidPckFile(fileInfo))
return InvalidDLCPackage.Instance;
return DLCPackage.Invalid;
using Stream stream = fileInfo.OpenRead();