Files
PCK-Studio/PckStudio.Core/Skin/Skin.cs
MayNL ad4bece44d Added SkinAdjustmentsEditor
-Removed ANIM Editor
-Added SkinAdjustments Editor for Skin ANIM and GAME_FLAGS values
-ANIM and GAME_FLAGS are now edited together across the program
-Box Editor made smaller
-Box Editor and SkinAdjustments Editor added to CustomSkinEditor
-SkinGameFlags class created
-Fixed bug where the first listed box wouldn't save changes in CustomSkinEditor
2026-04-09 01:23:44 -04:00

58 lines
1.7 KiB
C#

using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Security.Policy;
using System.Text;
using System.Threading.Tasks;
namespace PckStudio.Core.Skin
{
public sealed class Skin
{
public SkinMetaData MetaData { get; set; }
public SkinIdentifier Identifier { get; set; }
public SkinANIM Anim { get; set; }
public SkinGameFlags GameFlags { get; set; }
public SkinModel Model { get; set; }
public Image Texture { get; set; }
public Image CapeTexture { get; set; }
public bool HasCape => CapeTexture is not null;
public Skin(string name, Image texture)
{
MetaData = new SkinMetaData(name, string.Empty);
Texture = texture;
Model = new SkinModel();
}
public Skin(string name, Image texture, Image capeTexture)
: this(name, texture)
{
CapeTexture = capeTexture;
}
public Skin(string name, SkinANIM anim, SkinGameFlags gameFlags, Image texture, IEnumerable<SkinBOX> additionalBoxes, IEnumerable<SkinPartOffset> partOffsets)
: this(name, texture)
{
Model.AdditionalBoxes.AddRange(additionalBoxes);
Model.PartOffsets.AddRange(partOffsets);
Anim = anim;
GameFlags = gameFlags;
}
public Skin(string name, int id, Image texture, SkinANIM anim, SkinGameFlags gameFlags, IEnumerable<SkinBOX> additionalBoxes, IEnumerable<SkinPartOffset> partOffsets)
: this(name, anim, gameFlags, texture, additionalBoxes, partOffsets)
{
Identifier = new(id);
}
}
}