mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Rmg water support (#751)
* Roads added to shipyard * Load general rmg parameters from config * Fix issue with default zone guard * Move magic numbers related to balance to randomMap.json
This commit is contained in:
committed by
Andrii Danylchenko
parent
5c1a66ab69
commit
5054ee011a
@@ -52,11 +52,31 @@ public:
|
||||
class DLL_LINKAGE CMapGenerator
|
||||
{
|
||||
public:
|
||||
struct Config
|
||||
{
|
||||
std::vector<ETerrainType> terrainUndergroundAllowed;
|
||||
std::vector<ETerrainType> terrainGroundProhibit;
|
||||
std::vector<CTreasureInfo> waterTreasure;
|
||||
int shipyardGuard;
|
||||
int mineExtraResources;
|
||||
std::map<Res::ERes, int> mineValues;
|
||||
int minGuardStrength;
|
||||
ERoadType::ERoadType defaultRoadType;
|
||||
int treasureValueLimit;
|
||||
std::vector<int> prisonExperience, prisonValues;
|
||||
std::vector<int> scrollValues;
|
||||
int pandoraMultiplierGold, pandoraMultiplierExperience, pandoraMultiplierSpells, pandoraSpellSchool, pandoraSpell60;
|
||||
std::vector<int> pandoraCreatureValues;
|
||||
std::vector<int> questValues, questRewardValues;
|
||||
};
|
||||
|
||||
using Zones = std::map<TRmgTemplateZoneId, std::shared_ptr<CRmgTemplateZone>>;
|
||||
|
||||
explicit CMapGenerator(CMapGenOptions& mapGenOptions, int RandomSeed = std::time(nullptr));
|
||||
~CMapGenerator(); // required due to std::unique_ptr
|
||||
|
||||
const Config & getConfig() const;
|
||||
|
||||
mutable std::unique_ptr<CMap> map;
|
||||
CRandomGenerator rand;
|
||||
|
||||
@@ -111,6 +131,7 @@ public:
|
||||
private:
|
||||
int randomSeed;
|
||||
CMapGenOptions& mapGenOptions;
|
||||
Config config;
|
||||
|
||||
std::vector<rmg::ZoneConnection> connectionsLeft;
|
||||
Zones zones;
|
||||
@@ -129,6 +150,8 @@ private:
|
||||
void checkIsOnMap(const int3 &tile) const; //throws
|
||||
|
||||
/// Generation methods
|
||||
void loadConfig();
|
||||
|
||||
std::string getMapDescription() const;
|
||||
|
||||
void initPrisonsRemaining();
|
||||
|
||||
Reference in New Issue
Block a user