Elin Decompiled Documentation EA 23.344.1 Nightly
Loading...
Searching...
No Matches
ModPackage.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using System.IO;
4using System.Linq;
5using NPOI.SS.UserModel;
6using NPOI.XSSF.UserModel;
7using Newtonsoft.Json;
8using UnityEngine;
9
10public class ModPackage : EMod
11{
12 public struct SheetIndex
13 {
14 public int dest;
15
16 public int old;
17 }
18
19 public void CopyContentTo(string dir)
20 {
21 IO.DeleteDirectory(dir);
22 IO.CopyAll(dirInfo.FullName, dir);
23 EClass.ui.Say(dir);
24 }
25
26 public IReadOnlyList<FileInfo> ParseTalkText(DirectoryInfo dir)
27 {
28 List<FileInfo> list = new List<FileInfo>();
29 FileInfo[] files = dir.GetFiles("*.xlsx", SearchOption.TopDirectoryOnly);
30 foreach (FileInfo fileInfo in files)
31 {
32 ExcelData excelData = new ExcelData(fileInfo.FullName);
33 TalkText.modList.Add(excelData);
34 talkTexts.Add(excelData);
35 list.Add(fileInfo);
36 }
37 if (list.Count > 0)
38 {
39 Debug.Log($"TalkText: {talkTexts.Count}");
40 }
41 return list;
42 }
43
44 public IReadOnlyList<FileInfo> ParseMap(DirectoryInfo dir, bool addToList = true)
45 {
46 List<FileInfo> list = new List<FileInfo>();
47 FileInfo[] files = dir.GetFiles("*.z", SearchOption.TopDirectoryOnly);
48 foreach (FileInfo fileInfo in files)
49 {
50 string key = Path.ChangeExtension(fileInfo.Name, null);
51 if (addToList)
52 {
53 MOD.listMaps.Add(fileInfo);
54 }
55 maps[key] = fileInfo;
56 list.Add(fileInfo);
57 }
58 if (list.Count > 0)
59 {
60 Debug.Log($"Map: {maps.Count}");
61 }
62 return list;
63 }
64
65 public IReadOnlyList<FileInfo> ParseMapPiece(DirectoryInfo dir, bool addToList = true)
66 {
67 List<FileInfo> list = new List<FileInfo>();
68 FileInfo[] files = dir.GetFiles("*.mp", SearchOption.TopDirectoryOnly);
69 foreach (FileInfo fileInfo in files)
70 {
71 string key = Path.ChangeExtension(fileInfo.Name, null);
72 if (addToList)
73 {
74 MOD.listPartialMaps.Add(fileInfo);
75 }
76 partialMaps[key] = fileInfo;
77 list.Add(fileInfo);
78 }
79 if (list.Count > 0)
80 {
81 Debug.Log($"PartialMap: {partialMaps.Count}");
82 }
83 return list;
84 }
85
86 public IReadOnlyList<FileInfo> ParseTextureReplace(DirectoryInfo dir)
87 {
88 List<FileInfo> list = new List<FileInfo>();
89 FileInfo[] files = dir.GetFiles("*.png", SearchOption.TopDirectoryOnly);
90 foreach (FileInfo fileInfo in files)
91 {
92 string key = Path.ChangeExtension(fileInfo.Name, null);
93 textureReplaces[key] = fileInfo;
94 list.Add(fileInfo);
95 }
96 if (list.Count > 0)
97 {
98 Debug.Log($"Texture Replace: {textureReplaces.Count}");
99 }
100 return list;
101 }
102
103 public IReadOnlyList<FileInfo> ParseTexture(DirectoryInfo dir)
104 {
105 List<FileInfo> list = new List<FileInfo>();
106 FileInfo[] files = dir.GetFiles("*.png", SearchOption.AllDirectories);
107 foreach (FileInfo fileInfo in files)
108 {
109 string key = Path.ChangeExtension(Path.GetRelativePath(dir.FullName, fileInfo.FullName).NormalizePath(), null);
110 string text = Path.ChangeExtension(fileInfo.FullName, null);
111 Dictionary<string, string> dictModItems = SpriteReplacer.dictModItems;
112 string value = (textures[key] = text);
113 dictModItems[key] = value;
114 list.Add(fileInfo);
115 }
116 if (list.Count > 0)
117 {
118 Debug.Log($"Texture: {textures.Count}");
119 }
120 return list;
121 }
122
123 public IReadOnlyList<FileInfo> ParsePortrait(DirectoryInfo dir)
124 {
125 List<FileInfo> list = new List<FileInfo>();
126 FileInfo[] files = dir.GetFiles("*.png", SearchOption.TopDirectoryOnly);
127 foreach (FileInfo fileInfo in files)
128 {
129 string name = fileInfo.Name;
130 if (name.StartsWith("BG_", StringComparison.Ordinal))
131 {
132 Portrait.modPortraitBGs.Add(fileInfo);
133 }
134 else if (name.StartsWith("BGF_", StringComparison.Ordinal))
135 {
136 Portrait.modPortraitBGFs.Add(fileInfo);
137 }
138 else if (name.EndsWith("-full.png", StringComparison.Ordinal))
139 {
140 Portrait.modFull.Add(fileInfo);
141 }
142 else if (name.EndsWith("-overlay.png", StringComparison.Ordinal))
143 {
144 Portrait.modOverlays.Add(fileInfo);
145 }
146 else
147 {
148 Portrait.modPortraits.Add(fileInfo);
149 }
150 Portrait.allIds.Add(name);
151 portraits[name] = fileInfo;
152 list.Add(fileInfo);
153 }
154 if (list.Count > 0)
155 {
156 Debug.Log($"Portrait: {portraits.Count}");
157 }
158 return list;
159 }
160
161 public void ParseLangMod(DirectoryInfo dir)
162 {
163 if (Mapping == null)
164 {
165 Mapping = new FileMapping(dir.Parent);
166 }
167 Mapping.RebuildLangModMapping(EClass.core.config?.lang ?? EClass.core.debug.langCode.ToString());
168 Lang.excelDialog = null;
169 Debug.Log("LangMod: " + string.Join(", ", Mapping.OrderedLangMods));
170 if (Mapping.SourceSheets.Count > 0)
171 {
172 Debug.Log($"Source Sheets: {Mapping.SourceSheets.Count}, {Mapping.SourceLangMod}");
173 }
174 }
175
176 public IReadOnlyList<FileInfo> ParseSound(DirectoryInfo dir)
177 {
178 List<FileInfo> list = new List<FileInfo>();
179 FileInfo[] files = dir.GetFiles("*.*", SearchOption.AllDirectories);
180 foreach (FileInfo fileInfo in files)
181 {
182 if (ModUtil.GetAudioType(fileInfo.Extension) != AudioType.UNKNOWN)
183 {
184 string key = Path.ChangeExtension(Path.GetRelativePath(dir.FullName, fileInfo.FullName).NormalizePath(), null);
185 Dictionary<string, FileInfo> dictionary = MOD.sounds;
186 FileInfo value = (sounds[key] = fileInfo);
187 dictionary[key] = value;
188 list.Add(fileInfo);
189 }
190 }
191 if (list.Count > 0)
192 {
193 Debug.Log($"Sound: {sounds.Count}");
194 }
195 int num = sounds.Keys.Count((string k) => k.StartsWith("BGM/"));
196 if (num > 0)
197 {
198 Debug.Log($"BGM: {num}");
199 }
200 return list;
201 }
202
203 public override void GenerateCustomContentProfiles()
204 {
205 customContent.Clear();
206 foreach (SourceData.BaseRow sourceRow in sourceRows)
207 {
208 if (!(sourceRow is SourceChara.Row r))
209 {
210 if (!(sourceRow is SourceReligion.Row row))
211 {
212 if (!(sourceRow is SourceZone.Row r2))
213 {
214 if (!(sourceRow is SourceElement.Row r3))
215 {
216 if (!(sourceRow is SourceMaterial.Row r4))
217 {
218 if (!(sourceRow is SourceStat.Row r5))
219 {
220 if (!(sourceRow is SourceThing.Row r6))
221 {
222 if (!(sourceRow is SourceBlock.Row r7))
223 {
224 if (!(sourceRow is SourceFloor.Row r8))
225 {
226 if (!(sourceRow is SourceObj.Row r9))
227 {
228 if (!(sourceRow is SourceDeco.Row r10))
229 {
230 if (!(sourceRow is SourceCellEffect.Row r11))
231 {
232 if (!(sourceRow is SourceFaction.Row) && sourceRow is SourceQuest.Row)
233 {
234 }
235 }
236 else
237 {
238 customContent.Add(CustomCellEffectContent.CreateFromRow(r11, this));
239 }
240 }
241 else
242 {
243 customContent.Add(CustomDecoContent.CreateFromRow(r10, this));
244 }
245 }
246 else
247 {
248 customContent.Add(CustomObjContent.CreateFromRow(r9, this));
249 }
250 }
251 else
252 {
253 customContent.Add(CustomFloorContent.CreateFromRow(r8, this));
254 }
255 }
256 else
257 {
258 customContent.Add(CustomBlockContent.CreateFromRow(r7, this));
259 }
260 }
261 else
262 {
263 ModUtil.FixDefaultThingRowPref(r6);
264 customContent.Add(CustomThingContent.CreateFromRow(r6, this));
265 }
266 }
267 else
268 {
269 customContent.Add(CustomStatContent.CreateFromRow(r5, this));
270 }
271 }
272 else
273 {
274 customContent.Add(CustomMaterialContent.CreateFromRow(r4, this));
275 }
276 }
277 else
278 {
279 customContent.Add(CustomElementContent.CreateFromRow(r3, this));
280 }
281 }
282 else
283 {
284 customContent.Add(CustomZoneContent.CreateFromRow(r2, this));
285 }
286 }
287 else if (row.id.StartsWith("cwl") || row.id.StartsWith("custom"))
288 {
289 customContent.Add(CustomReligionContent.CreateFromRow(row, this));
290 }
291 }
292 else
293 {
294 ModUtil.FixDefaultCharaRowPref(r);
295 customContent.Add(CustomCharaContent.CreateFromRow(r, this));
296 }
297 }
298 customContent.RemoveAll((ICustomContent p) => p == null);
299 }
300
301 public override SortedDictionary<string, string> ExportSourceLocalizations()
302 {
303 SortedDictionary<string, string> sortedDictionary = new SortedDictionary<string, string>();
304 try
305 {
306 foreach (SourceData.BaseRow sourceRow in sourceRows)
307 {
308 foreach (KeyValuePair<string, string> item in sourceRow.ExportTexts(sourceRow.UseAlias ? "alias" : "id"))
309 {
310 item.Deconstruct(out var key, out var value);
311 string key2 = key;
312 string value2 = value;
313 sortedDictionary[key2] = value2;
314 }
315 }
316 }
317 catch (Exception arg)
318 {
319 Debug.LogError($"#source failed to export localization for {title}/{id}\n{arg}");
320 }
321 return sortedDictionary;
322 }
323
324 public override void ImportSourceLocalizations(IReadOnlyDictionary<string, string> texts)
325 {
326 foreach (SourceData.BaseRow sourceRow in sourceRows)
327 {
328 sourceRow.ImportTexts(texts, sourceRow.UseAlias ? "alias" : "id");
329 }
330 }
331
332 public override void ClearSourceLocalizations(string lang)
333 {
334 Mapping.RebuildLangModMapping(lang);
335 for (FileInfo fileInfo = Mapping.RelocateFile("SourceLocalization.json"); fileInfo != null; fileInfo = Mapping.RelocateFile("SourceLocalization.json"))
336 {
337 fileInfo.Delete();
338 Debug.Log("#source-localization deleted " + fileInfo.ShortPath());
339 }
340 Mapping.RebuildLangModMapping(Lang.langCode);
341 }
342
343 public override string UpdateSourceLocalizationFile(string lang, bool force = false)
344 {
345 if (!base.IsSourceLocalizable)
346 {
347 return null;
348 }
349 IReadOnlyDictionary<string, string> modEntries = SourceLocalization.GetModEntries(id, lang);
350 SortedDictionary<string, string> sortedDictionary = ExportSourceLocalizations();
351 SortedDictionary<string, string> final = new SortedDictionary<string, string>();
352 foreach (var (key, defaultValue) in sortedDictionary)
353 {
354 final[key] = modEntries.GetValueOrDefault(key, defaultValue);
355 }
356 string text3 = Path.Combine(dirInfo.FullName, "LangMod/" + lang + "/SourceLocalization.json");
357 if (force || modEntries.Count != final.Count || modEntries.Any((KeyValuePair<string, string> kv) => !final.ContainsKey(kv.Key)))
358 {
359 JsonSerializerSettings setting = new JsonSerializerSettings
360 {
361 PreserveReferencesHandling = PreserveReferencesHandling.None,
362 NullValueHandling = NullValueHandling.Ignore
363 };
364 IO.SaveFile(text3, final, compress: false, setting);
365 SourceLocalization.UpdateModEntries(id, lang, final);
366 }
367 return text3;
368 }
369
370 public void AddOrUpdateLang(DirectoryInfo dir)
371 {
372 Core core = EClass.core;
373 SourceManager sources = core.sources;
374 DirectoryInfo[] directories = dir.GetDirectories();
375 foreach (DirectoryInfo directoryInfo in directories)
376 {
377 if (!directoryInfo.Name.StartsWith("_") && !TryAddLang(directoryInfo, isNew: false))
378 {
379 Debug.Log("Generating Language Mod Contents:" + directoryInfo.FullName);
380 IO.CopyDir(CorePath.packageCore + "Lang/EN", directoryInfo.FullName);
381 Directory.CreateDirectory(directoryInfo.FullName + "/Dialog");
382 IO.CopyDir(CorePath.packageCore + "Lang/_Dialog", directoryInfo.FullName + "/Dialog");
383 sources.ExportSourceTexts(directoryInfo.FullName + "/Game");
384 IO.Copy(CorePath.packageCore + "Lang/lang.ini", directoryInfo.FullName + "/");
385 TryAddLang(directoryInfo, isNew: true);
386 }
387 }
388 bool TryAddLang(DirectoryInfo dirLang, bool isNew)
389 {
390 string name = dirLang.Name;
391 FileInfo[] files = dirLang.GetFiles();
392 foreach (FileInfo fileInfo in files)
393 {
394 if (fileInfo.Name == "lang.ini")
395 {
396 LangSetting langSetting = new LangSetting(fileInfo.FullName)
397 {
398 id = name,
399 dir = dirLang.FullName + "/"
400 };
401 if (isNew)
402 {
403 langSetting.SetVersion();
404 }
405 else if ((Application.isEditor || Lang.runUpdate) && !Lang.IsBuiltin(dirLang.Name) && langSetting.GetVersion() < core.version.GetInt())
406 {
407 sources.Init();
408 Log.system = "Updated Language Files:" + Environment.NewLine + Environment.NewLine;
409 Debug.Log("Updating Language:" + langSetting.name + "/" + langSetting.GetVersion() + "/" + core.version.GetInt());
410 string text = dirLang.FullName + "/Game";
411 Directory.Move(text, text + "_temp");
412 sources.ExportSourceTexts(text);
413 sources.UpdateSourceTexts(text);
414 IO.DeleteDirectory(text + "_temp");
415 text = dirLang.FullName + "/Dialog";
416 Directory.Move(text, text + "_temp");
417 IO.CopyDir(CorePath.packageCore + "Lang/_Dialog", text);
418 UpdateDialogs(new DirectoryInfo(text), text + "_temp");
419 IO.DeleteDirectory(text + "_temp");
420 text = dirLang.FullName + "/Data";
421 IO.CopyDir(text, text + "_temp");
422 IO.Copy(CorePath.packageCore + "Lang/EN/Data/god_talk.xlsx", text);
423 IO.Copy(CorePath.packageCore + "Lang/EN/Data/chara_talk.xlsx", text);
424 UpdateTalks(new DirectoryInfo(text), text + "_temp");
425 IO.DeleteDirectory(text + "_temp");
426 langSetting.SetVersion();
427 IO.SaveText(dirLang.FullName + "/update.txt", Log.system);
428 }
429 MOD.langs[name] = langSetting;
430 return true;
431 }
432 }
433 return false;
434 }
435 }
436
437 public void UpdateDialogs(DirectoryInfo dir, string dirTemp)
438 {
439 DirectoryInfo[] directories = dir.GetDirectories();
440 foreach (DirectoryInfo directoryInfo in directories)
441 {
442 UpdateDialogs(directoryInfo, dirTemp + "/" + directoryInfo.Name);
443 }
444 FileInfo[] files = dir.GetFiles();
445 foreach (FileInfo fileInfo in files)
446 {
447 if (fileInfo.Name.EndsWith("xlsx"))
448 {
449 UpdateExcelBook(fileInfo, dirTemp, updateOnlyText: true);
450 }
451 }
452 }
453
454 public void UpdateTalks(DirectoryInfo dir, string dirTemp)
455 {
456 FileInfo[] files = dir.GetFiles();
457 foreach (FileInfo fileInfo in files)
458 {
459 if (fileInfo.Name == "god_talk.xlsx" || fileInfo.Name == "chara_talk.xlsx")
460 {
461 UpdateExcelBook(fileInfo, dirTemp, updateOnlyText: false);
462 }
463 }
464 }
465
466 public void UpdateExcelBook(FileInfo f, string dirTemp, bool updateOnlyText)
467 {
468 string path = dirTemp + "/" + f.Name;
469 if (!File.Exists(path))
470 {
471 return;
472 }
473 XSSFWorkbook xSSFWorkbook;
474 using (FileStream @is = File.Open(path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
475 {
476 xSSFWorkbook = new XSSFWorkbook((Stream)@is);
477 }
478 XSSFWorkbook xSSFWorkbook2;
479 using (FileStream is2 = File.Open(f.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite))
480 {
481 xSSFWorkbook2 = new XSSFWorkbook((Stream)is2);
482 }
483 for (int i = 0; i < xSSFWorkbook2.NumberOfSheets; i++)
484 {
485 ISheet sheetAt = xSSFWorkbook2.GetSheetAt(i);
486 ISheet sheet = xSSFWorkbook.GetSheet(sheetAt.SheetName);
487 if (sheet == null)
488 {
489 Log.system = Log.system + "Old sheet not found:" + sheetAt.SheetName + Environment.NewLine;
490 continue;
491 }
492 int num = UpdateExcelSheet(sheetAt, sheet, updateOnlyText);
493 Log.system = Log.system + ((num == 0) ? "(No Changes) " : "(Updated) ") + f.FullName + "(" + sheetAt.SheetName + ")" + Environment.NewLine;
494 if (num != 0)
495 {
496 Log.system = Log.system + num + Environment.NewLine;
497 }
498 Log.system += Environment.NewLine;
499 }
500 using FileStream stream = new FileStream(f.FullName, FileMode.Create, FileAccess.Write, FileShare.ReadWrite);
501 xSSFWorkbook2.Write(stream);
502 }
503
504 public int UpdateExcelSheet(ISheet destSheet, ISheet oldSheet, bool updateOnlytext)
505 {
506 Dictionary<string, string[]> dictionary = new Dictionary<string, string[]>();
507 int num = 0;
508 int num2 = 0;
509 int num3 = 10;
510 IRow row = destSheet.GetRow(0);
511 IRow row2 = oldSheet.GetRow(0);
512 List<SheetIndex> list = new List<SheetIndex>();
513 int cellnum = FindField(row, "id");
514 int cellnum2 = FindField(row2, "id");
515 for (int i = 0; i < row.LastCellNum; i++)
516 {
517 ICell cell = row.GetCell(i);
518 if (cell == null)
519 {
520 break;
521 }
522 string stringCellValue = cell.StringCellValue;
523 if (stringCellValue == "id" || (updateOnlytext && stringCellValue != "text"))
524 {
525 continue;
526 }
527 for (int j = 0; j < row2.LastCellNum; j++)
528 {
529 cell = row2.GetCell(j);
530 if (cell == null)
531 {
532 break;
533 }
534 if (cell.StringCellValue == stringCellValue)
535 {
536 list.Add(new SheetIndex
537 {
538 dest = i,
539 old = j
540 });
541 Debug.Log(destSheet.SheetName + "/" + stringCellValue + "/" + i + "/" + j);
542 break;
543 }
544 }
545 }
546 for (int k = 2; k <= oldSheet.LastRowNum; k++)
547 {
548 IRow row3 = oldSheet.GetRow(k);
549 if (row3 == null)
550 {
551 if (num2 >= num3)
552 {
553 break;
554 }
555 num2++;
556 continue;
557 }
558 num2 = 0;
559 ICell cell2 = row3.GetCell(cellnum2);
560 if (cell2 == null)
561 {
562 continue;
563 }
564 string text = ((cell2.CellType == CellType.Numeric) ? cell2.NumericCellValue.ToString() : cell2.StringCellValue);
565 if (text.IsEmpty())
566 {
567 continue;
568 }
569 string[] array = new string[list.Count];
570 for (int l = 0; l < list.Count; l++)
571 {
572 ICell cell3 = row3.GetCell(list[l].old);
573 if (cell3 != null)
574 {
575 string stringCellValue2 = cell3.StringCellValue;
576 if (!stringCellValue2.IsEmpty())
577 {
578 array[l] = stringCellValue2;
579 }
580 }
581 }
582 dictionary.Add(text, array);
583 }
584 num2 = 0;
585 for (int m = 2; m <= destSheet.LastRowNum; m++)
586 {
587 IRow row4 = destSheet.GetRow(m);
588 if (row4 == null)
589 {
590 if (num2 >= num3)
591 {
592 break;
593 }
594 num2++;
595 continue;
596 }
597 num2 = 0;
598 ICell cell4 = row4.GetCell(cellnum);
599 if (cell4 == null)
600 {
601 continue;
602 }
603 string text2 = ((cell4.CellType == CellType.Numeric) ? cell4.NumericCellValue.ToString() : cell4.StringCellValue);
604 if (text2.IsEmpty() || !dictionary.ContainsKey(text2))
605 {
606 continue;
607 }
608 string[] array2 = dictionary[text2];
609 for (int n = 0; n < list.Count; n++)
610 {
611 ICell cell5 = row4.GetCell(list[n].dest) ?? row4.CreateCell(list[n].dest, CellType.String);
612 if (cell5 != null)
613 {
614 cell5.SetCellValue(array2[n]);
615 cell5.SetCellType(CellType.String);
616 cell5.SetAsActiveCell();
617 num++;
618 }
619 }
620 }
621 return num;
622 static int FindField(IRow row5, string id)
623 {
624 for (int num4 = 0; num4 < row5.LastCellNum; num4++)
625 {
626 ICell cell6 = row5.GetCell(num4);
627 if (cell6 == null)
628 {
629 break;
630 }
631 if (cell6.StringCellValue == id)
632 {
633 return num4;
634 }
635 }
636 return -1;
637 }
638 }
639}
string lang
Definition: CoreConfig.cs:603
Lang.LangCode langCode
Definition: CoreDebug.cs:130
static string packageCore
Definition: CorePath.cs:153
Definition: Core.cs:14
SourceManager sources
Definition: Core.cs:33
CoreDebug debug
Definition: Core.cs:31
CoreConfig config
Definition: Core.cs:70
static CustomBlockContent CreateFromRow(SourceBlock.Row r, ModPackage owner=null)
static CustomCellEffectContent CreateFromRow(SourceCellEffect.Row r, ModPackage owner=null)
static CustomCharaContent CreateFromRow(SourceChara.Row r, ModPackage owner=null)
static CustomDecoContent CreateFromRow(SourceDeco.Row r, ModPackage owner=null)
static CustomElementContent CreateFromRow(SourceElement.Row r, ModPackage owner=null)
static CustomFloorContent CreateFromRow(SourceFloor.Row r, ModPackage owner=null)
static CustomMaterialContent CreateFromRow(SourceMaterial.Row r, ModPackage owner=null)
static CustomObjContent CreateFromRow(SourceObj.Row r, ModPackage owner=null)
static CustomStatContent CreateFromRow(SourceStat.Row r, ModPackage owner=null)
static CustomThingContent CreateFromRow(SourceThing.Row r, ModPackage mod=null)
static CustomZoneContent CreateFromRow(SourceZone.Row r, ModPackage owner=null)
Definition: EClass.cs:6
static Core core
Definition: EClass.cs:7
static UI ui
Definition: EClass.cs:17
string name
Definition: LangSetting.cs:24
void SetVersion()
Definition: LangSetting.cs:114
int GetVersion()
Definition: LangSetting.cs:100
Definition: Lang.cs:7
static bool IsBuiltin(string id)
Definition: Lang.cs:61
static bool runUpdate
Definition: Lang.cs:25
static string langCode
Definition: Lang.cs:29
Definition: Log.cs:4
static string system
Definition: Log.cs:5
Definition: MOD.cs:7
static Dictionary< string, LangSetting > langs
Definition: MOD.cs:8
static Dictionary< string, FileInfo > sounds
Definition: MOD.cs:30
static List< FileInfo > listMaps
Definition: MOD.cs:26
static List< FileInfo > listPartialMaps
Definition: MOD.cs:28
void Add(FileInfo fi, string path=null, string prefix="")
Definition: ModItemList.cs:85
void CopyContentTo(string dir)
Definition: ModPackage.cs:19
IReadOnlyList< FileInfo > ParseTalkText(DirectoryInfo dir)
Definition: ModPackage.cs:26
void UpdateDialogs(DirectoryInfo dir, string dirTemp)
Definition: ModPackage.cs:437
override void ClearSourceLocalizations(string lang)
Definition: ModPackage.cs:332
override string UpdateSourceLocalizationFile(string lang, bool force=false)
Definition: ModPackage.cs:343
void ParseLangMod(DirectoryInfo dir)
Definition: ModPackage.cs:161
void UpdateExcelBook(FileInfo f, string dirTemp, bool updateOnlyText)
Definition: ModPackage.cs:466
IReadOnlyList< FileInfo > ParseTexture(DirectoryInfo dir)
Definition: ModPackage.cs:103
void AddOrUpdateLang(DirectoryInfo dir)
Definition: ModPackage.cs:370
override void GenerateCustomContentProfiles()
Definition: ModPackage.cs:203
IReadOnlyList< FileInfo > ParseMapPiece(DirectoryInfo dir, bool addToList=true)
Definition: ModPackage.cs:65
override void ImportSourceLocalizations(IReadOnlyDictionary< string, string > texts)
Definition: ModPackage.cs:324
override SortedDictionary< string, string > ExportSourceLocalizations()
Definition: ModPackage.cs:301
void UpdateTalks(DirectoryInfo dir, string dirTemp)
Definition: ModPackage.cs:454
IReadOnlyList< FileInfo > ParseTextureReplace(DirectoryInfo dir)
Definition: ModPackage.cs:86
IReadOnlyList< FileInfo > ParsePortrait(DirectoryInfo dir)
Definition: ModPackage.cs:123
IReadOnlyList< FileInfo > ParseMap(DirectoryInfo dir, bool addToList=true)
Definition: ModPackage.cs:44
int UpdateExcelSheet(ISheet destSheet, ISheet oldSheet, bool updateOnlytext)
Definition: ModPackage.cs:504
IReadOnlyList< FileInfo > ParseSound(DirectoryInfo dir)
Definition: ModPackage.cs:176
static ModItemList< Sprite > modPortraitBGFs
Definition: Portrait.cs:8
static ModItemList< Sprite > modPortraitBGs
Definition: Portrait.cs:10
static ModItemList< Sprite > modOverlays
Definition: Portrait.cs:14
static ModItemList< Sprite > modPortraits
Definition: Portrait.cs:12
static HashSet< string > allIds
Definition: Portrait.cs:20
static ModItemList< Sprite > modFull
Definition: Portrait.cs:16
static Dictionary< string, string > dictModItems
static List< ExcelData > modList
Definition: TalkText.cs:5