diff --git a/docs/Big-Cheat-Sheet.md b/docs/Big-Cheat-Sheet.md index ded28323c..4b83c183c 100644 --- a/docs/Big-Cheat-Sheet.md +++ b/docs/Big-Cheat-Sheet.md @@ -102,7 +102,7 @@ if (linkCache.TryResolve(formLink, out var foundRecord)) Using the [FormKey Generator](https://github.com/Mutagen-Modding/Mutagen.Bethesda.FormKeys) project is a good alternative to hand constructing FormLinks" ## Convert FormKey to FormID -=== Via MasterReferenceCollection +=== MasterReferenceCollection ``` { .cs hl_lines="4" } FormKey formKey = ...; IMasterReferenceCollection masterCollection = ...; @@ -121,6 +121,23 @@ var npcLink = formKey.ToLink(); [:octicons-arrow-right-24: FormLinks](plugins/ModKey, FormKey, FormLink.md#formlink) +## Convert FormLink to NullableFormLink +=== SetTo + ``` { .cs hl_lines="4" } + IFormLinkGetter link = ...; + IFormLinkNullableGetter nullableLink = ...; + + nullableLink.SetTo(link); + ``` +=== AsNullable + ``` { .cs hl_lines="3" } + IFormLinkGetter link = ...; + + IFormLinkNullableGetter nullableLink = link.AsNullable(); + ``` + +[:octicons-arrow-right-24: FormLinks](plugins/ModKey, FormKey, FormLink.md#formlink) + ## Convert MajorRecord to FormLink ``` cs INpcGetter npcGetter = ...;