Guest User

Untitled

a guest
Mar 2nd, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.88 KB | None | 0 0
  1. {
  2. Apply custom scripted filter for dialogues with specific conditions
  3. }
  4. unit ApplyCustomScriptedFilterDialogues;
  5.  
  6. function Filter(e: IInterface): Boolean;
  7. var
  8. conditions: IInterface;
  9. i: integer;
  10. func: string;
  11. begin
  12. if Signature(e) <> 'INFO' then
  13. Exit;
  14.  
  15. // check for condition functions
  16. conditions := ElementByName(e, 'Conditions');
  17. for i := 0 to ElementCount(conditions) - 1 do begin
  18. func := GetElementEditValues(ElementByIndex(conditions, i), 'CTDA\Function');
  19. if Pos(func, 'GetIsSex') > 0 then begin
  20. Result := True;
  21. Exit;
  22. end;
  23. end;
  24. end;
  25.  
  26. function Initialize: Integer;
  27. begin
  28. FilterConflictAll := False;
  29. FilterConflictThis := False;
  30. FilterByInjectStatus := False;
  31. FilterInjectStatus := False;
  32. FilterByNotReachableStatus := False;
  33. FilterNotReachableStatus := False;
  34. FilterByReferencesInjectedStatus := False;
  35. FilterReferencesInjectedStatus := False;
  36. FilterByEditorID := False;
  37. FilterEditorID := '';
  38. FilterByName := False;
  39. FilterName := '';
  40. FilterByBaseEditorID := False;
  41. FilterBaseEditorID := '';
  42. FilterByBaseName := False;
  43. FilterBaseName := '';
  44. FilterScaledActors := False;
  45. FilterByPersistent := False;
  46. FilterPersistent := False;
  47. FilterUnnecessaryPersistent := False;
  48. FilterMasterIsTemporary := False;
  49. FilterIsMaster := False;
  50. FilterPersistentPosChanged := False;
  51. FilterDeleted := False;
  52. FilterByVWD := False;
  53. FilterVWD := False;
  54. FilterByHasVWDMesh := False;
  55. FilterHasVWDMesh := False;
  56. FilterBySignature := False;
  57. FilterSignatures := '';
  58. FilterByBaseSignature := False;
  59. FilterBaseSignatures := '';
  60. FlattenBlocks := False;
  61. FlattenCellChilds := False;
  62. AssignPersWrldChild := False;
  63. InheritConflictByParent := False; // color conflicts
  64. FilterScripted := True; // use custom Filter() function
  65.  
  66. ApplyFilter;
  67.  
  68. Result := 1;
  69. end;
  70.  
  71. end.
Advertisement
Add Comment
Please, Sign In to add comment