1
0

MultipleMaids.Init.cs 68 KB

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