Example #1
0
 internal static void RegisterEvents()
 {
     JetPack.CharaHscene.OnHSceneFinishedLoading += (_sender, _args) =>
     {
         ClearUI();
         UpdateUI();
     };
     JetPack.CharaHscene.OnHSceneSetClothStateStartMotion += (_sender, _args) =>
     {
         foreach (ChaControl _chaCtrl in _args.Female)
         {
             DebugMsg(LogLevel.Info, $"[OnHSceneSetClothStateStartMotion][{_chaCtrl.GetFullName()}]");
             AccStateSyncController _pluginCtrl = GetController(_chaCtrl);
             if (_pluginCtrl != null)
             {
                 foreach (TriggerGroup _group in _pluginCtrl.TriggerGroupList)
                 {
                     _group.State = (_group.Secondary > -1) ? _group.Secondary : _group.Startup;
                 }
                 _pluginCtrl.RefreshCache();
                 _pluginCtrl.SyncAllAccToggle("OnHSceneSetClothStateStartMotion");
             }
         }
     };
 }
 internal static void SetClothStateStartMotionPostfix(HSceneProc __instance)
 {
     foreach (var heroine in __instance.flags.lstHeroine)
     {
         ChaControl chaCtrl = heroine.chaCtrl;
         Logger.Log(DebugLogLevel, $"[Harmony][HSceneProc][SetClothStateStartMotion][Postfix][{chaCtrl.chaFile.parameter?.fullname}]");
         AccStateSyncController controller = GetController(chaCtrl);
         if (controller != null)
         {
             controller.SyncAllAccToggle();
         }
     }
 }