Skip to content

Commit

Permalink
ModKey exposed
Browse files Browse the repository at this point in the history
  • Loading branch information
Noggog committed Mar 14, 2021
1 parent b6af06a commit 56dc201
Show file tree
Hide file tree
Showing 1,053 changed files with 169 additions and 1,034 deletions.
25 changes: 22 additions & 3 deletions Mutagen.Bethesda.FormKeys.Generator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ public static void Generate(GenerateFromMod gen)
var importStr = $"Mutagen.Bethesda.{gen.Release.ToCategory()}";
var modName = mod.ModKey.Name.TrimStart("DLC");

FileGeneration fg;
string path;
foreach (var regis in list.GroupBy(x => x.Regis))
{
FileGeneration fg = new FileGeneration();
fg = new FileGeneration();
fg.AppendLine($"using {importStr};");
fg.AppendLine();

Expand All @@ -121,7 +123,6 @@ public static void Generate(GenerateFromMod gen)
}
using (new BraceWrapper(fg))
{
fg.AppendLine($"private readonly static ModKey ModKey = ModKey.{nameof(ModKey.FromNameAndExtension)}(\"{mod.ModKey}\");");
fg.AppendLine($"private static FormLink<{regis.Key.GetterType.Name}> Construct(uint id) => new FormLink<{regis.Key.GetterType.Name}>(ModKey.{nameof(ModKeyExt.MakeFormKey)}(id));");
foreach (var rec in regis)
{
Expand All @@ -131,10 +132,28 @@ public static void Generate(GenerateFromMod gen)
}
}

var path = Path.Combine("Output", gen.Release.ToString(), modName, $"{regis.Key.Name}.cs");
path = Path.Combine("Output", gen.Release.ToString(), modName, $"{regis.Key.Name}.cs");
fg.Generate(path);
System.Console.WriteLine($"Exported: {path}");
}

