From 56e381af249b52fc93ecc999b24d854df6c8e61f Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Sun, 9 Nov 2025 22:44:26 +0100 Subject: [PATCH] Add DLCMiniGamePackage.cs --- PckStudio.Core/DLCBattlePackage.cs | 15 +++----------- PckStudio.Core/DLCMiniGamePackage.cs | 31 ++++++++++++++++++++++++++++ PckStudio.Core/PckStudio.Core.csproj | 1 + 3 files changed, 35 insertions(+), 12 deletions(-) create mode 100644 PckStudio.Core/DLCMiniGamePackage.cs diff --git a/PckStudio.Core/DLCBattlePackage.cs b/PckStudio.Core/DLCBattlePackage.cs index a10a516c..0d67443e 100644 --- a/PckStudio.Core/DLCBattlePackage.cs +++ b/PckStudio.Core/DLCBattlePackage.cs @@ -8,21 +8,12 @@ using PckStudio.Core.Interfaces; namespace PckStudio.Core { - internal sealed class DLCBattlePackage : DLCPackage + internal sealed class DLCBattlePackage : DLCMiniGamePackage { - - private List _maps = new List(); - - public DLCBattlePackage(string name, int identifier, IDLCPackageLocationInfo packageInfo = null, IDLCPackage parentPackage = null) - : base(name, identifier, packageInfo, parentPackage) + public DLCBattlePackage(string name, int identifier) + : base(name, identifier, DLCPackageType.MG01, MiniGameId.Battle) { } - public void AddMap(string name, Image thumbnail, MapSize mapSize, NamedData world) - { - _maps.Add(new MapData(name, thumbnail, MiniGameId.Battle, mapSize, world)); - } - - public override DLCPackageType GetDLCPackageType() => DLCPackageType.MG01; } } diff --git a/PckStudio.Core/DLCMiniGamePackage.cs b/PckStudio.Core/DLCMiniGamePackage.cs new file mode 100644 index 00000000..524bf6e8 --- /dev/null +++ b/PckStudio.Core/DLCMiniGamePackage.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using PckStudio.Core.Interfaces; + +namespace PckStudio.Core +{ + internal class DLCMiniGamePackage : DLCPackage + { + private List _maps = new List(); + private readonly DLCPackageType _packageType; + private readonly MiniGameId _miniGameId; + + public DLCMiniGamePackage(string name, int identifier, DLCPackageType packageType, MiniGameId miniGameId, IDLCPackageLocationInfo packageInfo = null, IDLCPackage parentPackage = null) + : base(name, identifier, packageInfo, parentPackage) + { + _packageType = packageType; + _miniGameId = miniGameId; + } + + public void AddMap(string name, Image thumbnail, MapSize mapSize, NamedData world) + { + _maps.Add(new MapData(name, thumbnail, _miniGameId, mapSize, world)); + } + + public override DLCPackageType GetDLCPackageType() => _packageType; + } +} diff --git a/PckStudio.Core/PckStudio.Core.csproj b/PckStudio.Core/PckStudio.Core.csproj index 366b2edb..75089f38 100644 --- a/PckStudio.Core/PckStudio.Core.csproj +++ b/PckStudio.Core/PckStudio.Core.csproj @@ -68,6 +68,7 @@ +