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

replace RESOURCE_NAMES where possible

This commit is contained in:
Laserlicht
2025-09-14 20:43:53 +02:00
parent 81c64ce54f
commit a54a1f8b8d
17 changed files with 76 additions and 49 deletions

View File

@@ -259,7 +259,7 @@ ResourceSet NewTurnProcessor::generatePlayerIncome(PlayerColor playerID, bool ne
// Distribute weekly bonuses over 7 days, depending on the current day of the week
for (GameResID i : LIBRARY->resourceTypeHandler->getAllObjects())
{
const std::string & name = GameConstants::RESOURCE_NAMES[i.getNum()];
const std::string & name = LIBRARY->resourceTypeHandler->getById(i)->getJsonKey();
int64_t weeklyBonus = difficultyConfig[name].Integer();
int64_t dayOfWeek = gameHandler->gameState().getDate(Date::DAY_OF_WEEK);
int64_t dailyIncome = incomeHandicapped[i];