static PartialAppearancesData() { PartialData.RegisterPartialData <AppearancesV01>(typeof(PartialAppearancesData)); EnumTranslator.RegisterEnumFixer <PartialAppearancesData>((x, y, z) => { EnumTranslator.FixEnumValues(x, y, z.unlocksCustom); EnumTranslator.FixEnumValues(x, y, z.unlocksPartial); EnumTranslator.FixEnumValues(x, y, z.selections); }); }
static PartialLandPlotData() { EnumTranslator.RegisterEnumFixer <PartialLandPlotData>((translator, mode, data) => { translator.FixEnumValues(mode, data.upgrades); while (data.upgrades.InternalList.Contains(global::LandPlot.Upgrade.NONE)) { data.upgrades.InternalList.Remove(global::LandPlot.Upgrade.NONE); } data.attachedId = translator.TranslateEnum(mode, data.attachedId); }); PartialData.RegisterPartialData(() => new PartialLandPlotData()); }
static PartialGordoData() { EnumTranslator.RegisterEnumFixer <PartialGordoData>((translator, mode, data) => { translator.FixEnumValues(mode, data.fashions); }); CustomChecker.RegisterCustomChecker <GordoV01>((x) => { if (x.fashions.Any(ModdedIDRegistry.IsModdedID)) { return(CustomChecker.CustomLevel.PARTIAL); } return(CustomChecker.CustomLevel.NONE); }); PartialData.RegisterPartialData(() => new PartialGordoData()); }
static PartialTreasurePodData() { CustomChecker.RegisterCustomChecker <TreasurePodV01>(x => { if (x.spawnQueue.Any(ModdedIDRegistry.IsModdedID)) { return(CustomChecker.CustomLevel.PARTIAL); } return(CustomChecker.CustomLevel.NONE); }); EnumTranslator.RegisterEnumFixer <PartialTreasurePodData>((translator, mode, data) => { translator.FixEnumValues(mode, data.spawnQueue); }); PartialData.RegisterPartialData(() => new PartialTreasurePodData()); }