MultipleMaids.Init.cs 58 KB

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