Mutagen-Modding / Mutagen

A .NET library for analyzing, creating, and manipulating Bethesda mods
GNU General Public License v3.0
117 stars 32 forks source link

LinkCache.Resolve with a FormLink passed isn't typing properly #519

Closed Noggog closed 4 months ago

Noggog commented 4 months ago
FormKey formKeyWeap = FormKey.Factory("00005B:Classic Fallout Condition.esl");

var weapFormLink = new FormLink<IInstanceNamingRulesGetter>(formKeyWeap);

if (state.LinkCache.TryResolve(weapFormLink, out var foundWeapRecord))
{
    Console.WriteLine($"Found the INNR {foundWeapRecord.EditorID}");
}

The type of foundWeapRecord is IMajorRecordGetter, but it should be IInstanceNamingRulesGetter

Probably need to add to the interface to get it to type better