AttachPointInfo.cs 755 B

1234567891011121314151617181920212223242526272829
  1. namespace MeidoPhotoStudio.Plugin;
  2. public readonly struct AttachPointInfo
  3. {
  4. private static readonly AttachPointInfo EmptyValue = new(AttachPoint.None, string.Empty, -1);
  5. public AttachPointInfo(AttachPoint attachPoint, Meido meido)
  6. {
  7. AttachPoint = attachPoint;
  8. MaidGuid = meido.Maid.status.guid;
  9. MaidIndex = meido.Slot;
  10. }
  11. public AttachPointInfo(AttachPoint attachPoint, string maidGuid, int maidIndex)
  12. {
  13. AttachPoint = attachPoint;
  14. MaidGuid = maidGuid;
  15. MaidIndex = maidIndex;
  16. }
  17. public static ref readonly AttachPointInfo Empty =>
  18. ref EmptyValue;
  19. public AttachPoint AttachPoint { get; }
  20. public string MaidGuid { get; }
  21. public int MaidIndex { get; }
  22. }