// Generate ModKey partial class
fg = new FileGeneration();
using (new NamespaceWrapper(fg, namespaceStr))
{
using (var c = new ClassWrapper(fg, modName))
{
c.Static = true;
c.Partial = true;
}
using (new BraceWrapper(fg))
{
fg.AppendLine($"public readonly static ModKey ModKey = ModKey.{nameof(ModKey.FromNameAndExtension)}(\"{mod.ModKey}\");");
}
}
path = Path.Combine("Output", gen.Release.ToString(), modName, $"ModKey.cs");
fg.Generate(path);
System.Console.WriteLine($"Exported: {path}");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class AIPackage
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IAIPackageGetter> Construct(uint id) => new FormLink<IAIPackageGetter>(ModKey.MakeFormKey(id));
public static FormLink<IAIPackageGetter> BattlehornCaptainSleep => Construct(0xca47);
public static FormLink<IAIPackageGetter> BattlehornKnightStartPatrolNightInterior1 => Construct(0xcf30);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Activator
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IActivatorGetter> Construct(uint id) => new FormLink<IActivatorGetter>(ModKey.MakeFormKey(id));
public static FormLink<IActivatorGetter> BattlehornWineBarrelE => Construct(0xb60e);
public static FormLink<IActivatorGetter> BattlehornWineBarrelF => Construct(0xb60f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Armor
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IArmorGetter> Construct(uint id) => new FormLink<IArmorGetter>(ModKey.MakeFormKey(id));
public static FormLink<IArmorGetter> DLCBattlehornShieldOfTrueHorn => Construct(0x97d3);
public static FormLink<IArmorGetter> DLCBattlehornShieldReward01 => Construct(0x11f17);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Book
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IBookGetter> Construct(uint id) => new FormLink<IBookGetter>(ModKey.MakeFormKey(id));
public static FormLink<IBookGetter> DLCBattlehornJournal => Construct(0x142ef);
public static FormLink<IBookGetter> DLCBattlehornMerchantList => Construct(0x147d7);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class CombatStyle
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<ICombatStyleGetter> Construct(uint id) => new FormLink<ICombatStyleGetter>(ModKey.MakeFormKey(id));
public static FormLink<ICombatStyleGetter> DLCBattlehornLichCombatStyle => Construct(0xe823);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Container
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IContainerGetter> Construct(uint id) => new FormLink<IContainerGetter>(ModKey.MakeFormKey(id));
public static FormLink<IContainerGetter> BattlehornCrateClutterMiddle01 => Construct(0x7771);
public static FormLink<IContainerGetter> BattlehornChestClutterMiddle01 => Construct(0x7772);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Creature
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<ICreatureGetter> Construct(uint id) => new FormLink<ICreatureGetter>(ModKey.MakeFormKey(id));
public static FormLink<ICreatureGetter> DogBattlehorn => Construct(0xc513);
public static FormLink<ICreatureGetter> DLCBattlehornSkeleton => Construct(0xe824);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class DialogTopic
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IDialogTopicGetter> Construct(uint id) => new FormLink<IDialogTopicGetter>(ModKey.MakeFormKey(id));
public static FormLink<IDialogTopicGetter> BattlehornWineTopic => Construct(0xb61e);
public static FormLink<IDialogTopicGetter> BattlehornWineA => Construct(0xb620);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Door
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IDoorGetter> Construct(uint id) => new FormLink<IDoorGetter>(ModKey.MakeFormKey(id));
public static FormLink<IDoorGetter> BattlehornCastleFortAgedNDoor01WineCeller => Construct(0x4334);
public static FormLink<IDoorGetter> BattlehornCastleDoor01Tax => Construct(0x432b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Enchantment
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IEnchantmentGetter> Construct(uint id) => new FormLink<IEnchantmentGetter>(ModKey.MakeFormKey(id));
public static FormLink<IEnchantmentGetter> DLCBattlehornShieldRewardEnch25 => Construct(0x11f29);
public static FormLink<IEnchantmentGetter> DLCBattlehornShieldRewardEnch30 => Construct(0x11f2b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Faction
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IFactionGetter> Construct(uint id) => new FormLink<IFactionGetter>(ModKey.MakeFormKey(id));
public static FormLink<IFactionGetter> DLCBattlehornCastleFaction => Construct(0xb09e);
public static FormLink<IFactionGetter> DLCBattlehornSparringFaction => Construct(0xbb21);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class IdleAnimation
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IIdleAnimationGetter> Construct(uint id) => new FormLink<IIdleAnimationGetter>(ModKey.MakeFormKey(id));
public static FormLink<IIdleAnimationGetter> DLCBattlehornOpenGate => Construct(0x13918);
}
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/BattlehornCastle/Key.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Key
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IKeyGetter> Construct(uint id) => new FormLink<IKeyGetter>(ModKey.MakeFormKey(id));
public static FormLink<IKeyGetter> DLCBattlehornLichKey => Construct(0xe339);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class LeveledItem
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<ILeveledItemGetter> Construct(uint id) => new FormLink<ILeveledItemGetter>(ModKey.MakeFormKey(id));
public static FormLink<ILeveledItemGetter> DLCBattlehornDragonswordLL => Construct(0x12e14);
public static FormLink<ILeveledItemGetter> DLCBattlehornShieldRewardLeveled => Construct(0x11f2d);
Expand Down
7 changes: 7 additions & 0 deletions Mutagen.Bethesda.FormKeys.Oblivion/BattlehornCastle/ModKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace Mutagen.Bethesda.FormKeys.Oblivion
{
public static partial class BattlehornCastle
{
public readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
}
}
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/BattlehornCastle/Npc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Npc
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<INpcGetter> Construct(uint id) => new FormLink<INpcGetter>(ModKey.MakeFormKey(id));
public static FormLink<INpcGetter> DLCBattlehornMaid => Construct(0xd441);
public static FormLink<INpcGetter> DLCBattlehornCook => Construct(0xd44b);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Place
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IPlaceGetter> Construct(uint id) => new FormLink<IPlaceGetter>(ModKey.MakeFormKey(id));
public static FormLink<IPlaceGetter> BattlehornCastleTowerS => Construct(0x12ec7);
public static FormLink<IPlaceGetter> BattlehornCastleGreatHall => Construct(0x1197);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class PlacedNpc
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IPlacedNpcGetter> Construct(uint id) => new FormLink<IPlacedNpcGetter>(ModKey.MakeFormKey(id));
public static FormLink<IPlacedNpcGetter> DLCBhornKnightRef => Construct(0xca2c);
public static FormLink<IPlacedNpcGetter> DLCBattlehornKnight2REF => Construct(0xca3f);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class PlacedObject
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IPlacedObjectGetter> Construct(uint id) => new FormLink<IPlacedObjectGetter>(ModKey.MakeFormKey(id));
public static FormLink<IPlacedObjectGetter> BattlehornSecretDoor01DustFallREF => Construct(0x605a);
public static FormLink<IPlacedObjectGetter> BattlehornSecretDoor01DustREF => Construct(0x6057);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Potion
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IPotionGetter> Construct(uint id) => new FormLink<IPotionGetter>(ModKey.MakeFormKey(id));
public static FormLink<IPotionGetter> DrinkArgonianBloodwine => Construct(0xa6a8);
public static FormLink<IPotionGetter> DrinkNumbskinMead => Construct(0xa6a9);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Quest
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IQuestGetter> Construct(uint id) => new FormLink<IQuestGetter>(ModKey.MakeFormKey(id));
public static FormLink<IQuestGetter> DLCBattlehornCastle => Construct(0xb089);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Script
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IScriptGetter> Construct(uint id) => new FormLink<IScriptGetter>(ModKey.MakeFormKey(id));
public static FormLink<IScriptGetter> BattlehornBedroomAreaReceiptSCRIPT => Construct(0xb0a4);
public static FormLink<IScriptGetter> BattlehornDiningAreaReceiptSCRIPT => Construct(0xb0a5);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Sound
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<ISoundGetter> Construct(uint id) => new FormLink<ISoundGetter>(ModKey.MakeFormKey(id));
public static FormLink<ISoundGetter> AMBDungeon2DLP08DLCBattlehorn => Construct(0x12915);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Spell
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<ISpellGetter> Construct(uint id) => new FormLink<ISpellGetter>(ModKey.MakeFormKey(id));
public static FormLink<ISpellGetter> DLCBattlehornDragonswordPower2 => Construct(0x147da);
public static FormLink<ISpellGetter> AbBattlehornArmorerBuff => Construct(0xc512);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Static
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IStaticGetter> Construct(uint id) => new FormLink<IStaticGetter>(ModKey.MakeFormKey(id));
public static FormLink<IStaticGetter> BattlehornTrophyMountainLion => Construct(0x4861);
public static FormLink<IStaticGetter> BattlehornTrophyOgre => Construct(0x4862);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class BattlehornCastle
{
public static class Weapon
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCBattlehornCastle.esp");
private static FormLink<IWeaponGetter> Construct(uint id) => new FormLink<IWeaponGetter>(ModKey.MakeFormKey(id));
public static FormLink<IWeaponGetter> DLCBattlehornDragonsword04 => Construct(0x147ef);
public static FormLink<IWeaponGetter> DLCBattlehornDragonsword05 => Construct(0x147f0);
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/Frostcrag/AIPackage.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class AIPackage
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<IAIPackageGetter> Construct(uint id) => new FormLink<IAIPackageGetter>(ModKey.MakeFormKey(id));
public static FormLink<IAIPackageGetter> DLCFrostcragAurelinwaeOfferServices => Construct(0x1247);
public static FormLink<IAIPackageGetter> DLCFrostcragAurelinwaeWanderstheICArbDistrict => Construct(0x1253);
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/Frostcrag/Activator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class Activator
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<IActivatorGetter> Construct(uint id) => new FormLink<IActivatorGetter>(ModKey.MakeFormKey(id));
public static FormLink<IActivatorGetter> FrostcragAlchemyStation01 => Construct(0x858b);
public static FormLink<IActivatorGetter> Tombstone02TimTest => Construct(0x8c2d);
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/Frostcrag/Book.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class Book
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<IBookGetter> Construct(uint id) => new FormLink<IBookGetter>(ModKey.MakeFormKey(id));
public static FormLink<IBookGetter> FrostcragLibraryAreaReceipt => Construct(0xd5e);
public static FormLink<IBookGetter> FrostcragApparatusReceipt => Construct(0xd5f);
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/Frostcrag/Clothing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class Clothing
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<IClothingGetter> Construct(uint id) => new FormLink<IClothingGetter>(ModKey.MakeFormKey(id));
public static FormLink<IClothingGetter> FrostcragRing => Construct(0x5e36);
}
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/Frostcrag/Container.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class Container
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<IContainerGetter> Construct(uint id) => new FormLink<IContainerGetter>(ModKey.MakeFormKey(id));
public static FormLink<IContainerGetter> CounterMiddle02ClutterMagesGuildFrostCrag => Construct(0x5d6f);
public static FormLink<IContainerGetter> CrateClutterMiddle03FC => Construct(0x353b);
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/Frostcrag/Creature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class Creature
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<ICreatureGetter> Construct(uint id) => new FormLink<ICreatureGetter>(ModKey.MakeFormKey(id));
public static FormLink<ICreatureGetter> DLCFrostcragAtronachFlame => Construct(0x1254);
public static FormLink<ICreatureGetter> CreatureClannfearRuntFC => Construct(0x214a);
Expand Down
1 change: 0 additions & 1 deletion Mutagen.Bethesda.FormKeys.Oblivion/Frostcrag/Door.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class Door
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<IDoorGetter> Construct(uint id) => new FormLink<IDoorGetter>(ModKey.MakeFormKey(id));
public static FormLink<IDoorGetter> FrostcragSpireTelepadTower => Construct(0xae35);
public static FormLink<IDoorGetter> FrostcragSpireTelepadBruma => Construct(0xbd27);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ public static partial class Frostcrag
{
public static class Enchantment
{
private readonly static ModKey ModKey = ModKey.FromNameAndExtension("DLCFrostcrag.esp");
private static FormLink<IEnchantmentGetter> Construct(uint id) => new FormLink<IEnchantmentGetter>(ModKey.MakeFormKey(id));
public static FormLink<IEnchantmentGetter> FrostcragEnAppRingEnch => Construct(0x5e37);
}
Expand Down
Loading

0 comments on commit 56dc201

Please sign in to comment.