Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- Apply custom scripted filter for dialogues with specific conditions
- }
- unit ApplyCustomScriptedFilterDialogues;
- function Filter(e: IInterface): Boolean;
- var
- conditions: IInterface;
- i: integer;
- func: string;
- begin
- if Signature(e) <> 'INFO' then
- Exit;
- // check for condition functions
- conditions := ElementByName(e, 'Conditions');
- for i := 0 to ElementCount(conditions) - 1 do begin
- func := GetElementEditValues(ElementByIndex(conditions, i), 'CTDA\Function');
- if Pos(func, 'GetIsSex') > 0 then begin
- Result := True;
- Exit;
- end;
- end;
- end;
- function Initialize: Integer;
- begin
- FilterConflictAll := False;
- FilterConflictThis := False;
- FilterByInjectStatus := False;
- FilterInjectStatus := False;
- FilterByNotReachableStatus := False;
- FilterNotReachableStatus := False;
- FilterByReferencesInjectedStatus := False;
- FilterReferencesInjectedStatus := False;
- FilterByEditorID := False;
- FilterEditorID := '';
- FilterByName := False;
- FilterName := '';
- FilterByBaseEditorID := False;
- FilterBaseEditorID := '';
- FilterByBaseName := False;
- FilterBaseName := '';
- FilterScaledActors := False;
- FilterByPersistent := False;
- FilterPersistent := False;
- FilterUnnecessaryPersistent := False;
- FilterMasterIsTemporary := False;
- FilterIsMaster := False;
- FilterPersistentPosChanged := False;
- FilterDeleted := False;
- FilterByVWD := False;
- FilterVWD := False;
- FilterByHasVWDMesh := False;
- FilterHasVWDMesh := False;
- FilterBySignature := False;
- FilterSignatures := '';
- FilterByBaseSignature := False;
- FilterBaseSignatures := '';
- FlattenBlocks := False;
- FlattenCellChilds := False;
- AssignPersWrldChild := False;
- InheritConflictByParent := False; // color conflicts
- FilterScripted := True; // use custom Filter() function
- ApplyFilter;
- Result := 1;
- end;
- end.
Advertisement
Add Comment
Please, Sign In to add comment