Преглед на файлове

Remove stock requirement from Meido

The StockNo property is not used anymore and is just leftovers from the
previous usage of stock no for calling maids.
habeebweeb преди 2 години
родител
ревизия
412f053067
променени са 2 файла, в които са добавени 3 реда и са изтрити 6 реда
  1. 1 1
      src/MeidoPhotoStudio.Plugin/Managers/MeidoManager.cs
  2. 2 5
      src/MeidoPhotoStudio.Plugin/Meido/Meido.cs

+ 1 - 1
src/MeidoPhotoStudio.Plugin/Managers/MeidoManager.cs

@@ -106,7 +106,7 @@ public class MeidoManager : IManager
     public void Activate()
     {
         Meidos = CharacterMgr.GetStockMaidList()
-            .Select((_, stockNo) => new Meido(stockNo))
+            .Select(maid => new Meido(maid))
             .ToArray();
 
         CharacterMgr.ResetCharaPosAll();

+ 2 - 5
src/MeidoPhotoStudio.Plugin/Meido/Meido.cs

@@ -47,10 +47,9 @@ public class Meido
     private float[] blendSetValueBackup;
     private bool freeLook;
 
-    public Meido(int stockMaidIndex)
+    public Meido(Maid maid)
     {
-        StockNo = stockMaidIndex;
-        Maid = GameMain.Instance.CharacterMgr.GetStockMaid(stockMaidIndex);
+        Maid = maid;
 
         IKManager = new(this);
         IKManager.SelectMaid += (_, args) =>
@@ -96,8 +95,6 @@ public class Meido
 
     public bool Loading { get; private set; }
 
-    public int StockNo { get; }
-
     public Maid Maid { get; }
 
     public MeidoDragPointManager IKManager { get; }