MultipleMaids.Init.cs 67 KB

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