1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

remove allresources

This commit is contained in:
Laserlicht
2025-09-14 15:29:14 +02:00
parent ded1a70dd7
commit 75f965c93a
15 changed files with 29 additions and 34 deletions

View File

@@ -22,6 +22,7 @@
#include "../../../lib/StartInfo.h"
#include "../../../lib/GameSettings.h"
#include "../../../lib/filesystem/Filesystem.h"
#include "../../../lib/entities/ResourceTypeHandler.h"
#include "../Goals/ExecuteHeroChain.h"
#include "../Goals/BuildThis.h"
#include "../Goals/StayAtTown.h"
@@ -136,7 +137,7 @@ int32_t getResourcesGoldReward(const TResources & res)
{
int32_t result = 0;
for(auto r : GameResID::ALL_RESOURCES())
for(auto r : LIBRARY->resourceTypeHandler->getAllObjects())
{
if(res[r] > 0)
result += r == EGameResID::GOLD ? res[r] : res[r] * 100;