Settings.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Settings.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. VCMI_LIB_NAMESPACE_BEGIN
  12. class JsonNode;
  13. class ResourcePath;
  14. VCMI_LIB_NAMESPACE_END
  15. namespace NKAI
  16. {
  17. class Settings
  18. {
  19. private:
  20. int maxRoamingHeroes;
  21. int mainHeroTurnDistanceLimit;
  22. int scoutHeroTurnDistanceLimit;
  23. int maxpass;
  24. int pathfinderBucketsCount;
  25. int pathfinderBucketSize;
  26. float maxGoldPressure;
  27. float retreatThresholdRelative;
  28. float retreatThresholdAbsolute;
  29. float safeAttackRatio;
  30. bool allowObjectGraph;
  31. bool useTroopsFromGarrisons;
  32. bool openMap;
  33. bool useFuzzy;
  34. public:
  35. explicit Settings(int difficultyLevel);
  36. int getMaxPass() const { return maxpass; }
  37. float getMaxGoldPressure() const { return maxGoldPressure; }
  38. float getRetreatThresholdRelative() const { return retreatThresholdRelative; }
  39. float getRetreatThresholdAbsolute() const { return retreatThresholdAbsolute; }
  40. float getSafeAttackRatio() const { return safeAttackRatio; }
  41. int getMaxRoamingHeroes() const { return maxRoamingHeroes; }
  42. int getMainHeroTurnDistanceLimit() const { return mainHeroTurnDistanceLimit; }
  43. int getScoutHeroTurnDistanceLimit() const { return scoutHeroTurnDistanceLimit; }
  44. int getPathfinderBucketsCount() const { return pathfinderBucketsCount; }
  45. int getPathfinderBucketSize() const { return pathfinderBucketSize; }
  46. bool isObjectGraphAllowed() const { return allowObjectGraph; }
  47. bool isGarrisonTroopsUsageAllowed() const { return useTroopsFromGarrisons; }
  48. bool isOpenMap() const { return openMap; }
  49. bool isUseFuzzy() const { return useFuzzy; }
  50. };
  51. }