MultipleMaids.Init.cs 58 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289
  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 =
  916. GameUty.FileSystem.FileOpen("edit_pose_dg" + index1 + str + "_00" + index3 + "_f.anm"))
  917. if (afileBase3.IsValid())
  918. stringList5.Add("edit_pose_dg" + index1 + str + "_00" + index3 + "_f");
  919. else
  920. using (AFileBase afileBase4 =
  921. GameUty.FileSystem.FileOpen("edit_pose_dg" + index1 + str + "_0" + index3 + "_f.anm"))
  922. if (afileBase4.IsValid())
  923. stringList5.Add("edit_pose_dg" + index1 + str + "_0" + index3 + "_f");
  924. }
  925. if (stringList5.Count > 0)
  926. stringList4.AddRange(stringList5.ToArray());
  927. using (GameUty.FileSystem.FileOpen("dance_cm3d_003_sp2_f1.anm"))
  928. ;
  929. using (GameUty.FileSystem.FileOpen("dance_cm3d2_kara_003_ddfl_f1.anm"))
  930. ;
  931. using (GameUty.FileSystem.FileOpen("dance_cm3d2_kara02_001_smt_f1.anm"))
  932. ;
  933. stringList4.AddRange(poseArrayVP2);
  934. stringList4.AddRange(poseArrayFB);
  935. stringList4.AddRange(poseArray4);
  936. stringList4.AddRange(poseArray5);
  937. stringList4.AddRange(poseArray6);
  938. poseArray = stringList4.ToArray();
  939. ((Action<string, List<string>>) ((path, result_list) =>
  940. {
  941. var files = Directory.GetFiles(path);
  942. this.countS = 0;
  943. for (int index = 0; index < files.Length; ++index)
  944. if (Path.GetExtension(files[index]) == ".anm")
  945. {
  946. strListS.Add(files[index].Split('\\')[files[index].Split('\\').Length - 1]
  947. .Split('.')[0] + "                    /"
  948. + files[index]);
  949. ++this.countS;
  950. }
  951. }))(Path.GetFullPath(".\\") + "Mod\\MultipleMaidsPose", new List<string>());
  952. var list = GameUty.FileSystem.GetList("motion", AFileSystemBase.ListType.AllFile);
  953. int num = 0;
  954. var stringList6 = new List<string>();
  955. foreach (string path2 in list)
  956. {
  957. string withoutExtension = Path.GetFileNameWithoutExtension(path2);
  958. string directoryName = Path.GetDirectoryName(path2);
  959. if (!withoutExtension.StartsWith("maid_motion_") && !withoutExtension.StartsWith("work_00")
  960. && !withoutExtension.EndsWith("_3_") && !withoutExtension.EndsWith("_5_")
  961. && !withoutExtension.StartsWith("ck_")
  962. && !withoutExtension.StartsWith("vr_")
  963. && !withoutExtension.StartsWith("dance_mc")
  964. && !withoutExtension.Contains("a01_") && !withoutExtension.StartsWith("j_")
  965. && !withoutExtension.StartsWith("k_") && !withoutExtension.StartsWith("t_")
  966. && !withoutExtension.StartsWith("cbl_")
  967. && !withoutExtension.Contains("b01_") && !withoutExtension.Contains("b02_")
  968. && !withoutExtension.Contains("_kubi_")
  969. && !withoutExtension.EndsWith("_m2") && !withoutExtension.EndsWith("_m3")
  970. && !withoutExtension.Contains("_m2_once")
  971. && !withoutExtension.Contains("_m3_once")
  972. && !withoutExtension.StartsWith("h_")
  973. && !withoutExtension.StartsWith("event_")
  974. && !withoutExtension.StartsWith("man_") && !withoutExtension.EndsWith("_m")
  975. && !withoutExtension.Contains("_m_") && !withoutExtension.Contains("_man")
  976. && !(withoutExtension == "dance_cm3d2_001_zoukin")
  977. && !(withoutExtension == "dance_cm3d2_001_mop")
  978. && !(withoutExtension == "maid_motion")
  979. && !(withoutExtension == "aruki_1_idougo_f")
  980. && !(withoutExtension == "sleep2") && !(withoutExtension == "stand_akire2")
  981. && !(withoutExtension == "ero_scene_001")
  982. && !(withoutExtension == "ero_scenefm_001")
  983. && !(withoutExtension == "training_001")
  984. && !(withoutExtension == "workff_001")
  985. && !(withoutExtension == "workfm_001")
  986. && !(withoutExtension == "dance_cm3d21_005_moe_mset")
  987. && !(withoutExtension == "hinpyoukai_001"))
  988. {
  989. if (!directoryName.Contains("\\sex\\"))
  990. {
  991. if (!withoutExtension.StartsWith("sex_"))
  992. {
  993. if (withoutExtension.StartsWith("dance_test"))
  994. {
  995. strListD.Add(withoutExtension);
  996. }
  997. else
  998. {
  999. bool flag = false;
  1000. foreach (string str1 in strListS)
  1001. {
  1002. var chArray = new char[1] {'/'};
  1003. string str2 = str1.Split(chArray)[0].Replace("                    ", "");
  1004. if (withoutExtension == str2)
  1005. {
  1006. flag = true;
  1007. break;
  1008. }
  1009. }
  1010. if (!flag)
  1011. stringList6.Add(withoutExtension);
  1012. }
  1013. }
  1014. }
  1015. else if (!withoutExtension.StartsWith("pose_"))
  1016. {
  1017. strListE.Add(withoutExtension);
  1018. }
  1019. }
  1020. }
  1021. foreach (string str in stringList6)
  1022. {
  1023. bool flag = false;
  1024. for (int index = 0; index < poseArray.Length; ++index)
  1025. if (str == poseArray[index])
  1026. flag = true;
  1027. if (!flag && str.StartsWith("edit_"))
  1028. strList2.Add(str);
  1029. }
  1030. foreach (string str in stringList6)
  1031. {
  1032. bool flag = false;
  1033. for (int index = 0; index < poseArray.Length; ++index)
  1034. if (str == poseArray[index])
  1035. flag = true;
  1036. if (!flag && str.StartsWith("pose_"))
  1037. strList2.Add(str);
  1038. }
  1039. foreach (string str in stringList6)
  1040. {
  1041. bool flag = false;
  1042. for (int index = 0; index < poseArray.Length; ++index)
  1043. if (str == poseArray[index])
  1044. flag = true;
  1045. if (!flag && !str.StartsWith("edit_") && !str.StartsWith("pose_"))
  1046. strList2.Add(str);
  1047. }
  1048. foreach (string str in strListE)
  1049. {
  1050. bool flag = false;
  1051. for (int index = 0; index < poseArray.Length; ++index)
  1052. if (str == poseArray[index])
  1053. flag = true;
  1054. if (!flag)
  1055. {
  1056. strListE2.Add(str);
  1057. ++num;
  1058. }
  1059. }
  1060. stringList4.AddRange(strList2.ToArray());
  1061. stringList4.AddRange(strListE2.ToArray());
  1062. existPose = false;
  1063. poseIniStr = "";
  1064. foreach (IniKey key in Preferences["pose"].Keys)
  1065. {
  1066. IniKey iniKey = Preferences["pose"][key.Key];
  1067. if (iniKey.Value != null && iniKey.Value != "" && iniKey.Value != "del")
  1068. {
  1069. stringList4.AddRange(new string[1] {key.Key});
  1070. existPose = true;
  1071. if (poseIniStr == "")
  1072. poseIniStr = key.Key;
  1073. }
  1074. }
  1075. stringList4.AddRange(strListS.ToArray());
  1076. poseArray = stringList4.ToArray();
  1077. var stringList7 = new List<string>(50 + poseGroupArray2.Length);
  1078. stringList7.AddRange(poseGroupArray2);
  1079. stringList7.AddRange(poseGroupArrayVP);
  1080. stringList7.AddRange(poseGroupArrayFB);
  1081. stringList7.AddRange(poseGroupArray3);
  1082. stringList7.Add(poseArray5[0]);
  1083. stringList7.Add(poseArray6[0]);
  1084. stringList7.Add(strList2[0]);
  1085. stringList7.Add(strListE2[0]);
  1086. if (strListS.Count > 0 && poseIniStr == "")
  1087. {
  1088. stringList7.Add(strListS[0]);
  1089. existPose = true;
  1090. }
  1091. if (poseIniStr != "")
  1092. stringList7.Add(poseIniStr);
  1093. poseGroupArray = stringList7.ToArray();
  1094. groupList = new ArrayList();
  1095. for (int index1 = 0; index1 < poseArray.Length; ++index1)
  1096. for (int index2 = 0; index2 < poseGroupArray.Length; ++index2)
  1097. if (poseGroupArray[index2] == poseArray[index1])
  1098. {
  1099. groupList.Add(index1);
  1100. if (poseGroupArray[index2] == strList2[0])
  1101. sPoseCount = index1;
  1102. }
  1103. var strArray1 = new string[1] {"Salon_Day"};
  1104. var strArray2 = new string[2] {"SMRoom2", "LockerRoom"};
  1105. var strArray3 = new string[2] {"Oheya", "MyBedRoom_NightOff"};
  1106. var strArray4 = new string[4] {"ClassRoom", "ClassRoom_Play", "HoneymoonRoom", "OutletPark"};
  1107. var strArray5 = new string[9]
  1108. {
  1109. "BigSight", "BigSight_Night", "PrivateRoom", "PrivateRoom_Night", "Sea", "Sea_Night", "Yashiki_Day", "Yashiki",
  1110. "Yashiki_Pillow"
  1111. };
  1112. var strArray6 = new string[8]
  1113. {
  1114. "rotenburo", "rotenburo_night", "villa", "villa_night", "villa_bedroom", "villa_bedroom_night", "villa_farm",
  1115. "villa_farm_night"
  1116. };
  1117. var strArray7 = new string[1] {"karaokeroom"};
  1118. var stringList8 = new List<string>(50 + poseArray2.Length);
  1119. stringList8.AddRange(bgArray2);
  1120. var stringList9 = new List<string>();
  1121. var saveDataDic = CreativeRoomManager.GetSaveDataDic();
  1122. if (saveDataDic != null)
  1123. foreach (var keyValuePair in saveDataDic)
  1124. stringList9.Add(keyValuePair.Key);
  1125. stringList8.AddRange(stringList9.ToArray());
  1126. if (isCM3D2)
  1127. {
  1128. stringList8.AddRange(bgArray21);
  1129. if (isVP)
  1130. stringList8.AddRange(strArray2);
  1131. if (isPP)
  1132. stringList8.AddRange(strArray3);
  1133. if (isPP2)
  1134. stringList8.AddRange(strArray4);
  1135. if (isPP3)
  1136. stringList8.AddRange(strArray5);
  1137. if (isVA)
  1138. stringList8.AddRange(strArray6);
  1139. if (isKA || isKA2)
  1140. stringList8.AddRange(strArray7);
  1141. stringList8.AddRange(strArray1);
  1142. }
  1143. bgArray = stringList8.ToArray();
  1144. var strArray8 = new string[3] {"dokidokifallinlove_short_inst", "dokidokifallinlove_short", "entrancetoyou_short"};
  1145. var strArray9 = new string[1] {"scarlet leap_short"};
  1146. var strArray10 = new string[3] {"stellarmytears_short", "stellarmytears_short2", "stellarmytears_short3"};
  1147. var strArray11 = new string[1] {"RhythmixToYou"};
  1148. var strArray12 = new string[3] {"happy_happy_scandal1", "happy_happy_scandal2", "happy_happy_scandal3"};
  1149. var strArray13 = new string[1] {"can_know_two_close"};
  1150. var strArray14 = new string[3] {"sweetsweeteveryday_short1", "sweetsweeteveryday_short2", "sweetsweeteveryday_short3"};
  1151. var strArray15 = new string[5]
  1152. {
  1153. "bloomingdreaming_short", "kiminiaijodelicious_short", "luminousmoment_short", "nightmagicfire_short",
  1154. "melodyofempire_short"
  1155. };
  1156. var stringList10 = new List<string>(50);
  1157. stringList10.AddRange(bgmArray2);
  1158. var stringList11 = new List<string>();
  1159. for (int index = 18; index < 210; ++index)
  1160. if (index < 100)
  1161. using (AFileBase afileBase5 = GameUty.FileSystem.FileOpen("bgm0" + index + ".ogg"))
  1162. if (afileBase5.IsValid())
  1163. stringList11.Add("bgm0" + index);
  1164. else
  1165. using (AFileBase afileBase6 = GameUty.FileSystem.FileOpen("bgm" + index + ".ogg"))
  1166. if (afileBase6.IsValid())
  1167. stringList11.Add("bgm" + index);
  1168. if (stringList11.Count > 0)
  1169. stringList10.AddRange(stringList11.ToArray());
  1170. stringList10.AddRange(strArray8);
  1171. stringList10.AddRange(strArray9);
  1172. stringList10.AddRange(strArray11);
  1173. stringList10.AddRange(strArray15);
  1174. bgmArray = stringList10.ToArray();
  1175. var strArray16 = new string[2] {"OutletPark:54", "HoneymoonRoom:102"};
  1176. var stringList12 = new List<string>(50 + parArray2.Length);
  1177. stringList12.AddRange(parArray2);
  1178. var enabled_id_list = new HashSet<int>();
  1179. var action3 = (Action<string>) (file_name =>
  1180. {
  1181. file_name += ".nei";
  1182. if (!GameUty.FileSystem.IsExistentFile(file_name))
  1183. return;
  1184. using (AFileBase file = GameUty.FileSystem.FileOpen(file_name))
  1185. {
  1186. using (var csvParser = new CsvParser())
  1187. {
  1188. NDebug.Assert(csvParser.Open(file), file_name + "\nopen failed.");
  1189. for (int cell_y = 1; cell_y < csvParser.max_cell_y; ++cell_y)
  1190. if (csvParser.IsCellToExistData(0, cell_y))
  1191. {
  1192. int cellAsInteger = csvParser.GetCellAsInteger(0, cell_y);
  1193. if (!enabled_id_list.Contains(cellAsInteger))
  1194. enabled_id_list.Add(cellAsInteger);
  1195. }
  1196. }
  1197. }
  1198. });
  1199. action3("desk_item_enabled_id");
  1200. for (int index = 0; index < GameUty.PathList.Count; ++index)
  1201. action3("desk_item_enabled_id_" + GameUty.PathList[index]);
  1202. using (AFileBase file = GameUty.FileSystem.FileOpen("desk_item_detail.nei"))
  1203. {
  1204. using (var csv = new CsvParser())
  1205. {
  1206. NDebug.Assert(csv.Open(file), "desk_item_detail.nei\nopen failed.");
  1207. for (int index = 1; index < csv.max_cell_y; ++index)
  1208. if (csv.IsCellToExistData(0, index))
  1209. {
  1210. int cellAsInteger = csv.GetCellAsInteger(0, index);
  1211. if (enabled_id_list.Contains(cellAsInteger))
  1212. {
  1213. var itemData2 = new ItemData2(csv, index);
  1214. if (itemData2.asset_name != "")
  1215. stringList12.AddRange(new string[1] {itemData2.name + "                    #" + itemData2.asset_name});
  1216. }
  1217. }
  1218. }
  1219. }
  1220. stringList12.AddRange(parArray3);
  1221. parArray = stringList12.ToArray();
  1222. var stringList13 = new List<string>(50 + doguBArray.Length);
  1223. stringList13.AddRange(doguBArray);
  1224. if (isCM3D2)
  1225. {
  1226. if (isVA)
  1227. stringList13.AddRange(doguB2Array);
  1228. if (isKA)
  1229. stringList13.AddRange(doguB3Array);
  1230. if (isKA2)
  1231. stringList13.AddRange(doguB4Array);
  1232. }
  1233. doguBArray = stringList13.ToArray();
  1234. var stringList14 = new List<string>(100 + itemBArray.Length);
  1235. stringList14.AddRange(itemBArray);
  1236. if (isCM3D2)
  1237. {
  1238. if (isVA)
  1239. stringList14.AddRange(itemB2Array);
  1240. if (isKA)
  1241. stringList14.AddRange(itemB3Array);
  1242. if (isKA2)
  1243. stringList14.AddRange(itemB4Array);
  1244. }
  1245. itemBArray = stringList14.ToArray();
  1246. }
  1247. }
  1248. }