Files
PCK-Studio/PckStudio.Core/Json/TileInfo.cs
2025-11-01 14:47:48 +01:00

40 lines
1.1 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;
namespace PckStudio.Core.Json
{
public sealed class JsonTileInfo
{
[JsonProperty("displayName")]
public string DisplayName { get; set; }
[JsonProperty("internalName")]
public string InternalName { get; set; }
[JsonProperty("width")]
public int TileWidth { get; set; } = 1;
[JsonProperty("height")]
public int TileHeight { get; set; } = 1;
[JsonIgnore]
public bool HasColourEntry => ColourEntry != null;
[JsonProperty("colourEntry", DefaultValueHandling = DefaultValueHandling.Ignore)]
public JsonColorEntry ColourEntry { get; set; }
[JsonProperty("allowCustomColour", DefaultValueHandling = DefaultValueHandling.Populate)]
public bool AllowCustomColour { get; set; }
public JsonTileInfo(string displayName, string internalName)
{
DisplayName = displayName;
InternalName = internalName;
}
}
}