static void HSceneEnd(HScene __instance, ChaControl[] ___chaFemales, ChaControl[] ___chaMales) { try { #if DEBUG AdditionalAccessoryControlsPlugin.Instance.Log.LogInfo("HScene End Event"); #endif foreach (ChaControl female in ___chaFemales) { if (female == null) { continue; } AdditionalAccessoryControlsController aacController = female.gameObject.GetComponent <AdditionalAccessoryControlsController>(); aacController.HandleVisibilityRules(hend: true); } foreach (ChaControl male in ___chaMales) { if (male == null) { continue; } AdditionalAccessoryControlsController aacController = male.gameObject.GetComponent <AdditionalAccessoryControlsController>(); aacController.HandleVisibilityRules(hend: true); } } catch (Exception e) { AdditionalAccessoryControlsPlugin.Instance.Log.LogWarning($"Exception in AACP Hook, Visibility Updates Not Thrown. {e.Message} {e.StackTrace}"); } }
public static void ChangingClothes(ChaControl __instance, int kind) { try { AdditionalAccessoryControlsController aacController = __instance.gameObject.GetComponent <AdditionalAccessoryControlsController>(); aacController.HandleVisibilityRules(clothes: true); } catch (Exception e) { AdditionalAccessoryControlsPlugin.Instance.Log.LogWarning($"Exception in AACP Hook, Visibility Updates Not Thrown. {e.Message} {e.StackTrace}"); } }
public static void ShowAccessory(ChaControl __instance, int slotNo) { try { AdditionalAccessoryControlsController aacController = __instance.gameObject.GetComponent <AdditionalAccessoryControlsController>(); aacController.HandleVisibilityRules(accessory: true, sourceSlot: slotNo); } catch (Exception e) { AdditionalAccessoryControlsPlugin.Instance.Log.LogWarning($"Exception in AACP Hook, Visibility Updates Not Thrown. {e.Message} {e.StackTrace}"); } }
static void HSceneStartPost(HScene __instance, ChaControl[] ___chaFemales, ChaControl[] ___chaMales) { try { if (HStartInit) { HStartInit = false; foreach (ChaControl female in ___chaFemales) { if (female != null) { #if DEBUG AdditionalAccessoryControlsPlugin.Instance.Log.LogInfo($"Sending event for: {female?.fileParam?.fullname}"); #endif AdditionalAccessoryControlsController aacController = female.gameObject.GetComponent <AdditionalAccessoryControlsController>(); aacController.HandleVisibilityRules(hstart: true); } } foreach (ChaControl male in ___chaMales) { if (male != null) { #if DEBUG AdditionalAccessoryControlsPlugin.Instance.Log.LogInfo($"Sending event for: {male?.fileParam?.fullname}"); #endif AdditionalAccessoryControlsController aacController = male.gameObject.GetComponent <AdditionalAccessoryControlsController>(); aacController.HandleVisibilityRules(hstart: true); } } } foreach (ChaControl control in dirtyChars) { #if DEBUG AdditionalAccessoryControlsPlugin.Instance.Log.LogInfo($"Sending event for: {control?.fileParam?.fullname}"); #endif AdditionalAccessoryControlsController aacController = control.gameObject.GetComponent <AdditionalAccessoryControlsController>(); aacController.HandleVisibilityRules(hstart: true); } dirtyChars.Clear(); } catch (Exception e) { AdditionalAccessoryControlsPlugin.Instance.Log.LogWarning($"Exception in AACP Hook, Visibility Updates Not Thrown. {e.Message} {e.StackTrace}"); } }