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. inName2 = "";
  106. inName3 = "";
  107. inText = "";
  108. fontSize = 25;
  109. isMessage = false;
  110. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  111. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  112. new MessageClass(gameObject, messageWindowMgr).Clear();
  113. messageWindowMgr.CloseMessageWindowPanel();
  114. SetFieldValue<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>(),
  115. "mFontSize",
  116. fontSize);
  117. ikMaid = 0;
  118. ikBui = 0;
  119. faceFlg = false;
  120. faceFlg2 = false;
  121. sceneFlg = false;
  122. poseFlg = false;
  123. kankyoFlg = false;
  124. kankyo2Flg = false;
  125. unLockFlg = false;
  126. isNamida = false;
  127. isNamidaH = false;
  128. isSekimenH = false;
  129. isHohoH = false;
  130. isTear1 = false;
  131. isTear2 = false;
  132. isTear3 = false;
  133. isShock = false;
  134. isYodare = false;
  135. isHoho = false;
  136. isHoho2 = false;
  137. isHohos = false;
  138. isHohol = false;
  139. isToothoff = false;
  140. isNosefook = false;
  141. isFaceInit = false;
  142. isPoseInit = false;
  143. isWear = true;
  144. isSkirt = true;
  145. isMekure1 = false;
  146. isMekure2 = false;
  147. isZurasi = false;
  148. isBra = true;
  149. isPanz = true;
  150. isHeadset = true;
  151. isAccUde = true;
  152. isStkg = true;
  153. isShoes = true;
  154. isGlove = true;
  155. isMegane = true;
  156. isAccSenaka = true;
  157. isMaid = true;
  158. isF6 = false;
  159. isPanel = true;
  160. isBloom = false;
  161. isBloomA = false;
  162. isBlur = false;
  163. isBlur2 = false;
  164. bloom1 = 2.85f;
  165. bloom2 = 3f;
  166. bloom3 = 0.0f;
  167. bloom4 = 0.0f;
  168. bloom5 = 0.0f;
  169. blur1 = -3.98f;
  170. blur4 = -0.75f;
  171. blur2 = 0.9f;
  172. blur3 = 4.19f;
  173. bokashi = 0.0f;
  174. kamiyure = 0.0f;
  175. isDepth = false;
  176. isDepthA = false;
  177. depth1 = 3f;
  178. depth2 = 0.1f;
  179. depth3 = 15f;
  180. depth4 = 2.5f;
  181. isFog = false;
  182. fog1 = 4f;
  183. fog2 = 1f;
  184. fog3 = 1f;
  185. fog4 = 0.0f;
  186. fog5 = 1f;
  187. fog6 = 1f;
  188. fog7 = 1f;
  189. isSepia = false;
  190. isSepian = false;
  191. isBloomS = true;
  192. isDepthS = false;
  193. isBlurS = false;
  194. isFogS = false;
  195. isHairSetting = true;
  196. isSkirtSetting = false;
  197. if (depth_field_ != null)
  198. {
  199. depth_field_.enabled = false;
  200. }
  201. if (fog_ != null)
  202. {
  203. fog_.enabled = false;
  204. }
  205. if (sepia_tone_ != null)
  206. {
  207. sepia_tone_.enabled = false;
  208. }
  209. isCube = false;
  210. isCube2 = true;
  211. isCube3 = false;
  212. isCube4 = true;
  213. isCubeS = false;
  214. cubeSize = 0.12f;
  215. isPoseEdit = false;
  216. isFaceEdit = false;
  217. bgmIndex = 0;
  218. if (sceneLevel == 5)
  219. {
  220. bgmIndex = 2;
  221. }
  222. effectIndex = 0;
  223. selectMaidIndex = 0;
  224. copyIndex = 0;
  225. selectLightIndex = 0;
  226. doguBIndex = 0;
  227. parIndex = 0;
  228. isEditNo = 0;
  229. editSelectMaid = null;
  230. for (int index = 0; index < 10; ++index)
  231. {
  232. date[index] = "";
  233. ninzu[index] = "";
  234. }
  235. isDanceStart1F = false;
  236. isDanceStart1K = false;
  237. isDanceStart2F = false;
  238. isDanceStart3F = false;
  239. isDanceStart3K = false;
  240. isDanceStart4F = false;
  241. isDanceStart4K = false;
  242. isDanceStart5F = false;
  243. isDanceStart5K = false;
  244. isDanceStart6F = false;
  245. isDanceStart6K = false;
  246. isDanceStart7F = false;
  247. isDanceStart7V = false;
  248. isDanceStart8F = false;
  249. isDanceStart8V = false;
  250. isDanceStart8P = false;
  251. isDanceStart9F = false;
  252. isDanceStart9K = false;
  253. isDanceStart10F = false;
  254. isDanceStart11F = false;
  255. isDanceStart11V = false;
  256. isDanceStart12F = false;
  257. isDanceStart13F = false;
  258. isDanceStart13K = false;
  259. isDanceStart14F = false;
  260. isDanceStart14V = false;
  261. isDanceStart15F = false;
  262. isDanceStart15V = false;
  263. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  264. {
  265. danceFace[index1] = 0.0f;
  266. FaceName[index1] = "";
  267. FaceName2[index1] = "";
  268. FaceName3[index1] = "";
  269. isStop[index1] = false;
  270. isBone[index1] = false;
  271. isBoneN[index1] = false;
  272. poseIndex[index1] = 0;
  273. itemIndex[index1] = 0;
  274. itemIndex2[index1] = 0;
  275. faceIndex[index1] = 0;
  276. faceBlendIndex[index1] = 0;
  277. headEyeIndex[index1] = 0;
  278. isLock[index1] = false;
  279. isFace[index1] = true;
  280. mekure1[index1] = false;
  281. mekure2[index1] = false;
  282. zurasi[index1] = false;
  283. mekure1n[index1] = false;
  284. mekure2n[index1] = false;
  285. zurasin[index1] = false;
  286. isLook[index1] = false;
  287. isLookn[index1] = false;
  288. lookX[index1] = 0.0f;
  289. lookY[index1] = -0.0f;
  290. lookXn[index1] = 0.0f;
  291. lookYn[index1] = -0.0f;
  292. voice1[index1] = false;
  293. voice2[index1] = false;
  294. voice1n[index1] = false;
  295. voice2n[index1] = false;
  296. hanten[index1] = false;
  297. hantenn[index1] = false;
  298. kotei[index1] = false;
  299. xFlg[index1] = false;
  300. zFlg[index1] = false;
  301. ikMode[index1] = 0;
  302. GraphicsUtils.Destroy(gMaid[index1]);
  303. GraphicsUtils.Destroy(gMaidC[index1]);
  304. GraphicsUtils.Destroy(gHandL[index1]);
  305. GraphicsUtils.Destroy(gArmL[index1]);
  306. GraphicsUtils.Destroy(gHandR[index1]);
  307. GraphicsUtils.Destroy(gArmR[index1]);
  308. GraphicsUtils.Destroy(gFootL[index1]);
  309. GraphicsUtils.Destroy(gHizaL[index1]);
  310. GraphicsUtils.Destroy(gFootR[index1]);
  311. GraphicsUtils.Destroy(gHizaR[index1]);
  312. GraphicsUtils.Destroy(gClavicleL[index1]);
  313. GraphicsUtils.Destroy(gClavicleR[index1]);
  314. GraphicsUtils.Destroy(gNeck[index1]);
  315. GraphicsUtils.Destroy(gSpine[index1]);
  316. GraphicsUtils.Destroy(gSpine0a[index1]);
  317. GraphicsUtils.Destroy(gSpine1a[index1]);
  318. GraphicsUtils.Destroy(gSpine1[index1]);
  319. GraphicsUtils.Destroy(gPelvis[index1]);
  320. GraphicsUtils.Destroy(gizmoHandL[index1]);
  321. GraphicsUtils.Destroy(gizmoHandR[index1]);
  322. GraphicsUtils.Destroy(gizmoFootL[index1]);
  323. GraphicsUtils.Destroy(gizmoFootR[index1]);
  324. GraphicsUtils.Destroy(gizmoNeck[index1]);
  325. GraphicsUtils.Destroy(gizmoPelvis[index1]);
  326. HandL1[index1] = null;
  327. for (int index2 = 0; index2 < 30; ++index2)
  328. {
  329. GraphicsUtils.Destroy(gFinger[index1, index2]);
  330. }
  331. for (int index2 = 0; index2 < 12; ++index2)
  332. {
  333. GraphicsUtils.Destroy(gFinger2[index1, index2]);
  334. }
  335. isIK[index1] = isIKAll;
  336. pHandL[index1] = 0;
  337. pHandR[index1] = 0;
  338. muneIKL[index1] = false;
  339. muneIKR[index1] = false;
  340. }
  341. if (kami)
  342. {
  343. kami.SetActive(false);
  344. }
  345. danceCheckIndex = 0;
  346. for (int index = 0; index < danceCheck.Length; ++index)
  347. {
  348. danceCheck[danceCheckIndex] = 1f;
  349. }
  350. lightIndex = new List<int>
  351. {
  352. 0
  353. };
  354. lightColorR = new List<float>
  355. {
  356. 1f
  357. };
  358. lightColorG = new List<float>
  359. {
  360. 1f
  361. };
  362. lightColorB = new List<float>
  363. {
  364. 1f
  365. };
  366. lightX = new List<float>
  367. {
  368. 40f
  369. };
  370. lightY = new List<float>
  371. {
  372. 180f
  373. };
  374. lightAkarusa = new List<float>
  375. {
  376. 0.95f
  377. };
  378. lightKage = new List<float>
  379. {
  380. 0.098f
  381. };
  382. lightRange = new List<float>
  383. {
  384. 50f
  385. };
  386. isIdx1 = false;
  387. isIdx2 = false;
  388. isIdx3 = false;
  389. isIdx4 = false;
  390. bgObject.SetActive(true);
  391. GameMain.Instance.MainLight.Reset();
  392. GameMain.Instance.MainLight.SetIntensity(0.95f);
  393. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 30f;
  394. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  395. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  396. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f);
  397. for (int index = 0; index < doguBObject.Count; ++index)
  398. {
  399. GraphicsUtils.Destroy(doguBObject[index]);
  400. }
  401. doguBObject.Clear();
  402. doguBIndex = 0;
  403. parIndex = 0;
  404. doguCombo.selectedItemIndex = 0;
  405. parCombo.selectedItemIndex = 0;
  406. for (int index = 1; index < lightList.Count; ++index)
  407. {
  408. GraphicsUtils.Destroy(lightList[index]);
  409. }
  410. lightList = new List<GameObject>
  411. {
  412. GameMain.Instance.MainLight.gameObject
  413. };
  414. lightComboList = new GUIContent[lightList.Count];
  415. lightComboList[0] = new GUIContent("メイン");
  416. lightCombo.selectedItemIndex = 0;
  417. selectLightIndex = 0;
  418. kankyoCombo.selectedItemIndex = 0;
  419. itemCombo2.selectedItemIndex = 0;
  420. slotCombo.selectedItemIndex = 0;
  421. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  422. poseScrollPos = new Vector2(0.0f, 0.0f);
  423. faceScrollPos = new Vector2(0.0f, 0.0f);
  424. bgScrollPos = new Vector2(0.0f, 0.0f);
  425. saveSceneScrollPos = new Vector2(0.0f, 0.0f);
  426. bg2ScrollPos = new Vector2(0.0f, 0.0f);
  427. Vignetting component = GameMain.Instance.MainCamera.gameObject.GetComponent<Vignetting>();
  428. component.mode = Vignetting.AberrationMode.Simple;
  429. component.intensity = -3.98f;
  430. component.chromaticAberration = -0.75f;
  431. component.axialAberration = 1.18f;
  432. component.blurSpread = 4.19f;
  433. component.luminanceDependency = 0.494f;
  434. component.blurDistance = 1.71f;
  435. component.enabled = false;
  436. doguIndex.Clear();
  437. doguSelectIndex = 0;
  438. for (int index = 0; index < doguObject.Count; ++index)
  439. {
  440. if (doguObject[index] != null)
  441. {
  442. GraphicsUtils.Destroy(doguObject[index]);
  443. doguObject[index] = null;
  444. }
  445. }
  446. doguObject.Clear();
  447. }
  448. public void init()
  449. {
  450. isInit = true;
  451. isVR = GameMain.Instance.VRMode;
  452. for (int index1 = 0; index1 < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index1)
  453. {
  454. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index1];
  455. if (goSlot[index1] != null)
  456. {
  457. stockMaid.body0.goSlot = new List<TBodySkin>(goSlot[index1]);
  458. for (int index2 = 0; index2 < bodyHit[index1].Count; ++index2)
  459. {
  460. stockMaid.body0.goSlot[index2].bonehair.bodyhit = bodyHit[index1][index2];
  461. }
  462. if (!GameMain.Instance.VRMode)
  463. {
  464. stockMaid.body0.quaDefEyeL.eulerAngles = eyeL[index1];
  465. stockMaid.body0.quaDefEyeR.eulerAngles = eyeR[index1];
  466. }
  467. shodaiFlg[index1] = false;
  468. }
  469. if (SkirtListArray[index1] != null)
  470. {
  471. for (int index2 = 0; index2 < stockMaid.body0.goSlot.Count; ++index2)
  472. {
  473. SetFieldValue<BoneHair3, DynamicSkirtBone>(stockMaid.body0.goSlot[index2].bonehair3,
  474. "m_SkirtBone",
  475. SkirtListArray[index1][index2]);
  476. }
  477. }
  478. }
  479. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  480. {
  481. if (maidArray[index1])
  482. {
  483. maidArray[index1].StopKuchipakuPattern();
  484. }
  485. if (maidArray[index1])
  486. {
  487. maidArray[index1].body0.trsLookTarget = GameMain.Instance.MainCamera.transform;
  488. }
  489. if (maidArray[index1] && maidArray[index1].Visible && maidArray[index1].body0.isLoadedBody)
  490. {
  491. maidArray[index1].CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  492. maidArray[index1].SetAutoTwistAll(true);
  493. maidArray[index1].body0.MuneYureL(1f);
  494. maidArray[index1].body0.MuneYureR(1f);
  495. maidArray[index1].body0.jbMuneL.enabled = true;
  496. maidArray[index1].body0.jbMuneR.enabled = true;
  497. }
  498. if (maidArray[index1])
  499. {
  500. maidArray[index1].body0.SetMask(TBody.SlotID.wear, true);
  501. maidArray[index1].body0.SetMask(TBody.SlotID.skirt, true);
  502. maidArray[index1].body0.SetMask(TBody.SlotID.bra, true);
  503. maidArray[index1].body0.SetMask(TBody.SlotID.panz, true);
  504. maidArray[index1].body0.SetMask(TBody.SlotID.mizugi, true);
  505. maidArray[index1].body0.SetMask(TBody.SlotID.onepiece, true);
  506. if (maidArray[index1].body0.isLoadedBody)
  507. {
  508. Maid maid = maidArray[index1];
  509. for (int index2 = 0; index2 < maid.body0.goSlot.Count; ++index2)
  510. {
  511. List<THair1> fieldValue = GetFieldValue<TBoneHair_, List<THair1>>(maid.body0.goSlot[index2].bonehair, "hair1list");
  512. for (int index3 = 0; index3 < fieldValue.Count; ++index3)
  513. {
  514. fieldValue[index3].SoftG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  515. }
  516. }
  517. }
  518. }
  519. maidArray[index1] = null;
  520. }
  521. goSlot = new List<TBodySkin>[maxMaidCnt * 2];
  522. bodyHit = new List<TBodyHit>[maxMaidCnt * 2];
  523. allowUpdate = true;
  524. if (okFlg)
  525. {
  526. GameMain.Instance.CharacterMgr.ResetCharaPosAll();
  527. for (int index = 0; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  528. {
  529. if (sceneLevel != 5 || index != editMaid)
  530. {
  531. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  532. stockMaid.transform.localScale = new Vector3(1f, 1f, 1f);
  533. TBody.MaskMode f_eMode = (TBody.MaskMode)Enum.Parse(typeof(TBody.MaskMode), "None");
  534. stockMaid.body0.SetMaskMode(f_eMode);
  535. stockMaid.boMabataki = true;
  536. }
  537. }
  538. GameMain.Instance.CharacterMgr.DeactivateCharaAll();
  539. for (int index = 11; index < GameMain.Instance.CharacterMgr.GetStockMaidCount(); ++index)
  540. {
  541. Maid stockMaid = GameMain.Instance.CharacterMgr.GetStockMaidList()[index];
  542. Vector3 zero = Vector3.zero;
  543. stockMaid.SetPos(zero);
  544. stockMaid.SetRot(zero);
  545. stockMaid.SetPosOffset(zero);
  546. if (stockMaid.body0 != null)
  547. {
  548. stockMaid.body0.SetBoneHitHeightY(0.0f);
  549. }
  550. stockMaid.Visible = false;
  551. stockMaid.ActiveSlotNo = -1;
  552. stockMaid.DelPrefabAll();
  553. if (stockMaid.body0.isLoadedBody)
  554. {
  555. stockMaid.CrossFade(poseArray[0] + ".anm", false, true, false, 0.0f, 1f);
  556. stockMaid.SetAutoTwistAll(true);
  557. }
  558. stockMaid.boMabataki = true;
  559. }
  560. }
  561. okFlg = false;
  562. isDance = false;
  563. isDanceChu = false;
  564. isSavePose = false;
  565. // bgIndex = 0;
  566. // bgIndexB = 0;
  567. bg.localScale = new Vector3(1f, 1f, 1f);
  568. softG = new Vector3(0.0f, -3f / 1000f, 0.0f);
  569. softG2 = new Vector3(0.0f, -0.005f, 0.0f);
  570. if (!GameMain.Instance.VRMode)
  571. {
  572. Bloom fieldValue = GetFieldValue<CameraMain, Bloom>(mainCamera, "m_gcBloom");
  573. fieldValue.enabled = true;
  574. fieldValue.bloomIntensity = 2.85f;
  575. fieldValue.hdr = Bloom.HDRBloomMode.Auto;
  576. fieldValue.bloomThreshholdColor = new Color(1f, 1f, 1f);
  577. fieldValue.bloomBlurIterations = 3;
  578. }
  579. mainCamera.GetComponent<Camera>().backgroundColor = new Color(0.0f, 0.0f, 0.0f);
  580. maidCnt = 0;
  581. wearIndex = 0;
  582. isF6 = false;
  583. faceFlg = false;
  584. faceFlg2 = false;
  585. sceneFlg = false;
  586. poseFlg = false;
  587. kankyoFlg = false;
  588. kankyo2Flg = false;
  589. unLockFlg = false;
  590. inName = "";
  591. inName2 = "";
  592. inName3 = "";
  593. inText = "";
  594. fontSize = 25;
  595. bGuiMessage = false;
  596. isMessage = false;
  597. GameObject gameObject = GameObject.Find("__GameMain__/SystemUI Root").transform.Find("MessageWindowPanel").gameObject;
  598. MessageWindowMgr messageWindowMgr = GameMain.Instance.ScriptMgr.adv_kag.MessageWindowMgr;
  599. new MessageClass(gameObject, messageWindowMgr).Clear();
  600. messageWindowMgr.CloseMessageWindowPanel();
  601. SetFieldValue<UILabel, int>(UTY.GetChildObject(gameObject, "MessageViewer/MsgParent/Message", false).GetComponent<UILabel>(),
  602. "mFontSize",
  603. fontSize);
  604. ikMaid = 0;
  605. ikBui = 0;
  606. isNamida = false;
  607. isNamidaH = false;
  608. isSekimenH = false;
  609. isHohoH = false;
  610. isTear1 = false;
  611. isTear2 = false;
  612. isTear3 = false;
  613. isShock = false;
  614. isYodare = false;
  615. isHoho = false;
  616. isHoho2 = false;
  617. isHohos = false;
  618. isHohol = false;
  619. isToothoff = false;
  620. isNosefook = false;
  621. isFaceInit = false;
  622. isPoseInit = false;
  623. isWear = true;
  624. isSkirt = true;
  625. isMekure1 = false;
  626. isMekure2 = false;
  627. isZurasi = false;
  628. isBra = true;
  629. isPanz = true;
  630. isHeadset = true;
  631. isAccUde = true;
  632. isStkg = true;
  633. isShoes = true;
  634. isGlove = true;
  635. isMegane = true;
  636. isAccSenaka = true;
  637. isMaid = true;
  638. isPanel = true;
  639. isBloom = false;
  640. isBloomA = false;
  641. isBlur = false;
  642. isBlur2 = false;
  643. bloom1 = 2.85f;
  644. bloom2 = 3f;
  645. bloom3 = 0.0f;
  646. bloom4 = 0.0f;
  647. bloom5 = 0.0f;
  648. blur1 = -3.98f;
  649. blur4 = -0.75f;
  650. blur2 = 0.9f;
  651. blur3 = 4.19f;
  652. bokashi = 0.0f;
  653. kamiyure = 0.0f;
  654. isDepth = false;
  655. isDepthA = false;
  656. depth1 = 3f;
  657. depth2 = 0.1f;
  658. depth3 = 15f;
  659. depth4 = 2.5f;
  660. isFog = false;
  661. fog1 = 4f;
  662. fog2 = 1f;
  663. fog3 = 1f;
  664. fog4 = 0.0f;
  665. fog5 = 1f;
  666. fog6 = 1f;
  667. fog7 = 1f;
  668. isSepia = false;
  669. isSepian = false;
  670. isBloomS = true;
  671. isDepthS = false;
  672. isBlurS = false;
  673. isFogS = false;
  674. isHairSetting = true;
  675. isSkirtSetting = false;
  676. if (depth_field_ != null)
  677. {
  678. depth_field_.enabled = false;
  679. }
  680. if (fog_ != null)
  681. {
  682. fog_.enabled = false;
  683. }
  684. if (sepia_tone_ != null)
  685. {
  686. sepia_tone_.enabled = false;
  687. }
  688. isCube = false;
  689. isCube2 = true;
  690. isCube3 = false;
  691. isCube4 = true;
  692. isCubeS = false;
  693. cubeSize = 0.12f;
  694. isPoseEdit = false;
  695. isFaceEdit = false;
  696. bgmIndex = 0;
  697. if (sceneLevel == 5)
  698. {
  699. bgmIndex = 2;
  700. }
  701. effectIndex = 0;
  702. selectMaidIndex = 0;
  703. copyIndex = 0;
  704. selectLightIndex = 0;
  705. doguBIndex = 0;
  706. parIndex = 0;
  707. isEditNo = 0;
  708. editSelectMaid = null;
  709. for (int index = 0; index < 10; ++index)
  710. {
  711. date[index] = "";
  712. ninzu[index] = "";
  713. }
  714. isDanceStart1F = false;
  715. isDanceStart1K = false;
  716. isDanceStart2F = false;
  717. isDanceStart3F = false;
  718. isDanceStart3K = false;
  719. isDanceStart4F = false;
  720. isDanceStart4K = false;
  721. isDanceStart5F = false;
  722. isDanceStart5K = false;
  723. isDanceStart6F = false;
  724. isDanceStart6K = false;
  725. isDanceStart7F = false;
  726. isDanceStart7V = false;
  727. isDanceStart8F = false;
  728. isDanceStart8V = false;
  729. isDanceStart8P = false;
  730. isDanceStart9F = false;
  731. isDanceStart9K = false;
  732. isDanceStart10F = false;
  733. isDanceStart11F = false;
  734. isDanceStart11V = false;
  735. isDanceStart12F = false;
  736. isDanceStart13F = false;
  737. isDanceStart13K = false;
  738. isDanceStart14F = false;
  739. isDanceStart14V = false;
  740. isDanceStart15F = false;
  741. isDanceStart15V = false;
  742. for (int index1 = 0; index1 < maxMaidCnt; ++index1)
  743. {
  744. danceFace[index1] = 0.0f;
  745. FaceName[index1] = "";
  746. FaceName2[index1] = "";
  747. FaceName3[index1] = "";
  748. isStop[index1] = false;
  749. isBone[index1] = false;
  750. isBoneN[index1] = false;
  751. poseIndex[index1] = 0;
  752. itemIndex[index1] = 0;
  753. itemIndex2[index1] = 0;
  754. faceIndex[index1] = 0;
  755. faceBlendIndex[index1] = 0;
  756. headEyeIndex[index1] = 0;
  757. isLock[index1] = false;
  758. isFace[index1] = true;
  759. mekure1[index1] = false;
  760. mekure2[index1] = false;
  761. zurasi[index1] = false;
  762. mekure1n[index1] = false;
  763. mekure2n[index1] = false;
  764. zurasin[index1] = false;
  765. isLook[index1] = false;
  766. isLookn[index1] = false;
  767. lookX[index1] = 0.0f;
  768. lookY[index1] = -0.0f;
  769. lookXn[index1] = 0.0f;
  770. lookYn[index1] = -0.0f;
  771. voice1[index1] = false;
  772. voice2[index1] = false;
  773. voice1n[index1] = false;
  774. voice2n[index1] = false;
  775. hanten[index1] = false;
  776. hantenn[index1] = false;
  777. kotei[index1] = false;
  778. xFlg[index1] = false;
  779. zFlg[index1] = false;
  780. ikMode[index1] = 0;
  781. GraphicsUtils.Destroy(gMaid[index1]);
  782. GraphicsUtils.Destroy(gMaidC[index1]);
  783. GraphicsUtils.Destroy(gHandL[index1]);
  784. GraphicsUtils.Destroy(gArmL[index1]);
  785. GraphicsUtils.Destroy(gHandR[index1]);
  786. GraphicsUtils.Destroy(gArmR[index1]);
  787. GraphicsUtils.Destroy(gFootL[index1]);
  788. GraphicsUtils.Destroy(gHizaL[index1]);
  789. GraphicsUtils.Destroy(gFootR[index1]);
  790. GraphicsUtils.Destroy(gHizaR[index1]);
  791. GraphicsUtils.Destroy(gClavicleL[index1]);
  792. GraphicsUtils.Destroy(gClavicleR[index1]);
  793. GraphicsUtils.Destroy(gNeck[index1]);
  794. GraphicsUtils.Destroy(gSpine[index1]);
  795. GraphicsUtils.Destroy(gSpine0a[index1]);
  796. GraphicsUtils.Destroy(gSpine1a[index1]);
  797. GraphicsUtils.Destroy(gSpine1[index1]);
  798. GraphicsUtils.Destroy(gPelvis[index1]);
  799. GraphicsUtils.Destroy(gizmoHandL[index1]);
  800. GraphicsUtils.Destroy(gizmoHandR[index1]);
  801. GraphicsUtils.Destroy(gizmoFootL[index1]);
  802. GraphicsUtils.Destroy(gizmoFootR[index1]);
  803. GraphicsUtils.Destroy(gizmoNeck[index1]);
  804. GraphicsUtils.Destroy(gizmoPelvis[index1]);
  805. HandL1[index1] = null;
  806. for (int index2 = 0; index2 < 30; ++index2)
  807. {
  808. GraphicsUtils.Destroy(gFinger[index1, index2]);
  809. }
  810. for (int index2 = 0; index2 < 12; ++index2)
  811. {
  812. GraphicsUtils.Destroy(gFinger2[index1, index2]);
  813. }
  814. isIK[index1] = isIKAll;
  815. pHandL[index1] = 0;
  816. pHandR[index1] = 0;
  817. muneIKL[index1] = false;
  818. muneIKR[index1] = false;
  819. }
  820. if (kami)
  821. {
  822. kami.SetActive(false);
  823. }
  824. danceCheckIndex = 0;
  825. for (int index = 0; index < danceCheck.Length; ++index)
  826. {
  827. danceCheck[danceCheckIndex] = 1f;
  828. }
  829. lightIndex = new List<int>
  830. {
  831. 0
  832. };
  833. lightColorR = new List<float>
  834. {
  835. 1f
  836. };
  837. lightColorG = new List<float>
  838. {
  839. 1f
  840. };
  841. lightColorB = new List<float>
  842. {
  843. 1f
  844. };
  845. lightX = new List<float>
  846. {
  847. 40f
  848. };
  849. lightY = new List<float>
  850. {
  851. 180f
  852. };
  853. lightAkarusa = new List<float>
  854. {
  855. 0.95f
  856. };
  857. lightKage = new List<float>
  858. {
  859. 0.098f
  860. };
  861. lightRange = new List<float>
  862. {
  863. 50f
  864. };
  865. isIdx1 = false;
  866. isIdx2 = false;
  867. isIdx3 = false;
  868. isIdx4 = false;
  869. GraphicsUtils.Destroy(cameraObj);
  870. GraphicsUtils.Destroy(subcamera);
  871. bgObject.SetActive(true);
  872. GameMain.Instance.MainLight.Reset();
  873. GameMain.Instance.MainLight.SetIntensity(0.95f);
  874. GameMain.Instance.MainLight.GetComponent<Light>().spotAngle = 30f;
  875. GameMain.Instance.MainLight.GetComponent<Light>().range = 10f;
  876. GameMain.Instance.MainLight.GetComponent<Light>().type = LightType.Directional;
  877. GameMain.Instance.MainLight.gameObject.transform.position = new Vector3(0.0f, 2f, 0.0f);
  878. if (!GameMain.Instance.VRMode)
  879. {
  880. m_material = new Material(Shader.Find("Transparent/Diffuse"))
  881. {
  882. color = new Color(0.4f, 0.4f, 1f, 0.8f)
  883. };
  884. m_UOCamera = GetFieldValue<CameraMain, UltimateOrbitCamera>(mainCamera, "m_UOCamera");
  885. if (sceneLevel == 3)
  886. {
  887. m_UOCamera.enabled = true;
  888. }
  889. }
  890. for (int index = 0; index < doguBObject.Count; ++index)
  891. {
  892. GraphicsUtils.Destroy(doguBObject[index]);
  893. }
  894. doguBObject.Clear();
  895. doguBIndex = 0;
  896. parIndex = 0;
  897. doguCombo.selectedItemIndex = 0;
  898. parCombo.selectedItemIndex = 0;
  899. for (int index = 1; index < lightList.Count; ++index)
  900. {
  901. GraphicsUtils.Destroy(lightList[index]);
  902. }
  903. lightList = new List<GameObject>
  904. {
  905. GameMain.Instance.MainLight.gameObject
  906. };
  907. lightComboList = new GUIContent[lightList.Count];
  908. lightComboList[0] = new GUIContent("メイン");
  909. lightCombo.selectedItemIndex = 0;
  910. selectLightIndex = 0;
  911. kankyoCombo.selectedItemIndex = 0;
  912. itemCombo2.selectedItemIndex = 0;
  913. slotCombo.selectedItemIndex = 0;
  914. maidCallScrollPos = new Vector2(0.0f, 0.0f);
  915. poseScrollPos = new Vector2(0.0f, 0.0f);
  916. faceScrollPos = new Vector2(0.0f, 0.0f);
  917. bgScrollPos = new Vector2(0.0f, 0.0f);
  918. saveSceneScrollPos = 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. }