Mutagen-Modding / Mutagen.Bethesda.Serialization

Library for generating serialization code between Bethesda plugin files to other formats
GNU General Public License v3.0
3 stars 2 forks source link

Record Customization #2

Open Noggog opened 1 year ago

Noggog commented 1 year ago

System to customize records via defining meta files, maybe like:

public class NpcCustomization : ICustomize<INpcGetter>
{
     public IRules Customize(IRules<INpcGetter> ruleBootstrap)
     {
           return ruleBootStrap
               .Exclude(n => n.Name)
               .AddComment(n => n.Health, "NPC's health")
               .AddComment(n => n.Magicka, n => $"NPC's mana: {n.Magicka}")
               .ReorderFirst(n => n.Stamina)
               .ReorderLast(n => n.Description);
     }
}