1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

[0002285] Implement feature with extra resources near mines (#742)

* RMG: clear start position
* [0002285] some heaps of resources are placed nearby mines
* Fix leak in case of inability to place resource
* Fix indentation according to vcmi style
* Add constant for random amount of resources
* Code review fixes
This commit is contained in:
Nordsoft91
2022-05-23 13:08:36 +03:00
committed by GitHub
parent c293b655f5
commit a8265c7052
4 changed files with 71 additions and 42 deletions

View File

@ -838,14 +838,14 @@ std::string CGResource::getHoverText(PlayerColor player) const
CGResource::CGResource()
{
amount = 0;
amount = CGResource::RANDOM_AMOUNT;
}
void CGResource::initObj(CRandomGenerator & rand)
{
blockVisit = true;
if(!amount)
if(amount == CGResource::RANDOM_AMOUNT)
{
switch(subID)
{