Settings.h 1.9 KB

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