1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

add mines support

This commit is contained in:
Laserlicht
2025-09-28 22:47:41 +02:00
parent 076f7ba5b5
commit 5ae4db60e3
11 changed files with 79 additions and 17 deletions

View File

@@ -61,7 +61,7 @@ void CGResource::pickRandomObject(IGameRandomizer & gameRandomizer)
if (ID == Obj::RANDOM_RESOURCE)
{
ID = Obj::RESOURCE;
subID = gameRandomizer.getDefault().nextInt(EGameResID::WOOD, EGameResID::GOLD); //todo: configurable resource support
subID = gameRandomizer.getDefault().nextInt(EGameResID::WOOD, LIBRARY->resourceTypeHandler->getAllObjects().size() - 1);
setType(ID, subID);
amount *= getAmountMultiplier();