Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef AI_RESPONSESYSTEM_H
  7. #define AI_RESPONSESYSTEM_H
  8. #include "utlvector.h"
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "AI_Criteria.h"
  13. abstract_class IResponseFilter
  14. {
  15. public:
  16. virtual ~IResponseFilter(){}
  17. virtual bool IsValidResponse( ResponseType_t type, const char *pszValue ) = 0;
  18. };
  19. abstract_class IResponseSystem
  20. {
  21. public:
  22. virtual ~IResponseSystem() {}
  23. virtual bool FindBestResponse( const AI_CriteriaSet& set, AI_Response& response, IResponseFilter *pFilter = NULL ) = 0;
  24. virtual void GetAllResponses( CUtlVector<AI_Response *> *pResponses ) = 0;
  25. virtual void PrecacheResponses( bool bEnable ) = 0;
  26. };
  27. IResponseSystem *PrecacheCustomResponseSystem( const char *scriptfile );
  28. IResponseSystem *BuildCustomResponseSystemGivenCriteria( const char *pszBaseFile, const char *pszCustomName, AI_CriteriaSet &criteriaSet, float flCriteriaScore );
  29. void DestroyCustomResponseSystems();
  30. class ISaveRestoreBlockHandler *GetDefaultResponseSystemSaveRestoreBlockHandler();
  31. class ISaveRestoreOps *GetResponseSystemSaveRestoreOps();
  32. #endif // AI_RESPONSESYSTEM_H