MultipleMaids.Init.cs 60 KB

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