Syntax fixes

This commit is contained in:
Eddoursul 2023-10-24 18:29:57 +02:00
parent fae731a9dd
commit af72530448

View File

@ -20,6 +20,9 @@ var
hardcodedStatForms: TStringList; hardcodedStatForms: TStringList;
dragonCZMarker, dragonLZMarker: IwbMainRecord; dragonCZMarker, dragonLZMarker: IwbMainRecord;
///// FUNCTIONS ////////////////////////////////////
function IsReferencedByNonLocation(rec: IwbMainRecord): boolean; function IsReferencedByNonLocation(rec: IwbMainRecord): boolean;
var var
masterRecord, referencingRecord: IwbMainRecord; masterRecord, referencingRecord: IwbMainRecord;
@ -180,7 +183,7 @@ begin
end; end;
end; end;
function IsSameCellPackage(inputValues: IwbElement): boolean; function IsSameCellPackage(e: IInterface; inputValues: IwbElement): boolean;
var var
packageLoc: string; packageLoc: string;
inputVal: IwbElement; inputVal: IwbElement;
@ -196,7 +199,6 @@ begin
if packageLoc <> '' then begin if packageLoc <> '' then begin
if (packageLoc = 'Near editor location') or (packageLoc = 'Near self') then begin if (packageLoc = 'Near editor location') or (packageLoc = 'Near self') then begin
//AddMessage(' Skipping editor location actor: ' + GetElementEditValues(e, 'NAME') + ' - (' + Name(e) + ')');
continue; continue;
end end
else if (packageLoc = 'In cell') then begin else if (packageLoc = 'In cell') then begin
@ -224,7 +226,8 @@ begin
else if (packageLoc = 'Specific Reference') then begin else if (packageLoc = 'Specific Reference') then begin
linkedRef := LinksTo(ElementByPath(inputVal, 'PTDA\Target Data\Reference')); linkedRef := LinksTo(ElementByPath(inputVal, 'PTDA\Target Data\Reference'));
if InSameCell(e, linkedRef) then continue; if InSameCell(e, linkedRef) then continue;
end; end
else continue;
end; end;
result := False; result := False;
@ -232,6 +235,9 @@ begin
end; end;
end; end;
///// PROCESSING ////////////////////////////////////
function Initialize: integer; function Initialize: integer;
var dobj: IwbMainRecord; var dobj: IwbMainRecord;
begin begin
@ -329,7 +335,7 @@ begin
end end
else if baseSig = 'ACTI' then begin else if baseSig = 'ACTI' then begin
// Flag water activators // Flag water activators
if ElementExists(baseRefRecord, 'WNAM')) then begin if ElementExists(baseRefRecord, 'WNAM') then begin
MarkPersistent(e); MarkPersistent(e);
exit; exit;
end; end;
@ -397,14 +403,14 @@ begin
continue; continue;
end; end;
if (IsSameCellPackage(ElementByPath(package, 'Package Data\Data Input Values'))) then continue; if (IsSameCellPackage(e, ElementByPath(package, 'Package Data\Data Input Values'))) then continue;
skip := false; skip := false;
break; break;
end; end;
if skip then begin if skip then begin
AddMessage(' Skipping actor, staying in the same cell: ' + GetElementEditValues(e, 'NAME') + ' - (' + Name(e) + ')'); //AddMessage(' Skipping actor, staying in the same cell: ' + GetElementEditValues(e, 'NAME') + ' - (' + Name(e) + ')');
exit; exit;
end; end;