internal void InitCurOutfitTriggerInfo(string _caller)
            {
                RefreshCache();

                if (JetPack.CharaStudio.Loaded && !TriggerEnabled)
                {
                    return;
                }

                int _count = _cachedCoordinatePropertyList.Count;

                DebugMsg(LogLevel.Info, $"[InitCurOutfitTriggerInfo][{CharaFullName}][{_caller}][CoordinatePropertyList.Count: {_count}]");

                if (JetPack.CharaMaker.Loaded)
                {
                    if (_duringLoadChange)
                    {
                        StartCoroutine(LoadChangeCoroutine());
                    }
                    StartCoroutine(AccSlotChangedHandlerCoroutine());
                }
                else if (JetPack.CharaStudio.Loaded)
                {
                    DebugMsg(LogLevel.Info, $"[InitCurOutfitTriggerInfo][CurTreeNodeObjID: {CharaStudio._curTreeNodeObjID}][TreeNodeObjID: {_treeNodeObjID}]");
                    if (CharaStudio.IsCharaSelected(ChaControl))
                    {
                        RefreshPreview(_caller);
                    }
                    if (CharaStudio._curTreeNodeObjID == _treeNodeObjID)
                    {
                        CharaStudio.UpdateUI();
                        StartCoroutine(CharaStudio.StatusPanelUpdateCoroutine());
                    }
                }
                else if (JetPack.CharaHscene.Loaded)
                {
                    RefreshPreview(_caller);
                    CharaHscene.ClearUI();
                    CharaHscene.UpdateUI();
                }
                else
                {
                    RefreshPreview(_caller);
                }
            }
Example #2
0
        private void Start()
        {
            _logger   = base.Logger;
            _instance = this;

            InitConfig();
            InitConstants();

            MoreAccessories.Init();

            CharacterApi.RegisterExtraBehaviour <AccStateSyncController>(GUID);

            Harmony.CreateAndPatchAll(typeof(Hooks));
#if KK
            if (Application.dataPath.EndsWith("CharaStudio_Data"))
            {
                StudioAPI.StudioLoadedChanged += (_sender, _args) => CharaStudio.RegisterControls();
            }
            else
            {
                {
                    BaseUnityPlugin _instance = JetPack.Toolbox.GetPluginInstance("madevil.kk.MovUrAcc");
                    if (_instance != null && !JetPack.Toolbox.PluginVersionCompare(_instance, "1.7.0.0"))
                    {
                        _logger.LogError($"MovUrAcc 1.7+ is required to work properly, version {_instance.Info.Metadata.Version} detected");
                    }
                }
                {
                    BaseUnityPlugin _instance = JetPack.Toolbox.GetPluginInstance("madevil.kk.ca");
                    if (_instance != null && !JetPack.Toolbox.PluginVersionCompare(_instance, "1.2.0.0"))
                    {
                        _logger.LogError($"Character Accessory 1.2+ is required to work properly, version {_instance.Info.Metadata.Version} detected");
                    }
                }
                CharaHscene.RegisterEvents();
                CharaMaker.RegisterControls();
            }
#elif KKS
            CharaMaker.RegisterControls();
#endif
        }