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

remove todo

This commit is contained in:
Laserlicht
2025-09-28 21:36:46 +02:00
parent 0cb9eb47d5
commit d7ba132fc1
2 changed files with 3 additions and 11 deletions

View File

@@ -267,16 +267,7 @@ ResourcesPanel::ResourcesPanel(const CTradeableItem::ClickPressedFunctor & click
{ {
OBJECT_CONSTRUCTION; OBJECT_CONSTRUCTION;
// TODO: replace with LIBRARY->resourceTypeHandler->getAllObjects() -> also check order after doing this resourcesForTrade = LIBRARY->resourceTypeHandler->getAllObjects();
resourcesForTrade =
{
GameResID::WOOD, GameResID::MERCURY, GameResID::ORE,
GameResID::SULFUR, GameResID::CRYSTAL, GameResID::GEMS,
GameResID::GOLD,
GameResID::GOLD, // TODO: remove
GameResID::GOLD, // TODO: remove
GameResID::GOLD // TODO: remove
};
int lines = vstd::divideAndCeil(resourcesForTrade.size(), 3); int lines = vstd::divideAndCeil(resourcesForTrade.size(), 3);
if(lines > 3) if(lines > 3)

View File

@@ -30,6 +30,7 @@
#include "../../lib/GameLibrary.h" #include "../../lib/GameLibrary.h"
#include "../../lib/callback/CCallback.h" #include "../../lib/callback/CCallback.h"
#include "../../lib/entities/building/CBuilding.h" #include "../../lib/entities/building/CBuilding.h"
#include "../../lib/entities/ResourceTypeHandler.h"
#include "../../lib/mapObjects/CGHeroInstance.h" #include "../../lib/mapObjects/CGHeroInstance.h"
#include "../../lib/mapObjects/CGMarket.h" #include "../../lib/mapObjects/CGMarket.h"
#include "../../lib/mapObjects/CGTownInstance.h" #include "../../lib/mapObjects/CGTownInstance.h"
@@ -202,7 +203,7 @@ std::string CMarketWindow::getMarketTitle(const ObjectInstanceID marketId, const
ImagePath CMarketWindow::getImagePathBasedOnResources(std::string name) ImagePath CMarketWindow::getImagePathBasedOnResources(std::string name)
{ {
int res = 9; //TODO: replace with LIBRARY->resourceTypeHandler->getAllObjects(); int res = LIBRARY->resourceTypeHandler->getAllObjects().size();
if(res == 8) if(res == 8)
name += "-R8"; name += "-R8";
else if(res > 8) else if(res > 8)