mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-05-23 17:14:32 +00:00
38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using Newtonsoft.Json;
|
|
using PckStudio.Json;
|
|
|
|
namespace PckStudio.Core.Json
|
|
{
|
|
public sealed class JsonTileInfo
|
|
{
|
|
[JsonProperty("displayName")]
|
|
public string DisplayName { get; set; }
|
|
|
|
[JsonProperty("internalName")]
|
|
public string InternalName { get; set; }
|
|
|
|
[JsonProperty("allowCustomColour", DefaultValueHandling = DefaultValueHandling.Populate)]
|
|
public bool AllowCustomColour { get; set; }
|
|
|
|
[JsonProperty("colorKey", DefaultValueHandling = DefaultValueHandling.Ignore)]
|
|
public string ColorKey { get; set; } = string.Empty;
|
|
|
|
[JsonIgnore]
|
|
public bool HasColourEntry => Tiles.ColorEntries.ContainsKey(ColorKey);
|
|
|
|
[JsonIgnore]
|
|
public JsonColorEntry ColorEntry => Tiles.ColorEntries[ColorKey];
|
|
|
|
public JsonTileInfo(string displayName, string internalName)
|
|
{
|
|
DisplayName = displayName;
|
|
InternalName = internalName;
|
|
}
|
|
}
|
|
}
|