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