MultipleMaids.Init.cs 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438
  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. SetFieldValue8<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. SetFieldValue2<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. sortList.Clear();
  422. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  423. poseScrollPos = new Vector2(0.0f, 0.0f);
  424. faceScrollPos = new Vector2(0.0f, 0.0f);
  425. bgScrollPos = new Vector2(0.0f, 0.0f);
  426. saveSceneScrollPos = new Vector2(0.0f, 0.0f);
  427. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  428. Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  429. component.mode = Vignetting.AberrationMode.Simple;
  430. component.intensity = -3.98f;
  431. component.chromaticAberration = -0.75f;
  432. component.axialAberration = 1.18f;
  433. component.blurSpread = 4.19f;
  434. component.luminanceDependency = 0.494f;
  435. component.blurDistance = 1.71f;
  436. component.enabled = false;
  437. doguIndex.Clear();
  438. doguSelectIndex = 0;
  439. for (int index = 0; index < doguObject.Count; ++index)
  440. {
  441. if (doguObject[index] != null)
  442. {
  443. GraphicsUtils.Destroy(doguObject[index]);
  444. doguObject[index] = null;
  445. }
  446. }
  447. doguObject.Clear();
  448. }
  449. public void init()
  450. {
  451. isInit = true;
  452. isVR = GameMain.Instance.VRMode;
  453. for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1)
  454. {
  455. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1];
  456. if (goSlot[index1] != null)
  457. {
  458. stockMaid.body0.goSlot = new List<TBodySkin>(goSlot[index1]);
  459. for (int index2 = 0; index2 < bodyHit[index1].Count; ++index2)
  460. {
  461. stockMaid.body0.goSlot[index2].bonehair.bodyhit = bodyHit[index1][index2];
  462. }
  463. if (!GameMain.Instance.VRMode)
  464. {
  465. stockMaid.body0.quaDefEyeL.eulerAngles = eyeL[index1];
  466. stockMaid.body0.quaDefEyeR.eulerAngles = eyeR[index1];
  467. }
  468. shodaiFlg[index1] = false;
  469. }
  470. if (SkirtListArray[index1] != null)
  471. {
  472. for (int index2 = 0; index2 < stockMaid.body0.goSlot.Count; ++index2)
  473. {
  474. SetFieldValue8<BoneHair3, DynamicSkirtBone>(stockMaid.body0.goSlot[index2].bonehair3,
  475. "m_SkirtBone",
  476. SkirtListArray[index1][index2]);
  477. }
  478. }
  479. }
  480. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  481. {
  482. if (maidArray[index1])
  483. {
  484. maidArray[index1].StopKuchipakuPattern();
  485. }
  486. if (maidArray[index1])
  487. {
  488. maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  489. }
  490. if (maidArray[index1] && maidArray[index1].Visible && maidArray[index1].body0.isLoadedBody)
  491. {
  492. maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  493. maidArray[index1].SetAutoTwistAll(true);
  494. maidArray[index1].body0.MuneYureL(1f);
  495. maidArray[index1].body0.MuneYureR(1f);
  496. maidArray[index1].body0.jbMuneL.enabled = true;
  497. maidArray[index1].body0.jbMuneR.enabled = true;
  498. }
  499. if (maidArray[index1])
  500. {
  501. maidArray[index1].body0.SetMask(TBody.SlotID.wear, true);
  502. maidArray[index1].body0.SetMask(TBody.SlotID.skirt, true);
  503. maidArray[index1].body0.SetMask(TBody.SlotID.bra, true);
  504. maidArray[index1].body0.SetMask(TBody.SlotID.panz, true);
  505. maidArray[index1].body0.SetMask(TBody.SlotID.mizugi, true);
  506. maidArray[index1].body0.SetMask(TBody.SlotID.onepiece, true);
  507. if (maidArray[index1].body0.isLoadedBody)
  508. {
  509. Maid maid = maidArray[index1];
  510. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  511. {
  512. List<THair1> fieldValue = GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[index2].bonehair, "hair1list");
  513. for (int index3 = 0; index3 < fieldValue.Count; ++index3)
  514. {
  515. fieldValue[index3].SoftG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  516. }
  517. }
  518. }
  519. }
  520. maidArray[index1] = null;
  521. }
  522. goSlot = new List<TBodySkin>[maxMaidCnt * 2];
  523. bodyHit = new List<TBodyHit>[maxMaidCnt * 2];
  524. allowUpdate = true;
  525. if (okFlg)
  526. {
  527. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  528. for (int index = 0; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  529. {
  530. if (sceneLevel != 5 || index != editMaid)
  531. {
  532. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  533. stockMaid.transform.localScale = new Vector3(1f, 1f, 1f);
  534. TBody.MaskMode f_eMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), "None");
  535. stockMaid.body0.SetMaskMode(f_eMode);
  536. stockMaid.boMabataki = true;
  537. }
  538. }
  539. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  540. for (int index = 11; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  541. {
  542. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  543. Vector3 zero = Vector3.zero;
  544. stockMaid.SetPos(zero);
  545. stockMaid.SetRot(zero);
  546. stockMaid.SetPosOffset(zero);
  547. if (stockMaid.body0 != null)
  548. {
  549. stockMaid.body0.SetBoneHitHeightY(0.0f);
  550. }
  551. stockMaid.Visible = false;
  552. stockMaid.ActiveSlotNo = -1;
  553. stockMaid.DelPrefabAll();
  554. if (stockMaid.body0.isLoadedBody)
  555. {
  556. stockMaid.CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  557. stockMaid.SetAutoTwistAll(true);
  558. }
  559. stockMaid.boMabataki = true;
  560. }
  561. }
  562. okFlg = false;
  563. isDance = false;
  564. isDanceChu = false;
  565. isSavePose = false;
  566. // bgIndex = 0;
  567. // bgIndexB = 0;
  568. bg.localScale = new Vector3(1f, 1f, 1f);
  569. softG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  570. softG2 = new Vector3(0.0f, -0.005f, 0.0f);
  571. if (!GameMain.Instance.VRMode)
  572. {
  573. Bloom fieldValue = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  574. fieldValue.enabled = true;
  575. fieldValue.bloomIntensity = 2.85f;
  576. fieldValue.hdr = Bloom.HDRBloomMode.Auto;
  577. fieldValue.bloomThreshholdColor = new Color(1f, 1f, 1f);
  578. fieldValue.bloomBlurIterations = 3;
  579. }
  580. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0.0f, 0.0f, 0.0f);
  581. maidCnt = 0;
  582. wearIndex = 0;
  583. isF6 = false;
  584. faceFlg = false;
  585. faceFlg2 = false;
  586. sceneFlg = false;
  587. poseFlg = false;
  588. kankyoFlg = false;
  589. kankyo2Flg = false;
  590. unLockFlg = false;
  591. inName = "";
  592. inName2 = "";
  593. inName3 = "";
  594. inText = "";
  595. fontSize = 25;
  596. bGuiMessage = false;
  597. isMessage = false;
  598. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  599. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  600. new MessageClass(gameObject, messageWindowMgr).Clear();
  601. messageWindowMgr.CloseMessageWindowPanel();
  602. SetFieldValue2<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>(),
  603. "mFontSize",
  604. fontSize);
  605. ikMaid = 0;
  606. ikBui = 0;
  607. isNamida = false;
  608. isNamidaH = false;
  609. isSekimenH = false;
  610. isHohoH = false;
  611. isTear1 = false;
  612. isTear2 = false;
  613. isTear3 = false;
  614. isShock = false;
  615. isYodare = false;
  616. isHoho = false;
  617. isHoho2 = false;
  618. isHohos = false;
  619. isHohol = false;
  620. isToothoff = false;
  621. isNosefook = false;
  622. isFaceInit = false;
  623. isPoseInit = false;
  624. isWear = true;
  625. isSkirt = true;
  626. isMekure1 = false;
  627. isMekure2 = false;
  628. isZurasi = false;
  629. isBra = true;
  630. isPanz = true;
  631. isHeadset = true;
  632. isAccUde = true;
  633. isStkg = true;
  634. isShoes = true;
  635. isGlove = true;
  636. isMegane = true;
  637. isAccSenaka = true;
  638. isMaid = true;
  639. isPanel = true;
  640. isBloom = false;
  641. isBloomA = false;
  642. isBlur = false;
  643. isBlur2 = false;
  644. bloom1 = 2.85f;
  645. bloom2 = 3f;
  646. bloom3 = 0.0f;
  647. bloom4 = 0.0f;
  648. bloom5 = 0.0f;
  649. blur1 = -3.98f;
  650. blur4 = -0.75f;
  651. blur2 = 0.9f;
  652. blur3 = 4.19f;
  653. bokashi = 0.0f;
  654. kamiyure = 0.0f;
  655. isDepth = false;
  656. isDepthA = false;
  657. depth1 = 3f;
  658. depth2 = 0.1f;
  659. depth3 = 15f;
  660. depth4 = 2.5f;
  661. isFog = false;
  662. fog1 = 4f;
  663. fog2 = 1f;
  664. fog3 = 1f;
  665. fog4 = 0.0f;
  666. fog5 = 1f;
  667. fog6 = 1f;
  668. fog7 = 1f;
  669. isSepia = false;
  670. isSepian = false;
  671. isBloomS = true;
  672. isDepthS = false;
  673. isBlurS = false;
  674. isFogS = false;
  675. isHairSetting = true;
  676. isSkirtSetting = false;
  677. if (depth_field_ != null)
  678. {
  679. depth_field_.enabled = false;
  680. }
  681. if (fog_ != null)
  682. {
  683. fog_.enabled = false;
  684. }
  685. if (sepia_tone_ != null)
  686. {
  687. sepia_tone_.enabled = false;
  688. }
  689. isCube = false;
  690. isCube2 = true;
  691. isCube3 = false;
  692. isCube4 = true;
  693. isCubeS = false;
  694. cubeSize = 0.12f;
  695. isPoseEdit = false;
  696. isFaceEdit = false;
  697. bgmIndex = 0;
  698. if (sceneLevel == 5)
  699. {
  700. bgmIndex = 2;
  701. }
  702. effectIndex = 0;
  703. selectMaidIndex = 0;
  704. copyIndex = 0;
  705. selectLightIndex = 0;
  706. doguBIndex = 0;
  707. parIndex = 0;
  708. isEditNo = 0;
  709. editSelectMaid = null;
  710. for (int index = 0; index < 10; ++index)
  711. {
  712. date[index] = "";
  713. ninzu[index] = "";
  714. }
  715. isDanceStart1F = false;
  716. isDanceStart1K = false;
  717. isDanceStart2F = false;
  718. isDanceStart3F = false;
  719. isDanceStart3K = false;
  720. isDanceStart4F = false;
  721. isDanceStart4K = false;
  722. isDanceStart5F = false;
  723. isDanceStart5K = false;
  724. isDanceStart6F = false;
  725. isDanceStart6K = false;
  726. isDanceStart7F = false;
  727. isDanceStart7V = false;
  728. isDanceStart8F = false;
  729. isDanceStart8V = false;
  730. isDanceStart8P = false;
  731. isDanceStart9F = false;
  732. isDanceStart9K = false;
  733. isDanceStart10F = false;
  734. isDanceStart11F = false;
  735. isDanceStart11V = false;
  736. isDanceStart12F = false;
  737. isDanceStart13F = false;
  738. isDanceStart13K = false;
  739. isDanceStart14F = false;
  740. isDanceStart14V = false;
  741. isDanceStart15F = false;
  742. isDanceStart15V = false;
  743. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  744. {
  745. danceFace[index1] = 0.0f;
  746. FaceName[index1] = "";
  747. FaceName2[index1] = "";
  748. FaceName3[index1] = "";
  749. isStop[index1] = false;
  750. isBone[index1] = false;
  751. isBoneN[index1] = false;
  752. poseIndex[index1] = 0;
  753. itemIndex[index1] = 0;
  754. itemIndex2[index1] = 0;
  755. faceIndex[index1] = 0;
  756. faceBlendIndex[index1] = 0;
  757. headEyeIndex[index1] = 0;
  758. isLock[index1] = false;
  759. isFace[index1] = true;
  760. mekure1[index1] = false;
  761. mekure2[index1] = false;
  762. zurasi[index1] = false;
  763. mekure1n[index1] = false;
  764. mekure2n[index1] = false;
  765. zurasin[index1] = false;
  766. isLook[index1] = false;
  767. isLookn[index1] = false;
  768. lookX[index1] = 0.0f;
  769. lookY[index1] = -0.0f;
  770. lookXn[index1] = 0.0f;
  771. lookYn[index1] = -0.0f;
  772. voice1[index1] = false;
  773. voice2[index1] = false;
  774. voice1n[index1] = false;
  775. voice2n[index1] = false;
  776. hanten[index1] = false;
  777. hantenn[index1] = false;
  778. kotei[index1] = false;
  779. xFlg[index1] = false;
  780. zFlg[index1] = false;
  781. ikMode[index1] = 0;
  782. GraphicsUtils.Destroy(gMaid[index1]);
  783. GraphicsUtils.Destroy(gMaidC[index1]);
  784. GraphicsUtils.Destroy(gHandL[index1]);
  785. GraphicsUtils.Destroy(gArmL[index1]);
  786. GraphicsUtils.Destroy(gHandR[index1]);
  787. GraphicsUtils.Destroy(gArmR[index1]);
  788. GraphicsUtils.Destroy(gFootL[index1]);
  789. GraphicsUtils.Destroy(gHizaL[index1]);
  790. GraphicsUtils.Destroy(gFootR[index1]);
  791. GraphicsUtils.Destroy(gHizaR[index1]);
  792. GraphicsUtils.Destroy(gClavicleL[index1]);
  793. GraphicsUtils.Destroy(gClavicleR[index1]);
  794. GraphicsUtils.Destroy(gNeck[index1]);
  795. GraphicsUtils.Destroy(gSpine[index1]);
  796. GraphicsUtils.Destroy(gSpine0a[index1]);
  797. GraphicsUtils.Destroy(gSpine1a[index1]);
  798. GraphicsUtils.Destroy(gSpine1[index1]);
  799. GraphicsUtils.Destroy(gPelvis[index1]);
  800. GraphicsUtils.Destroy(gizmoHandL[index1]);
  801. GraphicsUtils.Destroy(gizmoHandR[index1]);
  802. GraphicsUtils.Destroy(gizmoFootL[index1]);
  803. GraphicsUtils.Destroy(gizmoFootR[index1]);
  804. GraphicsUtils.Destroy(gizmoNeck[index1]);
  805. GraphicsUtils.Destroy(gizmoPelvis[index1]);
  806. HandL1[index1] = null;
  807. for (int index2 = 0; index2 < 30; ++index2)
  808. {
  809. GraphicsUtils.Destroy(gFinger[index1, index2]);
  810. }
  811. for (int index2 = 0; index2 < 12; ++index2)
  812. {
  813. GraphicsUtils.Destroy(gFinger2[index1, index2]);
  814. }
  815. isIK[index1] = isIKAll;
  816. pHandL[index1] = 0;
  817. pHandR[index1] = 0;
  818. muneIKL[index1] = false;
  819. muneIKR[index1] = false;
  820. }
  821. if (kami)
  822. {
  823. kami.SetActive(false);
  824. }
  825. danceCheckIndex = 0;
  826. for (int index = 0; index < danceCheck.Length; ++index)
  827. {
  828. danceCheck[danceCheckIndex] = 1f;
  829. }
  830. lightIndex = new List<int>
  831. {
  832. 0
  833. };
  834. lightColorR = new List<float>
  835. {
  836. 1f
  837. };
  838. lightColorG = new List<float>
  839. {
  840. 1f
  841. };
  842. lightColorB = new List<float>
  843. {
  844. 1f
  845. };
  846. lightX = new List<float>
  847. {
  848. 40f
  849. };
  850. lightY = new List<float>
  851. {
  852. 180f
  853. };
  854. lightAkarusa = new List<float>
  855. {
  856. 0.95f
  857. };
  858. lightKage = new List<float>
  859. {
  860. 0.098f
  861. };
  862. lightRange = new List<float>
  863. {
  864. 50f
  865. };
  866. isIdx1 = false;
  867. isIdx2 = false;
  868. isIdx3 = false;
  869. isIdx4 = false;
  870. GraphicsUtils.Destroy(cameraObj);
  871. GraphicsUtils.Destroy(subcamera);
  872. bgObject.SetActive(true);
  873. GameMain.Instance.MainLight.Reset();
  874. GameMain.Instance.MainLight.SetIntensity(0.95f);
  875. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 30f;
  876. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  877. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  878. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f);
  879. if (!GameMain.Instance.VRMode)
  880. {
  881. m_material = new Material(Shader.Find("Transparent/Diffuse"))
  882. {
  883. color = new Color(0.4f, 0.4f, 1f, 0.8f)
  884. };
  885. m_UOCamera = GetFieldValue<CameraMain, UltimateOrbitCamera>(mainCamera, "m_UOCamera");
  886. if (sceneLevel == 3)
  887. {
  888. m_UOCamera.enabled = true;
  889. }
  890. }
  891. for (int index = 0; index < doguBObject.Count; ++index)
  892. {
  893. GraphicsUtils.Destroy(doguBObject[index]);
  894. }
  895. doguBObject.Clear();
  896. doguBIndex = 0;
  897. parIndex = 0;
  898. doguCombo.selectedItemIndex = 0;
  899. parCombo.selectedItemIndex = 0;
  900. for (int index = 1; index < lightList.Count; ++index)
  901. {
  902. GraphicsUtils.Destroy(lightList[index]);
  903. }
  904. lightList = new List<GameObject>
  905. {
  906. GameMain.Instance.MainLight.gameObject
  907. };
  908. lightComboList = new GUIContent[lightList.Count];
  909. lightComboList[0] = new GUIContent("メイン");
  910. lightCombo.selectedItemIndex = 0;
  911. selectLightIndex = 0;
  912. kankyoCombo.selectedItemIndex = 0;
  913. itemCombo2.selectedItemIndex = 0;
  914. slotCombo.selectedItemIndex = 0;
  915. sortList.Clear();
  916. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  917. poseScrollPos = new Vector2(0.0f, 0.0f);
  918. faceScrollPos = new Vector2(0.0f, 0.0f);
  919. bgScrollPos = new Vector2(0.0f, 0.0f);
  920. saveSceneScrollPos = new Vector2(0.0f, 0.0f);
  921. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  922. if (!GameMain.Instance.VRMode)
  923. {
  924. Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  925. component.mode = Vignetting.AberrationMode.Simple;
  926. component.intensity = -3.98f;
  927. component.chromaticAberration = -0.75f;
  928. component.axialAberration = 1.18f;
  929. component.blurSpread = 4.19f;
  930. component.luminanceDependency = 0.494f;
  931. component.blurDistance = 1.71f;
  932. component.enabled = false;
  933. }
  934. doguIndex.Clear();
  935. doguSelectIndex = 0;
  936. for (int index = 0; index < doguObject.Count; ++index)
  937. {
  938. if (doguObject[index] != null)
  939. {
  940. GraphicsUtils.Destroy(doguObject[index]);
  941. doguObject[index] = null;
  942. }
  943. }
  944. doguObject.Clear();
  945. string mmPosePath = Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose";
  946. if (!File.Exists(mmPosePath))
  947. {
  948. Directory.CreateDirectory(mmPosePath);
  949. }
  950. int countS = this.countS;
  951. this.countS = Directory.GetFiles(mmPosePath).Where(f => Path.GetExtension(f) == ".anm").Count();
  952. if (this.countS != countS)
  953. {
  954. poseArray = null;
  955. }
  956. if (poseArray != null)
  957. {
  958. return;
  959. }
  960. if (GameMain.Instance.BgMgr.CreateAssetBundle("rotenburo") != null)
  961. {
  962. isVA = true;
  963. }
  964. if (GameMain.Instance.BgMgr.CreateAssetBundle("karaokeroom") != null)
  965. {
  966. isKA = true;
  967. }
  968. if (GameUty.IsEnabledCompatibilityMode)
  969. {
  970. isCM3D2 = true;
  971. }
  972. List<string> stringList4 = new List<string>(350 + poseArray2.Length);
  973. stringList4.AddRange(poseArray2);
  974. List<string> stringList5 = new List<string>();
  975. // Seems to only produce 'edit_pose_027'
  976. for (int poseIndex = 11; poseIndex < 100; poseIndex++)
  977. {
  978. string pose = $"edit_pose_{poseIndex:000}_f";
  979. if (GameUty.FileSystem.IsExistentFile($"{pose}.anm"))
  980. {
  981. stringList5.Add(pose);
  982. }
  983. }
  984. // Update when denkigai 2025 releases
  985. for (int year = 17; year < 25; year++)
  986. {
  987. foreach (char sw in "sw")
  988. {
  989. for (int poseIndex = 1; poseIndex < 10; poseIndex++)
  990. {
  991. string pose = $"edit_pose_dg{year}{sw}_{poseIndex:000}_f";
  992. if (GameUty.FileSystem.IsExistentFile($"{pose}.anm"))
  993. {
  994. stringList5.Add(pose);
  995. }
  996. }
  997. }
  998. }
  999. if (stringList5.Count > 0)
  1000. {
  1001. stringList4.AddRange(stringList5);
  1002. }
  1003. stringList4.AddRange(poseArrayVP2);
  1004. stringList4.AddRange(poseArrayFB);
  1005. stringList4.AddRange(poseArray4);
  1006. stringList4.AddRange(poseArray5);
  1007. stringList4.AddRange(poseArray6);
  1008. strList2 = new List<string>();
  1009. strListE = new List<string>();
  1010. strListE2 = new List<string>();
  1011. strListS = new List<string>();
  1012. HashSet<string> poseSet = new HashSet<string>(stringList4);
  1013. strS = "";
  1014. this.countS = 0;
  1015. foreach (string file in Directory.GetFiles(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose"))
  1016. {
  1017. if (Path.GetExtension(file) == ".anm")
  1018. {
  1019. string withoutExtension = Path.GetFileNameWithoutExtension(file);
  1020. string mmPose = $"{withoutExtension}{twentySpaces}/{file}";
  1021. strListS.Add(mmPose);
  1022. ++this.countS;
  1023. }
  1024. }
  1025. string[] list = GameUty.FileSystem.GetList("motion", AFileSystemBase.ListType.AllFile);
  1026. List<string> stringList6 = new List<string>();
  1027. foreach (string path2 in list)
  1028. {
  1029. string withoutExtension = Path.GetFileNameWithoutExtension(path2);
  1030. string directoryName = Path.GetDirectoryName(path2);
  1031. if (!withoutExtension.StartsWith("maid_motion_") && !withoutExtension.StartsWith("work_00")
  1032. #region huge if condition
  1033. && !withoutExtension.EndsWith("_3_") && !withoutExtension.EndsWith("_5_")
  1034. && !withoutExtension.StartsWith("ck_")
  1035. && !withoutExtension.StartsWith("vr_")
  1036. && !withoutExtension.StartsWith("dance_mc")
  1037. && !withoutExtension.Contains("a01_") && !withoutExtension.StartsWith("j_")
  1038. && !withoutExtension.StartsWith("k_") && !withoutExtension.StartsWith("t_")
  1039. && !withoutExtension.StartsWith("cbl_")
  1040. && !withoutExtension.Contains("b01_") && !withoutExtension.Contains("b02_")
  1041. && !withoutExtension.Contains("_kubi_")
  1042. && !withoutExtension.EndsWith("_m2") && !withoutExtension.EndsWith("_m3")
  1043. && !withoutExtension.Contains("_m2_once")
  1044. && !withoutExtension.Contains("_m3_once")
  1045. && !withoutExtension.StartsWith("h_")
  1046. && !withoutExtension.StartsWith("event_")
  1047. && !withoutExtension.StartsWith("man_") && !withoutExtension.EndsWith("_m")
  1048. && !withoutExtension.Contains("_m_") && !withoutExtension.Contains("_man")
  1049. && !(withoutExtension == "dance_cm3d2_001_zoukin")
  1050. && !(withoutExtension == "dance_cm3d2_001_mop")
  1051. && !(withoutExtension == "maid_motion")
  1052. && !(withoutExtension == "aruki_1_idougo_f")
  1053. && !(withoutExtension == "sleep2") && !(withoutExtension == "stand_akire2")
  1054. && !(withoutExtension == "ero_scene_001")
  1055. && !(withoutExtension == "ero_scenefm_001")
  1056. && !(withoutExtension == "training_001")
  1057. && !(withoutExtension == "workff_001")
  1058. && !(withoutExtension == "workfm_001")
  1059. && !(withoutExtension == "dance_cm3d21_005_moe_mset")
  1060. && !(withoutExtension == "hinpyoukai_001"))
  1061. #endregion
  1062. {
  1063. if (!directoryName.Contains("\\sex\\"))
  1064. {
  1065. if (!withoutExtension.StartsWith("sex_") && !withoutExtension.StartsWith("dance_test"))
  1066. {
  1067. if (!strListS.Exists(mmPose => withoutExtension == mmPose.Split('/')[0].Replace(twentySpaces, "")))
  1068. {
  1069. stringList6.Add(withoutExtension);
  1070. }
  1071. }
  1072. }
  1073. else if (!withoutExtension.StartsWith("pose_"))
  1074. {
  1075. strListE.Add(withoutExtension);
  1076. }
  1077. }
  1078. }
  1079. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("edit_")));
  1080. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("pose_")));
  1081. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && !str.StartsWith("edit_") && !str.StartsWith("pose_")));
  1082. strListE2.AddRange(strListE.Where(str => !poseSet.Contains(str)));
  1083. stringList4.AddRange(strList2);
  1084. stringList4.AddRange(strListE2);
  1085. // What is this for?
  1086. existPose = false;
  1087. poseIniStr = "";
  1088. foreach (IniKey key in Preferences["pose"].Keys)
  1089. {
  1090. IniKey iniKey = Preferences["pose"][key.Key];
  1091. if (!string.IsNullOrEmpty(iniKey.Value) && iniKey.Value != "del")
  1092. {
  1093. stringList4.Add(key.Key);
  1094. existPose = true;
  1095. if (poseIniStr == "")
  1096. {
  1097. poseIniStr = key.Key;
  1098. }
  1099. }
  1100. }
  1101. stringList4.AddRange(strListS);
  1102. poseArray = stringList4.ToArray();
  1103. List<string> stringList7 = new List<string>(50 + poseGroupArray2.Length);
  1104. stringList7.AddRange(poseGroupArray2);
  1105. stringList7.AddRange(poseGroupArrayVP);
  1106. stringList7.AddRange(poseGroupArrayFB);
  1107. stringList7.AddRange(poseGroupArray3);
  1108. stringList7.Add(poseArray5[0]);
  1109. stringList7.Add(poseArray6[0]);
  1110. stringList7.Add(strList2[0]);
  1111. stringList7.Add(strListE2[0]);
  1112. if (strListS.Count > 0 && poseIniStr == "")
  1113. {
  1114. stringList7.Add(strListS[0]);
  1115. existPose = true;
  1116. }
  1117. if (poseIniStr != "")
  1118. {
  1119. stringList7.Add(poseIniStr);
  1120. }
  1121. poseGroupArray = stringList7.ToArray();
  1122. groupList = new ArrayList();
  1123. for (int i = 0; i < poseArray.Length; i++)
  1124. {
  1125. foreach (string poseGroup in poseGroupArray)
  1126. {
  1127. if (poseGroup == poseArray[i])
  1128. {
  1129. groupList.Add(i);
  1130. if (poseGroup == strList2[0])
  1131. {
  1132. sPoseCount = i;
  1133. }
  1134. }
  1135. }
  1136. }
  1137. List<string> bgList = new List<string>(50 + poseArray2.Length);
  1138. PhotoBGData.Create();
  1139. bgDict = new Dictionary<string, string>();
  1140. List<PhotoBGData> photList = PhotoBGData.data;
  1141. IEnumerable<string> neiList = photList.Select(bgdata => bgdata.create_prefab_name).Where(name => !string.IsNullOrEmpty(name));
  1142. foreach (PhotoBGData bgdata in photList)
  1143. {
  1144. if (!string.IsNullOrEmpty(bgdata.create_prefab_name))
  1145. {
  1146. bgDict[bgdata.create_prefab_name] = bgdata.name;
  1147. }
  1148. }
  1149. bgUiNames.ToList().ForEach(x => bgDict[x.Key] = x.Value);
  1150. bgList.AddRange(neiList);
  1151. List<string> myRoomBgList = new List<string>();
  1152. Dictionary<string, string> saveDataDic = CreativeRoomManager.GetSaveDataDic();
  1153. if (saveDataDic != null)
  1154. {
  1155. foreach (KeyValuePair<string, string> keyValuePair in saveDataDic)
  1156. {
  1157. myRoomBgList.Add(keyValuePair.Key);
  1158. bgDict[keyValuePair.Key] = keyValuePair.Value;
  1159. }
  1160. }
  1161. bgList.AddRange(myRoomBgList);
  1162. if (isCM3D2)
  1163. {
  1164. if (GameUty.FileSystemOld.IsExistentFile("phot_bg_list.nei"))
  1165. {
  1166. List<string> cm3d2BgList = new List<string>(50);
  1167. using (AFileBase file = GameUty.FileSystemOld.FileOpen("phot_bg_list.nei"))
  1168. {
  1169. using (CsvParser csvParser = new CsvParser())
  1170. {
  1171. csvParser.Open(file);
  1172. for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
  1173. {
  1174. if (csvParser.IsCellToExistData(3, cell_y))
  1175. {
  1176. string data = csvParser.GetCellAsString(3, cell_y);
  1177. cm3d2BgList.Add(data);
  1178. // ew
  1179. if (data == "Yashiki") cm3d2BgList.Add("Yashiki_Pillow");
  1180. }
  1181. }
  1182. }
  1183. }
  1184. bgList.AddRange(cm3d2BgList);
  1185. }
  1186. }
  1187. bgArray = bgList.ToArray();
  1188. bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  1189. List<string> bgmList = new List<string>(50) { "bgm008" };
  1190. for (int i = 1; i < 33; i++)
  1191. {
  1192. if (i == 8) continue;
  1193. string bgm = $"bgm{i:000}";
  1194. if (GameUty.FileSystem.IsExistentFile($"{bgm}.ogg"))
  1195. {
  1196. bgmList.Add(bgm);
  1197. }
  1198. }
  1199. bgmList.AddRange(new string[]
  1200. {
  1201. "bloomingdreaming_short", "canknowtwoclose_short", "dokidokifallinlove_short",
  1202. "dokidokifallinlove_short_inst", "entrancetoyou_short", "happyhappyscandal_short_nao_kara",
  1203. "kiminiaijodelicious_short", "luminousmoment_short", "melodyofempire_short",
  1204. "nightmagicfire_short", "rhythmixtoyou", "scarlet leap_short",
  1205. "stellarmytears_short_misato_kara", "stellarmytears_short_nao_kara", "stellarmytears_short_sasaki_kara",
  1206. });
  1207. bgmArray = bgmList.ToArray();
  1208. List<string> stringList12 = new List<string>(50 + parArray2.Length);
  1209. stringList12.AddRange(parArray2);
  1210. HashSet<int> enabled_id_list = new HashSet<int>();
  1211. Action<string> action3 = file_name =>
  1212. {
  1213. if (GameUty.FileSystem.IsExistentFile(file_name))
  1214. {
  1215. using (AFileBase file = GameUty.FileSystem.FileOpen(file_name))
  1216. {
  1217. using (CsvParser csvParser = new CsvParser())
  1218. {
  1219. csvParser.Open(file);
  1220. for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
  1221. {
  1222. if (csvParser.IsCellToExistData(0, cell_y))
  1223. {
  1224. int cellAsInteger = csvParser.GetCellAsInteger(0, cell_y);
  1225. if (!enabled_id_list.Contains(cellAsInteger))
  1226. {
  1227. enabled_id_list.Add(cellAsInteger);
  1228. }
  1229. }
  1230. }
  1231. }
  1232. }
  1233. }
  1234. };
  1235. action3("desk_item_enabled_id.nei");
  1236. foreach (string path in GameUty.PathList)
  1237. {
  1238. action3($"desk_item_enabled_id_{path}.nei");
  1239. }
  1240. using (AFileBase file = GameUty.FileSystem.FileOpen("desk_item_detail.nei"))
  1241. {
  1242. using (CsvParser csvParser = new CsvParser())
  1243. {
  1244. csvParser.Open(file);
  1245. for (int index = 1; index < csvParser.max_cell_y; ++index)
  1246. {
  1247. if (csvParser.IsCellToExistData(0, index))
  1248. {
  1249. int cellAsInteger = csvParser.GetCellAsInteger(0, index);
  1250. if (enabled_id_list.Contains(cellAsInteger))
  1251. {
  1252. ItemData2 itemData2 = new ItemData2(csvParser, index);
  1253. if (itemData2.asset_name != "")
  1254. {
  1255. stringList12.Add($"{itemData2.name}{twentySpaces}#{itemData2.asset_name}");
  1256. }
  1257. }
  1258. }
  1259. }
  1260. }
  1261. }
  1262. stringList12.AddRange(parArray3);
  1263. parArray = stringList12.ToArray();
  1264. List<string> stringList13 = new List<string>(50 + doguBArray.Length);
  1265. PhotoBGObjectData.Create();
  1266. doguDict = new Dictionary<string, PhotoBGObjectData>();
  1267. IEnumerable<PhotoBGObjectData> filteredList = PhotoBGObjectData.data.Where(prpdata => prpdata.category != "パーティクル");
  1268. foreach (PhotoBGObjectData bgObj in filteredList)
  1269. {
  1270. string tmp = null;
  1271. if (!string.IsNullOrEmpty(bgObj.create_prefab_name))
  1272. {
  1273. doguDict[bgObj.create_prefab_name] = bgObj;
  1274. tmp = bgObj.create_prefab_name;
  1275. }
  1276. else if (!string.IsNullOrEmpty(bgObj.create_asset_bundle_name))
  1277. {
  1278. doguDict[bgObj.create_asset_bundle_name] = bgObj;
  1279. tmp = bgObj.create_asset_bundle_name;
  1280. }
  1281. else if (!string.IsNullOrEmpty(bgObj.direct_file))
  1282. {
  1283. doguDict[bgObj.direct_file] = bgObj;
  1284. tmp = bgObj.direct_file;
  1285. }
  1286. if (!string.IsNullOrEmpty(tmp))
  1287. {
  1288. doguUiNames[tmp] = bgObj.name;
  1289. }
  1290. }
  1291. IEnumerable<string> propList1 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_prefab_name))
  1292. .Select(prpdata => prpdata.create_prefab_name);
  1293. IEnumerable<string> propList2 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_asset_bundle_name))
  1294. .Select(prpdata => prpdata.create_asset_bundle_name);
  1295. List<string> propList = propList1.ToList();
  1296. propList.AddRange(propList2.ToList());
  1297. stringList13.AddRange(propList);
  1298. stringList13.AddRange(doguBArray);
  1299. if (isCM3D2)
  1300. {
  1301. if (isVA)
  1302. {
  1303. stringList13.AddRange(doguB2Array);
  1304. }
  1305. if (isKA)
  1306. {
  1307. stringList13.AddRange(doguB3Array);
  1308. }
  1309. if (isKA2)
  1310. {
  1311. stringList13.AddRange(doguB4Array);
  1312. }
  1313. }
  1314. doguBArray = stringList13.ToArray();
  1315. List<string> stringList14 = new List<string>(100 + itemBArray.Length);
  1316. stringList14.AddRange(itemBArray);
  1317. if (isCM3D2)
  1318. {
  1319. if (isVA)
  1320. {
  1321. stringList14.AddRange(itemB2Array);
  1322. }
  1323. if (isKA)
  1324. {
  1325. stringList14.AddRange(itemB3Array);
  1326. }
  1327. if (isKA2)
  1328. {
  1329. stringList14.AddRange(itemB4Array);
  1330. }
  1331. }
  1332. itemBArray = stringList14.ToArray();
  1333. }
  1334. }
  1335. }