1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +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

@@ -30,10 +30,12 @@
#include "../CPlayerInterface.h"
#include "../PlayerLocalState.h"
#include "../../lib/GameLibrary.h"
#include "../../lib/callback/CCallback.h"
#include "../../lib/constants/StringConstants.h"
#include "../../lib/mapping/CMapHeader.h"
#include "../../lib/filesystem/ResourcePath.h"
#include "../../lib/entities/ResourceTypeHandler.h"
AdventureMapWidget::AdventureMapWidget( std::shared_ptr<AdventureMapShortcuts> shortcuts )
: shortcuts(shortcuts)
@@ -286,7 +288,7 @@ std::shared_ptr<CIntObject> AdventureMapWidget::buildResourceDateBar(const JsonN
for(auto i = 0; i < GameConstants::RESOURCE_QUANTITY; i++)
{
const auto & node = input[GameConstants::RESOURCE_NAMES[i]];
const auto & node = input[LIBRARY->resourceTypeHandler->getById(i)->getJsonKey()];
if(node.isNull())
continue;