1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-10-08 23:22:25 +02:00

remove todo

This commit is contained in:
Laserlicht
2025-09-29 01:15:04 +02:00
parent 07659e3b25
commit 7314bb2d06
3 changed files with 4 additions and 12 deletions

View File

@@ -227,7 +227,7 @@ void CMinorResDataBar::showAll(Canvas & to)
{
CIntObject::showAll(to);
for (GameResID i=EGameResID::WOOD; i<=EGameResID::GOLD; ++i) //todo: configurable resource support
for (GameResID i=EGameResID::WOOD; i<=EGameResID::GOLD; ++i)
{
std::string text = std::to_string(GAME->interface()->cb->getResourceAmount(i));

View File

@@ -159,7 +159,7 @@ std::string StatisticDataSet::toCsv(std::string sep) const
{
std::stringstream ss;
auto resources = std::vector<EGameResID>{EGameResID::GOLD, EGameResID::WOOD, EGameResID::MERCURY, EGameResID::ORE, EGameResID::SULFUR, EGameResID::CRYSTAL, EGameResID::GEMS}; //todo: configurable resource support
auto resources = LIBRARY->resourceTypeHandler->getAllObjects();
ss << "Map" << sep;
ss << "Timestamp" << sep;

View File

@@ -308,17 +308,9 @@ JsonRandom::JsonRandom(IGameInfoCallback * cb, IGameRandomizer & gameRandomizer)
TResources JsonRandom::loadResource(const JsonNode & value, const Variables & variables)
{
std::set<GameResID> defaultResources{
GameResID::WOOD,
GameResID::MERCURY,
GameResID::ORE,
GameResID::SULFUR,
GameResID::CRYSTAL,
GameResID::GEMS,
GameResID::GOLD
}; //todo: configurable resource support
auto defaultResources = LIBRARY->resourceTypeHandler->getAllObjects();
std::set<GameResID> potentialPicks = filterKeys(value, defaultResources, variables);
std::set<GameResID> potentialPicks = filterKeys(value, std::set<GameResID>(defaultResources.begin(), defaultResources.end()), variables);
GameResID resourceID = *RandomGeneratorUtil::nextItem(potentialPicks, rng);
si32 resourceAmount = loadValue(value, variables, 0);