MultipleMaids.Init.cs 68 KB

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