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:
@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user