Rename & Move HasCustomColor to AllowCustomColour and move from ColorEntry to TileInfo

This commit is contained in:
miku-666
2024-07-03 15:14:15 +02:00
parent 74da4a74a9
commit fedfc68fc2
6 changed files with 57 additions and 65 deletions

View File

@@ -255,7 +255,9 @@ namespace PckStudio.Forms.Editor
}
}
if (setColorButton.Enabled = clearColorButton.Enabled = dataTile.Tile.HasColourEntry)
setColorButton.Enabled = dataTile.Tile.AllowCustomColour;
if (setColorButton.Enabled)
{
setColorButton.Enabled = clearColorButton.Enabled = dataTile.Tile.ColourEntry.HasCustomColour;
clearColorButton.Enabled = false;

View File

@@ -15,9 +15,6 @@ namespace PckStudio.Internal.Json
[JsonProperty("isWaterColour", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool IsWaterColour { get; set; }
[JsonProperty("hasCustomColour", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool HasCustomColour { get; set; }
[JsonProperty("variants", DefaultValueHandling = DefaultValueHandling.Populate)]
public string[] Variants { get; set; }
}

View File

@@ -27,6 +27,9 @@ namespace PckStudio.Internal.Json
[JsonProperty("colourEntry", DefaultValueHandling = DefaultValueHandling.Populate)]
public JsonColorEntry ColourEntry { get; set; }
[JsonProperty("allowCustomColour", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool AllowCustomColour { get; set; }
public JsonTileInfo(string displayName, string internalName)
{
DisplayName = displayName;

View File

@@ -2317,11 +2317,11 @@
{
"internalName": "cauldron_water",
"displayName": "Cauldron Water",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "Cauldron_Water",
"variants": [
"variants": [
"Cauldron_Water",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",

View File

@@ -5,9 +5,9 @@
{
"internalName": "helmetCloth",
"displayName": "Leather Cap",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "Armour_Default_Leather_Colour",
"variants": [ "Armour_Default_Leather_Colour" ]
}
@@ -75,9 +75,9 @@
{
"internalName": "chestplateCloth",
"displayName": "Leather Tunic",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "Armour_Default_Leather_Colour",
"variants": [ "Armour_Default_Leather_Colour" ]
}
@@ -145,9 +145,9 @@
{
"internalName": "leggingsCloth",
"displayName": "Leather Pants",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "Armour_Default_Leather_Colour",
"variants": [ "Armour_Default_Leather_Colour" ]
}
@@ -215,9 +215,9 @@
{
"internalName": "bootsCloth",
"displayName": "Leather Boots",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "Armour_Default_Leather_Colour",
"variants": [ "Armour_Default_Leather_Colour" ]
}
@@ -593,11 +593,11 @@
{
"internalName": "potion_contents",
"displayName": "Potion (Overlay)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1013,12 +1013,7 @@
{
"internalName": "fireworks_charge_overlay",
"displayName": "Firework Star (Overlay)",
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "",
"variants": [""]
}
"allowCustomColour": true
},
{
"internalName": "netherquartz",
@@ -1099,9 +1094,9 @@
{
"internalName": "leather_horse_armor_base",
"displayName": "Leather Horse Armor",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "Armour_Default_Leather_Colour",
"variants": [ "Armour_Default_Leather_Colour" ]
}

View File

@@ -301,12 +301,7 @@
"displayName": "Firework Flash",
"width": 4,
"height": 4,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "",
"variants": [""]
}
"allowCustomColour": true
},
{
"internalName": "flash",
@@ -754,10 +749,10 @@
"internalName": "effect_0",
"displayName": "Effect (Stage 1)",
"hasColourEntry": true,
"allowCustomColour": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -794,10 +789,10 @@
"internalName": "effect_1",
"displayName": "Effect (Stage 2)",
"hasColourEntry": true,
"allowCustomColour": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -833,11 +828,11 @@
{
"internalName": "effect_2",
"displayName": "Effect (Stage 3)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -873,11 +868,11 @@
{
"internalName": "effect_3",
"displayName": "Effect (Stage 4)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -913,11 +908,11 @@
{
"internalName": "effect_4",
"displayName": "Effect (Stage 5)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -953,11 +948,11 @@
{
"internalName": "effect_5",
"displayName": "Effect (Stage 6)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -993,11 +988,11 @@
{
"internalName": "effect_6",
"displayName": "Effect (Stage 7)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1033,11 +1028,11 @@
{
"internalName": "effect_7",
"displayName": "Effect (Stage 8)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1105,11 +1100,11 @@
{
"internalName": "spell_0",
"displayName": "Splash Effect (Stage 1)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1145,11 +1140,11 @@
{
"internalName": "spell_1",
"displayName": "Splash Effect (Stage 2)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1185,11 +1180,11 @@
{
"internalName": "spell_2",
"displayName": "Splash Effect (Stage 3)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1225,11 +1220,11 @@
{
"internalName": "spell_3",
"displayName": "Splash Effect (Stage 4)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1265,11 +1260,11 @@
{
"internalName": "spell_4",
"displayName": "Splash Effect (Stage 5)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1305,11 +1300,11 @@
{
"internalName": "spell_5",
"displayName": "Splash Effect (Stage 6)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1345,11 +1340,11 @@
{
"internalName": "spell_6",
"displayName": "Splash Effect (Stage 7)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1385,11 +1380,11 @@
{
"internalName": "spell_7",
"displayName": "Splash Effect (Stage 8)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"defaultName": "Potion_BaseColour",
"hasCustomColour": true,
"variants": [
"variants": [
"Potion_BaseColour",
"Effect_MovementSpeed",
"Effect_MovementSlowDown",
@@ -1457,9 +1452,9 @@
{
"internalName": "spark_0",
"displayName": "Firework Spark (Stage 1)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",
@@ -1472,9 +1467,9 @@
{
"internalName": "spark_1",
"displayName": "Firework Spark (Stage 2)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",
@@ -1487,9 +1482,9 @@
{
"internalName": "spark_2",
"displayName": "Firework Spark (Stage 3)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",
@@ -1502,9 +1497,9 @@
{
"internalName": "spark_3",
"displayName": "Firework Spark (Stage 4)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",
@@ -1517,9 +1512,9 @@
{
"internalName": "spark_4",
"displayName": "Firework Spark (Stage 5)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",
@@ -1532,9 +1527,9 @@
{
"internalName": "spark_5",
"displayName": "Firework Spark (Stage 6)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",
@@ -1547,9 +1542,9 @@
{
"internalName": "spark_6",
"displayName": "Firework Spark (Stage 7)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",
@@ -1562,9 +1557,9 @@
{
"internalName": "spark_7",
"displayName": "Firework Spark (Stage 8)",
"allowCustomColour": true,
"hasColourEntry": true,
"colourEntry": {
"hasCustomColour": true,
"defaultName": "None",
"variants": [
"None",