Settings.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 maxPriorityPass;
  25. int pathfinderBucketsCount;
  26. int pathfinderBucketSize;
  27. float maxGoldPressure;
  28. float retreatThresholdRelative;
  29. float retreatThresholdAbsolute;
  30. float safeAttackRatio;
  31. float maxArmyLossTarget;
  32. bool allowObjectGraph;
  33. bool useTroopsFromGarrisons;
  34. bool updateHitmapOnTileReveal;
  35. bool openMap;
  36. bool useFuzzy;
  37. public:
  38. explicit Settings(int difficultyLevel);
  39. int getMaxPass() const { return maxPass; }
  40. int getMaxPriorityPass() const { return maxPriorityPass; }
  41. float getMaxGoldPressure() const { return maxGoldPressure; }
  42. float getRetreatThresholdRelative() const { return retreatThresholdRelative; }
  43. float getRetreatThresholdAbsolute() const { return retreatThresholdAbsolute; }
  44. float getSafeAttackRatio() const { return safeAttackRatio; }
  45. float getMaxArmyLossTarget() const { return maxArmyLossTarget; }
  46. int getMaxRoamingHeroes() const { return maxRoamingHeroes; }
  47. int getMainHeroTurnDistanceLimit() const { return mainHeroTurnDistanceLimit; }
  48. int getScoutHeroTurnDistanceLimit() const { return scoutHeroTurnDistanceLimit; }
  49. int getPathfinderBucketsCount() const { return pathfinderBucketsCount; }
  50. int getPathfinderBucketSize() const { return pathfinderBucketSize; }
  51. bool isObjectGraphAllowed() const { return allowObjectGraph; }
  52. bool isGarrisonTroopsUsageAllowed() const { return useTroopsFromGarrisons; }
  53. bool isUpdateHitmapOnTileReveal() const { return updateHitmapOnTileReveal; }
  54. bool isOpenMap() const { return openMap; }
  55. bool isUseFuzzy() const { return useFuzzy; }
  56. };
  57. }