using ExIni; using MyRoomCustom; using System; using System.Collections; using System.Collections.Generic; using System.IO; using System.Linq; using UnityEngine; using UnityEngine.PostProcessing; namespace CM3D2.MultipleMaids.Plugin { public partial class MultipleMaids { public void init2() { for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1) { Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1]; if (goSlot[index1] != null) { stockMaid.body0.goSlot = new List(goSlot[index1]); for (int index2 = 0; index2 < bodyHit[index1].Count; ++index2) { stockMaid.body0.goSlot[index2].bonehair.bodyhit = bodyHit[index1][index2]; } if (!GameMain.Instance.VRMode) { stockMaid.body0.quaDefEyeL.eulerAngles = eyeL[index1]; stockMaid.body0.quaDefEyeR.eulerAngles = eyeR[index1]; } shodaiFlg[index1] = false; } if (SkirtListArray[index1] != null) { for (int index2 = 0; index2 < stockMaid.body0.goSlot.Count; ++index2) { SetFieldValue8(stockMaid.body0.goSlot[index2].bonehair3, "m_SkirtBone", SkirtListArray[index1][index2]); } } } for (int index1 = 0; index1 < maxMaidCnt; ++index1) { if (maidArray[index1]) { maidArray[index1].StopKuchipakuPattern(); } if (maidArray[index1]) { maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform; } if (maidArray[index1] && maidArray[index1].Visible && maidArray[index1].body0.isLoadedBody) { maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f); maidArray[index1].SetAutoTwistAll(true); maidArray[index1].body0.MuneYureL(1f); maidArray[index1].body0.MuneYureR(1f); maidArray[index1].body0.jbMuneL.enabled = true; maidArray[index1].body0.jbMuneR.enabled = true; } if (maidArray[index1]) { maidArray[index1].boMabataki = true; if (maidArray[index1].body0.isLoadedBody) { Maid maid = maidArray[index1]; for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2) { List fieldValue = GetFieldValue>(maid.body0.goSlot[index2].bonehair, "hair1list"); for (int index3 = 0; index3 < fieldValue.Count; ++index3) { fieldValue[index3].SoftG = new Vector3(0.0f, -3f / 1000f, 0.0f); } } } } } goSlot = new List[maxMaidCnt * 2]; bodyHit = new List[maxMaidCnt * 2]; allowUpdate = true; okFlg = false; isDance = false; isDanceChu = false; isSavePose = false; bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater"); bg.localScale = new Vector3(1f, 1f, 1f); softG = new Vector3(0.0f, -3f / 1000f, 0.0f); softG2 = new Vector3(0.0f, -0.005f, 0.0f); if (!GameMain.Instance.VRMode) { Bloom fieldValue = GetFieldValue(mainCamera, "m_gcBloom"); fieldValue.enabled = true; fieldValue.bloomIntensity = 2.85f; fieldValue.hdr = Bloom.HDRBloomMode.Auto; fieldValue.bloomThreshholdColor = new Color(1f, 1f, 1f); fieldValue.bloomBlurIterations = 3; } mainCamera.GetComponent().backgroundColor = new Color(0.0f, 0.0f, 0.0f); maidCnt = 1; editMaid = 0; wearIndex = 0; bGuiMessage = false; inName = ""; inName2 = ""; inName3 = ""; inText = ""; fontSize = 25; isMessage = false; GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject; MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr; new MessageClass(gameObject, messageWindowMgr).Clear(); messageWindowMgr.CloseMessageWindowPanel(); SetFieldValue2(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent(), "mFontSize", fontSize); ikMaid = 0; ikBui = 0; faceFlg = false; faceFlg2 = false; sceneFlg = false; poseFlg = false; kankyoFlg = false; kankyo2Flg = false; unLockFlg = false; isNamida = false; isNamidaH = false; isSekimenH = false; isHohoH = false; isTear1 = false; isTear2 = false; isTear3 = false; isShock = false; isYodare = false; isHoho = false; isHoho2 = false; isHohos = false; isHohol = false; isToothoff = false; isNosefook = false; isFaceInit = false; isPoseInit = false; isWear = true; isSkirt = true; isMekure1 = false; isMekure2 = false; isZurasi = false; isBra = true; isPanz = true; isHeadset = true; isAccUde = true; isStkg = true; isShoes = true; isGlove = true; isMegane = true; isAccSenaka = true; isMaid = true; isF6 = false; isPanel = true; isBloom = false; isBloomA = false; isBlur = false; isBlur2 = false; bloom1 = 2.85f; bloom2 = 3f; bloom3 = 0.0f; bloom4 = 0.0f; bloom5 = 0.0f; blur1 = -3.98f; blur4 = -0.75f; blur2 = 0.9f; blur3 = 4.19f; bokashi = 0.0f; kamiyure = 0.0f; isDepth = false; isDepthA = false; depth1 = 3f; depth2 = 0.1f; depth3 = 15f; depth4 = 2.5f; isFog = false; fog1 = 4f; fog2 = 1f; fog3 = 1f; fog4 = 0.0f; fog5 = 1f; fog6 = 1f; fog7 = 1f; isSepia = false; isSepian = false; isBloomS = true; isDepthS = false; isBlurS = false; isFogS = false; isHairSetting = true; isSkirtSetting = false; if (depth_field_ != null) { depth_field_.enabled = false; } if (fog_ != null) { fog_.enabled = false; } if (sepia_tone_ != null) { sepia_tone_.enabled = false; } isCube = false; isCube2 = true; isCube3 = false; isCube4 = true; isCubeS = false; cubeSize = 0.12f; isPoseEdit = false; isFaceEdit = false; bgmIndex = 0; if (sceneLevel == 5) { bgmIndex = 2; } effectIndex = 0; selectMaidIndex = 0; copyIndex = 0; selectLightIndex = 0; doguBIndex = 0; parIndex = 0; isEditNo = 0; editSelectMaid = null; for (int index = 0; index < 10; ++index) { date[index] = ""; ninzu[index] = ""; } isDanceStart1F = false; isDanceStart1K = false; isDanceStart2F = false; isDanceStart3F = false; isDanceStart3K = false; isDanceStart4F = false; isDanceStart4K = false; isDanceStart5F = false; isDanceStart5K = false; isDanceStart6F = false; isDanceStart6K = false; isDanceStart7F = false; isDanceStart7V = false; isDanceStart8F = false; isDanceStart8V = false; isDanceStart8P = false; isDanceStart9F = false; isDanceStart9K = false; isDanceStart10F = false; isDanceStart11F = false; isDanceStart11V = false; isDanceStart12F = false; isDanceStart13F = false; isDanceStart13K = false; isDanceStart14F = false; isDanceStart14V = false; isDanceStart15F = false; isDanceStart15V = false; for (int index1 = 0; index1 < maxMaidCnt; ++index1) { danceFace[index1] = 0.0f; FaceName[index1] = ""; FaceName2[index1] = ""; FaceName3[index1] = ""; isStop[index1] = false; isBone[index1] = false; isBoneN[index1] = false; poseIndex[index1] = 0; itemIndex[index1] = 0; itemIndex2[index1] = 0; faceIndex[index1] = 0; faceBlendIndex[index1] = 0; headEyeIndex[index1] = 0; isLock[index1] = false; isFace[index1] = true; mekure1[index1] = false; mekure2[index1] = false; zurasi[index1] = false; mekure1n[index1] = false; mekure2n[index1] = false; zurasin[index1] = false; isLook[index1] = false; isLookn[index1] = false; lookX[index1] = 0.0f; lookY[index1] = -0.0f; lookXn[index1] = 0.0f; lookYn[index1] = -0.0f; voice1[index1] = false; voice2[index1] = false; voice1n[index1] = false; voice2n[index1] = false; hanten[index1] = false; hantenn[index1] = false; kotei[index1] = false; xFlg[index1] = false; zFlg[index1] = false; ikMode[index1] = 0; GraphicsUtils.Destroy(gMaid[index1]); GraphicsUtils.Destroy(gMaidC[index1]); GraphicsUtils.Destroy(gHandL[index1]); GraphicsUtils.Destroy(gArmL[index1]); GraphicsUtils.Destroy(gHandR[index1]); GraphicsUtils.Destroy(gArmR[index1]); GraphicsUtils.Destroy(gFootL[index1]); GraphicsUtils.Destroy(gHizaL[index1]); GraphicsUtils.Destroy(gFootR[index1]); GraphicsUtils.Destroy(gHizaR[index1]); GraphicsUtils.Destroy(gClavicleL[index1]); GraphicsUtils.Destroy(gClavicleR[index1]); GraphicsUtils.Destroy(gNeck[index1]); GraphicsUtils.Destroy(gSpine[index1]); GraphicsUtils.Destroy(gSpine0a[index1]); GraphicsUtils.Destroy(gSpine1a[index1]); GraphicsUtils.Destroy(gSpine1[index1]); GraphicsUtils.Destroy(gPelvis[index1]); GraphicsUtils.Destroy(gizmoHandL[index1]); GraphicsUtils.Destroy(gizmoHandR[index1]); GraphicsUtils.Destroy(gizmoFootL[index1]); GraphicsUtils.Destroy(gizmoFootR[index1]); GraphicsUtils.Destroy(gizmoNeck[index1]); GraphicsUtils.Destroy(gizmoPelvis[index1]); HandL1[index1] = null; for (int index2 = 0; index2 < 30; ++index2) { GraphicsUtils.Destroy(gFinger[index1, index2]); } for (int index2 = 0; index2 < 12; ++index2) { GraphicsUtils.Destroy(gFinger2[index1, index2]); } isIK[index1] = isIKAll; pHandL[index1] = 0; pHandR[index1] = 0; muneIKL[index1] = false; muneIKR[index1] = false; } if (kami) { kami.SetActive(false); } danceCheckIndex = 0; for (int index = 0; index < danceCheck.Length; ++index) { danceCheck[danceCheckIndex] = 1f; } lightIndex = new List { 0 }; lightColorR = new List { 1f }; lightColorG = new List { 1f }; lightColorB = new List { 1f }; lightX = new List { 40f }; lightY = new List { 180f }; lightAkarusa = new List { 0.95f }; lightKage = new List { 0.098f }; lightRange = new List { 50f }; isIdx1 = false; isIdx2 = false; isIdx3 = false; isIdx4 = false; bgObject.SetActive(true); GameMain.Instance.MainLight.Reset(); GameMain.Instance.MainLight.SetIntensity(0.95f); GameMain.Instance.MainLight.GetComponent().spotAngle = 30f; GameMain.Instance.MainLight.GetComponent().range = 10f; GameMain.Instance.MainLight.GetComponent().type = LightType.Directional; GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f); for (int index = 0; index < doguBObject.Count; ++index) { GraphicsUtils.Destroy(doguBObject[index]); } doguBObject.Clear(); doguBIndex = 0; parIndex = 0; doguCombo.selectedItemIndex = 0; parCombo.selectedItemIndex = 0; for (int index = 1; index < lightList.Count; ++index) { GraphicsUtils.Destroy(lightList[index]); } lightList = new List { GameMain.Instance.MainLight.gameObject }; lightComboList = new GUIContent[lightList.Count]; lightComboList[0] = new GUIContent("メイン"); lightCombo.selectedItemIndex = 0; selectLightIndex = 0; kankyoCombo.selectedItemIndex = 0; itemCombo2.selectedItemIndex = 0; slotCombo.selectedItemIndex = 0; sortList.Clear(); maidCallScrollPos = new Vector2(0.0f, 0.0f); poseScrollPos = new Vector2(0.0f, 0.0f); faceScrollPos = new Vector2(0.0f, 0.0f); bgScrollPos = new Vector2(0.0f, 0.0f); saveSceneScrollPos = new Vector2(0.0f, 0.0f); bg2ScrollPos = new Vector2(0.0f, 0.0f); Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent(); component.mode = Vignetting.AberrationMode.Simple; component.intensity = -3.98f; component.chromaticAberration = -0.75f; component.axialAberration = 1.18f; component.blurSpread = 4.19f; component.luminanceDependency = 0.494f; component.blurDistance = 1.71f; component.enabled = false; doguIndex.Clear(); doguSelectIndex = 0; for (int index = 0; index < doguObject.Count; ++index) { if (doguObject[index] != null) { GraphicsUtils.Destroy(doguObject[index]); doguObject[index] = null; } } doguObject.Clear(); } public void init() { isInit = true; isVR = GameMain.Instance.VRMode; for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1) { Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1]; if (goSlot[index1] != null) { stockMaid.body0.goSlot = new List(goSlot[index1]); for (int index2 = 0; index2 < bodyHit[index1].Count; ++index2) { stockMaid.body0.goSlot[index2].bonehair.bodyhit = bodyHit[index1][index2]; } if (!GameMain.Instance.VRMode) { stockMaid.body0.quaDefEyeL.eulerAngles = eyeL[index1]; stockMaid.body0.quaDefEyeR.eulerAngles = eyeR[index1]; } shodaiFlg[index1] = false; } if (SkirtListArray[index1] != null) { for (int index2 = 0; index2 < stockMaid.body0.goSlot.Count; ++index2) { SetFieldValue8(stockMaid.body0.goSlot[index2].bonehair3, "m_SkirtBone", SkirtListArray[index1][index2]); } } } for (int index1 = 0; index1 < maxMaidCnt; ++index1) { if (maidArray[index1]) { maidArray[index1].StopKuchipakuPattern(); } if (maidArray[index1]) { maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform; } if (maidArray[index1] && maidArray[index1].Visible && maidArray[index1].body0.isLoadedBody) { maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f); maidArray[index1].SetAutoTwistAll(true); maidArray[index1].body0.MuneYureL(1f); maidArray[index1].body0.MuneYureR(1f); maidArray[index1].body0.jbMuneL.enabled = true; maidArray[index1].body0.jbMuneR.enabled = true; } if (maidArray[index1]) { maidArray[index1].body0.SetMask(TBody.SlotID.wear, true); maidArray[index1].body0.SetMask(TBody.SlotID.skirt, true); maidArray[index1].body0.SetMask(TBody.SlotID.bra, true); maidArray[index1].body0.SetMask(TBody.SlotID.panz, true); maidArray[index1].body0.SetMask(TBody.SlotID.mizugi, true); maidArray[index1].body0.SetMask(TBody.SlotID.onepiece, true); if (maidArray[index1].body0.isLoadedBody) { Maid maid = maidArray[index1]; for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2) { List fieldValue = GetFieldValue>(maid.body0.goSlot[index2].bonehair, "hair1list"); for (int index3 = 0; index3 < fieldValue.Count; ++index3) { fieldValue[index3].SoftG = new Vector3(0.0f, -3f / 1000f, 0.0f); } } } } maidArray[index1] = null; } goSlot = new List[maxMaidCnt * 2]; bodyHit = new List[maxMaidCnt * 2]; allowUpdate = true; if (okFlg) { GameMain.Instance.CharacterMgr.ResetCharaPosAll(); for (int index = 0; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index) { if (sceneLevel != 5 || index != editMaid) { Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index]; stockMaid.transform.localScale = new Vector3(1f, 1f, 1f); TBody.MaskMode f_eMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), "None"); stockMaid.body0.SetMaskMode(f_eMode); stockMaid.boMabataki = true; } } GameMain.Instance.CharacterMgr.DeactivateCharaAll(); for (int index = 11; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index) { Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index]; Vector3 zero = Vector3.zero; stockMaid.SetPos(zero); stockMaid.SetRot(zero); stockMaid.SetPosOffset(zero); if (stockMaid.body0 != null) { stockMaid.body0.SetBoneHitHeightY(0.0f); } stockMaid.Visible = false; stockMaid.ActiveSlotNo = -1; stockMaid.DelPrefabAll(); if (stockMaid.body0.isLoadedBody) { stockMaid.CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f); stockMaid.SetAutoTwistAll(true); } stockMaid.boMabataki = true; } } okFlg = false; isDance = false; isDanceChu = false; isSavePose = false; // bgIndex = 0; // bgIndexB = 0; bg.localScale = new Vector3(1f, 1f, 1f); softG = new Vector3(0.0f, -3f / 1000f, 0.0f); softG2 = new Vector3(0.0f, -0.005f, 0.0f); if (!GameMain.Instance.VRMode) { Bloom fieldValue = GetFieldValue(mainCamera, "m_gcBloom"); fieldValue.enabled = true; fieldValue.bloomIntensity = 2.85f; fieldValue.hdr = Bloom.HDRBloomMode.Auto; fieldValue.bloomThreshholdColor = new Color(1f, 1f, 1f); fieldValue.bloomBlurIterations = 3; } mainCamera.GetComponent().backgroundColor = new Color(0.0f, 0.0f, 0.0f); maidCnt = 0; wearIndex = 0; isF6 = false; faceFlg = false; faceFlg2 = false; sceneFlg = false; poseFlg = false; kankyoFlg = false; kankyo2Flg = false; unLockFlg = false; inName = ""; inName2 = ""; inName3 = ""; inText = ""; fontSize = 25; bGuiMessage = false; isMessage = false; GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject; MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr; new MessageClass(gameObject, messageWindowMgr).Clear(); messageWindowMgr.CloseMessageWindowPanel(); SetFieldValue2(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent(), "mFontSize", fontSize); ikMaid = 0; ikBui = 0; isNamida = false; isNamidaH = false; isSekimenH = false; isHohoH = false; isTear1 = false; isTear2 = false; isTear3 = false; isShock = false; isYodare = false; isHoho = false; isHoho2 = false; isHohos = false; isHohol = false; isToothoff = false; isNosefook = false; isFaceInit = false; isPoseInit = false; isWear = true; isSkirt = true; isMekure1 = false; isMekure2 = false; isZurasi = false; isBra = true; isPanz = true; isHeadset = true; isAccUde = true; isStkg = true; isShoes = true; isGlove = true; isMegane = true; isAccSenaka = true; isMaid = true; isPanel = true; isBloom = false; isBloomA = false; isBlur = false; isBlur2 = false; bloom1 = 2.85f; bloom2 = 3f; bloom3 = 0.0f; bloom4 = 0.0f; bloom5 = 0.0f; blur1 = -3.98f; blur4 = -0.75f; blur2 = 0.9f; blur3 = 4.19f; bokashi = 0.0f; kamiyure = 0.0f; isDepth = false; isDepthA = false; depth1 = 3f; depth2 = 0.1f; depth3 = 15f; depth4 = 2.5f; isFog = false; fog1 = 4f; fog2 = 1f; fog3 = 1f; fog4 = 0.0f; fog5 = 1f; fog6 = 1f; fog7 = 1f; isSepia = false; isSepian = false; isBloomS = true; isDepthS = false; isBlurS = false; isFogS = false; isHairSetting = true; isSkirtSetting = false; if (depth_field_ != null) { depth_field_.enabled = false; } if (fog_ != null) { fog_.enabled = false; } if (sepia_tone_ != null) { sepia_tone_.enabled = false; } isCube = false; isCube2 = true; isCube3 = false; isCube4 = true; isCubeS = false; cubeSize = 0.12f; isPoseEdit = false; isFaceEdit = false; bgmIndex = 0; if (sceneLevel == 5) { bgmIndex = 2; } effectIndex = 0; selectMaidIndex = 0; copyIndex = 0; selectLightIndex = 0; doguBIndex = 0; parIndex = 0; isEditNo = 0; editSelectMaid = null; for (int index = 0; index < 10; ++index) { date[index] = ""; ninzu[index] = ""; } isDanceStart1F = false; isDanceStart1K = false; isDanceStart2F = false; isDanceStart3F = false; isDanceStart3K = false; isDanceStart4F = false; isDanceStart4K = false; isDanceStart5F = false; isDanceStart5K = false; isDanceStart6F = false; isDanceStart6K = false; isDanceStart7F = false; isDanceStart7V = false; isDanceStart8F = false; isDanceStart8V = false; isDanceStart8P = false; isDanceStart9F = false; isDanceStart9K = false; isDanceStart10F = false; isDanceStart11F = false; isDanceStart11V = false; isDanceStart12F = false; isDanceStart13F = false; isDanceStart13K = false; isDanceStart14F = false; isDanceStart14V = false; isDanceStart15F = false; isDanceStart15V = false; for (int index1 = 0; index1 < maxMaidCnt; ++index1) { danceFace[index1] = 0.0f; FaceName[index1] = ""; FaceName2[index1] = ""; FaceName3[index1] = ""; isStop[index1] = false; isBone[index1] = false; isBoneN[index1] = false; poseIndex[index1] = 0; itemIndex[index1] = 0; itemIndex2[index1] = 0; faceIndex[index1] = 0; faceBlendIndex[index1] = 0; headEyeIndex[index1] = 0; isLock[index1] = false; isFace[index1] = true; mekure1[index1] = false; mekure2[index1] = false; zurasi[index1] = false; mekure1n[index1] = false; mekure2n[index1] = false; zurasin[index1] = false; isLook[index1] = false; isLookn[index1] = false; lookX[index1] = 0.0f; lookY[index1] = -0.0f; lookXn[index1] = 0.0f; lookYn[index1] = -0.0f; voice1[index1] = false; voice2[index1] = false; voice1n[index1] = false; voice2n[index1] = false; hanten[index1] = false; hantenn[index1] = false; kotei[index1] = false; xFlg[index1] = false; zFlg[index1] = false; ikMode[index1] = 0; GraphicsUtils.Destroy(gMaid[index1]); GraphicsUtils.Destroy(gMaidC[index1]); GraphicsUtils.Destroy(gHandL[index1]); GraphicsUtils.Destroy(gArmL[index1]); GraphicsUtils.Destroy(gHandR[index1]); GraphicsUtils.Destroy(gArmR[index1]); GraphicsUtils.Destroy(gFootL[index1]); GraphicsUtils.Destroy(gHizaL[index1]); GraphicsUtils.Destroy(gFootR[index1]); GraphicsUtils.Destroy(gHizaR[index1]); GraphicsUtils.Destroy(gClavicleL[index1]); GraphicsUtils.Destroy(gClavicleR[index1]); GraphicsUtils.Destroy(gNeck[index1]); GraphicsUtils.Destroy(gSpine[index1]); GraphicsUtils.Destroy(gSpine0a[index1]); GraphicsUtils.Destroy(gSpine1a[index1]); GraphicsUtils.Destroy(gSpine1[index1]); GraphicsUtils.Destroy(gPelvis[index1]); GraphicsUtils.Destroy(gizmoHandL[index1]); GraphicsUtils.Destroy(gizmoHandR[index1]); GraphicsUtils.Destroy(gizmoFootL[index1]); GraphicsUtils.Destroy(gizmoFootR[index1]); GraphicsUtils.Destroy(gizmoNeck[index1]); GraphicsUtils.Destroy(gizmoPelvis[index1]); HandL1[index1] = null; for (int index2 = 0; index2 < 30; ++index2) { GraphicsUtils.Destroy(gFinger[index1, index2]); } for (int index2 = 0; index2 < 12; ++index2) { GraphicsUtils.Destroy(gFinger2[index1, index2]); } isIK[index1] = isIKAll; pHandL[index1] = 0; pHandR[index1] = 0; muneIKL[index1] = false; muneIKR[index1] = false; } if (kami) { kami.SetActive(false); } danceCheckIndex = 0; for (int index = 0; index < danceCheck.Length; ++index) { danceCheck[danceCheckIndex] = 1f; } lightIndex = new List { 0 }; lightColorR = new List { 1f }; lightColorG = new List { 1f }; lightColorB = new List { 1f }; lightX = new List { 40f }; lightY = new List { 180f }; lightAkarusa = new List { 0.95f }; lightKage = new List { 0.098f }; lightRange = new List { 50f }; isIdx1 = false; isIdx2 = false; isIdx3 = false; isIdx4 = false; GraphicsUtils.Destroy(cameraObj); GraphicsUtils.Destroy(subcamera); bgObject.SetActive(true); GameMain.Instance.MainLight.Reset(); GameMain.Instance.MainLight.SetIntensity(0.95f); GameMain.Instance.MainLight.GetComponent().spotAngle = 30f; GameMain.Instance.MainLight.GetComponent().range = 10f; GameMain.Instance.MainLight.GetComponent().type = LightType.Directional; GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f); if (!GameMain.Instance.VRMode) { m_material = new Material(Shader.Find("Transparent/Diffuse")) { color = new Color(0.4f, 0.4f, 1f, 0.8f) }; m_UOCamera = GetFieldValue(mainCamera, "m_UOCamera"); if (sceneLevel == 3) { m_UOCamera.enabled = true; } } for (int index = 0; index < doguBObject.Count; ++index) { GraphicsUtils.Destroy(doguBObject[index]); } doguBObject.Clear(); doguBIndex = 0; parIndex = 0; doguCombo.selectedItemIndex = 0; parCombo.selectedItemIndex = 0; for (int index = 1; index < lightList.Count; ++index) { GraphicsUtils.Destroy(lightList[index]); } lightList = new List { GameMain.Instance.MainLight.gameObject }; lightComboList = new GUIContent[lightList.Count]; lightComboList[0] = new GUIContent("メイン"); lightCombo.selectedItemIndex = 0; selectLightIndex = 0; kankyoCombo.selectedItemIndex = 0; itemCombo2.selectedItemIndex = 0; slotCombo.selectedItemIndex = 0; sortList.Clear(); maidCallScrollPos = new Vector2(0.0f, 0.0f); poseScrollPos = new Vector2(0.0f, 0.0f); faceScrollPos = new Vector2(0.0f, 0.0f); bgScrollPos = new Vector2(0.0f, 0.0f); saveSceneScrollPos = new Vector2(0.0f, 0.0f); bg2ScrollPos = new Vector2(0.0f, 0.0f); if (!GameMain.Instance.VRMode) { Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent(); component.mode = Vignetting.AberrationMode.Simple; component.intensity = -3.98f; component.chromaticAberration = -0.75f; component.axialAberration = 1.18f; component.blurSpread = 4.19f; component.luminanceDependency = 0.494f; component.blurDistance = 1.71f; component.enabled = false; } doguIndex.Clear(); doguSelectIndex = 0; for (int index = 0; index < doguObject.Count; ++index) { if (doguObject[index] != null) { GraphicsUtils.Destroy(doguObject[index]); doguObject[index] = null; } } doguObject.Clear(); string mmPosePath = Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose"; if (!File.Exists(mmPosePath)) { Directory.CreateDirectory(mmPosePath); } int countS = this.countS; this.countS = Directory.GetFiles(mmPosePath).Where(f => Path.GetExtension(f) == ".anm").Count(); if (this.countS != countS) { poseArray = null; } if (poseArray != null) { return; } if (GameMain.Instance.BgMgr.CreateAssetBundle("rotenburo") != null) { isVA = true; } if (GameMain.Instance.BgMgr.CreateAssetBundle("karaokeroom") != null) { isKA = true; } if (GameUty.IsEnabledCompatibilityMode) { isCM3D2 = true; } List stringList4 = new List(350 + poseArray2.Length); stringList4.AddRange(poseArray2); List stringList5 = new List(); // Seems to only produce 'edit_pose_027' for (int poseIndex = 11; poseIndex < 100; poseIndex++) { string pose = $"edit_pose_{poseIndex:000}_f"; if (GameUty.FileSystem.IsExistentFile($"{pose}.anm")) { stringList5.Add(pose); } } // Update when denkigai 2025 releases for (int year = 17; year < 25; year++) { foreach (char sw in "sw") { for (int poseIndex = 1; poseIndex < 10; poseIndex++) { string pose = $"edit_pose_dg{year}{sw}_{poseIndex:000}_f"; if (GameUty.FileSystem.IsExistentFile($"{pose}.anm")) { stringList5.Add(pose); } } } } if (stringList5.Count > 0) { stringList4.AddRange(stringList5); } stringList4.AddRange(poseArrayVP2); stringList4.AddRange(poseArrayFB); stringList4.AddRange(poseArray4); stringList4.AddRange(poseArray5); stringList4.AddRange(poseArray6); strList2 = new List(); strListE = new List(); strListE2 = new List(); strListS = new List(); HashSet poseSet = new HashSet(stringList4); strS = ""; this.countS = 0; foreach (string file in Directory.GetFiles(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose")) { if (Path.GetExtension(file) == ".anm") { string withoutExtension = Path.GetFileNameWithoutExtension(file); string mmPose = $"{withoutExtension}{twentySpaces}/{file}"; strListS.Add(mmPose); ++this.countS; } } string[] list = GameUty.FileSystem.GetList("motion", AFileSystemBase.ListType.AllFile); List stringList6 = new List(); foreach (string path2 in list) { string withoutExtension = Path.GetFileNameWithoutExtension(path2); string directoryName = Path.GetDirectoryName(path2); if (!withoutExtension.StartsWith("maid_motion_") && !withoutExtension.StartsWith("work_00") #region huge if condition && !withoutExtension.EndsWith("_3_") && !withoutExtension.EndsWith("_5_") && !withoutExtension.StartsWith("ck_") && !withoutExtension.StartsWith("vr_") && !withoutExtension.StartsWith("dance_mc") && !withoutExtension.Contains("a01_") && !withoutExtension.StartsWith("j_") && !withoutExtension.StartsWith("k_") && !withoutExtension.StartsWith("t_") && !withoutExtension.StartsWith("cbl_") && !withoutExtension.Contains("b01_") && !withoutExtension.Contains("b02_") && !withoutExtension.Contains("_kubi_") && !withoutExtension.EndsWith("_m2") && !withoutExtension.EndsWith("_m3") && !withoutExtension.Contains("_m2_once") && !withoutExtension.Contains("_m3_once") && !withoutExtension.StartsWith("h_") && !withoutExtension.StartsWith("event_") && !withoutExtension.StartsWith("man_") && !withoutExtension.EndsWith("_m") && !withoutExtension.Contains("_m_") && !withoutExtension.Contains("_man") && !(withoutExtension == "dance_cm3d2_001_zoukin") && !(withoutExtension == "dance_cm3d2_001_mop") && !(withoutExtension == "maid_motion") && !(withoutExtension == "aruki_1_idougo_f") && !(withoutExtension == "sleep2") && !(withoutExtension == "stand_akire2") && !(withoutExtension == "ero_scene_001") && !(withoutExtension == "ero_scenefm_001") && !(withoutExtension == "training_001") && !(withoutExtension == "workff_001") && !(withoutExtension == "workfm_001") && !(withoutExtension == "dance_cm3d21_005_moe_mset") && !(withoutExtension == "hinpyoukai_001")) #endregion { if (!directoryName.Contains("\\sex\\")) { if (!withoutExtension.StartsWith("sex_") && !withoutExtension.StartsWith("dance_test")) { if (!strListS.Exists(mmPose => withoutExtension == mmPose.Split('/')[0].Replace(twentySpaces, ""))) { stringList6.Add(withoutExtension); } } } else if (!withoutExtension.StartsWith("pose_")) { strListE.Add(withoutExtension); } } } strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("edit_"))); strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("pose_"))); strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && !str.StartsWith("edit_") && !str.StartsWith("pose_"))); strListE2.AddRange(strListE.Where(str => !poseSet.Contains(str))); stringList4.AddRange(strList2); stringList4.AddRange(strListE2); // What is this for? existPose = false; poseIniStr = ""; foreach (IniKey key in Preferences["pose"].Keys) { IniKey iniKey = Preferences["pose"][key.Key]; if (!string.IsNullOrEmpty(iniKey.Value) && iniKey.Value != "del") { stringList4.Add(key.Key); existPose = true; if (poseIniStr == "") { poseIniStr = key.Key; } } } stringList4.AddRange(strListS); poseArray = stringList4.ToArray(); List stringList7 = new List(50 + poseGroupArray2.Length); stringList7.AddRange(poseGroupArray2); stringList7.AddRange(poseGroupArrayVP); stringList7.AddRange(poseGroupArrayFB); stringList7.AddRange(poseGroupArray3); stringList7.Add(poseArray5[0]); stringList7.Add(poseArray6[0]); stringList7.Add(strList2[0]); stringList7.Add(strListE2[0]); if (strListS.Count > 0 && poseIniStr == "") { stringList7.Add(strListS[0]); existPose = true; } if (poseIniStr != "") { stringList7.Add(poseIniStr); } poseGroupArray = stringList7.ToArray(); groupList = new ArrayList(); for (int i = 0; i < poseArray.Length; i++) { foreach (string poseGroup in poseGroupArray) { if (poseGroup == poseArray[i]) { groupList.Add(i); if (poseGroup == strList2[0]) { sPoseCount = i; } } } } List bgList = new List(50 + poseArray2.Length); PhotoBGData.Create(); bgDict = new Dictionary(); List photList = PhotoBGData.data; IEnumerable neiList = photList.Select(bgdata => bgdata.create_prefab_name).Where(name => !string.IsNullOrEmpty(name)); foreach (PhotoBGData bgdata in photList) { if (!string.IsNullOrEmpty(bgdata.create_prefab_name)) { bgDict[bgdata.create_prefab_name] = bgdata.name; } } bgUiNames.ToList().ForEach(x => bgDict[x.Key] = x.Value); bgList.AddRange(neiList); List myRoomBgList = new List(); Dictionary saveDataDic = CreativeRoomManager.GetSaveDataDic(); if (saveDataDic != null) { foreach (KeyValuePair keyValuePair in saveDataDic) { myRoomBgList.Add(keyValuePair.Key); bgDict[keyValuePair.Key] = keyValuePair.Value; } } bgList.AddRange(myRoomBgList); if (isCM3D2) { if (GameUty.FileSystemOld.IsExistentFile("phot_bg_list.nei")) { List cm3d2BgList = new List(50); using (AFileBase file = GameUty.FileSystemOld.FileOpen("phot_bg_list.nei")) { using (CsvParser csvParser = new CsvParser()) { csvParser.Open(file); for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y) { if (csvParser.IsCellToExistData(3, cell_y)) { string data = csvParser.GetCellAsString(3, cell_y); cm3d2BgList.Add(data); // ew if (data == "Yashiki") cm3d2BgList.Add("Yashiki_Pillow"); } } } } bgList.AddRange(cm3d2BgList); } } bgArray = bgList.ToArray(); bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater"); List bgmList = new List(50) { "bgm008" }; for (int i = 1; i < 33; i++) { if (i == 8) continue; string bgm = $"bgm{i:000}"; if (GameUty.FileSystem.IsExistentFile($"{bgm}.ogg")) { bgmList.Add(bgm); } } bgmList.AddRange(new string[] { "bloomingdreaming_short", "canknowtwoclose_short", "dokidokifallinlove_short", "dokidokifallinlove_short_inst", "entrancetoyou_short", "happyhappyscandal_short_nao_kara", "kiminiaijodelicious_short", "luminousmoment_short", "melodyofempire_short", "nightmagicfire_short", "rhythmixtoyou", "scarlet leap_short", "stellarmytears_short_misato_kara", "stellarmytears_short_nao_kara", "stellarmytears_short_sasaki_kara", }); bgmArray = bgmList.ToArray(); List stringList12 = new List(50 + parArray2.Length); stringList12.AddRange(parArray2); HashSet enabled_id_list = new HashSet(); Action action3 = file_name => { if (GameUty.FileSystem.IsExistentFile(file_name)) { using (AFileBase file = GameUty.FileSystem.FileOpen(file_name)) { using (CsvParser csvParser = new CsvParser()) { csvParser.Open(file); for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y) { if (csvParser.IsCellToExistData(0, cell_y)) { int cellAsInteger = csvParser.GetCellAsInteger(0, cell_y); if (!enabled_id_list.Contains(cellAsInteger)) { enabled_id_list.Add(cellAsInteger); } } } } } } }; action3("desk_item_enabled_id.nei"); foreach (string path in GameUty.PathList) { action3($"desk_item_enabled_id_{path}.nei"); } using (AFileBase file = GameUty.FileSystem.FileOpen("desk_item_detail.nei")) { using (CsvParser csvParser = new CsvParser()) { csvParser.Open(file); for (int index = 1; index < csvParser.max_cell_y; ++index) { if (csvParser.IsCellToExistData(0, index)) { int cellAsInteger = csvParser.GetCellAsInteger(0, index); if (enabled_id_list.Contains(cellAsInteger)) { ItemData2 itemData2 = new ItemData2(csvParser, index); if (itemData2.asset_name != "") { stringList12.Add($"{itemData2.name}{twentySpaces}#{itemData2.asset_name}"); } } } } } } stringList12.AddRange(parArray3); parArray = stringList12.ToArray(); List stringList13 = new List(50 + doguBArray.Length); PhotoBGObjectData.Create(); doguDict = new Dictionary(); IEnumerable filteredList = PhotoBGObjectData.data.Where(prpdata => prpdata.category != "パーティクル"); foreach (PhotoBGObjectData bgObj in filteredList) { string tmp = null; if (!string.IsNullOrEmpty(bgObj.create_prefab_name)) { doguDict[bgObj.create_prefab_name] = bgObj; tmp = bgObj.create_prefab_name; } else if (!string.IsNullOrEmpty(bgObj.create_asset_bundle_name)) { doguDict[bgObj.create_asset_bundle_name] = bgObj; tmp = bgObj.create_asset_bundle_name; } else if (!string.IsNullOrEmpty(bgObj.direct_file)) { doguDict[bgObj.direct_file] = bgObj; tmp = bgObj.direct_file; } if (!string.IsNullOrEmpty(tmp)) { doguUiNames[tmp] = bgObj.name; } } IEnumerable propList1 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_prefab_name)) .Select(prpdata => prpdata.create_prefab_name); IEnumerable propList2 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_asset_bundle_name)) .Select(prpdata => prpdata.create_asset_bundle_name); List propList = propList1.ToList(); propList.AddRange(propList2.ToList()); stringList13.AddRange(propList); stringList13.AddRange(doguBArray); if (isCM3D2) { if (isVA) { stringList13.AddRange(doguB2Array); } if (isKA) { stringList13.AddRange(doguB3Array); } if (isKA2) { stringList13.AddRange(doguB4Array); } } doguBArray = stringList13.ToArray(); List stringList14 = new List(100 + itemBArray.Length); stringList14.AddRange(itemBArray); if (isCM3D2) { if (isVA) { stringList14.AddRange(itemB2Array); } if (isKA) { stringList14.AddRange(itemB3Array); } if (isKA2) { stringList14.AddRange(itemB4Array); } } itemBArray = stringList14.ToArray(); } } }