BuildThis.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * BuildThis.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. #include "CGoal.h"
  12. #include "../Analyzers/BuildAnalyzer.h"
  13. struct HeroPtr;
  14. class VCAI;
  15. class FuzzyHelper;
  16. namespace Goals
  17. {
  18. class DLL_EXPORT BuildThis : public CGoal<BuildThis>
  19. {
  20. public:
  21. BuildingInfo buildingInfo;
  22. TownDevelopmentInfo townInfo;
  23. BuildThis() //should be private, but unit test uses it
  24. : CGoal(Goals::BUILD_STRUCTURE)
  25. {
  26. }
  27. BuildThis(const BuildingInfo & buildingInfo, const TownDevelopmentInfo & townInfo) //should be private, but unit test uses it
  28. : CGoal(Goals::BUILD_STRUCTURE), buildingInfo(buildingInfo), townInfo(townInfo)
  29. {
  30. bid = buildingInfo.id;
  31. town = townInfo.town;
  32. }
  33. BuildThis(BuildingID Bid, const CGTownInstance * tid)
  34. : CGoal(Goals::BUILD_STRUCTURE)
  35. {
  36. bid = Bid;
  37. town = tid;
  38. priority = 1;
  39. }
  40. BuildThis(BuildingID Bid)
  41. : CGoal(Goals::BUILD_STRUCTURE)
  42. {
  43. bid = Bid;
  44. priority = 1;
  45. }
  46. virtual bool operator==(const BuildThis & other) const override;
  47. virtual std::string name() const override;
  48. };
  49. }