MultipleMaids.Init.cs 67 KB

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