MultipleMaids.Init.cs 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441
  1. using ExIni;
  2. using MyRoomCustom;
  3. using System;
  4. using System.Collections;
  5. using System.Collections.Generic;
  6. using System.IO;
  7. using System.Linq;
  8. using UnityEngine;
  9. using UnityEngine.PostProcessing;
  10. namespace CM3D2.MultipleMaids.Plugin
  11. {
  12. public partial class MultipleMaids
  13. {
  14. public void init2()
  15. {
  16. for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1)
  17. {
  18. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1];
  19. if (goSlot[index1] != null)
  20. {
  21. stockMaid.body0.goSlot = new List<TBodySkin>(goSlot[index1]);
  22. for (int index2 = 0; index2 < bodyHit[index1].Count; ++index2)
  23. {
  24. stockMaid.body0.goSlot[index2].bonehair.bodyhit = bodyHit[index1][index2];
  25. }
  26. if (!GameMain.Instance.VRMode)
  27. {
  28. stockMaid.body0.quaDefEyeL.eulerAngles = eyeL[index1];
  29. stockMaid.body0.quaDefEyeR.eulerAngles = eyeR[index1];
  30. }
  31. shodaiFlg[index1] = false;
  32. }
  33. if (SkirtListArray[index1] != null)
  34. {
  35. for (int index2 = 0; index2 < stockMaid.body0.goSlot.Count; ++index2)
  36. {
  37. SetFieldValue<BoneHair3, DynamicSkirtBone>(stockMaid.body0.goSlot[index2].bonehair3,
  38. "m_SkirtBone",
  39. SkirtListArray[index1][index2]);
  40. }
  41. }
  42. }
  43. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  44. {
  45. if (maidArray[index1])
  46. {
  47. maidArray[index1].StopKuchipakuPattern();
  48. }
  49. if (maidArray[index1])
  50. {
  51. maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  52. }
  53. if (maidArray[index1] && maidArray[index1].Visible && maidArray[index1].body0.isLoadedBody)
  54. {
  55. maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  56. maidArray[index1].SetAutoTwistAll(true);
  57. maidArray[index1].body0.MuneYureL(1f);
  58. maidArray[index1].body0.MuneYureR(1f);
  59. maidArray[index1].body0.jbMuneL.enabled = true;
  60. maidArray[index1].body0.jbMuneR.enabled = true;
  61. }
  62. if (maidArray[index1])
  63. {
  64. maidArray[index1].boMabataki = true;
  65. if (maidArray[index1].body0.isLoadedBody)
  66. {
  67. Maid maid = maidArray[index1];
  68. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  69. {
  70. List<THair1> fieldValue = GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[index2].bonehair, "hair1list");
  71. for (int index3 = 0; index3 < fieldValue.Count; ++index3)
  72. {
  73. fieldValue[index3].SoftG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  74. }
  75. }
  76. }
  77. }
  78. }
  79. goSlot = new List<TBodySkin>[maxMaidCnt * 2];
  80. bodyHit = new List<TBodyHit>[maxMaidCnt * 2];
  81. allowUpdate = true;
  82. okFlg = false;
  83. isDance = false;
  84. isDanceChu = false;
  85. isSavePose = false;
  86. bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  87. bg.localScale = new Vector3(1f, 1f, 1f);
  88. softG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  89. softG2 = new Vector3(0.0f, -0.005f, 0.0f);
  90. if (!GameMain.Instance.VRMode)
  91. {
  92. Bloom fieldValue = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  93. fieldValue.enabled = true;
  94. fieldValue.bloomIntensity = 2.85f;
  95. fieldValue.hdr = Bloom.HDRBloomMode.Auto;
  96. fieldValue.bloomThreshholdColor = new Color(1f, 1f, 1f);
  97. fieldValue.bloomBlurIterations = 3;
  98. }
  99. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0.0f, 0.0f, 0.0f);
  100. maidCnt = 1;
  101. editMaid = 0;
  102. wearIndex = 0;
  103. bGuiMessage = false;
  104. inName = "";
  105. inName2 = "";
  106. inName3 = "";
  107. inText = "";
  108. fontSize = 25;
  109. isMessage = false;
  110. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  111. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  112. new MessageClass(gameObject, messageWindowMgr).Clear();
  113. messageWindowMgr.CloseMessageWindowPanel();
  114. SetFieldValue<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>(),
  115. "mFontSize",
  116. fontSize);
  117. ikMaid = 0;
  118. ikBui = 0;
  119. faceFlg = false;
  120. faceFlg2 = false;
  121. sceneFlg = false;
  122. poseFlg = false;
  123. kankyoFlg = false;
  124. kankyo2Flg = false;
  125. unLockFlg = false;
  126. isNamida = false;
  127. isNamidaH = false;
  128. isSekimenH = false;
  129. isHohoH = false;
  130. isTear1 = false;
  131. isTear2 = false;
  132. isTear3 = false;
  133. isShock = false;
  134. isYodare = false;
  135. isHoho = false;
  136. isHoho2 = false;
  137. isHohos = false;
  138. isHohol = false;
  139. isToothoff = false;
  140. isNosefook = false;
  141. isFaceInit = false;
  142. isPoseInit = false;
  143. isWear = true;
  144. isSkirt = true;
  145. isMekure1 = false;
  146. isMekure2 = false;
  147. isZurasi = false;
  148. isBra = true;
  149. isPanz = true;
  150. isHeadset = true;
  151. isAccUde = true;
  152. isStkg = true;
  153. isShoes = true;
  154. isGlove = true;
  155. isMegane = true;
  156. isAccSenaka = true;
  157. isMaid = true;
  158. isF6 = false;
  159. isPanel = true;
  160. isBloom = false;
  161. isBloomA = false;
  162. isBlur = false;
  163. isBlur2 = false;
  164. bloom1 = 2.85f;
  165. bloom2 = 3f;
  166. bloom3 = 0.0f;
  167. bloom4 = 0.0f;
  168. bloom5 = 0.0f;
  169. blur1 = -3.98f;
  170. blur4 = -0.75f;
  171. blur2 = 0.9f;
  172. blur3 = 4.19f;
  173. bokashi = 0.0f;
  174. kamiyure = 0.0f;
  175. isDepth = false;
  176. isDepthA = false;
  177. depth1 = 3f;
  178. depth2 = 0.1f;
  179. depth3 = 15f;
  180. depth4 = 2.5f;
  181. isFog = false;
  182. fog1 = 4f;
  183. fog2 = 1f;
  184. fog3 = 1f;
  185. fog4 = 0.0f;
  186. fog5 = 1f;
  187. fog6 = 1f;
  188. fog7 = 1f;
  189. isSepia = false;
  190. isSepian = false;
  191. isBloomS = true;
  192. isDepthS = false;
  193. isBlurS = false;
  194. isFogS = false;
  195. isHairSetting = true;
  196. isSkirtSetting = false;
  197. if (depth_field_ != null)
  198. {
  199. depth_field_.enabled = false;
  200. }
  201. if (fog_ != null)
  202. {
  203. fog_.enabled = false;
  204. }
  205. if (sepia_tone_ != null)
  206. {
  207. sepia_tone_.enabled = false;
  208. }
  209. isCube = false;
  210. isCube2 = true;
  211. isCube3 = false;
  212. isCube4 = true;
  213. isCubeS = false;
  214. cubeSize = 0.12f;
  215. isPoseEdit = false;
  216. isFaceEdit = false;
  217. bgmIndex = 0;
  218. if (sceneLevel == 5)
  219. {
  220. bgmIndex = 2;
  221. }
  222. effectIndex = 0;
  223. selectMaidIndex = 0;
  224. copyIndex = 0;
  225. selectLightIndex = 0;
  226. doguBIndex = 0;
  227. parIndex = 0;
  228. isEditNo = 0;
  229. editSelectMaid = null;
  230. for (int index = 0; index < 10; ++index)
  231. {
  232. date[index] = "";
  233. ninzu[index] = "";
  234. }
  235. isDanceStart1F = false;
  236. isDanceStart1K = false;
  237. isDanceStart2F = false;
  238. isDanceStart3F = false;
  239. isDanceStart3K = false;
  240. isDanceStart4F = false;
  241. isDanceStart4K = false;
  242. isDanceStart5F = false;
  243. isDanceStart5K = false;
  244. isDanceStart6F = false;
  245. isDanceStart6K = false;
  246. isDanceStart7F = false;
  247. isDanceStart7V = false;
  248. isDanceStart8F = false;
  249. isDanceStart8V = false;
  250. isDanceStart8P = false;
  251. isDanceStart9F = false;
  252. isDanceStart9K = false;
  253. isDanceStart10F = false;
  254. isDanceStart11F = false;
  255. isDanceStart11V = false;
  256. isDanceStart12F = false;
  257. isDanceStart13F = false;
  258. isDanceStart13K = false;
  259. isDanceStart14F = false;
  260. isDanceStart14V = false;
  261. isDanceStart15F = false;
  262. isDanceStart15V = false;
  263. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  264. {
  265. danceFace[index1] = 0.0f;
  266. FaceName[index1] = "";
  267. FaceName2[index1] = "";
  268. FaceName3[index1] = "";
  269. isStop[index1] = false;
  270. isBone[index1] = false;
  271. isBoneN[index1] = false;
  272. poseIndex[index1] = 0;
  273. itemIndex[index1] = 0;
  274. itemIndex2[index1] = 0;
  275. faceIndex[index1] = 0;
  276. faceBlendIndex[index1] = 0;
  277. headEyeIndex[index1] = 0;
  278. isLock[index1] = false;
  279. isFace[index1] = true;
  280. mekure1[index1] = false;
  281. mekure2[index1] = false;
  282. zurasi[index1] = false;
  283. mekure1n[index1] = false;
  284. mekure2n[index1] = false;
  285. zurasin[index1] = false;
  286. isLook[index1] = false;
  287. isLookn[index1] = false;
  288. lookX[index1] = 0.0f;
  289. lookY[index1] = -0.0f;
  290. lookXn[index1] = 0.0f;
  291. lookYn[index1] = -0.0f;
  292. voice1[index1] = false;
  293. voice2[index1] = false;
  294. voice1n[index1] = false;
  295. voice2n[index1] = false;
  296. hanten[index1] = false;
  297. hantenn[index1] = false;
  298. kotei[index1] = false;
  299. xFlg[index1] = false;
  300. zFlg[index1] = false;
  301. ikMode[index1] = 0;
  302. GraphicsUtils.Destroy(gMaid[index1]);
  303. GraphicsUtils.Destroy(gMaidC[index1]);
  304. GraphicsUtils.Destroy(gHandL[index1]);
  305. GraphicsUtils.Destroy(gArmL[index1]);
  306. GraphicsUtils.Destroy(gHandR[index1]);
  307. GraphicsUtils.Destroy(gArmR[index1]);
  308. GraphicsUtils.Destroy(gFootL[index1]);
  309. GraphicsUtils.Destroy(gHizaL[index1]);
  310. GraphicsUtils.Destroy(gFootR[index1]);
  311. GraphicsUtils.Destroy(gHizaR[index1]);
  312. GraphicsUtils.Destroy(gClavicleL[index1]);
  313. GraphicsUtils.Destroy(gClavicleR[index1]);
  314. GraphicsUtils.Destroy(gNeck[index1]);
  315. GraphicsUtils.Destroy(gSpine[index1]);
  316. GraphicsUtils.Destroy(gSpine0a[index1]);
  317. GraphicsUtils.Destroy(gSpine1a[index1]);
  318. GraphicsUtils.Destroy(gSpine1[index1]);
  319. GraphicsUtils.Destroy(gPelvis[index1]);
  320. GraphicsUtils.Destroy(gizmoHandL[index1]);
  321. GraphicsUtils.Destroy(gizmoHandR[index1]);
  322. GraphicsUtils.Destroy(gizmoFootL[index1]);
  323. GraphicsUtils.Destroy(gizmoFootR[index1]);
  324. GraphicsUtils.Destroy(gizmoNeck[index1]);
  325. GraphicsUtils.Destroy(gizmoPelvis[index1]);
  326. HandL1[index1] = null;
  327. for (int index2 = 0; index2 < 30; ++index2)
  328. {
  329. GraphicsUtils.Destroy(gFinger[index1, index2]);
  330. }
  331. for (int index2 = 0; index2 < 12; ++index2)
  332. {
  333. GraphicsUtils.Destroy(gFinger2[index1, index2]);
  334. }
  335. isIK[index1] = isIKAll;
  336. pHandL[index1] = 0;
  337. pHandR[index1] = 0;
  338. muneIKL[index1] = false;
  339. muneIKR[index1] = false;
  340. }
  341. if (kami)
  342. {
  343. kami.SetActive(false);
  344. }
  345. danceCheckIndex = 0;
  346. for (int index = 0; index < danceCheck.Length; ++index)
  347. {
  348. danceCheck[danceCheckIndex] = 1f;
  349. }
  350. lightIndex = new List<int>
  351. {
  352. 0
  353. };
  354. lightColorR = new List<float>
  355. {
  356. 1f
  357. };
  358. lightColorG = new List<float>
  359. {
  360. 1f
  361. };
  362. lightColorB = new List<float>
  363. {
  364. 1f
  365. };
  366. lightX = new List<float>
  367. {
  368. 40f
  369. };
  370. lightY = new List<float>
  371. {
  372. 180f
  373. };
  374. lightAkarusa = new List<float>
  375. {
  376. 0.95f
  377. };
  378. lightKage = new List<float>
  379. {
  380. 0.098f
  381. };
  382. lightRange = new List<float>
  383. {
  384. 50f
  385. };
  386. isIdx1 = false;
  387. isIdx2 = false;
  388. isIdx3 = false;
  389. isIdx4 = false;
  390. bgObject.SetActive(true);
  391. GameMain.Instance.MainLight.Reset();
  392. GameMain.Instance.MainLight.SetIntensity(0.95f);
  393. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 30f;
  394. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  395. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  396. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f);
  397. for (int index = 0; index < doguBObject.Count; ++index)
  398. {
  399. GraphicsUtils.Destroy(doguBObject[index]);
  400. }
  401. doguBObject.Clear();
  402. doguBIndex = 0;
  403. parIndex = 0;
  404. doguCombo.selectedItemIndex = 0;
  405. parCombo.selectedItemIndex = 0;
  406. for (int index = 1; index < lightList.Count; ++index)
  407. {
  408. GraphicsUtils.Destroy(lightList[index]);
  409. }
  410. lightList = new List<GameObject>
  411. {
  412. GameMain.Instance.MainLight.gameObject
  413. };
  414. lightComboList = new GUIContent[lightList.Count];
  415. lightComboList[0] = new GUIContent("メイン");
  416. lightCombo.selectedItemIndex = 0;
  417. selectLightIndex = 0;
  418. kankyoCombo.selectedItemIndex = 0;
  419. itemCombo2.selectedItemIndex = 0;
  420. slotCombo.selectedItemIndex = 0;
  421. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  422. poseScrollPos = new Vector2(0.0f, 0.0f);
  423. faceScrollPos = new Vector2(0.0f, 0.0f);
  424. bgScrollPos = new Vector2(0.0f, 0.0f);
  425. saveSceneScrollPos = new Vector2(0.0f, 0.0f);
  426. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  427. Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  428. component.mode = Vignetting.AberrationMode.Simple;
  429. component.intensity = -3.98f;
  430. component.chromaticAberration = -0.75f;
  431. component.axialAberration = 1.18f;
  432. component.blurSpread = 4.19f;
  433. component.luminanceDependency = 0.494f;
  434. component.blurDistance = 1.71f;
  435. component.enabled = false;
  436. doguIndex.Clear();
  437. doguSelectIndex = 0;
  438. for (int index = 0; index < doguObject.Count; ++index)
  439. {
  440. if (doguObject[index] != null)
  441. {
  442. GraphicsUtils.Destroy(doguObject[index]);
  443. doguObject[index] = null;
  444. }
  445. }
  446. doguObject.Clear();
  447. }
  448. public void init()
  449. {
  450. if (bg2Busy)
  451. {
  452. bg2Busy = false;
  453. GameMain.Instance.StopCoroutine(InitializeBG2());
  454. }
  455. isInit = true;
  456. isVR = GameMain.Instance.VRMode;
  457. for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1)
  458. {
  459. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1];
  460. if (goSlot[index1] != null)
  461. {
  462. stockMaid.body0.goSlot = new List<TBodySkin>(goSlot[index1]);
  463. for (int index2 = 0; index2 < bodyHit[index1].Count; ++index2)
  464. {
  465. stockMaid.body0.goSlot[index2].bonehair.bodyhit = bodyHit[index1][index2];
  466. }
  467. if (!GameMain.Instance.VRMode)
  468. {
  469. stockMaid.body0.quaDefEyeL.eulerAngles = eyeL[index1];
  470. stockMaid.body0.quaDefEyeR.eulerAngles = eyeR[index1];
  471. }
  472. shodaiFlg[index1] = false;
  473. }
  474. if (SkirtListArray[index1] != null)
  475. {
  476. for (int index2 = 0; index2 < stockMaid.body0.goSlot.Count; ++index2)
  477. {
  478. SetFieldValue<BoneHair3, DynamicSkirtBone>(stockMaid.body0.goSlot[index2].bonehair3,
  479. "m_SkirtBone",
  480. SkirtListArray[index1][index2]);
  481. }
  482. }
  483. }
  484. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  485. {
  486. if (maidArray[index1])
  487. {
  488. maidArray[index1].StopKuchipakuPattern();
  489. }
  490. if (maidArray[index1])
  491. {
  492. maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  493. }
  494. if (maidArray[index1] && maidArray[index1].Visible && maidArray[index1].body0.isLoadedBody)
  495. {
  496. maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  497. maidArray[index1].SetAutoTwistAll(true);
  498. maidArray[index1].body0.MuneYureL(1f);
  499. maidArray[index1].body0.MuneYureR(1f);
  500. maidArray[index1].body0.jbMuneL.enabled = true;
  501. maidArray[index1].body0.jbMuneR.enabled = true;
  502. }
  503. if (maidArray[index1])
  504. {
  505. maidArray[index1].body0.SetMask(TBody.SlotID.wear, true);
  506. maidArray[index1].body0.SetMask(TBody.SlotID.skirt, true);
  507. maidArray[index1].body0.SetMask(TBody.SlotID.bra, true);
  508. maidArray[index1].body0.SetMask(TBody.SlotID.panz, true);
  509. maidArray[index1].body0.SetMask(TBody.SlotID.mizugi, true);
  510. maidArray[index1].body0.SetMask(TBody.SlotID.onepiece, true);
  511. if (maidArray[index1].body0.isLoadedBody)
  512. {
  513. Maid maid = maidArray[index1];
  514. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  515. {
  516. List<THair1> fieldValue = GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[index2].bonehair, "hair1list");
  517. for (int index3 = 0; index3 < fieldValue.Count; ++index3)
  518. {
  519. fieldValue[index3].SoftG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  520. }
  521. }
  522. }
  523. }
  524. maidArray[index1] = null;
  525. }
  526. goSlot = new List<TBodySkin>[maxMaidCnt * 2];
  527. bodyHit = new List<TBodyHit>[maxMaidCnt * 2];
  528. allowUpdate = true;
  529. if (okFlg)
  530. {
  531. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  532. for (int index = 0; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  533. {
  534. if (sceneLevel != 5 || index != editMaid)
  535. {
  536. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  537. stockMaid.transform.localScale = new Vector3(1f, 1f, 1f);
  538. TBody.MaskMode f_eMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), "None");
  539. stockMaid.body0.SetMaskMode(f_eMode);
  540. stockMaid.boMabataki = true;
  541. }
  542. }
  543. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  544. for (int index = 11; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  545. {
  546. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  547. Vector3 zero = Vector3.zero;
  548. stockMaid.SetPos(zero);
  549. stockMaid.SetRot(zero);
  550. stockMaid.SetPosOffset(zero);
  551. if (stockMaid.body0 != null)
  552. {
  553. stockMaid.body0.SetBoneHitHeightY(0.0f);
  554. }
  555. stockMaid.Visible = false;
  556. stockMaid.ActiveSlotNo = -1;
  557. stockMaid.DelPrefabAll();
  558. if (stockMaid.body0.isLoadedBody)
  559. {
  560. stockMaid.CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  561. stockMaid.SetAutoTwistAll(true);
  562. }
  563. stockMaid.boMabataki = true;
  564. }
  565. }
  566. okFlg = false;
  567. isDance = false;
  568. isDanceChu = false;
  569. isSavePose = false;
  570. // bgIndex = 0;
  571. // bgIndexB = 0;
  572. bg.localScale = new Vector3(1f, 1f, 1f);
  573. softG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  574. softG2 = new Vector3(0.0f, -0.005f, 0.0f);
  575. if (!GameMain.Instance.VRMode)
  576. {
  577. Bloom fieldValue = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  578. fieldValue.enabled = true;
  579. fieldValue.bloomIntensity = 2.85f;
  580. fieldValue.hdr = Bloom.HDRBloomMode.Auto;
  581. fieldValue.bloomThreshholdColor = new Color(1f, 1f, 1f);
  582. fieldValue.bloomBlurIterations = 3;
  583. }
  584. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0.0f, 0.0f, 0.0f);
  585. maidCnt = 0;
  586. wearIndex = 0;
  587. isF6 = false;
  588. faceFlg = false;
  589. faceFlg2 = false;
  590. sceneFlg = false;
  591. poseFlg = false;
  592. kankyoFlg = false;
  593. kankyo2Flg = false;
  594. unLockFlg = false;
  595. inName = "";
  596. inName2 = "";
  597. inName3 = "";
  598. inText = "";
  599. fontSize = 25;
  600. bGuiMessage = false;
  601. isMessage = false;
  602. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  603. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  604. new MessageClass(gameObject, messageWindowMgr).Clear();
  605. messageWindowMgr.CloseMessageWindowPanel();
  606. SetFieldValue<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>(),
  607. "mFontSize",
  608. fontSize);
  609. ikMaid = 0;
  610. ikBui = 0;
  611. isNamida = false;
  612. isNamidaH = false;
  613. isSekimenH = false;
  614. isHohoH = false;
  615. isTear1 = false;
  616. isTear2 = false;
  617. isTear3 = false;
  618. isShock = false;
  619. isYodare = false;
  620. isHoho = false;
  621. isHoho2 = false;
  622. isHohos = false;
  623. isHohol = false;
  624. isToothoff = false;
  625. isNosefook = false;
  626. isFaceInit = false;
  627. isPoseInit = false;
  628. isWear = true;
  629. isSkirt = true;
  630. isMekure1 = false;
  631. isMekure2 = false;
  632. isZurasi = false;
  633. isBra = true;
  634. isPanz = true;
  635. isHeadset = true;
  636. isAccUde = true;
  637. isStkg = true;
  638. isShoes = true;
  639. isGlove = true;
  640. isMegane = true;
  641. isAccSenaka = true;
  642. isMaid = true;
  643. isPanel = true;
  644. isBloom = false;
  645. isBloomA = false;
  646. isBlur = false;
  647. isBlur2 = false;
  648. bloom1 = 2.85f;
  649. bloom2 = 3f;
  650. bloom3 = 0.0f;
  651. bloom4 = 0.0f;
  652. bloom5 = 0.0f;
  653. blur1 = -3.98f;
  654. blur4 = -0.75f;
  655. blur2 = 0.9f;
  656. blur3 = 4.19f;
  657. bokashi = 0.0f;
  658. kamiyure = 0.0f;
  659. isDepth = false;
  660. isDepthA = false;
  661. depth1 = 3f;
  662. depth2 = 0.1f;
  663. depth3 = 15f;
  664. depth4 = 2.5f;
  665. isFog = false;
  666. fog1 = 4f;
  667. fog2 = 1f;
  668. fog3 = 1f;
  669. fog4 = 0.0f;
  670. fog5 = 1f;
  671. fog6 = 1f;
  672. fog7 = 1f;
  673. isSepia = false;
  674. isSepian = false;
  675. isBloomS = true;
  676. isDepthS = false;
  677. isBlurS = false;
  678. isFogS = false;
  679. isHairSetting = true;
  680. isSkirtSetting = false;
  681. if (depth_field_ != null)
  682. {
  683. depth_field_.enabled = false;
  684. }
  685. if (fog_ != null)
  686. {
  687. fog_.enabled = false;
  688. }
  689. if (sepia_tone_ != null)
  690. {
  691. sepia_tone_.enabled = false;
  692. }
  693. isCube = false;
  694. isCube2 = true;
  695. isCube3 = false;
  696. isCube4 = true;
  697. isCubeS = false;
  698. cubeSize = 0.12f;
  699. isPoseEdit = false;
  700. isFaceEdit = false;
  701. bgmIndex = 0;
  702. if (sceneLevel == 5)
  703. {
  704. bgmIndex = 2;
  705. }
  706. effectIndex = 0;
  707. selectMaidIndex = 0;
  708. copyIndex = 0;
  709. selectLightIndex = 0;
  710. doguBIndex = 0;
  711. parIndex = 0;
  712. isEditNo = 0;
  713. editSelectMaid = null;
  714. for (int index = 0; index < 10; ++index)
  715. {
  716. date[index] = "";
  717. ninzu[index] = "";
  718. }
  719. isDanceStart1F = false;
  720. isDanceStart1K = false;
  721. isDanceStart2F = false;
  722. isDanceStart3F = false;
  723. isDanceStart3K = false;
  724. isDanceStart4F = false;
  725. isDanceStart4K = false;
  726. isDanceStart5F = false;
  727. isDanceStart5K = false;
  728. isDanceStart6F = false;
  729. isDanceStart6K = false;
  730. isDanceStart7F = false;
  731. isDanceStart7V = false;
  732. isDanceStart8F = false;
  733. isDanceStart8V = false;
  734. isDanceStart8P = false;
  735. isDanceStart9F = false;
  736. isDanceStart9K = false;
  737. isDanceStart10F = false;
  738. isDanceStart11F = false;
  739. isDanceStart11V = false;
  740. isDanceStart12F = false;
  741. isDanceStart13F = false;
  742. isDanceStart13K = false;
  743. isDanceStart14F = false;
  744. isDanceStart14V = false;
  745. isDanceStart15F = false;
  746. isDanceStart15V = false;
  747. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  748. {
  749. danceFace[index1] = 0.0f;
  750. FaceName[index1] = "";
  751. FaceName2[index1] = "";
  752. FaceName3[index1] = "";
  753. isStop[index1] = false;
  754. isBone[index1] = false;
  755. isBoneN[index1] = false;
  756. poseIndex[index1] = 0;
  757. itemIndex[index1] = 0;
  758. itemIndex2[index1] = 0;
  759. faceIndex[index1] = 0;
  760. faceBlendIndex[index1] = 0;
  761. headEyeIndex[index1] = 0;
  762. isLock[index1] = false;
  763. isFace[index1] = true;
  764. mekure1[index1] = false;
  765. mekure2[index1] = false;
  766. zurasi[index1] = false;
  767. mekure1n[index1] = false;
  768. mekure2n[index1] = false;
  769. zurasin[index1] = false;
  770. isLook[index1] = false;
  771. isLookn[index1] = false;
  772. lookX[index1] = 0.0f;
  773. lookY[index1] = -0.0f;
  774. lookXn[index1] = 0.0f;
  775. lookYn[index1] = -0.0f;
  776. voice1[index1] = false;
  777. voice2[index1] = false;
  778. voice1n[index1] = false;
  779. voice2n[index1] = false;
  780. hanten[index1] = false;
  781. hantenn[index1] = false;
  782. kotei[index1] = false;
  783. xFlg[index1] = false;
  784. zFlg[index1] = false;
  785. ikMode[index1] = 0;
  786. GraphicsUtils.Destroy(gMaid[index1]);
  787. GraphicsUtils.Destroy(gMaidC[index1]);
  788. GraphicsUtils.Destroy(gHandL[index1]);
  789. GraphicsUtils.Destroy(gArmL[index1]);
  790. GraphicsUtils.Destroy(gHandR[index1]);
  791. GraphicsUtils.Destroy(gArmR[index1]);
  792. GraphicsUtils.Destroy(gFootL[index1]);
  793. GraphicsUtils.Destroy(gHizaL[index1]);
  794. GraphicsUtils.Destroy(gFootR[index1]);
  795. GraphicsUtils.Destroy(gHizaR[index1]);
  796. GraphicsUtils.Destroy(gClavicleL[index1]);
  797. GraphicsUtils.Destroy(gClavicleR[index1]);
  798. GraphicsUtils.Destroy(gNeck[index1]);
  799. GraphicsUtils.Destroy(gSpine[index1]);
  800. GraphicsUtils.Destroy(gSpine0a[index1]);
  801. GraphicsUtils.Destroy(gSpine1a[index1]);
  802. GraphicsUtils.Destroy(gSpine1[index1]);
  803. GraphicsUtils.Destroy(gPelvis[index1]);
  804. GraphicsUtils.Destroy(gizmoHandL[index1]);
  805. GraphicsUtils.Destroy(gizmoHandR[index1]);
  806. GraphicsUtils.Destroy(gizmoFootL[index1]);
  807. GraphicsUtils.Destroy(gizmoFootR[index1]);
  808. GraphicsUtils.Destroy(gizmoNeck[index1]);
  809. GraphicsUtils.Destroy(gizmoPelvis[index1]);
  810. HandL1[index1] = null;
  811. for (int index2 = 0; index2 < 30; ++index2)
  812. {
  813. GraphicsUtils.Destroy(gFinger[index1, index2]);
  814. }
  815. for (int index2 = 0; index2 < 12; ++index2)
  816. {
  817. GraphicsUtils.Destroy(gFinger2[index1, index2]);
  818. }
  819. isIK[index1] = isIKAll;
  820. pHandL[index1] = 0;
  821. pHandR[index1] = 0;
  822. muneIKL[index1] = false;
  823. muneIKR[index1] = false;
  824. }
  825. if (kami)
  826. {
  827. kami.SetActive(false);
  828. }
  829. danceCheckIndex = 0;
  830. for (int index = 0; index < danceCheck.Length; ++index)
  831. {
  832. danceCheck[danceCheckIndex] = 1f;
  833. }
  834. lightIndex = new List<int>
  835. {
  836. 0
  837. };
  838. lightColorR = new List<float>
  839. {
  840. 1f
  841. };
  842. lightColorG = new List<float>
  843. {
  844. 1f
  845. };
  846. lightColorB = new List<float>
  847. {
  848. 1f
  849. };
  850. lightX = new List<float>
  851. {
  852. 40f
  853. };
  854. lightY = new List<float>
  855. {
  856. 180f
  857. };
  858. lightAkarusa = new List<float>
  859. {
  860. 0.95f
  861. };
  862. lightKage = new List<float>
  863. {
  864. 0.098f
  865. };
  866. lightRange = new List<float>
  867. {
  868. 50f
  869. };
  870. isIdx1 = false;
  871. isIdx2 = false;
  872. isIdx3 = false;
  873. isIdx4 = false;
  874. GraphicsUtils.Destroy(cameraObj);
  875. GraphicsUtils.Destroy(subcamera);
  876. bgObject.SetActive(true);
  877. GameMain.Instance.MainLight.Reset();
  878. GameMain.Instance.MainLight.SetIntensity(0.95f);
  879. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 30f;
  880. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  881. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  882. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f);
  883. if (!GameMain.Instance.VRMode)
  884. {
  885. m_material = new Material(Shader.Find("Transparent/Diffuse"))
  886. {
  887. color = new Color(0.4f, 0.4f, 1f, 0.8f)
  888. };
  889. m_UOCamera = GetFieldValue<CameraMain, UltimateOrbitCamera>(mainCamera, "m_UOCamera");
  890. if (sceneLevel == 3)
  891. {
  892. m_UOCamera.enabled = true;
  893. }
  894. }
  895. for (int index = 0; index < doguBObject.Count; ++index)
  896. {
  897. GraphicsUtils.Destroy(doguBObject[index]);
  898. }
  899. doguBObject.Clear();
  900. doguBIndex = 0;
  901. parIndex = 0;
  902. doguCombo.selectedItemIndex = 0;
  903. parCombo.selectedItemIndex = 0;
  904. for (int index = 1; index < lightList.Count; ++index)
  905. {
  906. GraphicsUtils.Destroy(lightList[index]);
  907. }
  908. lightList = new List<GameObject>
  909. {
  910. GameMain.Instance.MainLight.gameObject
  911. };
  912. lightComboList = new GUIContent[lightList.Count];
  913. lightComboList[0] = new GUIContent("メイン");
  914. lightCombo.selectedItemIndex = 0;
  915. selectLightIndex = 0;
  916. kankyoCombo.selectedItemIndex = 0;
  917. itemCombo2.selectedItemIndex = 0;
  918. slotCombo.selectedItemIndex = 0;
  919. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  920. poseScrollPos = new Vector2(0.0f, 0.0f);
  921. faceScrollPos = new Vector2(0.0f, 0.0f);
  922. bgScrollPos = new Vector2(0.0f, 0.0f);
  923. saveSceneScrollPos = new Vector2(0.0f, 0.0f);
  924. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  925. if (!GameMain.Instance.VRMode)
  926. {
  927. Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  928. component.mode = Vignetting.AberrationMode.Simple;
  929. component.intensity = -3.98f;
  930. component.chromaticAberration = -0.75f;
  931. component.axialAberration = 1.18f;
  932. component.blurSpread = 4.19f;
  933. component.luminanceDependency = 0.494f;
  934. component.blurDistance = 1.71f;
  935. component.enabled = false;
  936. }
  937. doguIndex.Clear();
  938. doguSelectIndex = 0;
  939. for (int index = 0; index < doguObject.Count; ++index)
  940. {
  941. if (doguObject[index] != null)
  942. {
  943. GraphicsUtils.Destroy(doguObject[index]);
  944. doguObject[index] = null;
  945. }
  946. }
  947. doguObject.Clear();
  948. string mmPosePath = Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose";
  949. if (!File.Exists(mmPosePath))
  950. {
  951. Directory.CreateDirectory(mmPosePath);
  952. }
  953. int countS = this.countS;
  954. this.countS = Directory.GetFiles(mmPosePath).Where(f => Path.GetExtension(f) == ".anm").Count();
  955. if (this.countS != countS)
  956. {
  957. poseArray = null;
  958. }
  959. if (poseArray != null)
  960. {
  961. return;
  962. }
  963. if (GameMain.Instance.BgMgr.CreateAssetBundle("rotenburo") != null)
  964. {
  965. isVA = true;
  966. }
  967. if (GameMain.Instance.BgMgr.CreateAssetBundle("karaokeroom") != null)
  968. {
  969. isKA = true;
  970. }
  971. if (GameUty.IsEnabledCompatibilityMode)
  972. {
  973. isCM3D2 = true;
  974. }
  975. List<string> stringList4 = new List<string>(350 + poseArray2.Length);
  976. stringList4.AddRange(poseArray2);
  977. List<string> stringList5 = new List<string>();
  978. // Seems to only produce 'edit_pose_027'
  979. for (int poseIndex = 11; poseIndex < 100; poseIndex++)
  980. {
  981. string pose = $"edit_pose_{poseIndex:000}_f";
  982. if (GameUty.FileSystem.IsExistentFile($"{pose}.anm"))
  983. {
  984. stringList5.Add(pose);
  985. }
  986. }
  987. // Update when denkigai 2025 releases
  988. for (int year = 17; year < 25; year++)
  989. {
  990. foreach (char sw in "sw")
  991. {
  992. for (int poseIndex = 1; poseIndex < 10; poseIndex++)
  993. {
  994. string pose = $"edit_pose_dg{year}{sw}_{poseIndex:000}_f";
  995. if (GameUty.FileSystem.IsExistentFile($"{pose}.anm"))
  996. {
  997. stringList5.Add(pose);
  998. }
  999. }
  1000. }
  1001. }
  1002. if (stringList5.Count > 0)
  1003. {
  1004. stringList4.AddRange(stringList5);
  1005. }
  1006. stringList4.AddRange(poseArrayVP2);
  1007. stringList4.AddRange(poseArrayFB);
  1008. stringList4.AddRange(poseArray4);
  1009. stringList4.AddRange(poseArray5);
  1010. stringList4.AddRange(poseArray6);
  1011. strList2 = new List<string>();
  1012. strListE = new List<string>();
  1013. strListE2 = new List<string>();
  1014. strListS = new List<string>();
  1015. HashSet<string> poseSet = new HashSet<string>(stringList4);
  1016. strS = "";
  1017. this.countS = 0;
  1018. foreach (string file in Directory.GetFiles(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose"))
  1019. {
  1020. if (Path.GetExtension(file) == ".anm")
  1021. {
  1022. string withoutExtension = Path.GetFileNameWithoutExtension(file);
  1023. string mmPose = $"{withoutExtension}{twentySpaces}/{file}";
  1024. strListS.Add(mmPose);
  1025. ++this.countS;
  1026. }
  1027. }
  1028. string[] list = GameUty.FileSystem.GetList("motion", AFileSystemBase.ListType.AllFile);
  1029. List<string> stringList6 = new List<string>();
  1030. foreach (string path2 in list)
  1031. {
  1032. string withoutExtension = Path.GetFileNameWithoutExtension(path2);
  1033. string directoryName = Path.GetDirectoryName(path2);
  1034. if (!withoutExtension.StartsWith("maid_motion_") && !withoutExtension.StartsWith("work_00")
  1035. #region huge if condition
  1036. && !withoutExtension.EndsWith("_3_") && !withoutExtension.EndsWith("_5_")
  1037. && !withoutExtension.StartsWith("ck_")
  1038. && !withoutExtension.StartsWith("vr_")
  1039. && !withoutExtension.StartsWith("dance_mc")
  1040. && !withoutExtension.Contains("a01_") && !withoutExtension.StartsWith("j_")
  1041. && !withoutExtension.StartsWith("k_") && !withoutExtension.StartsWith("t_")
  1042. && !withoutExtension.StartsWith("cbl_")
  1043. && !withoutExtension.Contains("b01_") && !withoutExtension.Contains("b02_")
  1044. && !withoutExtension.Contains("_kubi_")
  1045. && !withoutExtension.EndsWith("_m2") && !withoutExtension.EndsWith("_m3")
  1046. && !withoutExtension.Contains("_m2_once")
  1047. && !withoutExtension.Contains("_m3_once")
  1048. && !withoutExtension.StartsWith("h_")
  1049. && !withoutExtension.StartsWith("event_")
  1050. && !withoutExtension.StartsWith("man_") && !withoutExtension.EndsWith("_m")
  1051. && !withoutExtension.Contains("_m_") && !withoutExtension.Contains("_man")
  1052. && !(withoutExtension == "dance_cm3d2_001_zoukin")
  1053. && !(withoutExtension == "dance_cm3d2_001_mop")
  1054. && !(withoutExtension == "maid_motion")
  1055. && !(withoutExtension == "aruki_1_idougo_f")
  1056. && !(withoutExtension == "sleep2") && !(withoutExtension == "stand_akire2")
  1057. && !(withoutExtension == "ero_scene_001")
  1058. && !(withoutExtension == "ero_scenefm_001")
  1059. && !(withoutExtension == "training_001")
  1060. && !(withoutExtension == "workff_001")
  1061. && !(withoutExtension == "workfm_001")
  1062. && !(withoutExtension == "dance_cm3d21_005_moe_mset")
  1063. && !(withoutExtension == "hinpyoukai_001"))
  1064. #endregion
  1065. {
  1066. if (!directoryName.Contains("\\sex\\"))
  1067. {
  1068. if (!withoutExtension.StartsWith("sex_") && !withoutExtension.StartsWith("dance_test"))
  1069. {
  1070. if (!strListS.Exists(mmPose => withoutExtension == mmPose.Split('/')[0].Replace(twentySpaces, "")))
  1071. {
  1072. stringList6.Add(withoutExtension);
  1073. }
  1074. }
  1075. }
  1076. else if (!withoutExtension.StartsWith("pose_"))
  1077. {
  1078. strListE.Add(withoutExtension);
  1079. }
  1080. }
  1081. }
  1082. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("edit_")));
  1083. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("pose_")));
  1084. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && !str.StartsWith("edit_") && !str.StartsWith("pose_")));
  1085. strListE2.AddRange(strListE.Where(str => !poseSet.Contains(str)));
  1086. stringList4.AddRange(strList2);
  1087. stringList4.AddRange(strListE2);
  1088. // What is this for?
  1089. existPose = false;
  1090. poseIniStr = "";
  1091. foreach (IniKey key in Preferences["pose"].Keys)
  1092. {
  1093. IniKey iniKey = Preferences["pose"][key.Key];
  1094. if (!string.IsNullOrEmpty(iniKey.Value) && iniKey.Value != "del")
  1095. {
  1096. stringList4.Add(key.Key);
  1097. existPose = true;
  1098. if (poseIniStr == "")
  1099. {
  1100. poseIniStr = key.Key;
  1101. }
  1102. }
  1103. }
  1104. stringList4.AddRange(strListS);
  1105. poseArray = stringList4.ToArray();
  1106. List<string> stringList7 = new List<string>(50 + poseGroupArray2.Length);
  1107. stringList7.AddRange(poseGroupArray2);
  1108. stringList7.AddRange(poseGroupArrayVP);
  1109. stringList7.AddRange(poseGroupArrayFB);
  1110. stringList7.AddRange(poseGroupArray3);
  1111. stringList7.Add(poseArray5[0]);
  1112. stringList7.Add(poseArray6[0]);
  1113. stringList7.Add(strList2[0]);
  1114. stringList7.Add(strListE2[0]);
  1115. if (strListS.Count > 0 && poseIniStr == "")
  1116. {
  1117. stringList7.Add(strListS[0]);
  1118. existPose = true;
  1119. }
  1120. if (poseIniStr != "")
  1121. {
  1122. stringList7.Add(poseIniStr);
  1123. }
  1124. poseGroupArray = stringList7.ToArray();
  1125. groupList = new ArrayList();
  1126. for (int i = 0; i < poseArray.Length; i++)
  1127. {
  1128. foreach (string poseGroup in poseGroupArray)
  1129. {
  1130. if (poseGroup == poseArray[i])
  1131. {
  1132. groupList.Add(i);
  1133. if (poseGroup == strList2[0])
  1134. {
  1135. sPoseCount = i;
  1136. }
  1137. }
  1138. }
  1139. }
  1140. List<string> bgList = new List<string>(50 + poseArray2.Length);
  1141. PhotoBGData.Create();
  1142. bgDict = new Dictionary<string, string>();
  1143. List<PhotoBGData> photList = PhotoBGData.data;
  1144. IEnumerable<string> neiList = photList.Select(bgdata => bgdata.create_prefab_name).Where(name => !string.IsNullOrEmpty(name));
  1145. foreach (PhotoBGData bgdata in photList)
  1146. {
  1147. if (!string.IsNullOrEmpty(bgdata.create_prefab_name))
  1148. {
  1149. bgDict[bgdata.create_prefab_name] = bgdata.name;
  1150. }
  1151. }
  1152. bgUiNames.ToList().ForEach(x => bgDict[x.Key] = x.Value);
  1153. bgList.AddRange(neiList);
  1154. List<string> myRoomBgList = new List<string>();
  1155. Dictionary<string, string> saveDataDic = CreativeRoomManager.GetSaveDataDic();
  1156. if (saveDataDic != null)
  1157. {
  1158. foreach (KeyValuePair<string, string> keyValuePair in saveDataDic)
  1159. {
  1160. myRoomBgList.Add(keyValuePair.Key);
  1161. bgDict[keyValuePair.Key] = keyValuePair.Value;
  1162. }
  1163. }
  1164. bgList.AddRange(myRoomBgList);
  1165. if (isCM3D2)
  1166. {
  1167. if (GameUty.FileSystemOld.IsExistentFile("phot_bg_list.nei"))
  1168. {
  1169. List<string> cm3d2BgList = new List<string>(50);
  1170. using (AFileBase file = GameUty.FileSystemOld.FileOpen("phot_bg_list.nei"))
  1171. {
  1172. using (CsvParser csvParser = new CsvParser())
  1173. {
  1174. csvParser.Open(file);
  1175. for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
  1176. {
  1177. if (csvParser.IsCellToExistData(3, cell_y))
  1178. {
  1179. string data = csvParser.GetCellAsString(3, cell_y);
  1180. cm3d2BgList.Add(data);
  1181. // ew
  1182. if (data == "Yashiki") cm3d2BgList.Add("Yashiki_Pillow");
  1183. }
  1184. }
  1185. }
  1186. }
  1187. bgList.AddRange(cm3d2BgList);
  1188. }
  1189. }
  1190. bgArray = bgList.ToArray();
  1191. bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  1192. List<string> bgmList = new List<string>(50) { "bgm008" };
  1193. for (int i = 1; i < 33; i++)
  1194. {
  1195. if (i == 8) continue;
  1196. string bgm = $"bgm{i:000}";
  1197. if (GameUty.FileSystem.IsExistentFile($"{bgm}.ogg"))
  1198. {
  1199. bgmList.Add(bgm);
  1200. }
  1201. }
  1202. bgmList.AddRange(new string[]
  1203. {
  1204. "bloomingdreaming_short", "canknowtwoclose_short", "dokidokifallinlove_short",
  1205. "dokidokifallinlove_short_inst", "entrancetoyou_short", "happyhappyscandal_short_nao_kara",
  1206. "kiminiaijodelicious_short", "luminousmoment_short", "melodyofempire_short",
  1207. "nightmagicfire_short", "rhythmixtoyou", "scarlet leap_short",
  1208. "stellarmytears_short_misato_kara", "stellarmytears_short_nao_kara", "stellarmytears_short_sasaki_kara",
  1209. });
  1210. bgmArray = bgmList.ToArray();
  1211. List<string> stringList12 = new List<string>(50 + parArray2.Length);
  1212. stringList12.AddRange(parArray2);
  1213. HashSet<int> enabled_id_list = new HashSet<int>();
  1214. Action<string> action3 = file_name =>
  1215. {
  1216. if (GameUty.FileSystem.IsExistentFile(file_name))
  1217. {
  1218. using (AFileBase file = GameUty.FileSystem.FileOpen(file_name))
  1219. {
  1220. using (CsvParser csvParser = new CsvParser())
  1221. {
  1222. csvParser.Open(file);
  1223. for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
  1224. {
  1225. if (csvParser.IsCellToExistData(0, cell_y))
  1226. {
  1227. int cellAsInteger = csvParser.GetCellAsInteger(0, cell_y);
  1228. if (!enabled_id_list.Contains(cellAsInteger))
  1229. {
  1230. enabled_id_list.Add(cellAsInteger);
  1231. }
  1232. }
  1233. }
  1234. }
  1235. }
  1236. }
  1237. };
  1238. action3("desk_item_enabled_id.nei");
  1239. foreach (string path in GameUty.PathList)
  1240. {
  1241. action3($"desk_item_enabled_id_{path}.nei");
  1242. }
  1243. using (AFileBase file = GameUty.FileSystem.FileOpen("desk_item_detail.nei"))
  1244. {
  1245. using (CsvParser csvParser = new CsvParser())
  1246. {
  1247. csvParser.Open(file);
  1248. for (int index = 1; index < csvParser.max_cell_y; ++index)
  1249. {
  1250. if (csvParser.IsCellToExistData(0, index))
  1251. {
  1252. int cellAsInteger = csvParser.GetCellAsInteger(0, index);
  1253. if (enabled_id_list.Contains(cellAsInteger))
  1254. {
  1255. ItemData2 itemData2 = new ItemData2(csvParser, index);
  1256. if (itemData2.asset_name != "")
  1257. {
  1258. stringList12.Add($"{itemData2.name}{twentySpaces}#{itemData2.asset_name}");
  1259. }
  1260. }
  1261. }
  1262. }
  1263. }
  1264. }
  1265. stringList12.AddRange(parArray3);
  1266. parArray = stringList12.ToArray();
  1267. List<string> stringList13 = new List<string>(50 + doguBArray.Length);
  1268. PhotoBGObjectData.Create();
  1269. doguDict = new Dictionary<string, PhotoBGObjectData>();
  1270. IEnumerable<PhotoBGObjectData> filteredList = PhotoBGObjectData.data.Where(prpdata => prpdata.category != "パーティクル");
  1271. foreach (PhotoBGObjectData bgObj in filteredList)
  1272. {
  1273. string tmp = null;
  1274. if (!string.IsNullOrEmpty(bgObj.create_prefab_name))
  1275. {
  1276. doguDict[bgObj.create_prefab_name] = bgObj;
  1277. tmp = bgObj.create_prefab_name;
  1278. }
  1279. else if (!string.IsNullOrEmpty(bgObj.create_asset_bundle_name))
  1280. {
  1281. doguDict[bgObj.create_asset_bundle_name] = bgObj;
  1282. tmp = bgObj.create_asset_bundle_name;
  1283. }
  1284. else if (!string.IsNullOrEmpty(bgObj.direct_file))
  1285. {
  1286. doguDict[bgObj.direct_file] = bgObj;
  1287. tmp = bgObj.direct_file;
  1288. }
  1289. if (!string.IsNullOrEmpty(tmp))
  1290. {
  1291. doguUiNames[tmp] = bgObj.name;
  1292. }
  1293. }
  1294. IEnumerable<string> propList1 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_prefab_name))
  1295. .Select(prpdata => prpdata.create_prefab_name);
  1296. IEnumerable<string> propList2 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_asset_bundle_name))
  1297. .Select(prpdata => prpdata.create_asset_bundle_name);
  1298. List<string> propList = propList1.ToList();
  1299. propList.AddRange(propList2.ToList());
  1300. stringList13.AddRange(propList);
  1301. stringList13.AddRange(doguBArray);
  1302. if (isCM3D2)
  1303. {
  1304. if (isVA)
  1305. {
  1306. stringList13.AddRange(doguB2Array);
  1307. }
  1308. if (isKA)
  1309. {
  1310. stringList13.AddRange(doguB3Array);
  1311. }
  1312. if (isKA2)
  1313. {
  1314. stringList13.AddRange(doguB4Array);
  1315. }
  1316. }
  1317. doguBArray = stringList13.ToArray();
  1318. List<string> stringList14 = new List<string>(100 + itemBArray.Length);
  1319. stringList14.AddRange(itemBArray);
  1320. if (isCM3D2)
  1321. {
  1322. if (isVA)
  1323. {
  1324. stringList14.AddRange(itemB2Array);
  1325. }
  1326. if (isKA)
  1327. {
  1328. stringList14.AddRange(itemB3Array);
  1329. }
  1330. if (isKA2)
  1331. {
  1332. stringList14.AddRange(itemB4Array);
  1333. }
  1334. }
  1335. itemBArray = stringList14.ToArray();
  1336. }
  1337. }
  1338. }