Settings.h 2.2 KB

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