MultipleMaids.Init.cs 54 KB

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