Stripping out material because meh. Also loading in cels at the right ordering
This commit is contained in:
+22
-20
@@ -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; }
|
||||
}
|
||||
Reference in New Issue
Block a user