MultipleMaids.Init.cs 66 KB

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