MultipleMaids.Init.cs 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435
  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. inName3 = "";
  106. inText = "";
  107. fontSize = 25;
  108. isMessage = false;
  109. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  110. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  111. new MessageClass(gameObject, messageWindowMgr).Clear();
  112. messageWindowMgr.CloseMessageWindowPanel();
  113. SetFieldValue<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>(),
  114. "mFontSize",
  115. fontSize);
  116. ikMaid = 0;
  117. ikBui = 0;
  118. faceFlg = false;
  119. faceFlg2 = false;
  120. sceneFlg = false;
  121. poseFlg = false;
  122. kankyoFlg = false;
  123. kankyo2Flg = false;
  124. unLockFlg = false;
  125. isNamida = false;
  126. isNamidaH = false;
  127. isSekimenH = false;
  128. isHohoH = false;
  129. isTear1 = false;
  130. isTear2 = false;
  131. isTear3 = false;
  132. isShock = false;
  133. isYodare = false;
  134. isHoho = false;
  135. isHoho2 = false;
  136. isHohos = false;
  137. isHohol = false;
  138. isToothoff = false;
  139. isNosefook = false;
  140. isFaceInit = false;
  141. isPoseInit = false;
  142. isWear = true;
  143. isSkirt = true;
  144. isMekure1 = false;
  145. isMekure2 = false;
  146. isZurasi = false;
  147. isBra = true;
  148. isPanz = true;
  149. isHeadset = true;
  150. isAccUde = true;
  151. isStkg = true;
  152. isShoes = true;
  153. isGlove = true;
  154. isMegane = true;
  155. isAccSenaka = true;
  156. isMaid = true;
  157. isF6 = false;
  158. isPanel = true;
  159. isBloom = false;
  160. isBloomA = false;
  161. isBlur = false;
  162. isBlur2 = false;
  163. bloom1 = 2.85f;
  164. bloom2 = 3f;
  165. bloom3 = 0.0f;
  166. bloom4 = 0.0f;
  167. bloom5 = 0.0f;
  168. blur1 = -3.98f;
  169. blur4 = -0.75f;
  170. blur2 = 0.9f;
  171. blur3 = 4.19f;
  172. bokashi = 0.0f;
  173. kamiyure = 0.0f;
  174. isDepth = false;
  175. isDepthA = false;
  176. depth1 = 3f;
  177. depth2 = 0.1f;
  178. depth3 = 15f;
  179. depth4 = 2.5f;
  180. isFog = false;
  181. fog1 = 4f;
  182. fog2 = 1f;
  183. fog3 = 1f;
  184. fog4 = 0.0f;
  185. fog5 = 1f;
  186. fog6 = 1f;
  187. fog7 = 1f;
  188. isSepia = false;
  189. isSepian = false;
  190. isBloomS = true;
  191. isDepthS = false;
  192. isBlurS = false;
  193. isFogS = false;
  194. isHairSetting = true;
  195. isSkirtSetting = false;
  196. if (depth_field_ != null)
  197. {
  198. depth_field_.enabled = false;
  199. }
  200. if (fog_ != null)
  201. {
  202. fog_.enabled = false;
  203. }
  204. if (sepia_tone_ != null)
  205. {
  206. sepia_tone_.enabled = false;
  207. }
  208. isCube = false;
  209. isCube2 = true;
  210. isCube3 = false;
  211. isCube4 = true;
  212. isCubeS = false;
  213. cubeSize = 0.12f;
  214. isPoseEdit = false;
  215. isFaceEdit = false;
  216. bgmIndex = 0;
  217. if (sceneLevel == 5)
  218. {
  219. bgmIndex = 2;
  220. }
  221. effectIndex = 0;
  222. selectMaidIndex = 0;
  223. copyIndex = 0;
  224. selectLightIndex = 0;
  225. doguBIndex = 0;
  226. parIndex = 0;
  227. isEditNo = 0;
  228. editSelectMaid = null;
  229. for (int index = 0; index < 10; ++index)
  230. {
  231. date[index] = "";
  232. ninzu[index] = "";
  233. }
  234. isDanceStart1F = false;
  235. isDanceStart1K = false;
  236. isDanceStart2F = false;
  237. isDanceStart3F = false;
  238. isDanceStart3K = false;
  239. isDanceStart4F = false;
  240. isDanceStart4K = false;
  241. isDanceStart5F = false;
  242. isDanceStart5K = false;
  243. isDanceStart6F = false;
  244. isDanceStart6K = false;
  245. isDanceStart7F = false;
  246. isDanceStart7V = false;
  247. isDanceStart8F = false;
  248. isDanceStart8V = false;
  249. isDanceStart8P = false;
  250. isDanceStart9F = false;
  251. isDanceStart9K = false;
  252. isDanceStart10F = false;
  253. isDanceStart11F = false;
  254. isDanceStart11V = false;
  255. isDanceStart12F = false;
  256. isDanceStart13F = false;
  257. isDanceStart13K = false;
  258. isDanceStart14F = false;
  259. isDanceStart14V = false;
  260. isDanceStart15F = false;
  261. isDanceStart15V = false;
  262. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  263. {
  264. danceFace[index1] = 0.0f;
  265. FaceName[index1] = "";
  266. FaceName2[index1] = "";
  267. FaceName3[index1] = "";
  268. isStop[index1] = false;
  269. isBone[index1] = false;
  270. isBoneN[index1] = false;
  271. poseIndex[index1] = 0;
  272. itemIndex[index1] = 0;
  273. itemIndex2[index1] = 0;
  274. faceIndex[index1] = 0;
  275. faceBlendIndex[index1] = 0;
  276. headEyeIndex[index1] = 0;
  277. isLock[index1] = false;
  278. isFace[index1] = true;
  279. mekure1[index1] = false;
  280. mekure2[index1] = false;
  281. zurasi[index1] = false;
  282. mekure1n[index1] = false;
  283. mekure2n[index1] = false;
  284. zurasin[index1] = false;
  285. isLook[index1] = false;
  286. isLookn[index1] = false;
  287. lookX[index1] = 0.0f;
  288. lookY[index1] = -0.0f;
  289. lookXn[index1] = 0.0f;
  290. lookYn[index1] = -0.0f;
  291. voice1[index1] = false;
  292. voice2[index1] = false;
  293. voice1n[index1] = false;
  294. voice2n[index1] = false;
  295. hanten[index1] = false;
  296. hantenn[index1] = false;
  297. kotei[index1] = false;
  298. xFlg[index1] = false;
  299. zFlg[index1] = false;
  300. ikMode[index1] = 0;
  301. GraphicsUtils.Destroy(gMaid[index1]);
  302. GraphicsUtils.Destroy(gMaidC[index1]);
  303. GraphicsUtils.Destroy(gHandL[index1]);
  304. GraphicsUtils.Destroy(gArmL[index1]);
  305. GraphicsUtils.Destroy(gHandR[index1]);
  306. GraphicsUtils.Destroy(gArmR[index1]);
  307. GraphicsUtils.Destroy(gFootL[index1]);
  308. GraphicsUtils.Destroy(gHizaL[index1]);
  309. GraphicsUtils.Destroy(gFootR[index1]);
  310. GraphicsUtils.Destroy(gHizaR[index1]);
  311. GraphicsUtils.Destroy(gClavicleL[index1]);
  312. GraphicsUtils.Destroy(gClavicleR[index1]);
  313. GraphicsUtils.Destroy(gNeck[index1]);
  314. GraphicsUtils.Destroy(gSpine[index1]);
  315. GraphicsUtils.Destroy(gSpine0a[index1]);
  316. GraphicsUtils.Destroy(gSpine1a[index1]);
  317. GraphicsUtils.Destroy(gSpine1[index1]);
  318. GraphicsUtils.Destroy(gPelvis[index1]);
  319. GraphicsUtils.Destroy(gizmoHandL[index1]);
  320. GraphicsUtils.Destroy(gizmoHandR[index1]);
  321. GraphicsUtils.Destroy(gizmoFootL[index1]);
  322. GraphicsUtils.Destroy(gizmoFootR[index1]);
  323. GraphicsUtils.Destroy(gizmoNeck[index1]);
  324. GraphicsUtils.Destroy(gizmoPelvis[index1]);
  325. HandL1[index1] = null;
  326. for (int index2 = 0; index2 < 30; ++index2)
  327. {
  328. GraphicsUtils.Destroy(gFinger[index1, index2]);
  329. }
  330. for (int index2 = 0; index2 < 12; ++index2)
  331. {
  332. GraphicsUtils.Destroy(gFinger2[index1, index2]);
  333. }
  334. isIK[index1] = isIKAll;
  335. pHandL[index1] = 0;
  336. pHandR[index1] = 0;
  337. muneIKL[index1] = false;
  338. muneIKR[index1] = false;
  339. }
  340. if (kami)
  341. {
  342. kami.SetActive(false);
  343. }
  344. danceCheckIndex = 0;
  345. for (int index = 0; index < danceCheck.Length; ++index)
  346. {
  347. danceCheck[danceCheckIndex] = 1f;
  348. }
  349. lightIndex = new List<int>
  350. {
  351. 0
  352. };
  353. lightColorR = new List<float>
  354. {
  355. 1f
  356. };
  357. lightColorG = new List<float>
  358. {
  359. 1f
  360. };
  361. lightColorB = new List<float>
  362. {
  363. 1f
  364. };
  365. lightX = new List<float>
  366. {
  367. 40f
  368. };
  369. lightY = new List<float>
  370. {
  371. 180f
  372. };
  373. lightAkarusa = new List<float>
  374. {
  375. 0.95f
  376. };
  377. lightKage = new List<float>
  378. {
  379. 0.098f
  380. };
  381. lightRange = new List<float>
  382. {
  383. 50f
  384. };
  385. isIdx1 = false;
  386. isIdx2 = false;
  387. isIdx3 = false;
  388. isIdx4 = false;
  389. bgObject.SetActive(true);
  390. GameMain.Instance.MainLight.Reset();
  391. GameMain.Instance.MainLight.SetIntensity(0.95f);
  392. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 30f;
  393. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  394. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  395. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f);
  396. for (int index = 0; index < doguBObject.Count; ++index)
  397. {
  398. GraphicsUtils.Destroy(doguBObject[index]);
  399. }
  400. doguBObject.Clear();
  401. doguBIndex = 0;
  402. parIndex = 0;
  403. doguCombo.selectedItemIndex = 0;
  404. parCombo.selectedItemIndex = 0;
  405. for (int index = 1; index < lightList.Count; ++index)
  406. {
  407. GraphicsUtils.Destroy(lightList[index]);
  408. }
  409. lightList = new List<GameObject>
  410. {
  411. GameMain.Instance.MainLight.gameObject
  412. };
  413. lightComboList = new GUIContent[lightList.Count];
  414. lightComboList[0] = new GUIContent("メイン");
  415. lightCombo.selectedItemIndex = 0;
  416. selectLightIndex = 0;
  417. itemCombo2.selectedItemIndex = 0;
  418. slotCombo.selectedItemIndex = 0;
  419. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  420. poseScrollPos = new Vector2(0.0f, 0.0f);
  421. faceScrollPos = new Vector2(0.0f, 0.0f);
  422. bgScrollPos = new Vector2(0.0f, 0.0f);
  423. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  424. Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  425. component.mode = Vignetting.AberrationMode.Simple;
  426. component.intensity = -3.98f;
  427. component.chromaticAberration = -0.75f;
  428. component.axialAberration = 1.18f;
  429. component.blurSpread = 4.19f;
  430. component.luminanceDependency = 0.494f;
  431. component.blurDistance = 1.71f;
  432. component.enabled = false;
  433. doguIndex.Clear();
  434. doguSelectIndex = 0;
  435. for (int index = 0; index < doguObject.Count; ++index)
  436. {
  437. if (doguObject[index] != null)
  438. {
  439. GraphicsUtils.Destroy(doguObject[index]);
  440. doguObject[index] = null;
  441. }
  442. }
  443. doguObject.Clear();
  444. }
  445. public void init()
  446. {
  447. if (bg2Busy)
  448. {
  449. bg2Busy = false;
  450. GameMain.Instance.StopCoroutine(InitializeBG2());
  451. }
  452. isInit = true;
  453. isVR = GameMain.Instance.VRMode;
  454. for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1)
  455. {
  456. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1];
  457. if (goSlot[index1] != null)
  458. {
  459. stockMaid.body0.goSlot = new List<TBodySkin>(goSlot[index1]);
  460. for (int index2 = 0; index2 < bodyHit[index1].Count; ++index2)
  461. {
  462. stockMaid.body0.goSlot[index2].bonehair.bodyhit = bodyHit[index1][index2];
  463. }
  464. if (!GameMain.Instance.VRMode)
  465. {
  466. stockMaid.body0.quaDefEyeL.eulerAngles = eyeL[index1];
  467. stockMaid.body0.quaDefEyeR.eulerAngles = eyeR[index1];
  468. }
  469. shodaiFlg[index1] = false;
  470. }
  471. if (SkirtListArray[index1] != null)
  472. {
  473. for (int index2 = 0; index2 < stockMaid.body0.goSlot.Count; ++index2)
  474. {
  475. SetFieldValue<BoneHair3, DynamicSkirtBone>(stockMaid.body0.goSlot[index2].bonehair3,
  476. "m_SkirtBone",
  477. SkirtListArray[index1][index2]);
  478. }
  479. }
  480. }
  481. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  482. {
  483. if (maidArray[index1])
  484. {
  485. maidArray[index1].StopKuchipakuPattern();
  486. }
  487. if (maidArray[index1])
  488. {
  489. maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  490. }
  491. if (maidArray[index1] && maidArray[index1].Visible && maidArray[index1].body0.isLoadedBody)
  492. {
  493. maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  494. maidArray[index1].SetAutoTwistAll(true);
  495. maidArray[index1].body0.MuneYureL(1f);
  496. maidArray[index1].body0.MuneYureR(1f);
  497. maidArray[index1].body0.jbMuneL.enabled = true;
  498. maidArray[index1].body0.jbMuneR.enabled = true;
  499. }
  500. if (maidArray[index1])
  501. {
  502. maidArray[index1].body0.SetMask(TBody.SlotID.wear, true);
  503. maidArray[index1].body0.SetMask(TBody.SlotID.skirt, true);
  504. maidArray[index1].body0.SetMask(TBody.SlotID.bra, true);
  505. maidArray[index1].body0.SetMask(TBody.SlotID.panz, true);
  506. maidArray[index1].body0.SetMask(TBody.SlotID.mizugi, true);
  507. maidArray[index1].body0.SetMask(TBody.SlotID.onepiece, true);
  508. if (maidArray[index1].body0.isLoadedBody)
  509. {
  510. Maid maid = maidArray[index1];
  511. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  512. {
  513. List<THair1> fieldValue = GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[index2].bonehair, "hair1list");
  514. for (int index3 = 0; index3 < fieldValue.Count; ++index3)
  515. {
  516. fieldValue[index3].SoftG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  517. }
  518. }
  519. }
  520. }
  521. maidArray[index1] = null;
  522. }
  523. goSlot = new List<TBodySkin>[maxMaidCnt * 2];
  524. bodyHit = new List<TBodyHit>[maxMaidCnt * 2];
  525. allowUpdate = true;
  526. if (okFlg)
  527. {
  528. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  529. for (int index = 0; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  530. {
  531. if (sceneLevel != 5 || index != editMaid)
  532. {
  533. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  534. stockMaid.transform.localScale = new Vector3(1f, 1f, 1f);
  535. TBody.MaskMode f_eMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), "None");
  536. stockMaid.body0.SetMaskMode(f_eMode);
  537. stockMaid.boMabataki = true;
  538. }
  539. }
  540. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  541. for (int index = 11; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  542. {
  543. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  544. Vector3 zero = Vector3.zero;
  545. stockMaid.SetPos(zero);
  546. stockMaid.SetRot(zero);
  547. stockMaid.SetPosOffset(zero);
  548. if (stockMaid.body0 != null)
  549. {
  550. stockMaid.body0.SetBoneHitHeightY(0.0f);
  551. }
  552. stockMaid.Visible = false;
  553. stockMaid.ActiveSlotNo = -1;
  554. stockMaid.DelPrefabAll();
  555. if (stockMaid.body0.isLoadedBody)
  556. {
  557. stockMaid.CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  558. stockMaid.SetAutoTwistAll(true);
  559. }
  560. stockMaid.boMabataki = true;
  561. }
  562. }
  563. okFlg = false;
  564. isDance = false;
  565. isDanceChu = false;
  566. isSavePose = false;
  567. // bgIndex = 0;
  568. // bgIndexB = 0;
  569. bg.localScale = new Vector3(1f, 1f, 1f);
  570. softG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  571. softG2 = new Vector3(0.0f, -0.005f, 0.0f);
  572. if (!GameMain.Instance.VRMode)
  573. {
  574. Bloom fieldValue = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  575. fieldValue.enabled = true;
  576. fieldValue.bloomIntensity = 2.85f;
  577. fieldValue.hdr = Bloom.HDRBloomMode.Auto;
  578. fieldValue.bloomThreshholdColor = new Color(1f, 1f, 1f);
  579. fieldValue.bloomBlurIterations = 3;
  580. }
  581. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0.0f, 0.0f, 0.0f);
  582. maidCnt = 0;
  583. wearIndex = 0;
  584. isF6 = false;
  585. faceFlg = false;
  586. faceFlg2 = false;
  587. sceneFlg = false;
  588. poseFlg = false;
  589. kankyoFlg = false;
  590. kankyo2Flg = false;
  591. unLockFlg = false;
  592. inName = "";
  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. SetFieldValue<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. itemCombo2.selectedItemIndex = 0;
  913. slotCombo.selectedItemIndex = 0;
  914. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  915. poseScrollPos = new Vector2(0.0f, 0.0f);
  916. faceScrollPos = new Vector2(0.0f, 0.0f);
  917. bgScrollPos = new Vector2(0.0f, 0.0f);
  918. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  919. if (!GameMain.Instance.VRMode)
  920. {
  921. Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  922. component.mode = Vignetting.AberrationMode.Simple;
  923. component.intensity = -3.98f;
  924. component.chromaticAberration = -0.75f;
  925. component.axialAberration = 1.18f;
  926. component.blurSpread = 4.19f;
  927. component.luminanceDependency = 0.494f;
  928. component.blurDistance = 1.71f;
  929. component.enabled = false;
  930. }
  931. doguIndex.Clear();
  932. doguSelectIndex = 0;
  933. for (int index = 0; index < doguObject.Count; ++index)
  934. {
  935. if (doguObject[index] != null)
  936. {
  937. GraphicsUtils.Destroy(doguObject[index]);
  938. doguObject[index] = null;
  939. }
  940. }
  941. doguObject.Clear();
  942. string mmPosePath = Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose";
  943. if (!File.Exists(mmPosePath))
  944. {
  945. Directory.CreateDirectory(mmPosePath);
  946. }
  947. int countS = this.countS;
  948. this.countS = Directory.GetFiles(mmPosePath).Where(f => Path.GetExtension(f) == ".anm").Count();
  949. if (this.countS != countS)
  950. {
  951. poseArray = null;
  952. }
  953. if (poseArray != null)
  954. {
  955. return;
  956. }
  957. if (GameMain.Instance.BgMgr.CreateAssetBundle("rotenburo") != null)
  958. {
  959. isVA = true;
  960. }
  961. if (GameMain.Instance.BgMgr.CreateAssetBundle("karaokeroom") != null)
  962. {
  963. isKA = true;
  964. }
  965. if (GameUty.IsEnabledCompatibilityMode)
  966. {
  967. isCM3D2 = true;
  968. }
  969. List<string> stringList4 = new List<string>(350 + poseArray2.Length);
  970. stringList4.AddRange(poseArray2);
  971. List<string> stringList5 = new List<string>();
  972. // Seems to only produce 'edit_pose_027'
  973. for (int poseIndex = 11; poseIndex < 100; poseIndex++)
  974. {
  975. string pose = $"edit_pose_{poseIndex:000}_f";
  976. if (GameUty.FileSystem.IsExistentFile($"{pose}.anm"))
  977. {
  978. stringList5.Add(pose);
  979. }
  980. }
  981. // Update when denkigai 2025 releases
  982. for (int year = 17; year < 25; year++)
  983. {
  984. foreach (char sw in "sw")
  985. {
  986. for (int poseIndex = 1; poseIndex < 10; poseIndex++)
  987. {
  988. string pose = $"edit_pose_dg{year}{sw}_{poseIndex:000}_f";
  989. if (GameUty.FileSystem.IsExistentFile($"{pose}.anm"))
  990. {
  991. stringList5.Add(pose);
  992. }
  993. }
  994. }
  995. }
  996. if (stringList5.Count > 0)
  997. {
  998. stringList4.AddRange(stringList5);
  999. }
  1000. stringList4.AddRange(poseArrayVP2);
  1001. stringList4.AddRange(poseArrayFB);
  1002. stringList4.AddRange(poseArray4);
  1003. stringList4.AddRange(poseArray5);
  1004. stringList4.AddRange(poseArray6);
  1005. strList2 = new List<string>();
  1006. strListE = new List<string>();
  1007. strListE2 = new List<string>();
  1008. strListS = new List<string>();
  1009. HashSet<string> poseSet = new HashSet<string>(stringList4);
  1010. strS = "";
  1011. this.countS = 0;
  1012. foreach (string file in Directory.GetFiles(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose"))
  1013. {
  1014. if (Path.GetExtension(file) == ".anm")
  1015. {
  1016. string withoutExtension = Path.GetFileNameWithoutExtension(file);
  1017. string mmPose = $"{withoutExtension}{twentySpaces}/{file}";
  1018. strListS.Add(mmPose);
  1019. ++this.countS;
  1020. }
  1021. }
  1022. string[] list = GameUty.FileSystem.GetList("motion", AFileSystemBase.ListType.AllFile);
  1023. List<string> stringList6 = new List<string>();
  1024. foreach (string path2 in list)
  1025. {
  1026. string withoutExtension = Path.GetFileNameWithoutExtension(path2);
  1027. string directoryName = Path.GetDirectoryName(path2);
  1028. if (!withoutExtension.StartsWith("maid_motion_") && !withoutExtension.StartsWith("work_00")
  1029. #region huge if condition
  1030. && !withoutExtension.EndsWith("_3_") && !withoutExtension.EndsWith("_5_")
  1031. && !withoutExtension.StartsWith("ck_")
  1032. && !withoutExtension.StartsWith("vr_")
  1033. && !withoutExtension.StartsWith("dance_mc")
  1034. && !withoutExtension.Contains("a01_") && !withoutExtension.StartsWith("j_")
  1035. && !withoutExtension.StartsWith("k_") && !withoutExtension.StartsWith("t_")
  1036. && !withoutExtension.StartsWith("cbl_")
  1037. && !withoutExtension.Contains("b01_") && !withoutExtension.Contains("b02_")
  1038. && !withoutExtension.Contains("_kubi_")
  1039. && !withoutExtension.EndsWith("_m2") && !withoutExtension.EndsWith("_m3")
  1040. && !withoutExtension.Contains("_m2_once")
  1041. && !withoutExtension.Contains("_m3_once")
  1042. && !withoutExtension.StartsWith("h_")
  1043. && !withoutExtension.StartsWith("event_")
  1044. && !withoutExtension.StartsWith("man_") && !withoutExtension.EndsWith("_m")
  1045. && !withoutExtension.Contains("_m_") && !withoutExtension.Contains("_man")
  1046. && !(withoutExtension == "dance_cm3d2_001_zoukin")
  1047. && !(withoutExtension == "dance_cm3d2_001_mop")
  1048. && !(withoutExtension == "maid_motion")
  1049. && !(withoutExtension == "aruki_1_idougo_f")
  1050. && !(withoutExtension == "sleep2") && !(withoutExtension == "stand_akire2")
  1051. && !(withoutExtension == "ero_scene_001")
  1052. && !(withoutExtension == "ero_scenefm_001")
  1053. && !(withoutExtension == "training_001")
  1054. && !(withoutExtension == "workff_001")
  1055. && !(withoutExtension == "workfm_001")
  1056. && !(withoutExtension == "dance_cm3d21_005_moe_mset")
  1057. && !(withoutExtension == "hinpyoukai_001"))
  1058. #endregion
  1059. {
  1060. if (!directoryName.Contains("\\sex\\"))
  1061. {
  1062. if (!withoutExtension.StartsWith("sex_") && !withoutExtension.StartsWith("dance_test"))
  1063. {
  1064. if (!strListS.Exists(mmPose => withoutExtension == mmPose.Split('/')[0].Replace(twentySpaces, "")))
  1065. {
  1066. stringList6.Add(withoutExtension);
  1067. }
  1068. }
  1069. }
  1070. else if (!withoutExtension.StartsWith("pose_"))
  1071. {
  1072. strListE.Add(withoutExtension);
  1073. }
  1074. }
  1075. }
  1076. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("edit_")));
  1077. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && str.StartsWith("pose_")));
  1078. strList2.AddRange(stringList6.Where(str => !poseSet.Contains(str) && !str.StartsWith("edit_") && !str.StartsWith("pose_")));
  1079. strListE2.AddRange(strListE.Where(str => !poseSet.Contains(str)));
  1080. stringList4.AddRange(strList2);
  1081. stringList4.AddRange(strListE2);
  1082. // What is this for?
  1083. existPose = false;
  1084. poseIniStr = "";
  1085. foreach (IniKey key in Preferences["pose"].Keys)
  1086. {
  1087. IniKey iniKey = Preferences["pose"][key.Key];
  1088. if (!string.IsNullOrEmpty(iniKey.Value) && iniKey.Value != "del")
  1089. {
  1090. stringList4.Add(key.Key);
  1091. existPose = true;
  1092. if (poseIniStr == "")
  1093. {
  1094. poseIniStr = key.Key;
  1095. }
  1096. }
  1097. }
  1098. stringList4.AddRange(strListS);
  1099. poseArray = stringList4.ToArray();
  1100. List<string> stringList7 = new List<string>(50 + poseGroupArray2.Length);
  1101. stringList7.AddRange(poseGroupArray2);
  1102. stringList7.AddRange(poseGroupArrayVP);
  1103. stringList7.AddRange(poseGroupArrayFB);
  1104. stringList7.AddRange(poseGroupArray3);
  1105. stringList7.Add(poseArray5[0]);
  1106. stringList7.Add(poseArray6[0]);
  1107. stringList7.Add(strList2[0]);
  1108. stringList7.Add(strListE2[0]);
  1109. if (strListS.Count > 0 && poseIniStr == "")
  1110. {
  1111. stringList7.Add(strListS[0]);
  1112. existPose = true;
  1113. }
  1114. if (poseIniStr != "")
  1115. {
  1116. stringList7.Add(poseIniStr);
  1117. }
  1118. poseGroupArray = stringList7.ToArray();
  1119. groupList = new ArrayList();
  1120. for (int i = 0; i < poseArray.Length; i++)
  1121. {
  1122. foreach (string poseGroup in poseGroupArray)
  1123. {
  1124. if (poseGroup == poseArray[i])
  1125. {
  1126. groupList.Add(i);
  1127. if (poseGroup == strList2[0])
  1128. {
  1129. sPoseCount = i;
  1130. }
  1131. }
  1132. }
  1133. }
  1134. List<string> bgList = new List<string>(50 + poseArray2.Length);
  1135. PhotoBGData.Create();
  1136. bgDict = new Dictionary<string, string>();
  1137. List<PhotoBGData> photList = PhotoBGData.data;
  1138. IEnumerable<string> neiList = photList.Select(bgdata => bgdata.create_prefab_name).Where(name => !string.IsNullOrEmpty(name));
  1139. foreach (PhotoBGData bgdata in photList)
  1140. {
  1141. if (!string.IsNullOrEmpty(bgdata.create_prefab_name))
  1142. {
  1143. bgDict[bgdata.create_prefab_name] = bgdata.name;
  1144. }
  1145. }
  1146. bgUiNames.ToList().ForEach(x => bgDict[x.Key] = x.Value);
  1147. bgList.AddRange(neiList);
  1148. List<string> myRoomBgList = new List<string>();
  1149. Dictionary<string, string> saveDataDic = CreativeRoomManager.GetSaveDataDic();
  1150. if (saveDataDic != null)
  1151. {
  1152. foreach (KeyValuePair<string, string> keyValuePair in saveDataDic)
  1153. {
  1154. myRoomBgList.Add(keyValuePair.Key);
  1155. bgDict[keyValuePair.Key] = keyValuePair.Value;
  1156. }
  1157. }
  1158. bgList.AddRange(myRoomBgList);
  1159. if (isCM3D2)
  1160. {
  1161. if (GameUty.FileSystemOld.IsExistentFile("phot_bg_list.nei"))
  1162. {
  1163. List<string> cm3d2BgList = new List<string>(50);
  1164. using (AFileBase file = GameUty.FileSystemOld.FileOpen("phot_bg_list.nei"))
  1165. {
  1166. using (CsvParser csvParser = new CsvParser())
  1167. {
  1168. csvParser.Open(file);
  1169. for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
  1170. {
  1171. if (csvParser.IsCellToExistData(3, cell_y))
  1172. {
  1173. string data = csvParser.GetCellAsString(3, cell_y);
  1174. cm3d2BgList.Add(data);
  1175. // ew
  1176. if (data == "Yashiki") cm3d2BgList.Add("Yashiki_Pillow");
  1177. }
  1178. }
  1179. }
  1180. }
  1181. bgList.AddRange(cm3d2BgList);
  1182. }
  1183. }
  1184. bgArray = bgList.ToArray();
  1185. bgIndex = bgCombo2.selectedItemIndex = bgCombo.selectedItemIndex = Array.FindIndex(bgArray, bg => bg == "Theater");
  1186. List<string> bgmList = new List<string>(50) { "bgm008" };
  1187. for (int i = 1; i < 33; i++)
  1188. {
  1189. if (i == 8) continue;
  1190. string bgm = $"bgm{i:000}";
  1191. if (GameUty.FileSystem.IsExistentFile($"{bgm}.ogg"))
  1192. {
  1193. bgmList.Add(bgm);
  1194. }
  1195. }
  1196. bgmList.AddRange(new string[]
  1197. {
  1198. "bloomingdreaming_short", "canknowtwoclose_short", "dokidokifallinlove_short",
  1199. "dokidokifallinlove_short_inst", "entrancetoyou_short", "happyhappyscandal_short_nao_kara",
  1200. "kiminiaijodelicious_short", "luminousmoment_short", "melodyofempire_short",
  1201. "nightmagicfire_short", "rhythmixtoyou", "scarlet leap_short",
  1202. "stellarmytears_short_misato_kara", "stellarmytears_short_nao_kara", "stellarmytears_short_sasaki_kara",
  1203. });
  1204. bgmArray = bgmList.ToArray();
  1205. List<string> stringList12 = new List<string>(50 + parArray2.Length);
  1206. stringList12.AddRange(parArray2);
  1207. HashSet<int> enabled_id_list = new HashSet<int>();
  1208. Action<string> action3 = file_name =>
  1209. {
  1210. if (GameUty.FileSystem.IsExistentFile(file_name))
  1211. {
  1212. using (AFileBase file = GameUty.FileSystem.FileOpen(file_name))
  1213. {
  1214. using (CsvParser csvParser = new CsvParser())
  1215. {
  1216. csvParser.Open(file);
  1217. for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
  1218. {
  1219. if (csvParser.IsCellToExistData(0, cell_y))
  1220. {
  1221. int cellAsInteger = csvParser.GetCellAsInteger(0, cell_y);
  1222. if (!enabled_id_list.Contains(cellAsInteger))
  1223. {
  1224. enabled_id_list.Add(cellAsInteger);
  1225. }
  1226. }
  1227. }
  1228. }
  1229. }
  1230. }
  1231. };
  1232. action3("desk_item_enabled_id.nei");
  1233. foreach (string path in GameUty.PathList)
  1234. {
  1235. action3($"desk_item_enabled_id_{path}.nei");
  1236. }
  1237. using (AFileBase file = GameUty.FileSystem.FileOpen("desk_item_detail.nei"))
  1238. {
  1239. using (CsvParser csvParser = new CsvParser())
  1240. {
  1241. csvParser.Open(file);
  1242. for (int index = 1; index < csvParser.max_cell_y; ++index)
  1243. {
  1244. if (csvParser.IsCellToExistData(0, index))
  1245. {
  1246. int cellAsInteger = csvParser.GetCellAsInteger(0, index);
  1247. if (enabled_id_list.Contains(cellAsInteger))
  1248. {
  1249. ItemData2 itemData2 = new ItemData2(csvParser, index);
  1250. if (itemData2.asset_name != "")
  1251. {
  1252. stringList12.Add($"{itemData2.name}{twentySpaces}#{itemData2.asset_name}");
  1253. }
  1254. }
  1255. }
  1256. }
  1257. }
  1258. }
  1259. stringList12.AddRange(parArray3);
  1260. parArray = stringList12.ToArray();
  1261. List<string> stringList13 = new List<string>(50 + doguBArray.Length);
  1262. PhotoBGObjectData.Create();
  1263. doguDict = new Dictionary<string, PhotoBGObjectData>();
  1264. IEnumerable<PhotoBGObjectData> filteredList = PhotoBGObjectData.data.Where(prpdata => prpdata.category != "パーティクル");
  1265. foreach (PhotoBGObjectData bgObj in filteredList)
  1266. {
  1267. string tmp = null;
  1268. if (!string.IsNullOrEmpty(bgObj.create_prefab_name))
  1269. {
  1270. doguDict[bgObj.create_prefab_name] = bgObj;
  1271. tmp = bgObj.create_prefab_name;
  1272. }
  1273. else if (!string.IsNullOrEmpty(bgObj.create_asset_bundle_name))
  1274. {
  1275. doguDict[bgObj.create_asset_bundle_name] = bgObj;
  1276. tmp = bgObj.create_asset_bundle_name;
  1277. }
  1278. else if (!string.IsNullOrEmpty(bgObj.direct_file))
  1279. {
  1280. doguDict[bgObj.direct_file] = bgObj;
  1281. tmp = bgObj.direct_file;
  1282. }
  1283. if (!string.IsNullOrEmpty(tmp))
  1284. {
  1285. doguUiNames[tmp] = bgObj.name;
  1286. }
  1287. }
  1288. IEnumerable<string> propList1 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_prefab_name))
  1289. .Select(prpdata => prpdata.create_prefab_name);
  1290. IEnumerable<string> propList2 = filteredList.Where(prpdata => !string.IsNullOrEmpty(prpdata.create_asset_bundle_name))
  1291. .Select(prpdata => prpdata.create_asset_bundle_name);
  1292. List<string> propList = propList1.ToList();
  1293. propList.AddRange(propList2.ToList());
  1294. stringList13.AddRange(propList);
  1295. stringList13.AddRange(doguBArray);
  1296. if (isCM3D2)
  1297. {
  1298. if (isVA)
  1299. {
  1300. stringList13.AddRange(doguB2Array);
  1301. }
  1302. if (isKA)
  1303. {
  1304. stringList13.AddRange(doguB3Array);
  1305. }
  1306. if (isKA2)
  1307. {
  1308. stringList13.AddRange(doguB4Array);
  1309. }
  1310. }
  1311. doguBArray = stringList13.ToArray();
  1312. List<string> stringList14 = new List<string>(100 + itemBArray.Length);
  1313. stringList14.AddRange(itemBArray);
  1314. if (isCM3D2)
  1315. {
  1316. if (isVA)
  1317. {
  1318. stringList14.AddRange(itemB2Array);
  1319. }
  1320. if (isKA)
  1321. {
  1322. stringList14.AddRange(itemB3Array);
  1323. }
  1324. if (isKA2)
  1325. {
  1326. stringList14.AddRange(itemB4Array);
  1327. }
  1328. }
  1329. itemBArray = stringList14.ToArray();
  1330. }
  1331. }
  1332. }