MultipleMaids.Init.cs 54 KB

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