Stripping out material because meh. Also loading in cels at the right ordering

This commit is contained in:
Lani Aung
2024-02-11 16:14:51 -07:00
parent 70c85d0e18
commit bf5a47c650
25 changed files with 1167 additions and 12116 deletions
+22 -20
View File
@@ -2,29 +2,31 @@ using System.Linq;
using System.Text.Json.Serialization;
using fxl.codes.kisekae.Entities;
namespace fxl.codes.kisekae.Models
namespace fxl.codes.kisekae.Models;
public class PlaysetModel
{
public class PlaysetModel
[JsonIgnore] public readonly string BorderColor;
internal PlaysetModel(Configuration configuration)
{
[JsonIgnore] public readonly string BorderColor;
BorderColor = configuration.BackgroundColorHex;
internal PlaysetModel(Configuration configuration)
{
BorderColor = configuration.BackgroundColorHex;
Name = configuration.Name;
Height = configuration.Height;
Width = configuration.Width;
var totalCels = configuration.Cels.Count;
Cels = configuration.Cels
.Select((x, index) => new CelModel(x, (totalCels - index) * 10))
.OrderBy(x => x.ZIndex)
.ToArray();
Name = configuration.Name;
Height = configuration.Height;
Width = configuration.Width;
var totalCels = configuration.Cels.Count;
Cels = configuration.Cels.Select((x, index) => new CelModel(x, (totalCels - index) * 10)).ToArray();
for (var index = 0; index < 10; index++) Sets[index] = configuration.Cels.Any(x => x.Positions.Any(y => y.Set == index));
}
public CelModel[] Cels { get; set; }
public int Height { get; set; }
public string Name { get; set; }
public bool[] Sets { get; set; } = new bool[10];
public int Width { get; set; }
for (var index = 0; index < 10; index++) Sets[index] = configuration.Cels.Any(x => x.Positions.Any(y => y.Set == index));
}
public CelModel[] Cels { get; set; }
public int Height { get; set; }
public string Name { get; set; }
public bool[] Sets { get; set; } = new bool[10];
public int Width { get; set; }
}