EmpireLifeModeData.cs 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631
  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. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioType), "エンパイアライフモード.csv\n項目「種類」が指定されていません。\n\n表:" + text);
  171. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioAnyNumberPlay), "エンパイアライフモード.csv\n項目「何度でも再生できるか」が指定されていません。\n\n表:" + text);
  172. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataScenarioFileName), "エンパイアライフモード.csv\n項目「シナリオファイル」が指定されていません。\n\n表:" + text);
  173. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataFacilityUniqueName), "エンパイアライフモード.csv\n項目「施設」が指定されていません。\n\n表:" + text);
  174. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataFacilityCostumeChange), "エンパイアライフモード.csv\n項目「施設コスチュームの適用」が指定されていません。\n\n表:" + text);
  175. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot0 + this.rawDataMaidPersonalTypeSlot1 + this.rawDataMaidPersonalTypeSlot2), "エンパイアライフモード.csv\n項目「メイド性格」が指定されていません。\n\n表:" + text);
  176. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenNoNo), "エンパイアライフモード.csv\n項目「経験無し」が指定されていません。\n\n表:" + text);
  177. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenYesNo), "エンパイアライフモード.csv\n項目「前穴」が指定されていません。\n\n表:" + text);
  178. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenNoYes), "エンパイアライフモード.csv\n項目「後ろ穴」が指定されていません。\n\n表:" + text);
  179. NDebug.Assert(!string.IsNullOrEmpty(this.rawDataMaidSeikeikenYesYes), "エンパイアライフモード.csv\n項目「両方」が指定されていません。\n\n表:" + text);
  180. try
  181. {
  182. this.dataScenarioType = (EmpireLifeModeData.ScenarioType)Enum.Parse(typeof(EmpireLifeModeData.ScenarioType), this.rawDataScenarioType);
  183. }
  184. catch (Exception ex)
  185. {
  186. NDebug.Assert("エンパイアライフモード.csv\n項目「種類」の変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataScenarioType, false);
  187. }
  188. if (this.rawDataScenarioAnyNumberPlay == "○" || this.rawDataScenarioAnyNumberPlay == "◯")
  189. {
  190. this.dataScenarioAnyNumberPlay = true;
  191. }
  192. else if (this.rawDataScenarioAnyNumberPlay == "×")
  193. {
  194. this.dataScenarioAnyNumberPlay = false;
  195. }
  196. else
  197. {
  198. NDebug.Assert("エンパイアライフモード.csv\n項目「何度でも再生できるか」に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataScenarioAnyNumberPlay, false);
  199. }
  200. this.dataScenarioFileName = Path.ChangeExtension(this.rawDataScenarioFileName, ".ks");
  201. if (string.IsNullOrEmpty(this.rawDataScenarioFileLabel))
  202. {
  203. this.dataScenarioFileLabel = "*top";
  204. }
  205. else
  206. {
  207. this.dataScenarioFileLabel = ((this.rawDataScenarioFileLabel.IndexOf("*") >= 0) ? this.rawDataScenarioFileLabel : ("*" + this.rawDataScenarioFileLabel));
  208. }
  209. if (string.IsNullOrEmpty(this.rawDataNTRBlock))
  210. {
  211. this.dataNTRBlock = null;
  212. }
  213. else if (this.rawDataNTRBlock == "○" || this.rawDataNTRBlock == "◯")
  214. {
  215. this.dataNTRBlock = new bool?(true);
  216. }
  217. else if (this.rawDataNTRBlock == "×")
  218. {
  219. this.dataNTRBlock = new bool?(false);
  220. }
  221. else
  222. {
  223. NDebug.Assert("エンパイアライフモード.csv\n項目「NTRブロック」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataNTRBlock, false);
  224. }
  225. this.dataFacilityUniqueNameArray = this.rawDataFacilityUniqueName.Split(new char[]
  226. {
  227. ','
  228. });
  229. for (int j = 0; j < this.dataFacilityUniqueNameArray.Length; j++)
  230. {
  231. string text2 = this.dataFacilityUniqueNameArray[j] = this.dataFacilityUniqueNameArray[j].Trim();
  232. NDebug.Assert(FacilityDataTable.GetFacilityDefaultData(text2, true) != null, "エンパイアライフモード.csv\n項目「施設」の値「" + text2 + "」は正しくない情報です。\n\n表:" + text);
  233. }
  234. if (this.rawDataFacilityCostumeChange == "○" || this.rawDataFacilityCostumeChange == "◯")
  235. {
  236. this.dataFacilityCostumeChange = true;
  237. }
  238. else if (this.rawDataFacilityCostumeChange == "×")
  239. {
  240. this.dataFacilityCostumeChange = false;
  241. }
  242. else
  243. {
  244. NDebug.Assert("エンパイアライフモード.csv\n項目「施設コスチュームの適用」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataFacilityCostumeChange, false);
  245. }
  246. if (string.IsNullOrEmpty(this.rawDataTimeZone))
  247. {
  248. this.dataTimeZone = null;
  249. }
  250. else if (this.rawDataTimeZone == "昼")
  251. {
  252. this.dataTimeZone = new ScheduleMgr.ScheduleTime?(ScheduleMgr.ScheduleTime.DayTime);
  253. }
  254. else if (this.rawDataTimeZone == "夜")
  255. {
  256. this.dataTimeZone = new ScheduleMgr.ScheduleTime?(ScheduleMgr.ScheduleTime.Night);
  257. }
  258. else
  259. {
  260. NDebug.Assert("エンパイアライフモード.csv\n項目「時間帯」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataTimeZone, false);
  261. }
  262. if (string.IsNullOrEmpty(this.rawDataFlagPlayer))
  263. {
  264. this.dataFlagPlayer = null;
  265. }
  266. else
  267. {
  268. this.dataFlagPlayer = new Dictionary<string, int>();
  269. foreach (string text3 in this.rawDataFlagPlayer.Split(new char[]
  270. {
  271. ','
  272. }))
  273. {
  274. string[] array2 = text3.Split(new char[]
  275. {
  276. ':'
  277. });
  278. NDebug.Assert(array2.Length == 2, "エンパイアライフモード.csv\n項目「プレイヤーフラグ」の書式に問題がありました。\n\n表:" + text + "\n値:" + text3);
  279. NDebug.Assert(!this.dataFlagPlayer.ContainsKey(array2[0]), "エンパイアライフモード.csv\n項目「プレイヤーフラグ」で、フラグ名が重複しました。\n\n表:" + text + "\nフラグ名:" + array2[0]);
  280. int value;
  281. if (!int.TryParse(array2[1], out value))
  282. {
  283. NDebug.Assert("エンパイアライフモード.csv\n項目「プレイヤーフラグ」で、フラグの値を整数値に変換できませんでした。\n\n表:" + text + "\n値: " + text3, false);
  284. }
  285. this.dataFlagPlayer.Add(array2[0], value);
  286. }
  287. }
  288. if (string.IsNullOrEmpty(this.rawDataFlagMaid))
  289. {
  290. this.dataFlagMaid = null;
  291. }
  292. else
  293. {
  294. this.dataFlagMaid = new Dictionary<string, int>();
  295. foreach (string text4 in this.rawDataFlagMaid.Split(new char[]
  296. {
  297. ','
  298. }))
  299. {
  300. string[] array4 = text4.Split(new char[]
  301. {
  302. ':'
  303. });
  304. NDebug.Assert(array4.Length == 2, "エンパイアライフモード.csv\n項目「メイドフラグ」の書式に問題がありました。\n\n表:" + text + "\n値:" + text4);
  305. NDebug.Assert(!this.dataFlagMaid.ContainsKey(array4[0]), "エンパイアライフモード.csv\n項目「メイドフラグ」で、フラグ名が重複しました。\n\n表:" + text + "\nフラグ名:" + array4[0]);
  306. int value2;
  307. if (!int.TryParse(array4[1], out value2))
  308. {
  309. NDebug.Assert("エンパイアライフモード.csv\n項目「メイドフラグ」で、フラグの値を整数値に変換できませんでした。\n\n表:" + text + "\n値: " + text4, false);
  310. }
  311. this.dataFlagMaid.Add(array4[0], value2);
  312. }
  313. }
  314. this.dataMaidPersonalUniqueNameAndActiveSlotDic = new Dictionary<int, string>();
  315. if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot0))
  316. {
  317. string value3;
  318. if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot0, out value3))
  319. {
  320. NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot0, false);
  321. }
  322. this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(0, value3);
  323. }
  324. if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot1))
  325. {
  326. string value4;
  327. if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot1, out value4))
  328. {
  329. NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot1, false);
  330. }
  331. this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(1, value4);
  332. }
  333. if (!string.IsNullOrEmpty(this.rawDataMaidPersonalTypeSlot2))
  334. {
  335. string value5;
  336. if (!EmpireLifeModeData.Data.personalUniqueNameDic.TryGetValue(this.rawDataMaidPersonalTypeSlot2, out value5))
  337. {
  338. NDebug.Assert("エンパイアライフモード.csv\n項目「メイド性格」の値で、性格ユニーク名への変換に失敗しました。\n\n表:" + text + "\n値:" + this.rawDataMaidPersonalTypeSlot2, false);
  339. }
  340. this.dataMaidPersonalUniqueNameAndActiveSlotDic.Add(2, value5);
  341. }
  342. if (string.IsNullOrEmpty(this.rawDataMaidMainCharaOnly))
  343. {
  344. this.dataMaidMainCharaOnly = null;
  345. }
  346. else if (this.rawDataMaidMainCharaOnly == "○" || this.rawDataMaidMainCharaOnly == "◯")
  347. {
  348. this.dataMaidMainCharaOnly = new bool?(true);
  349. }
  350. else if (this.rawDataMaidMainCharaOnly == "×")
  351. {
  352. this.dataMaidMainCharaOnly = new bool?(false);
  353. }
  354. else
  355. {
  356. NDebug.Assert(string.Concat(new object[]
  357. {
  358. "エンパイアライフモード.csv\n項目「初期メイドフラグ」の値に、想定外の文字が入りました。\n\n表:",
  359. text,
  360. "\n値:",
  361. this.dataMaidMainCharaOnly
  362. }), false);
  363. }
  364. if (string.IsNullOrEmpty(this.rawDataMaidContract))
  365. {
  366. this.dataMaidContract = null;
  367. }
  368. else
  369. {
  370. Contract value6;
  371. if (!EmpireLifeModeData.Data.contractTypeDic.TryGetValue(this.rawDataMaidContract, out value6))
  372. {
  373. NDebug.Assert("エンパイアライフモード.csv\n項目「契約状態」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataMaidContract, false);
  374. }
  375. this.dataMaidContract = new Contract?(value6);
  376. }
  377. if (string.IsNullOrEmpty(this.rawDataMaidRelation))
  378. {
  379. this.dataMaidRelation = null;
  380. }
  381. else
  382. {
  383. Relation value7;
  384. if (!EmpireLifeModeData.Data.relationTypeDic.TryGetValue(this.rawDataMaidRelation, out value7))
  385. {
  386. NDebug.Assert("エンパイアライフモード.csv\n項目「関係状態」の値に、想定外の文字が入りました。\n\n表:" + text + "\n値:" + this.rawDataMaidRelation, false);
  387. }
  388. this.dataMaidRelation = new Relation?(value7);
  389. }
  390. if (string.IsNullOrEmpty(this.rawDataMaidStatus))
  391. {
  392. this.dataMaidStatus = null;
  393. }
  394. else
  395. {
  396. this.dataMaidStatus = new ParametersPack();
  397. this.dataMaidStatus.Parse(this.rawDataMaidStatus.Replace(':', '='), ',');
  398. }
  399. List<Seikeiken> list = new List<Seikeiken>();
  400. if (this.rawDataMaidSeikeikenNoNo == "○" || this.rawDataMaidSeikeikenNoNo == "◯")
  401. {
  402. list.Add(Seikeiken.No_No);
  403. }
  404. if (this.rawDataMaidSeikeikenYesNo == "○" || this.rawDataMaidSeikeikenYesNo == "◯")
  405. {
  406. list.Add(Seikeiken.Yes_No);
  407. }
  408. if (this.rawDataMaidSeikeikenNoYes == "○" || this.rawDataMaidSeikeikenNoYes == "◯")
  409. {
  410. list.Add(Seikeiken.No_Yes);
  411. }
  412. if (this.rawDataMaidSeikeikenYesYes == "○" || this.rawDataMaidSeikeikenYesYes == "◯")
  413. {
  414. list.Add(Seikeiken.Yes_Yes);
  415. }
  416. this.dataMaidSeikeiken = list.ToArray();
  417. break;
  418. }
  419. }
  420. }
  421. private static Dictionary<string, string> personalUniqueNameDic
  422. {
  423. get
  424. {
  425. if (EmpireLifeModeData.Data.m_PersonalUniqueNameDic == null)
  426. {
  427. EmpireLifeModeData.Data.m_PersonalUniqueNameDic = new Dictionary<string, string>();
  428. foreach (Personal.Data data in Personal.GetAllDatas(false))
  429. {
  430. EmpireLifeModeData.Data.m_PersonalUniqueNameDic.Add(data.drawName, data.uniqueName);
  431. }
  432. }
  433. return EmpireLifeModeData.Data.m_PersonalUniqueNameDic;
  434. }
  435. }
  436. private static Dictionary<string, Contract> contractTypeDic
  437. {
  438. get
  439. {
  440. if (EmpireLifeModeData.Data.m_ContractTypeDic == null)
  441. {
  442. EmpireLifeModeData.Data.m_ContractTypeDic = new Dictionary<string, Contract>();
  443. IEnumerator enumerator = Enum.GetValues(typeof(Contract)).GetEnumerator();
  444. try
  445. {
  446. while (enumerator.MoveNext())
  447. {
  448. object obj = enumerator.Current;
  449. Contract contract = (Contract)obj;
  450. string @string = EnumConvert.GetString(contract);
  451. EmpireLifeModeData.Data.m_ContractTypeDic.Add(@string, contract);
  452. }
  453. }
  454. finally
  455. {
  456. IDisposable disposable;
  457. if ((disposable = (enumerator as IDisposable)) != null)
  458. {
  459. disposable.Dispose();
  460. }
  461. }
  462. }
  463. return EmpireLifeModeData.Data.m_ContractTypeDic;
  464. }
  465. }
  466. private static Dictionary<string, Relation> relationTypeDic
  467. {
  468. get
  469. {
  470. if (EmpireLifeModeData.Data.m_RelationTypeDic == null)
  471. {
  472. EmpireLifeModeData.Data.m_RelationTypeDic = new Dictionary<string, Relation>();
  473. IEnumerator enumerator = Enum.GetValues(typeof(Relation)).GetEnumerator();
  474. try
  475. {
  476. while (enumerator.MoveNext())
  477. {
  478. object obj = enumerator.Current;
  479. Relation relation = (Relation)obj;
  480. string @string = EnumConvert.GetString(relation);
  481. EmpireLifeModeData.Data.m_RelationTypeDic.Add(@string, relation);
  482. }
  483. }
  484. finally
  485. {
  486. IDisposable disposable;
  487. if ((disposable = (enumerator as IDisposable)) != null)
  488. {
  489. disposable.Dispose();
  490. }
  491. }
  492. }
  493. return EmpireLifeModeData.Data.m_RelationTypeDic;
  494. }
  495. }
  496. public static List<string> personalUniqueNameEnabledList
  497. {
  498. get
  499. {
  500. if (EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList == null)
  501. {
  502. EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList = new List<string>();
  503. List<EmpireLifeModeData.Data> allDatas = EmpireLifeModeData.GetAllDatas(true);
  504. int count = allDatas.Count;
  505. for (int i = 0; i < count; i++)
  506. {
  507. using (Dictionary<int, string>.ValueCollection.Enumerator enumerator = allDatas[i].dataMaidPersonalUniqueNameAndActiveSlotDic.Values.GetEnumerator())
  508. {
  509. while (enumerator.MoveNext())
  510. {
  511. if (!EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Contains(enumerator.Current))
  512. {
  513. EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList.Add(enumerator.Current);
  514. }
  515. }
  516. }
  517. }
  518. }
  519. return EmpireLifeModeData.Data.m_PersonalUniqueNameEnabledList;
  520. }
  521. }
  522. public readonly int ID;
  523. public readonly string strUniqueName;
  524. public readonly string rawDataScenarioType;
  525. public readonly string rawDataScenarioAnyNumberPlay;
  526. public readonly string rawDataScenarioFileName;
  527. public readonly string rawDataScenarioFileLabel;
  528. public readonly string rawDataNTRBlock;
  529. public readonly string rawDataFacilityUniqueName;
  530. public readonly string rawDataFacilityCostumeChange;
  531. public readonly string rawDataTimeZone;
  532. public readonly string rawDataFlagPlayer;
  533. public readonly string rawDataFlagMaid;
  534. public readonly string rawDataMaidPersonalTypeSlot0;
  535. public readonly string rawDataMaidPersonalTypeSlot1;
  536. public readonly string rawDataMaidPersonalTypeSlot2;
  537. public readonly string rawDataMaidMainCharaOnly;
  538. public readonly string rawDataMaidContract;
  539. public readonly string rawDataMaidRelation;
  540. public readonly string rawDataMaidStatus;
  541. public readonly string rawDataMaidSeikeikenNoNo;
  542. public readonly string rawDataMaidSeikeikenYesNo;
  543. public readonly string rawDataMaidSeikeikenNoYes;
  544. public readonly string rawDataMaidSeikeikenYesYes;
  545. public readonly EmpireLifeModeData.ScenarioType dataScenarioType;
  546. public readonly bool dataScenarioAnyNumberPlay;
  547. public readonly string dataScenarioFileName;
  548. public readonly string dataScenarioFileLabel;
  549. public readonly bool? dataNTRBlock;
  550. public readonly string[] dataFacilityUniqueNameArray;
  551. public readonly bool dataFacilityCostumeChange;
  552. public readonly ScheduleMgr.ScheduleTime? dataTimeZone;
  553. public readonly Dictionary<string, int> dataFlagPlayer;
  554. public readonly Dictionary<string, int> dataFlagMaid;
  555. public readonly Dictionary<int, string> dataMaidPersonalUniqueNameAndActiveSlotDic;
  556. public readonly bool? dataMaidMainCharaOnly;
  557. public readonly Contract? dataMaidContract;
  558. public readonly Relation? dataMaidRelation;
  559. public readonly ParametersPack dataMaidStatus;
  560. public readonly Seikeiken[] dataMaidSeikeiken;
  561. private static Dictionary<string, string> m_PersonalUniqueNameDic;
  562. private static Dictionary<string, Contract> m_ContractTypeDic;
  563. private static Dictionary<string, Relation> m_RelationTypeDic;
  564. private static List<string> m_PersonalUniqueNameEnabledList;
  565. }
  566. }