diff --git a/.idea/.idea.sinmai-mods/.idea/vcs.xml b/.idea/.idea.sinmai-mods/.idea/vcs.xml new file mode 100644 index 0000000..9661ac7 --- /dev/null +++ b/.idea/.idea.sinmai-mods/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/LooseDBTables.GeneratePatches/LooseDBTables.GeneratePatches.csproj b/LooseDBTables.GeneratePatches/LooseDBTables.GeneratePatches.csproj new file mode 100644 index 0000000..5d9ec54 --- /dev/null +++ b/LooseDBTables.GeneratePatches/LooseDBTables.GeneratePatches.csproj @@ -0,0 +1,14 @@ + + + + Exe + net9.0 + enable + enable + + + + + + + diff --git a/LooseDBTables.GeneratePatches/Program.cs b/LooseDBTables.GeneratePatches/Program.cs new file mode 100644 index 0000000..a4a6185 --- /dev/null +++ b/LooseDBTables.GeneratePatches/Program.cs @@ -0,0 +1,154 @@ +// See https://aka.ms/new-console-template for more information + +using System.Collections.Immutable; +using System.Reflection; +using System.Text; + +var assemblyPath = args[0]; +var targetPath = args[1]; +var assembly = Assembly.LoadFrom(assemblyPath); +var types = assembly.GetTypes().Where(t => t.FullName.StartsWith("DB.") && t.FullName.EndsWith("IDEnum")).ToImmutableList(); + +foreach (var type in types) +{ + var tableRecordType = assembly.GetType(type.FullName.Replace("IDEnum", "TableRecord"))!; + var patchClassName = $"patch_{type.Name}"; + var readCommands = new StringBuilder(); + var writeCommands = new StringBuilder(); + var tableRecordFields = new StringBuilder(); + + foreach (var field in tableRecordType.GetFields(BindingFlags.Public | BindingFlags.Instance)) + { + tableRecordFields.Append("public "); + + if (field.FieldType.IsEnum) + { + tableRecordFields.Append("System.Int32 "); + } + else + { + tableRecordFields.Append(field.FieldType.FullName); + tableRecordFields.Append(" "); + } + + tableRecordFields.Append(field.Name); + tableRecordFields.AppendLine(";"); + + readCommands.Append(field.Name) + .Append(" = (") + .Append(field.FieldType.FullName) + .Append(")src[i].") + .Append(field.Name) + .Append(", "); + writeCommands.Append(field.Name) + .Append(" = (") + .Append(field.FieldType.IsEnum ? "int" : field.FieldType.FullName) + .Append(")src[i].") + .Append(field.Name) + .Append(", "); + } + + using var sw = File.CreateText(Path.Combine(targetPath, patchClassName + ".cs")); + sw.WriteLine($$""" + // ReSharper disable CheckNamespace + // ReSharper disable InconsistentNaming + + using System; + using System.CodeDom.Compiler; + using System.IO; + using System.Text; + using MonoMod; + using LooseDBTables; + using UnityEngine; + + namespace DB; + + [MonoModIgnore] + [GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] + public class {{type.Name}} + { + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static {{tableRecordType.Name}}[] records; + } + + [GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] + [Serializable] + public class Serializable{{tableRecordType.Name}} { + {{tableRecordFields}} + } + + [GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] + public class {{patchClassName}} : {{type.Name}} { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new {{tableRecordType.Name}} { {{readCommands}} }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new Serializable{{tableRecordType.Name}}[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new Serializable{{tableRecordType.Name}} { {{writeCommands}} }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } + } + """); +} + +using var dbLoaderSw = File.CreateText(Path.Combine(targetPath, "DBLoader.cs")); +dbLoaderSw.WriteLine($$""" + // ReSharper disable CheckNamespace + + using System; + using System.CodeDom.Compiler; + using System.IO; + using System.Text; + + namespace DB; + + [GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] + public class DBLoader + { + public static void LoadAll(string dirPath) + { + {{string.Join("\n", types.Select(t => $"{t.Name}.LoadFromFile(Path.Combine(dirPath, \"{t.Name.Replace("IDEnum", "TableRecord")}.json\"));"))}} + } + + public static void DumpAll(string dirPath) + { + {{string.Join("\n", types.Select(t => $"{t.Name}.DumpToFile(Path.Combine(dirPath, \"{t.Name.Replace("IDEnum", "TableRecord")}.json\"));"))}} + } + } + """); diff --git a/LooseDBTables/DB/DBLoader.cs b/LooseDBTables/DB/DBLoader.cs new file mode 100644 index 0000000..dc66f78 --- /dev/null +++ b/LooseDBTables/DB/DBLoader.cs @@ -0,0 +1,296 @@ +// ReSharper disable CheckNamespace + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; + +namespace DB; + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class DBLoader +{ + public static void LoadAll(string dirPath) + { + AdvertiseVolumeIDEnum.LoadFromFile(Path.Combine(dirPath, "AdvertiseVolumeTableRecord.json")); +ButtonIDEnum.LoadFromFile(Path.Combine(dirPath, "ButtonTableRecord.json")); +ButtonKindIDEnum.LoadFromFile(Path.Combine(dirPath, "ButtonKindTableRecord.json")); +ButtonPosIDEnum.LoadFromFile(Path.Combine(dirPath, "ButtonPosTableRecord.json")); +ButtonTypeIDEnum.LoadFromFile(Path.Combine(dirPath, "ButtonTypeTableRecord.json")); +CharlistAbcLargeIDEnum.LoadFromFile(Path.Combine(dirPath, "CharlistAbcLargeTableRecord.json")); +CharlistAbcSmallIDEnum.LoadFromFile(Path.Combine(dirPath, "CharlistAbcSmallTableRecord.json")); +CharlistIDEnum.LoadFromFile(Path.Combine(dirPath, "CharlistTableRecord.json")); +CharlistNumIDEnum.LoadFromFile(Path.Combine(dirPath, "CharlistNumTableRecord.json")); +CharlistSymboleIDEnum.LoadFromFile(Path.Combine(dirPath, "CharlistSymboleTableRecord.json")); +CommonMessageIDEnum.LoadFromFile(Path.Combine(dirPath, "CommonMessageTableRecord.json")); +ContentBitIDEnum.LoadFromFile(Path.Combine(dirPath, "ContentBitTableRecord.json")); +DeluxcorerankrateIDEnum.LoadFromFile(Path.Combine(dirPath, "DeluxcorerankrateTableRecord.json")); +ErrorIDEnum.LoadFromFile(Path.Combine(dirPath, "ErrorTableRecord.json")); +EventModeMusicCountIDEnum.LoadFromFile(Path.Combine(dirPath, "EventModeMusicCountTableRecord.json")); +ExtendContentBitIDEnum.LoadFromFile(Path.Combine(dirPath, "ExtendContentBitTableRecord.json")); +HardInitializeTextIDEnum.LoadFromFile(Path.Combine(dirPath, "HardInitializeTextTableRecord.json")); +JvsButtonIDEnum.LoadFromFile(Path.Combine(dirPath, "JvsButtonTableRecord.json")); +JvsOutputIDEnum.LoadFromFile(Path.Combine(dirPath, "JvsOutputTableRecord.json")); +KeyCodeIDEnum.LoadFromFile(Path.Combine(dirPath, "KeyCodeTableRecord.json")); +LedBlockIDEnum.LoadFromFile(Path.Combine(dirPath, "LedBlockTableRecord.json")); +MachineGroupIDEnum.LoadFromFile(Path.Combine(dirPath, "MachineGroupTableRecord.json")); +MaintenanceInfoIDEnum.LoadFromFile(Path.Combine(dirPath, "MaintenanceInfoTableRecord.json")); +NgwordExIDEnum.LoadFromFile(Path.Combine(dirPath, "NgwordExTableRecord.json")); +NgwordJpIDEnum.LoadFromFile(Path.Combine(dirPath, "NgwordJpTableRecord.json")); +OptionAppealIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionAppealTableRecord.json")); +OptionBodybrightnessIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionBodybrightnessTableRecord.json")); +OptionBreakseIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionBreakseTableRecord.json")); +OptionCateDesignIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCateDesignTableRecord.json")); +OptionCateGameIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCateGameTableRecord.json")); +OptionCategoryIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCategoryTableRecord.json")); +OptionCateJudgeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCateJudgeTableRecord.json")); +OptionCateSoundIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCateSoundTableRecord.json")); +OptionCateSpeedIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCateSpeedTableRecord.json")); +OptionCenterdisplayIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCenterdisplayTableRecord.json")); +OptionCriticalIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionCriticalTableRecord.json")); +OptionDispbarlineIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionDispbarlineTableRecord.json")); +OptionDispchainIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionDispchainTableRecord.json")); +OptionDispjudgeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionDispjudgeTableRecord.json")); +OptionDispjudgeposIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionDispjudgeposTableRecord.json")); +OptionDispjudgetouchposIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionDispjudgetouchposTableRecord.json")); +OptionDisprateIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionDisprateTableRecord.json")); +OptionExseIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionExseTableRecord.json")); +OptionGameholdIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionGameholdTableRecord.json")); +OptionGameoutlineIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionGameoutlineTableRecord.json")); +OptionGameslideIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionGameslideTableRecord.json")); +OptionGametapIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionGametapTableRecord.json")); +OptionHeadphonevolumeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionHeadphonevolumeTableRecord.json")); +OptionJudgetimingIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionJudgetimingTableRecord.json")); +OptionKindIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionKindTableRecord.json")); +OptionMatchingIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionMatchingTableRecord.json")); +OptionMirrorIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionMirrorTableRecord.json")); +OptionMoviebrightnessIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionMoviebrightnessTableRecord.json")); +OptionNotesizeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionNotesizeTableRecord.json")); +OptionNotespeedIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionNotespeedTableRecord.json")); +OptionOutframedisplayIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionOutframedisplayTableRecord.json")); +OptionRootIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionRootTableRecord.json")); +OptionSlideseIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionSlideseTableRecord.json")); +OptionSlidesizeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionSlidesizeTableRecord.json")); +OptionSlidespeedIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionSlidespeedTableRecord.json")); +OptionStarrotateIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionStarrotateTableRecord.json")); +OptionStartypeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionStartypeTableRecord.json")); +OptionSubmonAchiveIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionSubmonAchiveTableRecord.json")); +OptionSubmonitorIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionSubmonitorTableRecord.json")); +OptionTapSuccessSeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionTapSuccessSeTableRecord.json")); +OptionToucheffectIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionToucheffectTableRecord.json")); +OptionTouchsizeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionTouchsizeTableRecord.json")); +OptionTouchspeedIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionTouchspeedTableRecord.json")); +OptionTrackskipIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionTrackskipTableRecord.json")); +OptionVolumeAnswerSoundIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionVolumeAnswerSoundTableRecord.json")); +OptionVolumeIDEnum.LoadFromFile(Path.Combine(dirPath, "OptionVolumeTableRecord.json")); +PartyAdvertiseStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyAdvertiseStateTableRecord.json")); +PartyConnectStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyConnectStateTableRecord.json")); +PartyDeliveryCheckerErrorIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyDeliveryCheckerErrorTableRecord.json")); +PartyDeliveryCheckerStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyDeliveryCheckerStateTableRecord.json")); +PartyHeartBeatStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyHeartBeatStateTableRecord.json")); +PartyPartyClientStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyPartyClientStateTableRecord.json")); +PartyPartyHostStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyPartyHostStateTableRecord.json")); +PartyPartyJoinResultIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyPartyJoinResultTableRecord.json")); +PartyPartyManagerStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyPartyManagerStateTableRecord.json")); +PartyPartyStanceIDEnum.LoadFromFile(Path.Combine(dirPath, "PartyPartyStanceTableRecord.json")); +PartySettingClientStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartySettingClientStateTableRecord.json")); +PartySettingErrorIDEnum.LoadFromFile(Path.Combine(dirPath, "PartySettingErrorTableRecord.json")); +PartySettingHostStateIDEnum.LoadFromFile(Path.Combine(dirPath, "PartySettingHostStateTableRecord.json")); +PhotoeditDateIDEnum.LoadFromFile(Path.Combine(dirPath, "PhotoeditDateTableRecord.json")); +PhotoeditLayoutIDEnum.LoadFromFile(Path.Combine(dirPath, "PhotoeditLayoutTableRecord.json")); +PhotoeditPlayerinfoIDEnum.LoadFromFile(Path.Combine(dirPath, "PhotoeditPlayerinfoTableRecord.json")); +PhotoeditSettingIDEnum.LoadFromFile(Path.Combine(dirPath, "PhotoeditSettingTableRecord.json")); +PhotoeditShopnameIDEnum.LoadFromFile(Path.Combine(dirPath, "PhotoeditShopnameTableRecord.json")); +PhotoeditStampIDEnum.LoadFromFile(Path.Combine(dirPath, "PhotoeditStampTableRecord.json")); +PlayComboflagIDEnum.LoadFromFile(Path.Combine(dirPath, "PlayComboflagTableRecord.json")); +PlaystatusTabIDEnum.LoadFromFile(Path.Combine(dirPath, "PlaystatusTabTableRecord.json")); +PlaySyncflagIDEnum.LoadFromFile(Path.Combine(dirPath, "PlaySyncflagTableRecord.json")); +RateColorIDEnum.LoadFromFile(Path.Combine(dirPath, "RateColorTableRecord.json")); +RatingTableIDEnum.LoadFromFile(Path.Combine(dirPath, "RatingTableTableRecord.json")); +SortMusicIDEnum.LoadFromFile(Path.Combine(dirPath, "SortMusicTableRecord.json")); +SortRootIDEnum.LoadFromFile(Path.Combine(dirPath, "SortRootTableRecord.json")); +SortTabIDEnum.LoadFromFile(Path.Combine(dirPath, "SortTabTableRecord.json")); +SystemInitializeTextIDEnum.LoadFromFile(Path.Combine(dirPath, "SystemInitializeTextTableRecord.json")); +TestmodeAccountingIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeAccountingTableRecord.json")); +TestmodeAimeReadIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeAimeReadTableRecord.json")); +TestmodeBackupclearConfirmIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeBackupclearConfirmTableRecord.json")); +TestmodeBackupclearDoneIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeBackupclearDoneTableRecord.json")); +TestmodeBackupclearIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeBackupclearTableRecord.json")); +TestmodeBookkeep1IDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeBookkeep1TableRecord.json")); +TestmodeBookkeep2IDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeBookkeep2TableRecord.json")); +TestmodeBookkeep3IDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeBookkeep3TableRecord.json")); +TestmodeCameraIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeCameraTableRecord.json")); +TestmodeCloseChangedIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeCloseChangedTableRecord.json")); +TestmodeCloseConfirmIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeCloseConfirmTableRecord.json")); +TestmodeCloseIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeCloseTableRecord.json")); +TestmodeDebugEventsetIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeDebugEventsetTableRecord.json")); +TestmodeDebugInisetIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeDebugInisetTableRecord.json")); +TestmodeDebugLedIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeDebugLedTableRecord.json")); +TestmodeDebugSoundtestIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeDebugSoundtestTableRecord.json")); +TestmodeDownloadIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeDownloadTableRecord.json")); +TestmodeEmoneyAuthIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeEmoneyAuthTableRecord.json")); +TestmodeEmoneyIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeEmoneyTableRecord.json")); +TestmodeEmoneyRemoveIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeEmoneyRemoveTableRecord.json")); +TestmodeGamesettingIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeGamesettingTableRecord.json")); +TestmodeGenericIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeGenericTableRecord.json")); +TestmodeInputIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeInputTableRecord.json")); +TestmodeMonitorIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeMonitorTableRecord.json")); +TestmodeNetworkIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeNetworkTableRecord.json")); +TestmodeOutputIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeOutputTableRecord.json")); +TestmodeRootIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeRootTableRecord.json")); +TestmodeSystemInfo1IDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeSystemInfo1TableRecord.json")); +TestmodeSystemInfo2IDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeSystemInfo2TableRecord.json")); +TestmodeSystemtestIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeSystemtestTableRecord.json")); +TestmodeTouchpanel1pIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeTouchpanel1pTableRecord.json")); +TestmodeTouchpanel2pIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeTouchpanel2pTableRecord.json")); +TestmodeTouchpanelIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeTouchpanelTableRecord.json")); +TestmodeVfdIDEnum.LoadFromFile(Path.Combine(dirPath, "TestmodeVfdTableRecord.json")); +VsghostnpcIDEnum.LoadFromFile(Path.Combine(dirPath, "VsghostnpcTableRecord.json")); +WindowKindIDEnum.LoadFromFile(Path.Combine(dirPath, "WindowKindTableRecord.json")); +WindowMessageIDEnum.LoadFromFile(Path.Combine(dirPath, "WindowMessageTableRecord.json")); +WindowPositionIDEnum.LoadFromFile(Path.Combine(dirPath, "WindowPositionTableRecord.json")); +WindowSizeIDEnum.LoadFromFile(Path.Combine(dirPath, "WindowSizeTableRecord.json")); + } + + public static void DumpAll(string dirPath) + { + AdvertiseVolumeIDEnum.DumpToFile(Path.Combine(dirPath, "AdvertiseVolumeTableRecord.json")); +ButtonIDEnum.DumpToFile(Path.Combine(dirPath, "ButtonTableRecord.json")); +ButtonKindIDEnum.DumpToFile(Path.Combine(dirPath, "ButtonKindTableRecord.json")); +ButtonPosIDEnum.DumpToFile(Path.Combine(dirPath, "ButtonPosTableRecord.json")); +ButtonTypeIDEnum.DumpToFile(Path.Combine(dirPath, "ButtonTypeTableRecord.json")); +CharlistAbcLargeIDEnum.DumpToFile(Path.Combine(dirPath, "CharlistAbcLargeTableRecord.json")); +CharlistAbcSmallIDEnum.DumpToFile(Path.Combine(dirPath, "CharlistAbcSmallTableRecord.json")); +CharlistIDEnum.DumpToFile(Path.Combine(dirPath, "CharlistTableRecord.json")); +CharlistNumIDEnum.DumpToFile(Path.Combine(dirPath, "CharlistNumTableRecord.json")); +CharlistSymboleIDEnum.DumpToFile(Path.Combine(dirPath, "CharlistSymboleTableRecord.json")); +CommonMessageIDEnum.DumpToFile(Path.Combine(dirPath, "CommonMessageTableRecord.json")); +ContentBitIDEnum.DumpToFile(Path.Combine(dirPath, "ContentBitTableRecord.json")); +DeluxcorerankrateIDEnum.DumpToFile(Path.Combine(dirPath, "DeluxcorerankrateTableRecord.json")); +ErrorIDEnum.DumpToFile(Path.Combine(dirPath, "ErrorTableRecord.json")); +EventModeMusicCountIDEnum.DumpToFile(Path.Combine(dirPath, "EventModeMusicCountTableRecord.json")); +ExtendContentBitIDEnum.DumpToFile(Path.Combine(dirPath, "ExtendContentBitTableRecord.json")); +HardInitializeTextIDEnum.DumpToFile(Path.Combine(dirPath, "HardInitializeTextTableRecord.json")); +JvsButtonIDEnum.DumpToFile(Path.Combine(dirPath, "JvsButtonTableRecord.json")); +JvsOutputIDEnum.DumpToFile(Path.Combine(dirPath, "JvsOutputTableRecord.json")); +KeyCodeIDEnum.DumpToFile(Path.Combine(dirPath, "KeyCodeTableRecord.json")); +LedBlockIDEnum.DumpToFile(Path.Combine(dirPath, "LedBlockTableRecord.json")); +MachineGroupIDEnum.DumpToFile(Path.Combine(dirPath, "MachineGroupTableRecord.json")); +MaintenanceInfoIDEnum.DumpToFile(Path.Combine(dirPath, "MaintenanceInfoTableRecord.json")); +NgwordExIDEnum.DumpToFile(Path.Combine(dirPath, "NgwordExTableRecord.json")); +NgwordJpIDEnum.DumpToFile(Path.Combine(dirPath, "NgwordJpTableRecord.json")); +OptionAppealIDEnum.DumpToFile(Path.Combine(dirPath, "OptionAppealTableRecord.json")); +OptionBodybrightnessIDEnum.DumpToFile(Path.Combine(dirPath, "OptionBodybrightnessTableRecord.json")); +OptionBreakseIDEnum.DumpToFile(Path.Combine(dirPath, "OptionBreakseTableRecord.json")); +OptionCateDesignIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCateDesignTableRecord.json")); +OptionCateGameIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCateGameTableRecord.json")); +OptionCategoryIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCategoryTableRecord.json")); +OptionCateJudgeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCateJudgeTableRecord.json")); +OptionCateSoundIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCateSoundTableRecord.json")); +OptionCateSpeedIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCateSpeedTableRecord.json")); +OptionCenterdisplayIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCenterdisplayTableRecord.json")); +OptionCriticalIDEnum.DumpToFile(Path.Combine(dirPath, "OptionCriticalTableRecord.json")); +OptionDispbarlineIDEnum.DumpToFile(Path.Combine(dirPath, "OptionDispbarlineTableRecord.json")); +OptionDispchainIDEnum.DumpToFile(Path.Combine(dirPath, "OptionDispchainTableRecord.json")); +OptionDispjudgeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionDispjudgeTableRecord.json")); +OptionDispjudgeposIDEnum.DumpToFile(Path.Combine(dirPath, "OptionDispjudgeposTableRecord.json")); +OptionDispjudgetouchposIDEnum.DumpToFile(Path.Combine(dirPath, "OptionDispjudgetouchposTableRecord.json")); +OptionDisprateIDEnum.DumpToFile(Path.Combine(dirPath, "OptionDisprateTableRecord.json")); +OptionExseIDEnum.DumpToFile(Path.Combine(dirPath, "OptionExseTableRecord.json")); +OptionGameholdIDEnum.DumpToFile(Path.Combine(dirPath, "OptionGameholdTableRecord.json")); +OptionGameoutlineIDEnum.DumpToFile(Path.Combine(dirPath, "OptionGameoutlineTableRecord.json")); +OptionGameslideIDEnum.DumpToFile(Path.Combine(dirPath, "OptionGameslideTableRecord.json")); +OptionGametapIDEnum.DumpToFile(Path.Combine(dirPath, "OptionGametapTableRecord.json")); +OptionHeadphonevolumeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionHeadphonevolumeTableRecord.json")); +OptionJudgetimingIDEnum.DumpToFile(Path.Combine(dirPath, "OptionJudgetimingTableRecord.json")); +OptionKindIDEnum.DumpToFile(Path.Combine(dirPath, "OptionKindTableRecord.json")); +OptionMatchingIDEnum.DumpToFile(Path.Combine(dirPath, "OptionMatchingTableRecord.json")); +OptionMirrorIDEnum.DumpToFile(Path.Combine(dirPath, "OptionMirrorTableRecord.json")); +OptionMoviebrightnessIDEnum.DumpToFile(Path.Combine(dirPath, "OptionMoviebrightnessTableRecord.json")); +OptionNotesizeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionNotesizeTableRecord.json")); +OptionNotespeedIDEnum.DumpToFile(Path.Combine(dirPath, "OptionNotespeedTableRecord.json")); +OptionOutframedisplayIDEnum.DumpToFile(Path.Combine(dirPath, "OptionOutframedisplayTableRecord.json")); +OptionRootIDEnum.DumpToFile(Path.Combine(dirPath, "OptionRootTableRecord.json")); +OptionSlideseIDEnum.DumpToFile(Path.Combine(dirPath, "OptionSlideseTableRecord.json")); +OptionSlidesizeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionSlidesizeTableRecord.json")); +OptionSlidespeedIDEnum.DumpToFile(Path.Combine(dirPath, "OptionSlidespeedTableRecord.json")); +OptionStarrotateIDEnum.DumpToFile(Path.Combine(dirPath, "OptionStarrotateTableRecord.json")); +OptionStartypeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionStartypeTableRecord.json")); +OptionSubmonAchiveIDEnum.DumpToFile(Path.Combine(dirPath, "OptionSubmonAchiveTableRecord.json")); +OptionSubmonitorIDEnum.DumpToFile(Path.Combine(dirPath, "OptionSubmonitorTableRecord.json")); +OptionTapSuccessSeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionTapSuccessSeTableRecord.json")); +OptionToucheffectIDEnum.DumpToFile(Path.Combine(dirPath, "OptionToucheffectTableRecord.json")); +OptionTouchsizeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionTouchsizeTableRecord.json")); +OptionTouchspeedIDEnum.DumpToFile(Path.Combine(dirPath, "OptionTouchspeedTableRecord.json")); +OptionTrackskipIDEnum.DumpToFile(Path.Combine(dirPath, "OptionTrackskipTableRecord.json")); +OptionVolumeAnswerSoundIDEnum.DumpToFile(Path.Combine(dirPath, "OptionVolumeAnswerSoundTableRecord.json")); +OptionVolumeIDEnum.DumpToFile(Path.Combine(dirPath, "OptionVolumeTableRecord.json")); +PartyAdvertiseStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartyAdvertiseStateTableRecord.json")); +PartyConnectStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartyConnectStateTableRecord.json")); +PartyDeliveryCheckerErrorIDEnum.DumpToFile(Path.Combine(dirPath, "PartyDeliveryCheckerErrorTableRecord.json")); +PartyDeliveryCheckerStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartyDeliveryCheckerStateTableRecord.json")); +PartyHeartBeatStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartyHeartBeatStateTableRecord.json")); +PartyPartyClientStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartyPartyClientStateTableRecord.json")); +PartyPartyHostStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartyPartyHostStateTableRecord.json")); +PartyPartyJoinResultIDEnum.DumpToFile(Path.Combine(dirPath, "PartyPartyJoinResultTableRecord.json")); +PartyPartyManagerStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartyPartyManagerStateTableRecord.json")); +PartyPartyStanceIDEnum.DumpToFile(Path.Combine(dirPath, "PartyPartyStanceTableRecord.json")); +PartySettingClientStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartySettingClientStateTableRecord.json")); +PartySettingErrorIDEnum.DumpToFile(Path.Combine(dirPath, "PartySettingErrorTableRecord.json")); +PartySettingHostStateIDEnum.DumpToFile(Path.Combine(dirPath, "PartySettingHostStateTableRecord.json")); +PhotoeditDateIDEnum.DumpToFile(Path.Combine(dirPath, "PhotoeditDateTableRecord.json")); +PhotoeditLayoutIDEnum.DumpToFile(Path.Combine(dirPath, "PhotoeditLayoutTableRecord.json")); +PhotoeditPlayerinfoIDEnum.DumpToFile(Path.Combine(dirPath, "PhotoeditPlayerinfoTableRecord.json")); +PhotoeditSettingIDEnum.DumpToFile(Path.Combine(dirPath, "PhotoeditSettingTableRecord.json")); +PhotoeditShopnameIDEnum.DumpToFile(Path.Combine(dirPath, "PhotoeditShopnameTableRecord.json")); +PhotoeditStampIDEnum.DumpToFile(Path.Combine(dirPath, "PhotoeditStampTableRecord.json")); +PlayComboflagIDEnum.DumpToFile(Path.Combine(dirPath, "PlayComboflagTableRecord.json")); +PlaystatusTabIDEnum.DumpToFile(Path.Combine(dirPath, "PlaystatusTabTableRecord.json")); +PlaySyncflagIDEnum.DumpToFile(Path.Combine(dirPath, "PlaySyncflagTableRecord.json")); +RateColorIDEnum.DumpToFile(Path.Combine(dirPath, "RateColorTableRecord.json")); +RatingTableIDEnum.DumpToFile(Path.Combine(dirPath, "RatingTableTableRecord.json")); +SortMusicIDEnum.DumpToFile(Path.Combine(dirPath, "SortMusicTableRecord.json")); +SortRootIDEnum.DumpToFile(Path.Combine(dirPath, "SortRootTableRecord.json")); +SortTabIDEnum.DumpToFile(Path.Combine(dirPath, "SortTabTableRecord.json")); +SystemInitializeTextIDEnum.DumpToFile(Path.Combine(dirPath, "SystemInitializeTextTableRecord.json")); +TestmodeAccountingIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeAccountingTableRecord.json")); +TestmodeAimeReadIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeAimeReadTableRecord.json")); +TestmodeBackupclearConfirmIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeBackupclearConfirmTableRecord.json")); +TestmodeBackupclearDoneIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeBackupclearDoneTableRecord.json")); +TestmodeBackupclearIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeBackupclearTableRecord.json")); +TestmodeBookkeep1IDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeBookkeep1TableRecord.json")); +TestmodeBookkeep2IDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeBookkeep2TableRecord.json")); +TestmodeBookkeep3IDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeBookkeep3TableRecord.json")); +TestmodeCameraIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeCameraTableRecord.json")); +TestmodeCloseChangedIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeCloseChangedTableRecord.json")); +TestmodeCloseConfirmIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeCloseConfirmTableRecord.json")); +TestmodeCloseIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeCloseTableRecord.json")); +TestmodeDebugEventsetIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeDebugEventsetTableRecord.json")); +TestmodeDebugInisetIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeDebugInisetTableRecord.json")); +TestmodeDebugLedIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeDebugLedTableRecord.json")); +TestmodeDebugSoundtestIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeDebugSoundtestTableRecord.json")); +TestmodeDownloadIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeDownloadTableRecord.json")); +TestmodeEmoneyAuthIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeEmoneyAuthTableRecord.json")); +TestmodeEmoneyIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeEmoneyTableRecord.json")); +TestmodeEmoneyRemoveIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeEmoneyRemoveTableRecord.json")); +TestmodeGamesettingIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeGamesettingTableRecord.json")); +TestmodeGenericIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeGenericTableRecord.json")); +TestmodeInputIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeInputTableRecord.json")); +TestmodeMonitorIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeMonitorTableRecord.json")); +TestmodeNetworkIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeNetworkTableRecord.json")); +TestmodeOutputIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeOutputTableRecord.json")); +TestmodeRootIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeRootTableRecord.json")); +TestmodeSystemInfo1IDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeSystemInfo1TableRecord.json")); +TestmodeSystemInfo2IDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeSystemInfo2TableRecord.json")); +TestmodeSystemtestIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeSystemtestTableRecord.json")); +TestmodeTouchpanel1pIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeTouchpanel1pTableRecord.json")); +TestmodeTouchpanel2pIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeTouchpanel2pTableRecord.json")); +TestmodeTouchpanelIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeTouchpanelTableRecord.json")); +TestmodeVfdIDEnum.DumpToFile(Path.Combine(dirPath, "TestmodeVfdTableRecord.json")); +VsghostnpcIDEnum.DumpToFile(Path.Combine(dirPath, "VsghostnpcTableRecord.json")); +WindowKindIDEnum.DumpToFile(Path.Combine(dirPath, "WindowKindTableRecord.json")); +WindowMessageIDEnum.DumpToFile(Path.Combine(dirPath, "WindowMessageTableRecord.json")); +WindowPositionIDEnum.DumpToFile(Path.Combine(dirPath, "WindowPositionTableRecord.json")); +WindowSizeIDEnum.DumpToFile(Path.Combine(dirPath, "WindowSizeTableRecord.json")); + } +} diff --git a/LooseDBTables/DB/patch_AdvertiseVolumeIDEnum.cs b/LooseDBTables/DB/patch_AdvertiseVolumeIDEnum.cs new file mode 100644 index 0000000..7f60a50 --- /dev/null +++ b/LooseDBTables/DB/patch_AdvertiseVolumeIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class AdvertiseVolumeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static AdvertiseVolumeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableAdvertiseVolumeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 Volume; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_AdvertiseVolumeIDEnum : AdvertiseVolumeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new AdvertiseVolumeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Volume = (System.Int32)src[i].Volume, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableAdvertiseVolumeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableAdvertiseVolumeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Volume = (System.Int32)src[i].Volume, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_ButtonIDEnum.cs b/LooseDBTables/DB/patch_ButtonIDEnum.cs new file mode 100644 index 0000000..c7680e0 --- /dev/null +++ b/LooseDBTables/DB/patch_ButtonIDEnum.cs @@ -0,0 +1,79 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class ButtonIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static ButtonTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableButtonTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.Int32 Kind; +public System.Int32 Type; +public System.Int32 Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_ButtonIDEnum : ButtonIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new ButtonTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Kind = (DB.ButtonKindID)src[i].Kind, Type = (DB.ButtonTypeID)src[i].Type, Name = (System.Int32)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableButtonTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableButtonTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Kind = (int)src[i].Kind, Type = (int)src[i].Type, Name = (System.Int32)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_ButtonKindIDEnum.cs b/LooseDBTables/DB/patch_ButtonKindIDEnum.cs new file mode 100644 index 0000000..6846c07 --- /dev/null +++ b/LooseDBTables/DB/patch_ButtonKindIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class ButtonKindIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static ButtonKindTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableButtonKindTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_ButtonKindIDEnum : ButtonKindIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new ButtonKindTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableButtonKindTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableButtonKindTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_ButtonPosIDEnum.cs b/LooseDBTables/DB/patch_ButtonPosIDEnum.cs new file mode 100644 index 0000000..93249bb --- /dev/null +++ b/LooseDBTables/DB/patch_ButtonPosIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class ButtonPosIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static ButtonPosTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableButtonPosTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_ButtonPosIDEnum : ButtonPosIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new ButtonPosTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableButtonPosTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableButtonPosTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_ButtonTypeIDEnum.cs b/LooseDBTables/DB/patch_ButtonTypeIDEnum.cs new file mode 100644 index 0000000..1352aab --- /dev/null +++ b/LooseDBTables/DB/patch_ButtonTypeIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class ButtonTypeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static ButtonTypeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableButtonTypeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_ButtonTypeIDEnum : ButtonTypeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new ButtonTypeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableButtonTypeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableButtonTypeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_CharlistAbcLargeIDEnum.cs b/LooseDBTables/DB/patch_CharlistAbcLargeIDEnum.cs new file mode 100644 index 0000000..6dda3d3 --- /dev/null +++ b/LooseDBTables/DB/patch_CharlistAbcLargeIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class CharlistAbcLargeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static CharlistAbcLargeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableCharlistAbcLargeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_CharlistAbcLargeIDEnum : CharlistAbcLargeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new CharlistAbcLargeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableCharlistAbcLargeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableCharlistAbcLargeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_CharlistAbcSmallIDEnum.cs b/LooseDBTables/DB/patch_CharlistAbcSmallIDEnum.cs new file mode 100644 index 0000000..3e64aae --- /dev/null +++ b/LooseDBTables/DB/patch_CharlistAbcSmallIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class CharlistAbcSmallIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static CharlistAbcSmallTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableCharlistAbcSmallTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_CharlistAbcSmallIDEnum : CharlistAbcSmallIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new CharlistAbcSmallTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableCharlistAbcSmallTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableCharlistAbcSmallTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_CharlistIDEnum.cs b/LooseDBTables/DB/patch_CharlistIDEnum.cs new file mode 100644 index 0000000..6466e99 --- /dev/null +++ b/LooseDBTables/DB/patch_CharlistIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class CharlistIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static CharlistTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableCharlistTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_CharlistIDEnum : CharlistIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new CharlistTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableCharlistTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableCharlistTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_CharlistNumIDEnum.cs b/LooseDBTables/DB/patch_CharlistNumIDEnum.cs new file mode 100644 index 0000000..bf22ae5 --- /dev/null +++ b/LooseDBTables/DB/patch_CharlistNumIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class CharlistNumIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static CharlistNumTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableCharlistNumTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_CharlistNumIDEnum : CharlistNumIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new CharlistNumTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableCharlistNumTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableCharlistNumTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_CharlistSymboleIDEnum.cs b/LooseDBTables/DB/patch_CharlistSymboleIDEnum.cs new file mode 100644 index 0000000..a7e0f30 --- /dev/null +++ b/LooseDBTables/DB/patch_CharlistSymboleIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class CharlistSymboleIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static CharlistSymboleTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableCharlistSymboleTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_CharlistSymboleIDEnum : CharlistSymboleIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new CharlistSymboleTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableCharlistSymboleTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableCharlistSymboleTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_CommonMessageIDEnum.cs b/LooseDBTables/DB/patch_CommonMessageIDEnum.cs new file mode 100644 index 0000000..2bba212 --- /dev/null +++ b/LooseDBTables/DB/patch_CommonMessageIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class CommonMessageIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static CommonMessageTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableCommonMessageTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_CommonMessageIDEnum : CommonMessageIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new CommonMessageTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableCommonMessageTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableCommonMessageTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_ContentBitIDEnum.cs b/LooseDBTables/DB/patch_ContentBitIDEnum.cs new file mode 100644 index 0000000..3139b3f --- /dev/null +++ b/LooseDBTables/DB/patch_ContentBitIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class ContentBitIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static ContentBitTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableContentBitTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isGuestIgnore; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_ContentBitIDEnum : ContentBitIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new ContentBitTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isGuestIgnore = (System.Boolean)src[i].isGuestIgnore, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableContentBitTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableContentBitTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isGuestIgnore = (System.Boolean)src[i].isGuestIgnore, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_DeluxcorerankrateIDEnum.cs b/LooseDBTables/DB/patch_DeluxcorerankrateIDEnum.cs new file mode 100644 index 0000000..29d30fc --- /dev/null +++ b/LooseDBTables/DB/patch_DeluxcorerankrateIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class DeluxcorerankrateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static DeluxcorerankrateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableDeluxcorerankrateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 Achieve; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_DeluxcorerankrateIDEnum : DeluxcorerankrateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new DeluxcorerankrateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Achieve = (System.Int32)src[i].Achieve, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableDeluxcorerankrateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableDeluxcorerankrateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Achieve = (System.Int32)src[i].Achieve, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_ErrorIDEnum.cs b/LooseDBTables/DB/patch_ErrorIDEnum.cs new file mode 100644 index 0000000..f1e5503 --- /dev/null +++ b/LooseDBTables/DB/patch_ErrorIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class ErrorIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static ErrorTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableErrorTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isWarning; +public System.Boolean isFirmUpdate; +public System.Int32 Code; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_ErrorIDEnum : ErrorIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new ErrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isWarning = (System.Boolean)src[i].isWarning, isFirmUpdate = (System.Boolean)src[i].isFirmUpdate, Code = (System.Int32)src[i].Code, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableErrorTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableErrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isWarning = (System.Boolean)src[i].isWarning, isFirmUpdate = (System.Boolean)src[i].isFirmUpdate, Code = (System.Int32)src[i].Code, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_EventModeMusicCountIDEnum.cs b/LooseDBTables/DB/patch_EventModeMusicCountIDEnum.cs new file mode 100644 index 0000000..fd9536d --- /dev/null +++ b/LooseDBTables/DB/patch_EventModeMusicCountIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class EventModeMusicCountIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static EventModeMusicCountTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableEventModeMusicCountTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 Track; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_EventModeMusicCountIDEnum : EventModeMusicCountIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new EventModeMusicCountTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Track = (System.Int32)src[i].Track, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableEventModeMusicCountTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableEventModeMusicCountTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Track = (System.Int32)src[i].Track, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_ExtendContentBitIDEnum.cs b/LooseDBTables/DB/patch_ExtendContentBitIDEnum.cs new file mode 100644 index 0000000..760414a --- /dev/null +++ b/LooseDBTables/DB/patch_ExtendContentBitIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class ExtendContentBitIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static ExtendContentBitTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableExtendContentBitTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_ExtendContentBitIDEnum : ExtendContentBitIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new ExtendContentBitTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableExtendContentBitTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableExtendContentBitTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_HardInitializeTextIDEnum.cs b/LooseDBTables/DB/patch_HardInitializeTextIDEnum.cs new file mode 100644 index 0000000..fefd201 --- /dev/null +++ b/LooseDBTables/DB/patch_HardInitializeTextIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class HardInitializeTextIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static HardInitializeTextTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableHardInitializeTextTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_HardInitializeTextIDEnum : HardInitializeTextIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new HardInitializeTextTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableHardInitializeTextTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableHardInitializeTextTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_JvsButtonIDEnum.cs b/LooseDBTables/DB/patch_JvsButtonIDEnum.cs new file mode 100644 index 0000000..8969ec5 --- /dev/null +++ b/LooseDBTables/DB/patch_JvsButtonIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class JvsButtonIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static JvsButtonTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableJvsButtonTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 JvsPlayer; +public System.String InputIDName; +public System.Int32 SubstituteKey; +public System.Int32 Invert; +public System.Int32 System; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_JvsButtonIDEnum : JvsButtonIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new JvsButtonTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, JvsPlayer = (System.Int32)src[i].JvsPlayer, InputIDName = (System.String)src[i].InputIDName, SubstituteKey = (DB.KeyCodeID)src[i].SubstituteKey, Invert = (System.Int32)src[i].Invert, System = (System.Int32)src[i].System, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableJvsButtonTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableJvsButtonTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, JvsPlayer = (System.Int32)src[i].JvsPlayer, InputIDName = (System.String)src[i].InputIDName, SubstituteKey = (int)src[i].SubstituteKey, Invert = (System.Int32)src[i].Invert, System = (System.Int32)src[i].System, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_JvsOutputIDEnum.cs b/LooseDBTables/DB/patch_JvsOutputIDEnum.cs new file mode 100644 index 0000000..d8aa8d7 --- /dev/null +++ b/LooseDBTables/DB/patch_JvsOutputIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class JvsOutputIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static JvsOutputTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableJvsOutputTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String OutputIDName; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_JvsOutputIDEnum : JvsOutputIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new JvsOutputTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, OutputIDName = (System.String)src[i].OutputIDName, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableJvsOutputTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableJvsOutputTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, OutputIDName = (System.String)src[i].OutputIDName, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_KeyCodeIDEnum.cs b/LooseDBTables/DB/patch_KeyCodeIDEnum.cs new file mode 100644 index 0000000..5525d9f --- /dev/null +++ b/LooseDBTables/DB/patch_KeyCodeIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class KeyCodeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static KeyCodeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableKeyCodeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 Value; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_KeyCodeIDEnum : KeyCodeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new KeyCodeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Value = (System.Int32)src[i].Value, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableKeyCodeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableKeyCodeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Value = (System.Int32)src[i].Value, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_LedBlockIDEnum.cs b/LooseDBTables/DB/patch_LedBlockIDEnum.cs new file mode 100644 index 0000000..5d907ae --- /dev/null +++ b/LooseDBTables/DB/patch_LedBlockIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class LedBlockIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static LedBlockTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableLedBlockTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 LedbdID; +public System.Int32 Playerindex; +public System.Boolean isJvs; +public System.Boolean isFet; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_LedBlockIDEnum : LedBlockIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new LedBlockTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, LedbdID = (System.Int32)src[i].LedbdID, Playerindex = (System.Int32)src[i].Playerindex, isJvs = (System.Boolean)src[i].isJvs, isFet = (System.Boolean)src[i].isFet, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableLedBlockTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableLedBlockTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, LedbdID = (System.Int32)src[i].LedbdID, Playerindex = (System.Int32)src[i].Playerindex, isJvs = (System.Boolean)src[i].isJvs, isFet = (System.Boolean)src[i].isFet, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_MachineGroupIDEnum.cs b/LooseDBTables/DB/patch_MachineGroupIDEnum.cs new file mode 100644 index 0000000..0324881 --- /dev/null +++ b/LooseDBTables/DB/patch_MachineGroupIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class MachineGroupIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static MachineGroupTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableMachineGroupTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_MachineGroupIDEnum : MachineGroupIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new MachineGroupTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableMachineGroupTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableMachineGroupTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_MaintenanceInfoIDEnum.cs b/LooseDBTables/DB/patch_MaintenanceInfoIDEnum.cs new file mode 100644 index 0000000..1e291c5 --- /dev/null +++ b/LooseDBTables/DB/patch_MaintenanceInfoIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class MaintenanceInfoIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static MaintenanceInfoTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableMaintenanceInfoTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_MaintenanceInfoIDEnum : MaintenanceInfoIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new MaintenanceInfoTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableMaintenanceInfoTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableMaintenanceInfoTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_NgwordExIDEnum.cs b/LooseDBTables/DB/patch_NgwordExIDEnum.cs new file mode 100644 index 0000000..5656044 --- /dev/null +++ b/LooseDBTables/DB/patch_NgwordExIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class NgwordExIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static NgwordExTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableNgwordExTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_NgwordExIDEnum : NgwordExIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new NgwordExTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableNgwordExTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableNgwordExTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_NgwordJpIDEnum.cs b/LooseDBTables/DB/patch_NgwordJpIDEnum.cs new file mode 100644 index 0000000..912e3c3 --- /dev/null +++ b/LooseDBTables/DB/patch_NgwordJpIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class NgwordJpIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static NgwordJpTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableNgwordJpTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_NgwordJpIDEnum : NgwordJpIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new NgwordJpTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableNgwordJpTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableNgwordJpTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionAppealIDEnum.cs b/LooseDBTables/DB/patch_OptionAppealIDEnum.cs new file mode 100644 index 0000000..2327b63 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionAppealIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionAppealIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionAppealTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionAppealTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionAppealIDEnum : OptionAppealIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionAppealTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionAppealTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionAppealTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionBodybrightnessIDEnum.cs b/LooseDBTables/DB/patch_OptionBodybrightnessIDEnum.cs new file mode 100644 index 0000000..3baa344 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionBodybrightnessIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionBodybrightnessIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionBodybrightnessTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionBodybrightnessTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String Detail; +public System.String FilePath; +public System.Boolean isDefault; +public System.Single Value; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionBodybrightnessIDEnum : OptionBodybrightnessIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionBodybrightnessTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Detail = (System.String)src[i].Detail, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionBodybrightnessTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionBodybrightnessTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Detail = (System.String)src[i].Detail, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionBreakseIDEnum.cs b/LooseDBTables/DB/patch_OptionBreakseIDEnum.cs new file mode 100644 index 0000000..21a4308 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionBreakseIDEnum.cs @@ -0,0 +1,84 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionBreakseIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionBreakseTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionBreakseTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String SeGoodEnum; +public System.String SeBadEnum; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionBreakseIDEnum : OptionBreakseIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionBreakseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeGoodEnum = (System.String)src[i].SeGoodEnum, SeBadEnum = (System.String)src[i].SeBadEnum, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionBreakseTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionBreakseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeGoodEnum = (System.String)src[i].SeGoodEnum, SeBadEnum = (System.String)src[i].SeBadEnum, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCateDesignIDEnum.cs b/LooseDBTables/DB/patch_OptionCateDesignIDEnum.cs new file mode 100644 index 0000000..11d3960 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCateDesignIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCateDesignIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCateDesignTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCateDesignTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCateDesignIDEnum : OptionCateDesignIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCateDesignTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCateDesignTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCateDesignTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCateGameIDEnum.cs b/LooseDBTables/DB/patch_OptionCateGameIDEnum.cs new file mode 100644 index 0000000..afe765b --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCateGameIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCateGameIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCateGameTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCateGameTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCateGameIDEnum : OptionCateGameIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCateGameTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCateGameTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCateGameTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCateJudgeIDEnum.cs b/LooseDBTables/DB/patch_OptionCateJudgeIDEnum.cs new file mode 100644 index 0000000..9b97a64 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCateJudgeIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCateJudgeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCateJudgeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCateJudgeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCateJudgeIDEnum : OptionCateJudgeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCateJudgeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCateJudgeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCateJudgeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCateSoundIDEnum.cs b/LooseDBTables/DB/patch_OptionCateSoundIDEnum.cs new file mode 100644 index 0000000..d550dfe --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCateSoundIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCateSoundIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCateSoundTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCateSoundTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCateSoundIDEnum : OptionCateSoundIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCateSoundTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCateSoundTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCateSoundTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCateSpeedIDEnum.cs b/LooseDBTables/DB/patch_OptionCateSpeedIDEnum.cs new file mode 100644 index 0000000..541346b --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCateSpeedIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCateSpeedIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCateSpeedTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCateSpeedTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCateSpeedIDEnum : OptionCateSpeedIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCateSpeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCateSpeedTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCateSpeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCategoryIDEnum.cs b/LooseDBTables/DB/patch_OptionCategoryIDEnum.cs new file mode 100644 index 0000000..d2a0615 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCategoryIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCategoryIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCategoryTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCategoryTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.UInt32 MainColor; +public System.String Filename; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCategoryIDEnum : OptionCategoryIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCategoryTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, MainColor = (System.UInt32)src[i].MainColor, Filename = (System.String)src[i].Filename, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCategoryTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCategoryTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, MainColor = (System.UInt32)src[i].MainColor, Filename = (System.String)src[i].Filename, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCenterdisplayIDEnum.cs b/LooseDBTables/DB/patch_OptionCenterdisplayIDEnum.cs new file mode 100644 index 0000000..00f2634 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCenterdisplayIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCenterdisplayIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCenterdisplayTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCenterdisplayTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCenterdisplayIDEnum : OptionCenterdisplayIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCenterdisplayTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCenterdisplayTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCenterdisplayTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionCriticalIDEnum.cs b/LooseDBTables/DB/patch_OptionCriticalIDEnum.cs new file mode 100644 index 0000000..37d9d04 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionCriticalIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionCriticalIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionCriticalTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionCriticalTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionCriticalIDEnum : OptionCriticalIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionCriticalTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionCriticalTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionCriticalTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionDispbarlineIDEnum.cs b/LooseDBTables/DB/patch_OptionDispbarlineIDEnum.cs new file mode 100644 index 0000000..ab0243f --- /dev/null +++ b/LooseDBTables/DB/patch_OptionDispbarlineIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionDispbarlineIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionDispbarlineTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionDispbarlineTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionDispbarlineIDEnum : OptionDispbarlineIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionDispbarlineTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionDispbarlineTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionDispbarlineTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionDispchainIDEnum.cs b/LooseDBTables/DB/patch_OptionDispchainIDEnum.cs new file mode 100644 index 0000000..e3f9132 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionDispchainIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionDispchainIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionDispchainTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionDispchainTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionDispchainIDEnum : OptionDispchainIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionDispchainTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionDispchainTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionDispchainTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionDispjudgeIDEnum.cs b/LooseDBTables/DB/patch_OptionDispjudgeIDEnum.cs new file mode 100644 index 0000000..50740c3 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionDispjudgeIDEnum.cs @@ -0,0 +1,84 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionDispjudgeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionDispjudgeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionDispjudgeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; +public System.Boolean isCritical; +public System.Boolean isFastlate; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionDispjudgeIDEnum : OptionDispjudgeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionDispjudgeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, isCritical = (System.Boolean)src[i].isCritical, isFastlate = (System.Boolean)src[i].isFastlate, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionDispjudgeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionDispjudgeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, isCritical = (System.Boolean)src[i].isCritical, isFastlate = (System.Boolean)src[i].isFastlate, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionDispjudgeposIDEnum.cs b/LooseDBTables/DB/patch_OptionDispjudgeposIDEnum.cs new file mode 100644 index 0000000..681374f --- /dev/null +++ b/LooseDBTables/DB/patch_OptionDispjudgeposIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionDispjudgeposIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionDispjudgeposTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionDispjudgeposTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionDispjudgeposIDEnum : OptionDispjudgeposIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionDispjudgeposTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionDispjudgeposTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionDispjudgeposTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionDispjudgetouchposIDEnum.cs b/LooseDBTables/DB/patch_OptionDispjudgetouchposIDEnum.cs new file mode 100644 index 0000000..47e9f26 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionDispjudgetouchposIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionDispjudgetouchposIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionDispjudgetouchposTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionDispjudgetouchposTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionDispjudgetouchposIDEnum : OptionDispjudgetouchposIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionDispjudgetouchposTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionDispjudgetouchposTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionDispjudgetouchposTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionDisprateIDEnum.cs b/LooseDBTables/DB/patch_OptionDisprateIDEnum.cs new file mode 100644 index 0000000..c3bca59 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionDisprateIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionDisprateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionDisprateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionDisprateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionDisprateIDEnum : OptionDisprateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionDisprateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionDisprateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionDisprateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionExseIDEnum.cs b/LooseDBTables/DB/patch_OptionExseIDEnum.cs new file mode 100644 index 0000000..8483727 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionExseIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionExseIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionExseTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionExseTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String SeEnum; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionExseIDEnum : OptionExseIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionExseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeEnum = (System.String)src[i].SeEnum, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionExseTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionExseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeEnum = (System.String)src[i].SeEnum, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionGameholdIDEnum.cs b/LooseDBTables/DB/patch_OptionGameholdIDEnum.cs new file mode 100644 index 0000000..218736f --- /dev/null +++ b/LooseDBTables/DB/patch_OptionGameholdIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionGameholdIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionGameholdTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionGameholdTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionGameholdIDEnum : OptionGameholdIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionGameholdTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionGameholdTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionGameholdTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionGameoutlineIDEnum.cs b/LooseDBTables/DB/patch_OptionGameoutlineIDEnum.cs new file mode 100644 index 0000000..c10ce4a --- /dev/null +++ b/LooseDBTables/DB/patch_OptionGameoutlineIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionGameoutlineIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionGameoutlineTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionGameoutlineTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionGameoutlineIDEnum : OptionGameoutlineIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionGameoutlineTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionGameoutlineTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionGameoutlineTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionGameslideIDEnum.cs b/LooseDBTables/DB/patch_OptionGameslideIDEnum.cs new file mode 100644 index 0000000..82c72f4 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionGameslideIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionGameslideIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionGameslideTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionGameslideTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionGameslideIDEnum : OptionGameslideIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionGameslideTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionGameslideTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionGameslideTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionGametapIDEnum.cs b/LooseDBTables/DB/patch_OptionGametapIDEnum.cs new file mode 100644 index 0000000..3e9335b --- /dev/null +++ b/LooseDBTables/DB/patch_OptionGametapIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionGametapIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionGametapTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionGametapTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionGametapIDEnum : OptionGametapIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionGametapTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionGametapTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionGametapTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionHeadphonevolumeIDEnum.cs b/LooseDBTables/DB/patch_OptionHeadphonevolumeIDEnum.cs new file mode 100644 index 0000000..afdaa4e --- /dev/null +++ b/LooseDBTables/DB/patch_OptionHeadphonevolumeIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionHeadphonevolumeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionHeadphonevolumeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionHeadphonevolumeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.Single Value; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionHeadphonevolumeIDEnum : OptionHeadphonevolumeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionHeadphonevolumeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionHeadphonevolumeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionHeadphonevolumeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionJudgetimingIDEnum.cs b/LooseDBTables/DB/patch_OptionJudgetimingIDEnum.cs new file mode 100644 index 0000000..897d3c3 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionJudgetimingIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionJudgetimingIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionJudgetimingTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionJudgetimingTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionJudgetimingIDEnum : OptionJudgetimingIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionJudgetimingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionJudgetimingTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionJudgetimingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionKindIDEnum.cs b/LooseDBTables/DB/patch_OptionKindIDEnum.cs new file mode 100644 index 0000000..6e8d031 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionKindIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionKindIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionKindTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionKindTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionKindIDEnum : OptionKindIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionKindTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionKindTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionKindTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionMatchingIDEnum.cs b/LooseDBTables/DB/patch_OptionMatchingIDEnum.cs new file mode 100644 index 0000000..3ab4889 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionMatchingIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionMatchingIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionMatchingTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionMatchingTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionMatchingIDEnum : OptionMatchingIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionMatchingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionMatchingTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionMatchingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionMirrorIDEnum.cs b/LooseDBTables/DB/patch_OptionMirrorIDEnum.cs new file mode 100644 index 0000000..0a70ca8 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionMirrorIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionMirrorIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionMirrorTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionMirrorTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionMirrorIDEnum : OptionMirrorIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionMirrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionMirrorTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionMirrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionMoviebrightnessIDEnum.cs b/LooseDBTables/DB/patch_OptionMoviebrightnessIDEnum.cs new file mode 100644 index 0000000..0373a61 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionMoviebrightnessIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionMoviebrightnessIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionMoviebrightnessTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionMoviebrightnessTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.Single Value; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionMoviebrightnessIDEnum : OptionMoviebrightnessIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionMoviebrightnessTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionMoviebrightnessTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionMoviebrightnessTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionNotesizeIDEnum.cs b/LooseDBTables/DB/patch_OptionNotesizeIDEnum.cs new file mode 100644 index 0000000..d12ba2b --- /dev/null +++ b/LooseDBTables/DB/patch_OptionNotesizeIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionNotesizeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionNotesizeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionNotesizeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; +public System.Single Value; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionNotesizeIDEnum : OptionNotesizeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionNotesizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionNotesizeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionNotesizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionNotespeedIDEnum.cs b/LooseDBTables/DB/patch_OptionNotespeedIDEnum.cs new file mode 100644 index 0000000..0ecd4e2 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionNotespeedIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionNotespeedIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionNotespeedTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionNotespeedTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.Single Value; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionNotespeedIDEnum : OptionNotespeedIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionNotespeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionNotespeedTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionNotespeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionOutframedisplayIDEnum.cs b/LooseDBTables/DB/patch_OptionOutframedisplayIDEnum.cs new file mode 100644 index 0000000..0e9c493 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionOutframedisplayIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionOutframedisplayIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionOutframedisplayTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionOutframedisplayTableRecord { + public System.String EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionOutframedisplayIDEnum : OptionOutframedisplayIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionOutframedisplayTableRecord { EnumValue = (System.String)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionOutframedisplayTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionOutframedisplayTableRecord { EnumValue = (System.String)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionRootIDEnum.cs b/LooseDBTables/DB/patch_OptionRootIDEnum.cs new file mode 100644 index 0000000..733a62d --- /dev/null +++ b/LooseDBTables/DB/patch_OptionRootIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionRootIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionRootTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionRootTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionRootIDEnum : OptionRootIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionRootTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionRootTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionRootTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionSlideseIDEnum.cs b/LooseDBTables/DB/patch_OptionSlideseIDEnum.cs new file mode 100644 index 0000000..76fb377 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionSlideseIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionSlideseIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionSlideseTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionSlideseTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String SeEnum; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionSlideseIDEnum : OptionSlideseIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionSlideseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeEnum = (System.String)src[i].SeEnum, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionSlideseTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionSlideseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeEnum = (System.String)src[i].SeEnum, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionSlidesizeIDEnum.cs b/LooseDBTables/DB/patch_OptionSlidesizeIDEnum.cs new file mode 100644 index 0000000..92bc174 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionSlidesizeIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionSlidesizeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionSlidesizeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionSlidesizeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; +public System.Single Value; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionSlidesizeIDEnum : OptionSlidesizeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionSlidesizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionSlidesizeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionSlidesizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionSlidespeedIDEnum.cs b/LooseDBTables/DB/patch_OptionSlidespeedIDEnum.cs new file mode 100644 index 0000000..00decb7 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionSlidespeedIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionSlidespeedIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionSlidespeedTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionSlidespeedTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionSlidespeedIDEnum : OptionSlidespeedIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionSlidespeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionSlidespeedTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionSlidespeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionStarrotateIDEnum.cs b/LooseDBTables/DB/patch_OptionStarrotateIDEnum.cs new file mode 100644 index 0000000..48331a4 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionStarrotateIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionStarrotateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionStarrotateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionStarrotateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionStarrotateIDEnum : OptionStarrotateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionStarrotateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionStarrotateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionStarrotateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionStartypeIDEnum.cs b/LooseDBTables/DB/patch_OptionStartypeIDEnum.cs new file mode 100644 index 0000000..02a705a --- /dev/null +++ b/LooseDBTables/DB/patch_OptionStartypeIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionStartypeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionStartypeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionStartypeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionStartypeIDEnum : OptionStartypeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionStartypeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionStartypeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionStartypeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionSubmonAchiveIDEnum.cs b/LooseDBTables/DB/patch_OptionSubmonAchiveIDEnum.cs new file mode 100644 index 0000000..a01460a --- /dev/null +++ b/LooseDBTables/DB/patch_OptionSubmonAchiveIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionSubmonAchiveIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionSubmonAchiveTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionSubmonAchiveTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionSubmonAchiveIDEnum : OptionSubmonAchiveIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionSubmonAchiveTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionSubmonAchiveTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionSubmonAchiveTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionSubmonitorIDEnum.cs b/LooseDBTables/DB/patch_OptionSubmonitorIDEnum.cs new file mode 100644 index 0000000..54a5257 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionSubmonitorIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionSubmonitorIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionSubmonitorTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionSubmonitorTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionSubmonitorIDEnum : OptionSubmonitorIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionSubmonitorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionSubmonitorTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionSubmonitorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionTapSuccessSeIDEnum.cs b/LooseDBTables/DB/patch_OptionTapSuccessSeIDEnum.cs new file mode 100644 index 0000000..6eb5c23 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionTapSuccessSeIDEnum.cs @@ -0,0 +1,86 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionTapSuccessSeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionTapSuccessSeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionTapSuccessSeTableRecord { + public System.String EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String SeEnumCritical; +public System.String SeEnumPerfect; +public System.String SeEnumGreat; +public System.String SeEnumGood; +public System.Boolean isDefault; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionTapSuccessSeIDEnum : OptionTapSuccessSeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionTapSuccessSeTableRecord { EnumValue = (System.String)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeEnumCritical = (System.String)src[i].SeEnumCritical, SeEnumPerfect = (System.String)src[i].SeEnumPerfect, SeEnumGreat = (System.String)src[i].SeEnumGreat, SeEnumGood = (System.String)src[i].SeEnumGood, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionTapSuccessSeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionTapSuccessSeTableRecord { EnumValue = (System.String)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, SeEnumCritical = (System.String)src[i].SeEnumCritical, SeEnumPerfect = (System.String)src[i].SeEnumPerfect, SeEnumGreat = (System.String)src[i].SeEnumGreat, SeEnumGood = (System.String)src[i].SeEnumGood, isDefault = (System.Boolean)src[i].isDefault, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionToucheffectIDEnum.cs b/LooseDBTables/DB/patch_OptionToucheffectIDEnum.cs new file mode 100644 index 0000000..963573c --- /dev/null +++ b/LooseDBTables/DB/patch_OptionToucheffectIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionToucheffectIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionToucheffectTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionToucheffectTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionToucheffectIDEnum : OptionToucheffectIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionToucheffectTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionToucheffectTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionToucheffectTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionTouchsizeIDEnum.cs b/LooseDBTables/DB/patch_OptionTouchsizeIDEnum.cs new file mode 100644 index 0000000..9c1506d --- /dev/null +++ b/LooseDBTables/DB/patch_OptionTouchsizeIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionTouchsizeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionTouchsizeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionTouchsizeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; +public System.Single Value; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionTouchsizeIDEnum : OptionTouchsizeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionTouchsizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionTouchsizeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionTouchsizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, Value = (System.Single)src[i].Value, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionTouchspeedIDEnum.cs b/LooseDBTables/DB/patch_OptionTouchspeedIDEnum.cs new file mode 100644 index 0000000..dea74f4 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionTouchspeedIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionTouchspeedIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionTouchspeedTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionTouchspeedTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.Single Value; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionTouchspeedIDEnum : OptionTouchspeedIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionTouchspeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionTouchspeedTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionTouchspeedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionTrackskipIDEnum.cs b/LooseDBTables/DB/patch_OptionTrackskipIDEnum.cs new file mode 100644 index 0000000..a356512 --- /dev/null +++ b/LooseDBTables/DB/patch_OptionTrackskipIDEnum.cs @@ -0,0 +1,82 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionTrackskipIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionTrackskipTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionTrackskipTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionTrackskipIDEnum : OptionTrackskipIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionTrackskipTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionTrackskipTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionTrackskipTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionVolumeAnswerSoundIDEnum.cs b/LooseDBTables/DB/patch_OptionVolumeAnswerSoundIDEnum.cs new file mode 100644 index 0000000..596deaa --- /dev/null +++ b/LooseDBTables/DB/patch_OptionVolumeAnswerSoundIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionVolumeAnswerSoundIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionVolumeAnswerSoundTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionVolumeAnswerSoundTableRecord { + public System.String EnumValue; +public System.String EnumName; +public System.Single Value; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionVolumeAnswerSoundIDEnum : OptionVolumeAnswerSoundIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionVolumeAnswerSoundTableRecord { EnumValue = (System.String)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionVolumeAnswerSoundTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionVolumeAnswerSoundTableRecord { EnumValue = (System.String)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_OptionVolumeIDEnum.cs b/LooseDBTables/DB/patch_OptionVolumeIDEnum.cs new file mode 100644 index 0000000..7c546ee --- /dev/null +++ b/LooseDBTables/DB/patch_OptionVolumeIDEnum.cs @@ -0,0 +1,83 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class OptionVolumeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static OptionVolumeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableOptionVolumeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.Single Value; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; +public System.Boolean isDefault; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_OptionVolumeIDEnum : OptionVolumeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new OptionVolumeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableOptionVolumeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableOptionVolumeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Value = (System.Single)src[i].Value, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, isDefault = (System.Boolean)src[i].isDefault, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyAdvertiseStateIDEnum.cs b/LooseDBTables/DB/patch_PartyAdvertiseStateIDEnum.cs new file mode 100644 index 0000000..8d48652 --- /dev/null +++ b/LooseDBTables/DB/patch_PartyAdvertiseStateIDEnum.cs @@ -0,0 +1,79 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyAdvertiseStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyAdvertiseStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyAdvertiseStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isNormal; +public System.Boolean isGo; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyAdvertiseStateIDEnum : PartyAdvertiseStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyAdvertiseStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isGo = (System.Boolean)src[i].isGo, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyAdvertiseStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyAdvertiseStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isGo = (System.Boolean)src[i].isGo, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyConnectStateIDEnum.cs b/LooseDBTables/DB/patch_PartyConnectStateIDEnum.cs new file mode 100644 index 0000000..880596a --- /dev/null +++ b/LooseDBTables/DB/patch_PartyConnectStateIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyConnectStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyConnectStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyConnectStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyConnectStateIDEnum : PartyConnectStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyConnectStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyConnectStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyConnectStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyDeliveryCheckerErrorIDEnum.cs b/LooseDBTables/DB/patch_PartyDeliveryCheckerErrorIDEnum.cs new file mode 100644 index 0000000..b1f269f --- /dev/null +++ b/LooseDBTables/DB/patch_PartyDeliveryCheckerErrorIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyDeliveryCheckerErrorIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyDeliveryCheckerErrorTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyDeliveryCheckerErrorTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyDeliveryCheckerErrorIDEnum : PartyDeliveryCheckerErrorIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyDeliveryCheckerErrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyDeliveryCheckerErrorTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyDeliveryCheckerErrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyDeliveryCheckerStateIDEnum.cs b/LooseDBTables/DB/patch_PartyDeliveryCheckerStateIDEnum.cs new file mode 100644 index 0000000..d2923de --- /dev/null +++ b/LooseDBTables/DB/patch_PartyDeliveryCheckerStateIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyDeliveryCheckerStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyDeliveryCheckerStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyDeliveryCheckerStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyDeliveryCheckerStateIDEnum : PartyDeliveryCheckerStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyDeliveryCheckerStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyDeliveryCheckerStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyDeliveryCheckerStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyHeartBeatStateIDEnum.cs b/LooseDBTables/DB/patch_PartyHeartBeatStateIDEnum.cs new file mode 100644 index 0000000..0e7a7e0 --- /dev/null +++ b/LooseDBTables/DB/patch_PartyHeartBeatStateIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyHeartBeatStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyHeartBeatStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyHeartBeatStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyHeartBeatStateIDEnum : PartyHeartBeatStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyHeartBeatStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyHeartBeatStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyHeartBeatStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyPartyClientStateIDEnum.cs b/LooseDBTables/DB/patch_PartyPartyClientStateIDEnum.cs new file mode 100644 index 0000000..db1cc6d --- /dev/null +++ b/LooseDBTables/DB/patch_PartyPartyClientStateIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyPartyClientStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyPartyClientStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyPartyClientStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isConnect; +public System.Boolean isNormal; +public System.Boolean isRequest; +public System.Boolean isWaitPlay; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyPartyClientStateIDEnum : PartyPartyClientStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyPartyClientStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isConnect = (System.Boolean)src[i].isConnect, isNormal = (System.Boolean)src[i].isNormal, isRequest = (System.Boolean)src[i].isRequest, isWaitPlay = (System.Boolean)src[i].isWaitPlay, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyPartyClientStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyPartyClientStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isConnect = (System.Boolean)src[i].isConnect, isNormal = (System.Boolean)src[i].isNormal, isRequest = (System.Boolean)src[i].isRequest, isWaitPlay = (System.Boolean)src[i].isWaitPlay, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyPartyHostStateIDEnum.cs b/LooseDBTables/DB/patch_PartyPartyHostStateIDEnum.cs new file mode 100644 index 0000000..632520c --- /dev/null +++ b/LooseDBTables/DB/patch_PartyPartyHostStateIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyPartyHostStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyPartyHostStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyPartyHostStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isNormal; +public System.Boolean isWorking; +public System.Boolean isRecruit; +public System.Boolean isPlay; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyPartyHostStateIDEnum : PartyPartyHostStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyPartyHostStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isWorking = (System.Boolean)src[i].isWorking, isRecruit = (System.Boolean)src[i].isRecruit, isPlay = (System.Boolean)src[i].isPlay, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyPartyHostStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyPartyHostStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isWorking = (System.Boolean)src[i].isWorking, isRecruit = (System.Boolean)src[i].isRecruit, isPlay = (System.Boolean)src[i].isPlay, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyPartyJoinResultIDEnum.cs b/LooseDBTables/DB/patch_PartyPartyJoinResultIDEnum.cs new file mode 100644 index 0000000..0e78702 --- /dev/null +++ b/LooseDBTables/DB/patch_PartyPartyJoinResultIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyPartyJoinResultIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyPartyJoinResultTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyPartyJoinResultTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyPartyJoinResultIDEnum : PartyPartyJoinResultIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyPartyJoinResultTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyPartyJoinResultTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyPartyJoinResultTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyPartyManagerStateIDEnum.cs b/LooseDBTables/DB/patch_PartyPartyManagerStateIDEnum.cs new file mode 100644 index 0000000..2e59ad6 --- /dev/null +++ b/LooseDBTables/DB/patch_PartyPartyManagerStateIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyPartyManagerStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyPartyManagerStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyPartyManagerStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isNormal; +public System.Boolean isHost; +public System.Boolean isClient; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyPartyManagerStateIDEnum : PartyPartyManagerStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyPartyManagerStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isHost = (System.Boolean)src[i].isHost, isClient = (System.Boolean)src[i].isClient, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyPartyManagerStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyPartyManagerStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isHost = (System.Boolean)src[i].isHost, isClient = (System.Boolean)src[i].isClient, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartyPartyStanceIDEnum.cs b/LooseDBTables/DB/patch_PartyPartyStanceIDEnum.cs new file mode 100644 index 0000000..1344ede --- /dev/null +++ b/LooseDBTables/DB/patch_PartyPartyStanceIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartyPartyStanceIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartyPartyStanceTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartyPartyStanceTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartyPartyStanceIDEnum : PartyPartyStanceIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartyPartyStanceTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartyPartyStanceTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartyPartyStanceTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartySettingClientStateIDEnum.cs b/LooseDBTables/DB/patch_PartySettingClientStateIDEnum.cs new file mode 100644 index 0000000..65f36bb --- /dev/null +++ b/LooseDBTables/DB/patch_PartySettingClientStateIDEnum.cs @@ -0,0 +1,80 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartySettingClientStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartySettingClientStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartySettingClientStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isNormal; +public System.Boolean isError; +public System.Boolean isBusy; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartySettingClientStateIDEnum : PartySettingClientStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartySettingClientStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isError = (System.Boolean)src[i].isError, isBusy = (System.Boolean)src[i].isBusy, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartySettingClientStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartySettingClientStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isError = (System.Boolean)src[i].isError, isBusy = (System.Boolean)src[i].isBusy, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartySettingErrorIDEnum.cs b/LooseDBTables/DB/patch_PartySettingErrorIDEnum.cs new file mode 100644 index 0000000..002c3c6 --- /dev/null +++ b/LooseDBTables/DB/patch_PartySettingErrorIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartySettingErrorIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartySettingErrorTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartySettingErrorTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartySettingErrorIDEnum : PartySettingErrorIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartySettingErrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartySettingErrorTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartySettingErrorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PartySettingHostStateIDEnum.cs b/LooseDBTables/DB/patch_PartySettingHostStateIDEnum.cs new file mode 100644 index 0000000..a033b9d --- /dev/null +++ b/LooseDBTables/DB/patch_PartySettingHostStateIDEnum.cs @@ -0,0 +1,79 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PartySettingHostStateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PartySettingHostStateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePartySettingHostStateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Boolean isNormal; +public System.Boolean isError; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PartySettingHostStateIDEnum : PartySettingHostStateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PartySettingHostStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isError = (System.Boolean)src[i].isError, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePartySettingHostStateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePartySettingHostStateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, isNormal = (System.Boolean)src[i].isNormal, isError = (System.Boolean)src[i].isError, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PhotoeditDateIDEnum.cs b/LooseDBTables/DB/patch_PhotoeditDateIDEnum.cs new file mode 100644 index 0000000..f70621c --- /dev/null +++ b/LooseDBTables/DB/patch_PhotoeditDateIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PhotoeditDateIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PhotoeditDateTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePhotoeditDateTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PhotoeditDateIDEnum : PhotoeditDateIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PhotoeditDateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePhotoeditDateTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePhotoeditDateTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PhotoeditLayoutIDEnum.cs b/LooseDBTables/DB/patch_PhotoeditLayoutIDEnum.cs new file mode 100644 index 0000000..d7d521f --- /dev/null +++ b/LooseDBTables/DB/patch_PhotoeditLayoutIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PhotoeditLayoutIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PhotoeditLayoutTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePhotoeditLayoutTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PhotoeditLayoutIDEnum : PhotoeditLayoutIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PhotoeditLayoutTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePhotoeditLayoutTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePhotoeditLayoutTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PhotoeditPlayerinfoIDEnum.cs b/LooseDBTables/DB/patch_PhotoeditPlayerinfoIDEnum.cs new file mode 100644 index 0000000..a10869b --- /dev/null +++ b/LooseDBTables/DB/patch_PhotoeditPlayerinfoIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PhotoeditPlayerinfoIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PhotoeditPlayerinfoTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePhotoeditPlayerinfoTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PhotoeditPlayerinfoIDEnum : PhotoeditPlayerinfoIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PhotoeditPlayerinfoTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePhotoeditPlayerinfoTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePhotoeditPlayerinfoTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PhotoeditSettingIDEnum.cs b/LooseDBTables/DB/patch_PhotoeditSettingIDEnum.cs new file mode 100644 index 0000000..b34c6eb --- /dev/null +++ b/LooseDBTables/DB/patch_PhotoeditSettingIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PhotoeditSettingIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PhotoeditSettingTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePhotoeditSettingTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PhotoeditSettingIDEnum : PhotoeditSettingIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PhotoeditSettingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePhotoeditSettingTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePhotoeditSettingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PhotoeditShopnameIDEnum.cs b/LooseDBTables/DB/patch_PhotoeditShopnameIDEnum.cs new file mode 100644 index 0000000..f7c6938 --- /dev/null +++ b/LooseDBTables/DB/patch_PhotoeditShopnameIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PhotoeditShopnameIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PhotoeditShopnameTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePhotoeditShopnameTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PhotoeditShopnameIDEnum : PhotoeditShopnameIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PhotoeditShopnameTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePhotoeditShopnameTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePhotoeditShopnameTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PhotoeditStampIDEnum.cs b/LooseDBTables/DB/patch_PhotoeditStampIDEnum.cs new file mode 100644 index 0000000..89c986e --- /dev/null +++ b/LooseDBTables/DB/patch_PhotoeditStampIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PhotoeditStampIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PhotoeditStampTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePhotoeditStampTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PhotoeditStampIDEnum : PhotoeditStampIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PhotoeditStampTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePhotoeditStampTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePhotoeditStampTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PlayComboflagIDEnum.cs b/LooseDBTables/DB/patch_PlayComboflagIDEnum.cs new file mode 100644 index 0000000..f42655e --- /dev/null +++ b/LooseDBTables/DB/patch_PlayComboflagIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PlayComboflagIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PlayComboflagTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePlayComboflagTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PlayComboflagIDEnum : PlayComboflagIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PlayComboflagTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePlayComboflagTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePlayComboflagTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PlaySyncflagIDEnum.cs b/LooseDBTables/DB/patch_PlaySyncflagIDEnum.cs new file mode 100644 index 0000000..88ed8da --- /dev/null +++ b/LooseDBTables/DB/patch_PlaySyncflagIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PlaySyncflagIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PlaySyncflagTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePlaySyncflagTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 Point; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PlaySyncflagIDEnum : PlaySyncflagIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PlaySyncflagTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Point = (System.Int32)src[i].Point, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePlaySyncflagTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePlaySyncflagTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Point = (System.Int32)src[i].Point, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_PlaystatusTabIDEnum.cs b/LooseDBTables/DB/patch_PlaystatusTabIDEnum.cs new file mode 100644 index 0000000..d87ba73 --- /dev/null +++ b/LooseDBTables/DB/patch_PlaystatusTabIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class PlaystatusTabIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static PlaystatusTabTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializablePlaystatusTabTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_PlaystatusTabIDEnum : PlaystatusTabIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new PlaystatusTabTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializablePlaystatusTabTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializablePlaystatusTabTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_RateColorIDEnum.cs b/LooseDBTables/DB/patch_RateColorIDEnum.cs new file mode 100644 index 0000000..99c7e24 --- /dev/null +++ b/LooseDBTables/DB/patch_RateColorIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class RateColorIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static RateColorTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableRateColorTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 Rate; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_RateColorIDEnum : RateColorIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new RateColorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Rate = (System.Int32)src[i].Rate, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableRateColorTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableRateColorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Rate = (System.Int32)src[i].Rate, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_RatingTableIDEnum.cs b/LooseDBTables/DB/patch_RatingTableIDEnum.cs new file mode 100644 index 0000000..fee7766 --- /dev/null +++ b/LooseDBTables/DB/patch_RatingTableIDEnum.cs @@ -0,0 +1,79 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class RatingTableIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static RatingTableTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableRatingTableTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.Int32 Achive; +public System.Int32 Offset; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_RatingTableIDEnum : RatingTableIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new RatingTableTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Achive = (System.Int32)src[i].Achive, Offset = (System.Int32)src[i].Offset, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableRatingTableTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableRatingTableTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, Achive = (System.Int32)src[i].Achive, Offset = (System.Int32)src[i].Offset, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_SortMusicIDEnum.cs b/LooseDBTables/DB/patch_SortMusicIDEnum.cs new file mode 100644 index 0000000..21bb3d5 --- /dev/null +++ b/LooseDBTables/DB/patch_SortMusicIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class SortMusicIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static SortMusicTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableSortMusicTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_SortMusicIDEnum : SortMusicIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new SortMusicTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableSortMusicTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableSortMusicTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_SortRootIDEnum.cs b/LooseDBTables/DB/patch_SortRootIDEnum.cs new file mode 100644 index 0000000..7158c2c --- /dev/null +++ b/LooseDBTables/DB/patch_SortRootIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class SortRootIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static SortRootTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableSortRootTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_SortRootIDEnum : SortRootIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new SortRootTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableSortRootTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableSortRootTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_SortTabIDEnum.cs b/LooseDBTables/DB/patch_SortTabIDEnum.cs new file mode 100644 index 0000000..47495a4 --- /dev/null +++ b/LooseDBTables/DB/patch_SortTabIDEnum.cs @@ -0,0 +1,81 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class SortTabIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static SortTabTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableSortTabTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; +public System.String Detail; +public System.String DetailEx; +public System.String FilePath; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_SortTabIDEnum : SortTabIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new SortTabTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableSortTabTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableSortTabTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Detail = (System.String)src[i].Detail, DetailEx = (System.String)src[i].DetailEx, FilePath = (System.String)src[i].FilePath, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_SystemInitializeTextIDEnum.cs b/LooseDBTables/DB/patch_SystemInitializeTextIDEnum.cs new file mode 100644 index 0000000..2cae8f5 --- /dev/null +++ b/LooseDBTables/DB/patch_SystemInitializeTextIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class SystemInitializeTextIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static SystemInitializeTextTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableSystemInitializeTextTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_SystemInitializeTextIDEnum : SystemInitializeTextIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new SystemInitializeTextTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableSystemInitializeTextTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableSystemInitializeTextTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeAccountingIDEnum.cs b/LooseDBTables/DB/patch_TestmodeAccountingIDEnum.cs new file mode 100644 index 0000000..7a644c8 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeAccountingIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeAccountingIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeAccountingTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeAccountingTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeAccountingIDEnum : TestmodeAccountingIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeAccountingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeAccountingTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeAccountingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeAimeReadIDEnum.cs b/LooseDBTables/DB/patch_TestmodeAimeReadIDEnum.cs new file mode 100644 index 0000000..945a662 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeAimeReadIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeAimeReadIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeAimeReadTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeAimeReadTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeAimeReadIDEnum : TestmodeAimeReadIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeAimeReadTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeAimeReadTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeAimeReadTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeBackupclearConfirmIDEnum.cs b/LooseDBTables/DB/patch_TestmodeBackupclearConfirmIDEnum.cs new file mode 100644 index 0000000..fea7081 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeBackupclearConfirmIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeBackupclearConfirmIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeBackupclearConfirmTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeBackupclearConfirmTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeBackupclearConfirmIDEnum : TestmodeBackupclearConfirmIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeBackupclearConfirmTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeBackupclearConfirmTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeBackupclearConfirmTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeBackupclearDoneIDEnum.cs b/LooseDBTables/DB/patch_TestmodeBackupclearDoneIDEnum.cs new file mode 100644 index 0000000..f8c3ae1 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeBackupclearDoneIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeBackupclearDoneIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeBackupclearDoneTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeBackupclearDoneTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeBackupclearDoneIDEnum : TestmodeBackupclearDoneIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeBackupclearDoneTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeBackupclearDoneTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeBackupclearDoneTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeBackupclearIDEnum.cs b/LooseDBTables/DB/patch_TestmodeBackupclearIDEnum.cs new file mode 100644 index 0000000..bfa862c --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeBackupclearIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeBackupclearIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeBackupclearTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeBackupclearTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeBackupclearIDEnum : TestmodeBackupclearIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeBackupclearTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeBackupclearTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeBackupclearTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeBookkeep1IDEnum.cs b/LooseDBTables/DB/patch_TestmodeBookkeep1IDEnum.cs new file mode 100644 index 0000000..bb9161d --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeBookkeep1IDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeBookkeep1IDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeBookkeep1TableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeBookkeep1TableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeBookkeep1IDEnum : TestmodeBookkeep1IDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeBookkeep1TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeBookkeep1TableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeBookkeep1TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeBookkeep2IDEnum.cs b/LooseDBTables/DB/patch_TestmodeBookkeep2IDEnum.cs new file mode 100644 index 0000000..32f0c2c --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeBookkeep2IDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeBookkeep2IDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeBookkeep2TableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeBookkeep2TableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeBookkeep2IDEnum : TestmodeBookkeep2IDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeBookkeep2TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeBookkeep2TableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeBookkeep2TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeBookkeep3IDEnum.cs b/LooseDBTables/DB/patch_TestmodeBookkeep3IDEnum.cs new file mode 100644 index 0000000..ab253b8 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeBookkeep3IDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeBookkeep3IDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeBookkeep3TableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeBookkeep3TableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeBookkeep3IDEnum : TestmodeBookkeep3IDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeBookkeep3TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeBookkeep3TableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeBookkeep3TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeCameraIDEnum.cs b/LooseDBTables/DB/patch_TestmodeCameraIDEnum.cs new file mode 100644 index 0000000..3e33bde --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeCameraIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeCameraIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeCameraTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeCameraTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeCameraIDEnum : TestmodeCameraIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeCameraTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeCameraTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeCameraTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeCloseChangedIDEnum.cs b/LooseDBTables/DB/patch_TestmodeCloseChangedIDEnum.cs new file mode 100644 index 0000000..816a7aa --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeCloseChangedIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeCloseChangedIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeCloseChangedTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeCloseChangedTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeCloseChangedIDEnum : TestmodeCloseChangedIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeCloseChangedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeCloseChangedTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeCloseChangedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeCloseConfirmIDEnum.cs b/LooseDBTables/DB/patch_TestmodeCloseConfirmIDEnum.cs new file mode 100644 index 0000000..381c164 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeCloseConfirmIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeCloseConfirmIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeCloseConfirmTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeCloseConfirmTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeCloseConfirmIDEnum : TestmodeCloseConfirmIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeCloseConfirmTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeCloseConfirmTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeCloseConfirmTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeCloseIDEnum.cs b/LooseDBTables/DB/patch_TestmodeCloseIDEnum.cs new file mode 100644 index 0000000..14cfe7f --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeCloseIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeCloseIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeCloseTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeCloseTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeCloseIDEnum : TestmodeCloseIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeCloseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeCloseTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeCloseTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeDebugEventsetIDEnum.cs b/LooseDBTables/DB/patch_TestmodeDebugEventsetIDEnum.cs new file mode 100644 index 0000000..2acac2c --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeDebugEventsetIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeDebugEventsetIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeDebugEventsetTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeDebugEventsetTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeDebugEventsetIDEnum : TestmodeDebugEventsetIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeDebugEventsetTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeDebugEventsetTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeDebugEventsetTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeDebugInisetIDEnum.cs b/LooseDBTables/DB/patch_TestmodeDebugInisetIDEnum.cs new file mode 100644 index 0000000..5875ef2 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeDebugInisetIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeDebugInisetIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeDebugInisetTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeDebugInisetTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeDebugInisetIDEnum : TestmodeDebugInisetIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeDebugInisetTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeDebugInisetTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeDebugInisetTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeDebugLedIDEnum.cs b/LooseDBTables/DB/patch_TestmodeDebugLedIDEnum.cs new file mode 100644 index 0000000..36fe219 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeDebugLedIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeDebugLedIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeDebugLedTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeDebugLedTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeDebugLedIDEnum : TestmodeDebugLedIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeDebugLedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeDebugLedTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeDebugLedTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeDebugSoundtestIDEnum.cs b/LooseDBTables/DB/patch_TestmodeDebugSoundtestIDEnum.cs new file mode 100644 index 0000000..09ec1e0 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeDebugSoundtestIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeDebugSoundtestIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeDebugSoundtestTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeDebugSoundtestTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeDebugSoundtestIDEnum : TestmodeDebugSoundtestIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeDebugSoundtestTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeDebugSoundtestTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeDebugSoundtestTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeDownloadIDEnum.cs b/LooseDBTables/DB/patch_TestmodeDownloadIDEnum.cs new file mode 100644 index 0000000..7405a1d --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeDownloadIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeDownloadIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeDownloadTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeDownloadTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeDownloadIDEnum : TestmodeDownloadIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeDownloadTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeDownloadTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeDownloadTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeEmoneyAuthIDEnum.cs b/LooseDBTables/DB/patch_TestmodeEmoneyAuthIDEnum.cs new file mode 100644 index 0000000..06ef6a3 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeEmoneyAuthIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeEmoneyAuthIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeEmoneyAuthTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeEmoneyAuthTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeEmoneyAuthIDEnum : TestmodeEmoneyAuthIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeEmoneyAuthTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeEmoneyAuthTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeEmoneyAuthTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeEmoneyIDEnum.cs b/LooseDBTables/DB/patch_TestmodeEmoneyIDEnum.cs new file mode 100644 index 0000000..3e150c2 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeEmoneyIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeEmoneyIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeEmoneyTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeEmoneyTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeEmoneyIDEnum : TestmodeEmoneyIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeEmoneyTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeEmoneyTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeEmoneyTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeEmoneyRemoveIDEnum.cs b/LooseDBTables/DB/patch_TestmodeEmoneyRemoveIDEnum.cs new file mode 100644 index 0000000..032f861 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeEmoneyRemoveIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeEmoneyRemoveIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeEmoneyRemoveTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeEmoneyRemoveTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeEmoneyRemoveIDEnum : TestmodeEmoneyRemoveIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeEmoneyRemoveTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeEmoneyRemoveTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeEmoneyRemoveTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeGamesettingIDEnum.cs b/LooseDBTables/DB/patch_TestmodeGamesettingIDEnum.cs new file mode 100644 index 0000000..9645121 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeGamesettingIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeGamesettingIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeGamesettingTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeGamesettingTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeGamesettingIDEnum : TestmodeGamesettingIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeGamesettingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeGamesettingTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeGamesettingTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeGenericIDEnum.cs b/LooseDBTables/DB/patch_TestmodeGenericIDEnum.cs new file mode 100644 index 0000000..f7c9ca0 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeGenericIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeGenericIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeGenericTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeGenericTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeGenericIDEnum : TestmodeGenericIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeGenericTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeGenericTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeGenericTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeInputIDEnum.cs b/LooseDBTables/DB/patch_TestmodeInputIDEnum.cs new file mode 100644 index 0000000..6921a6a --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeInputIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeInputIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeInputTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeInputTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeInputIDEnum : TestmodeInputIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeInputTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeInputTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeInputTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeMonitorIDEnum.cs b/LooseDBTables/DB/patch_TestmodeMonitorIDEnum.cs new file mode 100644 index 0000000..cfaba4f --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeMonitorIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeMonitorIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeMonitorTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeMonitorTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeMonitorIDEnum : TestmodeMonitorIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeMonitorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeMonitorTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeMonitorTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeNetworkIDEnum.cs b/LooseDBTables/DB/patch_TestmodeNetworkIDEnum.cs new file mode 100644 index 0000000..b4559f6 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeNetworkIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeNetworkIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeNetworkTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeNetworkTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeNetworkIDEnum : TestmodeNetworkIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeNetworkTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeNetworkTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeNetworkTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeOutputIDEnum.cs b/LooseDBTables/DB/patch_TestmodeOutputIDEnum.cs new file mode 100644 index 0000000..68cd82f --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeOutputIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeOutputIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeOutputTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeOutputTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeOutputIDEnum : TestmodeOutputIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeOutputTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeOutputTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeOutputTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeRootIDEnum.cs b/LooseDBTables/DB/patch_TestmodeRootIDEnum.cs new file mode 100644 index 0000000..137f663 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeRootIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeRootIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeRootTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeRootTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeRootIDEnum : TestmodeRootIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeRootTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeRootTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeRootTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeSystemInfo1IDEnum.cs b/LooseDBTables/DB/patch_TestmodeSystemInfo1IDEnum.cs new file mode 100644 index 0000000..71b2822 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeSystemInfo1IDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeSystemInfo1IDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeSystemInfo1TableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeSystemInfo1TableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeSystemInfo1IDEnum : TestmodeSystemInfo1IDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeSystemInfo1TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeSystemInfo1TableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeSystemInfo1TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeSystemInfo2IDEnum.cs b/LooseDBTables/DB/patch_TestmodeSystemInfo2IDEnum.cs new file mode 100644 index 0000000..a5a41bc --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeSystemInfo2IDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeSystemInfo2IDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeSystemInfo2TableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeSystemInfo2TableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeSystemInfo2IDEnum : TestmodeSystemInfo2IDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeSystemInfo2TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeSystemInfo2TableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeSystemInfo2TableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeSystemtestIDEnum.cs b/LooseDBTables/DB/patch_TestmodeSystemtestIDEnum.cs new file mode 100644 index 0000000..1f6420f --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeSystemtestIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeSystemtestIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeSystemtestTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeSystemtestTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeSystemtestIDEnum : TestmodeSystemtestIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeSystemtestTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeSystemtestTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeSystemtestTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeTouchpanel1pIDEnum.cs b/LooseDBTables/DB/patch_TestmodeTouchpanel1pIDEnum.cs new file mode 100644 index 0000000..a8d7d68 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeTouchpanel1pIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeTouchpanel1pIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeTouchpanel1pTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeTouchpanel1pTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeTouchpanel1pIDEnum : TestmodeTouchpanel1pIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeTouchpanel1pTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeTouchpanel1pTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeTouchpanel1pTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeTouchpanel2pIDEnum.cs b/LooseDBTables/DB/patch_TestmodeTouchpanel2pIDEnum.cs new file mode 100644 index 0000000..6864285 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeTouchpanel2pIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeTouchpanel2pIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeTouchpanel2pTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeTouchpanel2pTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeTouchpanel2pIDEnum : TestmodeTouchpanel2pIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeTouchpanel2pTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeTouchpanel2pTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeTouchpanel2pTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeTouchpanelIDEnum.cs b/LooseDBTables/DB/patch_TestmodeTouchpanelIDEnum.cs new file mode 100644 index 0000000..a12062d --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeTouchpanelIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeTouchpanelIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeTouchpanelTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeTouchpanelTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeTouchpanelIDEnum : TestmodeTouchpanelIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeTouchpanelTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeTouchpanelTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeTouchpanelTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_TestmodeVfdIDEnum.cs b/LooseDBTables/DB/patch_TestmodeVfdIDEnum.cs new file mode 100644 index 0000000..8918388 --- /dev/null +++ b/LooseDBTables/DB/patch_TestmodeVfdIDEnum.cs @@ -0,0 +1,78 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class TestmodeVfdIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static TestmodeVfdTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableTestmodeVfdTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; +public System.String NameEx; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_TestmodeVfdIDEnum : TestmodeVfdIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new TestmodeVfdTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableTestmodeVfdTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableTestmodeVfdTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_VsghostnpcIDEnum.cs b/LooseDBTables/DB/patch_VsghostnpcIDEnum.cs new file mode 100644 index 0000000..db10fac --- /dev/null +++ b/LooseDBTables/DB/patch_VsghostnpcIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class VsghostnpcIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static VsghostnpcTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableVsghostnpcTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_VsghostnpcIDEnum : VsghostnpcIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new VsghostnpcTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableVsghostnpcTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableVsghostnpcTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_WindowKindIDEnum.cs b/LooseDBTables/DB/patch_WindowKindIDEnum.cs new file mode 100644 index 0000000..ca35c6c --- /dev/null +++ b/LooseDBTables/DB/patch_WindowKindIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class WindowKindIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static WindowKindTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableWindowKindTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_WindowKindIDEnum : WindowKindIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new WindowKindTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableWindowKindTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableWindowKindTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_WindowMessageIDEnum.cs b/LooseDBTables/DB/patch_WindowMessageIDEnum.cs new file mode 100644 index 0000000..4df8b6e --- /dev/null +++ b/LooseDBTables/DB/patch_WindowMessageIDEnum.cs @@ -0,0 +1,85 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class WindowMessageIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static WindowMessageTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableWindowMessageTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.Int32 Kind; +public System.Int32 Position; +public System.Int32 Size; +public System.String Title; +public System.String TitleEx; +public System.String Name; +public System.String NameEx; +public System.Int32 Lifetime; +public System.String FileName; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_WindowMessageIDEnum : WindowMessageIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new WindowMessageTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Kind = (DB.WindowKindID)src[i].Kind, Position = (DB.WindowPositionID)src[i].Position, Size = (DB.WindowSizeID)src[i].Size, Title = (System.String)src[i].Title, TitleEx = (System.String)src[i].TitleEx, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Lifetime = (System.Int32)src[i].Lifetime, FileName = (System.String)src[i].FileName, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableWindowMessageTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableWindowMessageTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Kind = (int)src[i].Kind, Position = (int)src[i].Position, Size = (int)src[i].Size, Title = (System.String)src[i].Title, TitleEx = (System.String)src[i].TitleEx, Name = (System.String)src[i].Name, NameEx = (System.String)src[i].NameEx, Lifetime = (System.Int32)src[i].Lifetime, FileName = (System.String)src[i].FileName, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_WindowPositionIDEnum.cs b/LooseDBTables/DB/patch_WindowPositionIDEnum.cs new file mode 100644 index 0000000..8010d3d --- /dev/null +++ b/LooseDBTables/DB/patch_WindowPositionIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class WindowPositionIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static WindowPositionTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableWindowPositionTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_WindowPositionIDEnum : WindowPositionIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new WindowPositionTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableWindowPositionTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableWindowPositionTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/DB/patch_WindowSizeIDEnum.cs b/LooseDBTables/DB/patch_WindowSizeIDEnum.cs new file mode 100644 index 0000000..a384d44 --- /dev/null +++ b/LooseDBTables/DB/patch_WindowSizeIDEnum.cs @@ -0,0 +1,77 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System; +using System.CodeDom.Compiler; +using System.IO; +using System.Text; +using MonoMod; +using LooseDBTables; +using UnityEngine; + +namespace DB; + +[MonoModIgnore] +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class WindowSizeIDEnum +{ + public static extern bool LoadFromFile(string filename); + public static extern void DumpToFile(string filename); + protected static WindowSizeTableRecord[] records; +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +[Serializable] +public class SerializableWindowSizeTableRecord { + public System.Int32 EnumValue; +public System.String EnumName; +public System.String Name; + +} + +[GeneratedCode("LooseDBTables.GeneratePatches", "1.0.0.0")] +public class patch_WindowSizeIDEnum : WindowSizeIDEnum { + public new static bool LoadFromFile(string filename) { + if (!File.Exists(filename)) { + return false; + } + + var table = JsonUtility.FromJson>(File.ReadAllText(filename)); + + try + { + if (table.records.Length != records.Length) { + Debug.LogError($"Count read error: {filename}"); + return false; + } + + var src = table.records; + var dst = records; + + for (var i = 0; i < table.records.Length; i++) { + dst[i] = new WindowSizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + } + catch + { + Debug.LogError($"File read error: {filename}"); + return false; + } + return true; + } + + public new static void DumpToFile(string filename) { + var table = new Table() { + records = new SerializableWindowSizeTableRecord[records.Length] + }; + + var src = records; + var dst = table.records; + + for (var i = 0; i < records.Length; i++) { + dst[i] = new SerializableWindowSizeTableRecord { EnumValue = (System.Int32)src[i].EnumValue, EnumName = (System.String)src[i].EnumName, Name = (System.String)src[i].Name, }; + } + + File.WriteAllText(filename, JsonUtility.ToJson(table, true), Encoding.UTF8); + } +} diff --git a/LooseDBTables/LooseDBTables.csproj b/LooseDBTables/LooseDBTables.csproj new file mode 100644 index 0000000..2e39277 --- /dev/null +++ b/LooseDBTables/LooseDBTables.csproj @@ -0,0 +1,77 @@ + + + + + Debug + AnyCPU + {F15988CC-BDF0-4F86-811B-BAE18EEA6519} + Library + Properties + LooseDBTables + Assembly-CSharp.LooseDBTables.mm + v4.6.2 + 512 + latest + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + ..\External\MonoMod.exe + False + + + ..\External\Assembly-CSharp.dll + False + + + ..\External\UnityEngine.dll + False + + + ..\External\UnityEngine.CoreModule.dll + False + + + ..\External\UnityEngine.JSONSerializeModule.dll + False + + + + + + + + + + + + diff --git a/LooseDBTables/Process/patch_PowerOnProcess.cs b/LooseDBTables/Process/patch_PowerOnProcess.cs new file mode 100644 index 0000000..048c220 --- /dev/null +++ b/LooseDBTables/Process/patch_PowerOnProcess.cs @@ -0,0 +1,32 @@ +// ReSharper disable CheckNamespace +// ReSharper disable InconsistentNaming + +using System.IO; +using DB; +using MonoMod; +using UnityEngine; + +namespace Process; + +[method: MonoModIgnore] +public class patch_PowerOnProcess(ProcessDataContainer dataContainer) : PowerOnProcess(dataContainer) +{ + private extern void orig_OnStart(); + + public override void OnStart() + { + var dbPath = Path.Combine(Application.streamingAssetsPath, "DB"); + + if (Directory.Exists(dbPath)) + { + DBLoader.LoadAll(dbPath); + } + else + { + Directory.CreateDirectory(dbPath); + DBLoader.DumpAll(dbPath); + } + + orig_OnStart(); + } +} \ No newline at end of file diff --git a/LooseDBTables/Properties/AssemblyInfo.cs b/LooseDBTables/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..9667ab6 --- /dev/null +++ b/LooseDBTables/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("LooseDBTables")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("LooseDBTables")] +[assembly: AssemblyCopyright("Copyright © 2024")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("F15988CC-BDF0-4F86-811B-BAE18EEA6519")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] \ No newline at end of file diff --git a/LooseDBTables/Table.cs b/LooseDBTables/Table.cs new file mode 100644 index 0000000..cb2942a --- /dev/null +++ b/LooseDBTables/Table.cs @@ -0,0 +1,9 @@ +using System; + +namespace LooseDBTables; + +[Serializable] +public class Table +{ + public T[] records; +} \ No newline at end of file