2024-06-21 16:02:38 +00:00
|
|
|
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,
|
2024-06-21 16:12:50 +00:00
|
|
|
}
|