From f0d6b77447df824807526e7d70c52d235e4500b0 Mon Sep 17 00:00:00 2001 From: miku-666 <74728189+NessieHax@users.noreply.github.com> Date: Thu, 20 Nov 2025 01:27:16 +0100 Subject: [PATCH] Core - Add 'additionalMapiconsData.json' --- PckStudio.Core/PckStudio.Core.csproj | 1 + .../Properties/Resources.Designer.cs | 86 +++++++++++++------ PckStudio.Core/Properties/Resources.resx | 3 + .../Resources/additionalMapiconsData.json | 70 +++++++++++++++ PckStudio.Core/Resources/mapIconData.json | 68 +-------------- PckStudio.Core/Tiles.cs | 29 +++---- 6 files changed, 145 insertions(+), 112 deletions(-) create mode 100644 PckStudio.Core/Resources/additionalMapiconsData.json diff --git a/PckStudio.Core/PckStudio.Core.csproj b/PckStudio.Core/PckStudio.Core.csproj index 3ffd9e16..92655915 100644 --- a/PckStudio.Core/PckStudio.Core.csproj +++ b/PckStudio.Core/PckStudio.Core.csproj @@ -201,6 +201,7 @@ + diff --git a/PckStudio.Core/Properties/Resources.Designer.cs b/PckStudio.Core/Properties/Resources.Designer.cs index af12b5e9..30de97d7 100644 --- a/PckStudio.Core/Properties/Resources.Designer.cs +++ b/PckStudio.Core/Properties/Resources.Designer.cs @@ -70,6 +70,39 @@ namespace PckStudio.Core.Properties { } } + /// + /// Looks up a localized string similar to { + /// "COMMENT_1": "JSON by MattNL", + /// "entries": [ + /// { + /// "internalName": "player_1_off_map", + /// "displayName": "Player 1 (Off Map)" + /// }, + /// { + /// "internalName": "player_2_off_map", + /// "displayName": "Player 2 (Off Map)" + /// }, + /// { + /// "internalName": "player_3_off_map", + /// "displayName": "Player 3 (Off Map)" + /// }, + /// { + /// "internalName": "player_4_off_map", + /// "displayName": "Player 4 (Off Map)" + /// }, + /// { + /// "internalName": "treasure", + /// "displayName": "Buried Treasure" + /// }, + /// { + /// "interna [rest of string was truncated]";. + /// + public static string additionalMapiconsData { + get { + return ResourceManager.GetString("additionalMapiconsData", resourceCulture); + } + } + /// /// Looks up a localized string similar to { /// "COMMENT_1": "JSON by MattNL", @@ -77,7 +110,7 @@ namespace PckStudio.Core.Properties { /// { /// "internalName": "base", /// "displayName": "Base", - /// "hasColourEntry": true, + /// /// "colourEntry": { /// "defaultName": "Banner_White", /// "variants": [ @@ -94,7 +127,8 @@ namespace PckStudio.Core.Properties { /// "Banner_Pink", /// "Banner_Purple", /// "Banner_Red", - /// "Ban [rest of string was truncated]";. + /// "Banner_Silver", + /// "Banner [rest of string was truncated]";. /// public static string bannerData { get { @@ -120,7 +154,7 @@ namespace PckStudio.Core.Properties { /// { /// "internalName": "grass_top", /// "displayName": "Grass Block (Top)", - /// "hasColourEntry": true, + /// /// "colourEntry": { /// "defaultName": "Grass_Common", /// "variants": [ @@ -136,7 +170,8 @@ namespace PckStudio.Core.Properties { /// "displayName": "Stone" /// }, /// { - /// "internalName": [rest of string was truncated]";. + /// "internalName": "dirt", + /// "displayName" [rest of string was truncated]";. /// public static string blockData { get { @@ -407,29 +442,26 @@ namespace PckStudio.Core.Properties { /// /// Looks up a localized string similar to { - /// "COMMENT_1": "JSON by MattNL", - /// "entries": [ - /// { - /// "internalName": "generic_0", - /// "displayName": "Generic (Stage 1)", - /// "hasColourEntry": true, - /// "colourEntry": { - /// "defaultName": "None", - /// "variants": [ - /// "None", - /// "Particle_Smoke", - /// "Particle_NetherPortal", - /// "Particle_EnderPortal", - /// "Particle_Ender", - /// "Particle_DragonBreathMin", - /// "Particle_DragonBreathMax" - /// ] - /// } - /// }, - /// { - /// "internalName": "generic_1", - /// "displayName": "Generic (Stage 2)", - /// [rest of string was truncated]";. + /// "COMMENT_1": "JSON by MattNL", + /// "entries": [ + /// { + /// "internalName": "generic_0", + /// "displayName": "Generic (Stage 1)", + /// "colourEntry": { + /// "defaultName": "None", + /// "variants": [ + /// "None", + /// "Particle_Smoke", + /// "Particle_NetherPortal", + /// "Particle_EnderPortal", + /// "Particle_Ender", + /// "Particle_DragonBreathMin", + /// "Particle_DragonBreathMax" + /// ] + /// } + /// }, + /// { + /// "internalName": "generic_1", [rest of string was truncated]";. /// public static string particleData { get { diff --git a/PckStudio.Core/Properties/Resources.resx b/PckStudio.Core/Properties/Resources.resx index b1f785a9..df7cea2f 100644 --- a/PckStudio.Core/Properties/Resources.resx +++ b/PckStudio.Core/Properties/Resources.resx @@ -118,6 +118,9 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + ..\Resources\additionalMapiconsData.json;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + ..\Resources\additional_mapicons.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a diff --git a/PckStudio.Core/Resources/additionalMapiconsData.json b/PckStudio.Core/Resources/additionalMapiconsData.json new file mode 100644 index 00000000..8c0190ab --- /dev/null +++ b/PckStudio.Core/Resources/additionalMapiconsData.json @@ -0,0 +1,70 @@ +{ + "COMMENT_1": "JSON by MattNL", + "entries": [ + { + "internalName": "player_1_off_map", + "displayName": "Player 1 (Off Map)" + }, + { + "internalName": "player_2_off_map", + "displayName": "Player 2 (Off Map)" + }, + { + "internalName": "player_3_off_map", + "displayName": "Player 3 (Off Map)" + }, + { + "internalName": "player_4_off_map", + "displayName": "Player 4 (Off Map)" + }, + { + "internalName": "treasure", + "displayName": "Buried Treasure" + }, + { + "internalName": "", + "displayName": "" + }, + { + "internalName": "", + "displayName": "" + }, + { + "internalName": "", + "displayName": "" + }, + { + "internalName": "player_5_off_map", + "displayName": "Player 5 (Off Map)" + }, + { + "internalName": "player_6_off_map", + "displayName": "Player 6 (Off Map)" + }, + { + "internalName": "player_7_off_map", + "displayName": "Player 7 (Off Map)" + }, + { + "internalName": "player_8_off_map", + "displayName": "Player 8 (Off Map)" + }, + { + "internalName": "", + "displayName": "" + }, + { + "internalName": "", + "displayName": "" + }, + { + "internalName": "", + "displayName": "" + }, + { + "internalName": "", + "displayName": "" + } + ] + +} \ No newline at end of file diff --git a/PckStudio.Core/Resources/mapIconData.json b/PckStudio.Core/Resources/mapIconData.json index 8e1273f2..4e5162d9 100644 --- a/PckStudio.Core/Resources/mapIconData.json +++ b/PckStudio.Core/Resources/mapIconData.json @@ -65,71 +65,5 @@ "internalName": "monument", "displayName": "Ocean Monument (Explorer Map)" } - ], - "additional_entries": [ - { - "internalName": "player_1_off_map", - "displayName": "Player 1 (Off Map)" - }, - { - "internalName": "player_2_off_map", - "displayName": "Player 2 (Off Map)" - }, - { - "internalName": "player_3_off_map", - "displayName": "Player 3 (Off Map)" - }, - { - "internalName": "player_4_off_map", - "displayName": "Player 4 (Off Map)" - }, - { - "internalName": "treasure", - "displayName": "Buried Treasure" - }, - { - "internalName": "", - "displayName": "" - }, - { - "internalName": "", - "displayName": "" - }, - { - "internalName": "", - "displayName": "" - }, - { - "internalName": "player_5_off_map", - "displayName": "Player 5 (Off Map)" - }, - { - "internalName": "player_6_off_map", - "displayName": "Player 6 (Off Map)" - }, - { - "internalName": "player_7_off_map", - "displayName": "Player 7 (Off Map)" - }, - { - "internalName": "player_8_off_map", - "displayName": "Player 8 (Off Map)" - }, - { - "internalName": "", - "displayName": "" - }, - { - "internalName": "", - "displayName": "" - }, - { - "internalName": "", - "displayName": "" - }, - { - "internalName": "", - "displayName": "" - } ] -} + } diff --git a/PckStudio.Core/Tiles.cs b/PckStudio.Core/Tiles.cs index 223fe78d..e1a1a807 100644 --- a/PckStudio.Core/Tiles.cs +++ b/PckStudio.Core/Tiles.cs @@ -14,34 +14,27 @@ namespace PckStudio.Json { [JsonProperty("entries")] public List Entries { get; set; } - - [JsonProperty("additional_entries")] - public List AdditionalEntries { get; set; } } public static class Tiles { - private static JsonTiles - _jsonBlockData, _jsonItemData, - _jsonParticleData, _jsonMoonPhaseData, - _jsonMapIconData, _jsonExplosionData, - _jsonExperienceOrbData, _jsonPaintingData, _jsonBannerData; - public static JsonTiles JsonBlockData => _jsonBlockData ??= JsonConvert.DeserializeObject(Resources.blockData); - public static JsonTiles JsonItemData => _jsonItemData ??= JsonConvert.DeserializeObject(Resources.itemData); - public static JsonTiles JsonParticleData => _jsonParticleData ??= JsonConvert.DeserializeObject(Resources.particleData); - public static JsonTiles JsonMoonPhaseData => _jsonMoonPhaseData ??= JsonConvert.DeserializeObject(Resources.moonPhaseData); - public static JsonTiles JsonMapIconData => _jsonMapIconData ??= JsonConvert.DeserializeObject(Resources.mapIconData); - public static JsonTiles JsonExplosionData => _jsonExplosionData ??= JsonConvert.DeserializeObject(Resources.explosionData); - public static JsonTiles JsonExperienceOrbData => _jsonExperienceOrbData ??= JsonConvert.DeserializeObject(Resources.experienceOrbData); - public static JsonTiles JsonPaintingData => _jsonPaintingData ??= JsonConvert.DeserializeObject(Resources.paintingData); - public static JsonTiles JsonBannerData => _jsonBannerData ??= JsonConvert.DeserializeObject(Resources.bannerData); + public static JsonTiles JsonBlockData { get; } = JsonConvert.DeserializeObject(Resources.blockData); + public static JsonTiles JsonItemData { get; } = JsonConvert.DeserializeObject(Resources.itemData); + public static JsonTiles JsonParticleData { get; } = JsonConvert.DeserializeObject(Resources.particleData); + public static JsonTiles JsonMoonPhaseData { get; } = JsonConvert.DeserializeObject(Resources.moonPhaseData); + public static JsonTiles JsonMapIconData { get; } = JsonConvert.DeserializeObject(Resources.mapIconData); + public static JsonTiles JsonAdditionalMapIconData { get; } = JsonConvert.DeserializeObject(Resources.additionalMapiconsData); + public static JsonTiles JsonExplosionData { get; } = JsonConvert.DeserializeObject(Resources.explosionData); + public static JsonTiles JsonExperienceOrbData { get; } = JsonConvert.DeserializeObject(Resources.experienceOrbData); + public static JsonTiles JsonPaintingData { get; } = JsonConvert.DeserializeObject(Resources.paintingData); + public static JsonTiles JsonBannerData { get; } = JsonConvert.DeserializeObject(Resources.bannerData); public static List ItemTileInfos => JsonItemData.Entries; public static List BlockTileInfos => JsonBlockData.Entries; public static List ParticleTileInfos => JsonParticleData.Entries; public static List MoonPhaseTileInfos => JsonMoonPhaseData.Entries; public static List MapIconTileInfos => JsonMapIconData.Entries; - public static List AdditionalMapIconTileInfos => JsonMapIconData.AdditionalEntries; + public static List AdditionalMapIconTileInfos => JsonAdditionalMapIconData.Entries; public static List ExperienceOrbTileInfos => JsonExperienceOrbData.Entries; public static List ExplosionTileInfos => JsonExplosionData.Entries; public static List PaintingTileInfos => JsonPaintingData.Entries;