BuildThis.cpp 894 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * BuildThis.cpp, 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. #include "StdInc.h"
  11. #include "BuildThis.h"
  12. #include "../VCAI.h"
  13. #include "../AIUtility.h"
  14. #include "../AIhelper.h"
  15. #include "../FuzzyHelper.h"
  16. #include "../../../lib/mapping/CMap.h" //for victory conditions
  17. #include "../../../lib/CPathfinder.h"
  18. #include "../../../lib/StringConstants.h"
  19. extern boost::thread_specific_ptr<CCallback> cb;
  20. extern boost::thread_specific_ptr<VCAI> ai;
  21. extern FuzzyHelper * fh;
  22. using namespace Goals;
  23. bool BuildThis::operator==(const BuildThis & other) const
  24. {
  25. return town == other.town && bid == other.bid;
  26. }
  27. std::string BuildThis::toString() const
  28. {
  29. return "Build " + buildingInfo.name + "(" + std::to_string(bid) + ") in " + town->name;
  30. }