mirror of
https://github.com/vcmi/vcmi.git
synced 2025-10-08 23:22:25 +02:00
remove todo
This commit is contained in:
@@ -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));
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user