TimePasses/Model/WhenSex.cs

27 lines
609 B
C#

using Dalamud.Game.ClientState.Objects.Enums;
using YamlDotNet.Serialization;
namespace TimePasses.Model;
[Serializable]
public class WhenSex : IWhen {
[YamlMember(Alias = "is")]
public Sex Sex { get; init; }
public ReplacementText Text { get; init; }
public bool Slowly { get; init; }
public bool IsValid(Plugin plugin) {
if (plugin.ClientState.LocalPlayer is not { } player) {
return false;
}
return player.Customize[(int) CustomizeIndex.Gender] == (byte) this.Sex;
}
}
[Serializable]
public enum Sex : byte {
Female = 1,
Male = 0,
}