EmpireLifeModeData.cs 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using System.IO;
  5. using MaidStatus;
  6. using wf;
  7. public static class EmpireLifeModeData
  8. {
  9. public static int Count
  10. {
  11. get
  12. {
  13. EmpireLifeModeData.CreateData();
  14. return EmpireLifeModeData.commonIdManager.idMap.Count;
  15. }
  16. }
  17. public static bool Contains(int id)
  18. {
  19. EmpireLifeModeData.CreateData();
  20. return EmpireLifeModeData.commonIdManager.idMap.ContainsKey(id);
  21. }
  22. public static int uniqueNameToId(string name)
  23. {
  24. EmpireLifeModeData.CreateData();
  25. NDebug.Assert(EmpireLifeModeData.commonIdManager.nameMap.ContainsKey(name), "エンパイアライフモード.csv\nユニーク名[" + name + "]をIDに変換できませんでした");
  26. return EmpireLifeModeData.commonIdManager.nameMap[name];
  27. }
  28. public static string IdToUniqueName(int id)
  29. {
  30. EmpireLifeModeData.CreateData();
  31. NDebug.Assert(EmpireLifeModeData.commonIdManager.idMap.ContainsKey(id), "エンパイアライフモード.csv\nID[" + id + "]をユニーク名に変換できませんでした");
  32. return EmpireLifeModeData.commonIdManager.idMap[id].Key;
  33. }
  34. public static EmpireLifeModeData.Data GetData(int id)
  35. {
  36. EmpireLifeModeData.CreateData();
  37. NDebug.Assert(EmpireLifeModeData.basicDatas.ContainsKey(id), "エンパイアライフモード.csv\nID[" + id + "]のデータは存在しません");
  38. return EmpireLifeModeData.basicDatas[id];
  39. }
  40. public static EmpireLifeModeData.Data GetData(string uniqueName)
  41. {
  42. return EmpireLifeModeData.GetData(EmpireLifeModeData.uniqueNameToId(uniqueName));
  43. }
  44. public static bool IsEnabled(int id)
  45. {
  46. EmpireLifeModeData.CreateData();
  47. return EmpireLifeModeData.commonIdManager.enabledIdList.Contains(id);
  48. }
  49. public static bool IsEnabled(string uniqueName)
  50. {
  51. EmpireLifeModeData.CreateData();
  52. return EmpireLifeModeData.commonIdManager.enabledIdList.Contains(EmpireLifeModeData.uniqueNameToId(uniqueName));
  53. }
  54. public static List<EmpireLifeModeData.Data> GetAllDatas(bool onlyEnabled)
  55. {
  56. EmpireLifeModeData.CreateData();
  57. List<EmpireLifeModeData.Data> list = new List<EmpireLifeModeData.Data>();
  58. foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in EmpireLifeModeData.commonIdManager.idMap)
  59. {
  60. if (!onlyEnabled || EmpireLifeModeData.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
  61. {
  62. list.Add(EmpireLifeModeData.basicDatas[keyValuePair.Key]);
  63. }
  64. }
  65. return list;
  66. }
  67. public static List<EmpireLifeModeData.Data> GetDatas(Func<EmpireLifeModeData.Data, bool> customCheckFunction, bool isOnlyEnabled = true)
  68. {
  69. EmpireLifeModeData.CreateData();
  70. List<EmpireLifeModeData.Data> list = new List<EmpireLifeModeData.Data>();
  71. foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in EmpireLifeModeData.commonIdManager.idMap)
  72. {
  73. if (!isOnlyEnabled || EmpireLifeModeData.commonIdManager.enabledIdList.Contains(keyValuePair.Key))
  74. {
  75. EmpireLifeModeData.Data data = EmpireLifeModeData.basicDatas[keyValuePair.Key];
  76. if (customCheckFunction(data))
  77. {
  78. list.Add(data);
  79. }
  80. }
  81. }
  82. return list;
  83. }
  84. public static void CreateData()
  85. {
  86. if (EmpireLifeModeData.commonIdManager != null)
  87. {
  88. return;
  89. }
  90. EmpireLifeModeData.commonIdManager = new CsvCommonIdManager("empire_life_mode", "エンパイアライフモード.csv", CsvCommonIdManager.Type.IdAndUniqueName, null);
  91. EmpireLifeModeData.basicDatas = new Dictionary<int, EmpireLifeModeData.Data>();
  92. string[] array = new string[]
  93. {
  94. "list"
  95. };
  96. KeyValuePair<AFileBase, CsvParser>[] array2 = new KeyValuePair<AFileBase, CsvParser>[array.Length];
  97. for (int i = 0; i < array2.Length; i++)
  98. {
  99. string text = "empire_life_mode_" + array[i] + ".nei";
  100. AFileBase afileBase = GameUty.FileSystem.FileOpen(text);
  101. CsvParser csvParser = new CsvParser();
  102. bool condition = csvParser.Open(afileBase);
  103. NDebug.Assert(condition, text + "\nopen failed.");
  104. array2[i] = new KeyValuePair<AFileBase, CsvParser>(afileBase, csvParser);
  105. }
  106. foreach (KeyValuePair<int, KeyValuePair<string, string>> keyValuePair in EmpireLifeModeData.commonIdManager.idMap)
  107. {
  108. int key = keyValuePair.Key;
  109. EmpireLifeModeData.Data value = new EmpireLifeModeData.Data(key, array2[0].Value);
  110. EmpireLifeModeData.basicDatas.Add(key, value);
  111. }
  112. foreach (KeyValuePair<AFileBase, CsvParser> keyValuePair2 in array2)
  113. {
  114. keyValuePair2.Value.Dispose();
  115. keyValuePair2.Key.Dispose();
  116. }
  117. }
  118. public static void Clear()
  119. {
  120. if (EmpireLifeModeData.commonIdManager != null)
  121. {
  122. EmpireLifeModeData.commonIdManager = null;
  123. }
  124. }
  125. private const string csvTopCommonName = "empire_life_mode";
  126. private const string typeNameForErrorLog = "エンパイアライフモード.csv";
  127. private static CsvCommonIdManager commonIdManager;
  128. private static Dictionary<int, EmpireLifeModeData.Data> basicDatas;
  129. public enum ScenarioType
  130. {
  131. 一般,
  132. 汎用,
  133. スト\u30FCリ\u30FC,
  134. Hシ\u30FCン,
  135. セクハラ
  136. }
  137. public class Data
  138. {
  139. public Data(int uniqueID, CsvParser csv)
  140. {
  141. for (int i = 1; i < csv.max_cell_y; i++)
  142. {
  143. if (csv.IsCellToExistData(0, i) && csv.GetCellAsInteger(0, i) == uniqueID)
  144. {
  145. string text = (i + 1).ToString() + "行目";
  146. int num = 1;
  147. this.ID = uniqueID;
  148. this.strUniqueName = csv.GetCellAsString(num++, i);
  149. this.rawDataScenarioType = csv.GetCellAsString(num++, i);
  150. this.rawDataScenarioAnyNumberPlay = csv.GetCellAsString(num++, i);
  151. this.rawDataScenarioFileName = csv.GetCellAsString(num++, i);
  152. this.rawDataScenarioFileLabel = csv.GetCellAsString(num++, i);
  153. this.rawDataNTRBlock = csv.GetCellAsString(num++, i);
  154. this.rawDataFacilityUniqueName = csv.GetCellAsString(num++, i);
  155. this.rawDataFacilityCostumeChange = csv.GetCellAsString(num++, i);
  156. this.rawDataTimeZone = csv.GetCellAsString(num++, i);
  157. this.rawDataFlagPlayer = csv.GetCellAsString(num++, i);
  158. this.rawDataFlagMaid = csv.GetCellAsString(num++, i);
  159. this.rawDataMaidPersonalTypeSlot0 = csv.GetCellAsString(num++, i);
  160. this.rawDataMaidPersonalTypeSlot1 = csv.GetCellAsString(num++, i);
  161. this.rawDataMaidPersonalTypeSlot2 = csv.GetCellAsString(num++, i);
  162. this.rawDataMaidMainCharaOnly = csv.GetCellAsString(num++, i);
  163. this.rawDataMaidContract = csv.GetCellAsString(num++, i);
  164. this.rawDataMaidRelation = csv.GetCellAsString(num++, i);
  165. this.rawDataMaidStatus = csv.GetCellAsString(num++, i);
  166. this.rawDataMaidSeikeikenNoNo = csv.GetCellAsString(num++, i);
  167. this.rawDataMaidSeikeikenYesNo = csv.GetCellAsString(num++, i);
  168. this.rawDataMaidSeikeikenNoYes = csv.GetCellAsString(num++, i);
  169. this.rawDataMaidSeikeikenYesYes = csv.GetCellAsString(num++, i);
  170. this.rawDataGP002PersonalCheck = csv.GetCellAsString(num++, i);
  171. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioType), "エンパイアライフモード.csv\n項目「種類」が指定されていません。\n\n表:" + text);
  172. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioAnyNumberPlay), "エンパイアライフモード.csv\n項目「何度でも再生できるか」が指定されていません。\n\n表:" + text);
  173. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioFileName), "エンパイアライフモード.csv\n項目「シナリオファイル」が指定されていません。\n\n表:" + text);
  174. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataFacilityUniqueName), "エンパイアライフモード.csv\n項目「施設」が指定されていません。\n\n表:" + text);
  175. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataFacilityCostumeChange), "エンパイアライフモード.csv\n項目「施設コスチュームの適用」が指定されていません。\n\n表:" + text);
  176. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot0 + this.rawDataMaidPersonalTypeSlot1 + this.rawDataMaidPersonalTypeSlot2), "エンパイアライフモード.csv\n項目「メイド性格」が指定されていません。\n\n表:" + text);
  177. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenNoNo), "エンパイアライフモード.csv\n項目「経験無し」が指定されていません。\n\n表:" + text);
  178. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenYesNo), "エンパイアライフモード.csv\n項目「前穴」が指定されていません。\n\n表:" + text);
  179. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenNoYes), "エンパイアライフモード.csv\n項目「後ろ穴」が指定されていません。\n\n表:" + text);
  180. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenYesYes), "エンパイアライフモード.csv\n項目「両方」が指定されていません。\n\n表:" + text);
  181. try
  182. {
  183. this.dataScenarioType = (EmpireLifeModeData.ScenarioType)Enum.Parse(typeof(EmpireLifeModeData.ScenarioType), this.rawDataScenarioType);
  184. }
  185. catch (Exception ex)
  186. {
  187. NDebug.Assert("エンパイアライフモード.csv\n項目「種類」の変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataScenarioType, false);
  188. }
  189. if (this.rawDataScenarioAnyNumberPlay == "○" || this.rawDataScenarioAnyNumberPlay == "◯")
  190. {
  191. this.dataScenarioAnyNumberPlay = true;
  192. }
  193. else if (this.rawDataScenarioAnyNumberPlay == "×")
  194. {
  195. this.dataScenarioAnyNumberPlay = false;
  196. }
  197. else
  198. {
  199. NDebug.Assert("エンパイアライフモード.csv\n項目「何度でも再生できるか」に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataScenarioAnyNumberPlay, false);
  200. }
  201. this.dataScenarioFileName = Path.ChangeExtension(this.rawDataScenarioFileName, ".ks");
  202. if (string.IsNullOrEmpty(this.rawDataScenarioFileLabel))
  203. {
  204. this.dataScenarioFileLabel = "*top";
  205. }
  206. else
  207. {
  208. this.dataScenarioFileLabel = ((this.rawDataScenarioFileLabel.IndexOf("*") >= 0) ? this.rawDataScenarioFileLabel : ("*" + this.rawDataScenarioFileLabel));
  209. }
  210. if (string.IsNullOrEmpty(this.rawDataNTRBlock))
  211. {
  212. this.dataNTRBlock = null;
  213. }
  214. else if (this.rawDataNTRBlock == "○" || this.rawDataNTRBlock == "◯")
  215. {
  216. this.dataNTRBlock = new bool?(true);
  217. }
  218. else if (this.rawDataNTRBlock == "×")
  219. {
  220. this.dataNTRBlock = new bool?(false);
  221. }
  222. else
  223. {
  224. NDebug.Assert("エンパイアライフモード.csv\n項目「NTRブロック」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataNTRBlock, false);
  225. }
  226. this.dataFacilityUniqueNameArray = this.rawDataFacilityUniqueName.Split(new char[]
  227. {
  228. ','
  229. });
  230. for (int j = 0; j < this.dataFacilityUniqueNameArray.Length; j++)
  231. {
  232. string text2 = this.dataFacilityUniqueNameArray[j] = this.dataFacilityUniqueNameArray[j].Trim();
  233. NDebug.Assert(FacilityDataTable.GetFacilityDefaultData(text2, true) != null, "エンパイアライフモード.csv\n項目「施設」の値「" + text2 + "」は正しくない情報です。\n\n表:" + text);
  234. }
  235. if (this.rawDataFacilityCostumeChange == "○" || this.rawDataFacilityCostumeChange == "◯")
  236. {
  237. this.dataFacilityCostumeChange = true;
  238. }
  239. else if (this.rawDataFacilityCostumeChange == "×")
  240. {
  241. this.dataFacilityCostumeChange = false;
  242. }
  243. else
  244. {
  245. NDebug.Assert("エンパイアライフモード.csv\n項目「施設コスチュームの適用」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataFacilityCostumeChange, false);
  246. }
  247. if (string.IsNullOrEmpty(this.rawDataTimeZone))
  248. {
  249. this.dataTimeZone = null;
  250. }
  251. else if (this.rawDataTimeZone == "昼")
  252. {
  253. this.dataTimeZone = new ScheduleMgr.ScheduleTime?(ScheduleMgr.ScheduleTime.DayTime);
  254. }
  255. else if (this.rawDataTimeZone == "夜")
  256. {
  257. this.dataTimeZone = new ScheduleMgr.ScheduleTime?(ScheduleMgr.ScheduleTime.Night);
  258. }
  259. else
  260. {
  261. NDebug.Assert("エンパイアライフモード.csv\n項目「時間帯」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataTimeZone, false);
  262. }
  263. if (string.IsNullOrEmpty(this.rawDataFlagPlayer))
  264. {
  265. this.dataFlagPlayer = null;
  266. }
  267. else
  268. {
  269. this.dataFlagPlayer = new Dictionary<string, int>();
  270. foreach (string text3 in this.rawDataFlagPlayer.Split(new char[]
  271. {
  272. ','
  273. }))
  274. {
  275. string[] array2 = text3.Split(new char[]
  276. {
  277. ':'
  278. });
  279. NDebug.Assert(array2.Length == 2, "エンパイアライフモード.csv\n項目「プレイヤーフラグ」の書式に問題がありました。\n\n表:" + text + "\n値:" + text3);
  280. NDebug.Assert(!this.dataFlagPlayer.ContainsKey(array2[0]), "エンパイアライフモード.csv\n項目「プレイヤーフラグ」で、フラグ名が重複しました。\n\n表:" + text + "\nフラグ名:" + array2[0]);
  281. int value;
  282. if (!int.TryParse(array2[1], out value))
  283. {
  284. NDebug.Assert("エンパイアライフモード.csv\n項目「プレイヤーフラグ」で、フラグの値を整数値に変換できませんでした。\n\n表:" + text + "\n値: " + text3, false);
  285. }
  286. this.dataFlagPlayer.Add(array2[0], value);
  287. }
  288. }
  289. if (string.IsNullOrEmpty(this.rawDataFlagMaid))
  290. {
  291. this.dataFlagMaid = null;
  292. }
  293. else
  294. {
  295. this.dataFlagMaid = new Dictionary<string, int>();
  296. foreach (string text4 in this.rawDataFlagMaid.Split(new char[]
  297. {
  298. ','
  299. }))
  300. {
  301. string[] array4 = text4.Split(new char[]
  302. {
  303. ':'
  304. });
  305. NDebug.Assert(array4.Length == 2, "エンパイアライフモード.csv\n項目「メイドフラグ」の書式に問題がありました。\n\n表:" + text + "\n値:" + text4);
  306. NDebug.Assert(!this.dataFlagMaid.ContainsKey(array4[0]), "エンパイアライフモード.csv\n項目「メイドフラグ」で、フラグ名が重複しました。\n\n表:" + text + "\nフラグ名:" + array4[0]);
  307. int value2;
  308. if (!int.TryParse(array4[1], out value2))
  309. {
  310. NDebug.Assert("エンパイアライフモード.csv\n項目「メイドフラグ」で、フラグの値を整数値に変換できませんでした。\n\n表:" + text + "\n値: " + text4, false);
  311. }
  312. this.dataFlagMaid.Add(array4[0], value2);
  313. }
  314. }
  315. this.dataMaidPersonalUniqueNameAndActiveSlotDic = new Dictionary<int, string>();
  316. if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot0))
  317. {
  318. string value3;
  319. if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot0, out value3))
  320. {
  321. NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot0, false);
  322. }
  323. this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(0, value3);
  324. }
  325. if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot1))
  326. {
  327. string value4;
  328. if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot1, out value4))
  329. {
  330. NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot1, false);
  331. }
  332. this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(1, value4);
  333. }
  334. if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot2))
  335. {
  336. string value5;
  337. if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot2, out value5))
  338. {
  339. NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot2, false);
  340. }
  341. this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(2, value5);
  342. }
  343. if (string.IsNullOrEmpty(this.rawDataMaidMainCharaOnly))
  344. {
  345. this.dataMaidMainCharaOnly = null;
  346. }
  347. else if (this.rawDataMaidMainCharaOnly == "○" || this.rawDataMaidMainCharaOnly == "◯")
  348. {
  349. this.dataMaidMainCharaOnly = new bool?(true);
  350. }
  351. else if (this.rawDataMaidMainCharaOnly == "×")
  352. {
  353. this.dataMaidMainCharaOnly = new bool?(false);
  354. }
  355. else
  356. {
  357. NDebug.Assert(string.Concat(new object[]
  358. {
  359. "エンパイアライフモード.csv\n項目「初期メイドフラグ」の値に、想定外の文字が入りました。\n\n表:",
  360. text,
  361. "\n値:",
  362. this.dataMaidMainCharaOnly
  363. }), false);
  364. }
  365. if (string.IsNullOrEmpty(this.rawDataMaidContract))
  366. {
  367. this.dataMaidContract = null;
  368. }
  369. else
  370. {
  371. Contract value6;
  372. if (!EmpireLifeModeData.Data.contractTypeDic.TryGetValue(this.rawDataMaidContract, out value6))
  373. {
  374. NDebug.Assert("エンパイアライフモード.csv\n項目「契約状態」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataMaidContract, false);
  375. }
  376. this.dataMaidContract = new Contract?(value6);
  377. }
  378. if (string.IsNullOrEmpty(this.rawDataMaidRelation))
  379. {
  380. this.dataMaidRelation = null;
  381. }
  382. else
  383. {
  384. Relation value7;
  385. if (!EmpireLifeModeData.Data.relationTypeDic.TryGetValue(this.rawDataMaidRelation, out value7))
  386. {
  387. NDebug.Assert("エンパイアライフモード.csv\n項目「関係状態」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataMaidRelation, false);
  388. }
  389. this.dataMaidRelation = new Relation?(value7);
  390. }
  391. if (string.IsNullOrEmpty(this.rawDataMaidStatus))
  392. {
  393. this.dataMaidStatus = null;
  394. }
  395. else
  396. {
  397. this.dataMaidStatus = new ParametersPack();
  398. this.dataMaidStatus.Parse(this.rawDataMaidStatus.Replace(':', '='), ',');
  399. }
  400. List<Seikeiken> list = new List<Seikeiken>();
  401. if (this.rawDataMaidSeikeikenNoNo == "○" || this.rawDataMaidSeikeikenNoNo == "◯")
  402. {
  403. list.Add(Seikeiken.No_No);
  404. }
  405. if (this.rawDataMaidSeikeikenYesNo == "○" || this.rawDataMaidSeikeikenYesNo == "◯")
  406. {
  407. list.Add(Seikeiken.Yes_No);
  408. }
  409. if (this.rawDataMaidSeikeikenNoYes == "○" || this.rawDataMaidSeikeikenNoYes == "◯")
  410. {
  411. list.Add(Seikeiken.No_Yes);
  412. }
  413. if (this.rawDataMaidSeikeikenYesYes == "○" || this.rawDataMaidSeikeikenYesYes == "◯")
  414. {
  415. list.Add(Seikeiken.Yes_Yes);
  416. }
  417. this.dataMaidSeikeiken = list.ToArray();
  418. this.dataGP002PersonalCheck = (this.rawDataGP002PersonalCheck == "○" || this.rawDataGP002PersonalCheck == "◯");
  419. break;
  420. }
  421. }
  422. }
  423. public bool IsEnableGP002PersonalCheck
  424. {
  425. get
  426. {
  427. if (this.m_IsEnableGP002PersonalCheck == null)
  428. {
  429. this.m_IsEnableGP002PersonalCheck = new bool?(true);
  430. if (this.dataGP002PersonalCheck)
  431. {
  432. foreach (KeyValuePair<int, string> keyValuePair in this.dataMaidPersonalUniqueNameAndActiveSlotDic)
  433. {
  434. if (!PluginData.IsEnabledForGP002Personal(keyValuePair.Value))
  435. {
  436. this.m_IsEnableGP002PersonalCheck = new bool?(false);
  437. break;
  438. }
  439. }
  440. }
  441. }
  442. return this.m_IsEnableGP002PersonalCheck.Value;
  443. }
  444. }
  445. private static Dictionary<string, string> personalUniqueNameDic
  446. {
  447. get
  448. {
  449. if (EmpireLifeModeData.Data.m_PersonalUniqueNameDic == null)
  450. {
  451. EmpireLifeModeData.Data.m_PersonalUniqueNameDic = new Dictionary<string, string>();
  452. foreach (Personal.Data data in Personal.GetAllDatas(false))
  453. {
  454. EmpireLifeModeData.Data.m_PersonalUniqueNameDic.Add(data.drawName, data.uniqueName);
  455. }
  456. }
  457. return EmpireLifeModeData.Data.m_PersonalUniqueNameDic;
  458. }
  459. }
  460. private static Dictionary<string, Contract> contractTypeDic
  461. {
  462. get
  463. {
  464. if (EmpireLifeModeData.Data.m_ContractTypeDic == null)
  465. {
  466. EmpireLifeModeData.Data.m_ContractTypeDic = new Dictionary<string, Contract>();
  467. IEnumerator enumerator = Enum.GetValues(typeof(Contract)).GetEnumerator();
  468. try
  469. {
  470. while (enumerator.MoveNext())
  471. {
  472. object obj = enumerator.Current;
  473. Contract contract = (Contract)obj;
  474. string @string = EnumConvert.GetString(contract);
  475. EmpireLifeModeData.Data.m_ContractTypeDic.Add(@string, contract);
  476. }
  477. }
  478. finally
  479. {
  480. IDisposable disposable;
  481. if ((disposable = (enumerator as IDisposable)) != null)
  482. {
  483. disposable.Dispose();
  484. }
  485. }
  486. }
  487. return EmpireLifeModeData.Data.m_ContractTypeDic;
  488. }
  489. }
  490. private static Dictionary<string, Relation> relationTypeDic
  491. {
  492. get
  493. {
  494. if (EmpireLifeModeData.Data.m_RelationTypeDic == null)
  495. {
  496. EmpireLifeModeData.Data.m_RelationTypeDic = new Dictionary<string, Relation>();
  497. IEnumerator enumerator = Enum.GetValues(typeof(Relation)).GetEnumerator();
  498. try
  499. {
  500. while (enumerator.MoveNext())
  501. {
  502. object obj = enumerator.Current;
  503. Relation relation = (Relation)obj;
  504. string @string = EnumConvert.GetString(relation);
  505. EmpireLifeModeData.Data.m_RelationTypeDic.Add(@string, relation);
  506. }
  507. }
  508. finally
  509. {
  510. IDisposable disposable;
  511. if ((disposable = (enumerator as IDisposable)) != null)
  512. {
  513. disposable.Dispose();
  514. }
  515. }
  516. }
  517. return EmpireLifeModeData.Data.m_RelationTypeDic;
  518. }
  519. }
  520. public static List<string> personalUniqueNameEnabledList
  521. {
  522. get
  523. {
  524. if (EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList == null)
  525. {
  526. EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList = new List<string>();
  527. List<EmpireLifeModeData.Data> allDatas = EmpireLifeModeData.GetAllDatas(true);
  528. int count = allDatas.Count;
  529. for (int i = 0; i < count; i++)
  530. {
  531. using (Dictionary<int, string>.ValueCollection.Enumerator enumerator = allDatas[i].dataMaidPersonalUniqueNameAndActiveSlotDic.Values.GetEnumerator())
  532. {
  533. if (allDatas[i].IsCorrectPersonalGP002())
  534. {
  535. while (enumerator.MoveNext())
  536. {
  537. if (!EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Contains(enumerator.Current))
  538. {
  539. EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Add(enumerator.Current);
  540. }
  541. }
  542. }
  543. }
  544. }
  545. }
  546. return EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList;
  547. }
  548. }
  549. public readonly int ID;
  550. public readonly string strUniqueName;
  551. public readonly string rawDataScenarioType;
  552. public readonly string rawDataScenarioAnyNumberPlay;
  553. public readonly string rawDataScenarioFileName;
  554. public readonly string rawDataScenarioFileLabel;
  555. public readonly string rawDataNTRBlock;
  556. public readonly string rawDataFacilityUniqueName;
  557. public readonly string rawDataFacilityCostumeChange;
  558. public readonly string rawDataTimeZone;
  559. public readonly string rawDataFlagPlayer;
  560. public readonly string rawDataFlagMaid;
  561. public readonly string rawDataMaidPersonalTypeSlot0;
  562. public readonly string rawDataMaidPersonalTypeSlot1;
  563. public readonly string rawDataMaidPersonalTypeSlot2;
  564. public readonly string rawDataMaidMainCharaOnly;
  565. public readonly string rawDataMaidContract;
  566. public readonly string rawDataMaidRelation;
  567. public readonly string rawDataMaidStatus;
  568. public readonly string rawDataMaidSeikeikenNoNo;
  569. public readonly string rawDataMaidSeikeikenYesNo;
  570. public readonly string rawDataMaidSeikeikenNoYes;
  571. public readonly string rawDataMaidSeikeikenYesYes;
  572. public readonly string rawDataGP002PersonalCheck;
  573. public readonly EmpireLifeModeData.ScenarioType dataScenarioType;
  574. public readonly bool dataScenarioAnyNumberPlay;
  575. public readonly string dataScenarioFileName;
  576. public readonly string dataScenarioFileLabel;
  577. public readonly bool? dataNTRBlock;
  578. public readonly string[] dataFacilityUniqueNameArray;
  579. public readonly bool dataFacilityCostumeChange;
  580. public readonly ScheduleMgr.ScheduleTime? dataTimeZone;
  581. public readonly Dictionary<string, int> dataFlagPlayer;
  582. public readonly Dictionary<string, int> dataFlagMaid;
  583. public readonly Dictionary<int, string> dataMaidPersonalUniqueNameAndActiveSlotDic;
  584. public readonly bool? dataMaidMainCharaOnly;
  585. public readonly Contract? dataMaidContract;
  586. public readonly Relation? dataMaidRelation;
  587. public readonly ParametersPack dataMaidStatus;
  588. public readonly Seikeiken[] dataMaidSeikeiken;
  589. public readonly bool dataGP002PersonalCheck;
  590. private bool? m_IsEnableGP002PersonalCheck;
  591. private static Dictionary<string, string> m_PersonalUniqueNameDic;
  592. private static Dictionary<string, Contract> m_ContractTypeDic;
  593. private static Dictionary<string, Relation> m_RelationTypeDic;
  594. private static List<string> m_PersonalUniqueNameEnabledList;
  595. }
  596. }