private static void ChaControl_SetSiruFlags_Postfix(ChaControl __instance) { if (!DuringLoad.ContainsKey(__instance) || DuringLoad[__instance]) { return; } __instance.StartCoroutine(ChaControl_UpdateClothesSiru_Coroutine(__instance)); }
internal static void ChaControl_UpdateClothesSiru(ChaControl chaCtrl) { if (!CfgEnable.Value) { return; } if (chaCtrl == null || chaCtrl.gameObject == null) { return; } if (!DuringLoad.ContainsKey(chaCtrl) || DuringLoad[chaCtrl]) { return; } if (LiquidT == null || LiquidTPath != CfgLiquidTPath.Value) { if (!LoadLiquidTexture(CfgLiquidTPath.Value, ref LiquidT)) { CfgLiquidTPath.Value = ""; } LiquidTPath = CfgLiquidTPath.Value; } if (LiquidN == null || LiquidNPath != CfgLiquidNPath.Value) { if (!LoadLiquidTexture(CfgLiquidNPath.Value, ref LiquidN)) { CfgLiquidNPath.Value = ""; } LiquidNPath = CfgLiquidNPath.Value; } for (int i = 0; i < chaCtrl.objClothes.Length; i++) { if (chaCtrl.objClothes[i] == null) { continue; } ApplyEffect(chaCtrl, 1, i, chaCtrl.objClothes[i]); } List <ChaFileAccessory.PartsInfo> nowAccessories = JetPack.Accessory.ListPartsInfo(chaCtrl); List <GameObject> objAccessory = JetPack.Accessory.ListObjAccessory(chaCtrl); for (int i = 0; i < nowAccessories.Count; i++) { if (nowAccessories.ElementAtOrDefault(i) == null || nowAccessories[i].type == 120) { continue; } GameObject go = objAccessory.FirstOrDefault(x => x.name == $"ca_slot{i:00}"); ApplyEffect(chaCtrl, 2, i, go); } }
private static void ChaControl_UpdateClothesSiru_Postfix(ChaControl __instance, int __0) { if (!DuringLoad.ContainsKey(__instance) || DuringLoad[__instance]) { return; } if (__0 == 0) { __instance.StartCoroutine(ChaControl_UpdateClothesSiru_Coroutine(__instance)); } }
internal static IEnumerator ChaControl_UpdateClothesSiru_Coroutine(ChaControl chaCtrl) { if (!DuringLoad.ContainsKey(chaCtrl) || DuringLoad[chaCtrl]) { yield break; } yield return(JetPack.Toolbox.WaitForEndOfFrame); yield return(JetPack.Toolbox.WaitForEndOfFrame); ChaControl_UpdateClothesSiru(chaCtrl); }