MultipleMaids.Init.cs 60 KB

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