diff --git a/ESMify_Plugins.pas b/ESMify_Plugins.pas index 609c468..c3961f2 100644 --- a/ESMify_Plugins.pas +++ b/ESMify_Plugins.pas @@ -341,9 +341,17 @@ begin end; end - else if (GetElementEditValues(ElementByIndex(ElementByPath(package, 'Package Data\Data Input Values'), 0), 'PTDA\Target Data\Type') = 'Linked Reference') then begin - linkedRefKeyword := LinksTo(ElementByPath(ElementByIndex(ElementByPath(package, 'Package Data\Data Input Values'), 0), 'PTDA\Target Data\Reference')); - if not IsLinkedRefRemote(e, linkedRefKeyword) then continue; + else begin + packageLoc := GetElementEditValues(ElementByIndex(ElementByPath(package, 'Package Data\Data Input Values'), 0), 'PTDA\Target Data\Type'); + + if (packageLoc = 'Linked Reference') then begin + linkedRefKeyword := LinksTo(ElementByPath(ElementByIndex(ElementByPath(package, 'Package Data\Data Input Values'), 0), 'PTDA\Target Data\Reference')); + if not IsLinkedRefRemote(e, linkedRefKeyword) then continue; + end + else if (packageLoc = 'Specific Reference') then begin + linkedRef := LinksTo(ElementByPath(ElementByIndex(ElementByPath(package, 'Package Data\Data Input Values'), 0), 'PTDA\Target Data\Reference')); + if InSameCell(e, linkedRef) then continue; + end; end; skip := false;