MultipleMaids.Init.cs 67 KB

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