1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Removed buggy and poorly designed fromString method

Use VLC->modh directly with proper parameters instead
This commit is contained in:
Ivan Savenko
2023-07-25 22:36:45 +03:00
parent 1335a834e2
commit e733b55c90
8 changed files with 16 additions and 46 deletions

View File

@ -1244,12 +1244,11 @@ BattleField CGameState::battleGetBattlefieldType(int3 tile, CRandomGenerator & r
}
if(map->isCoastalTile(tile)) //coastal tile is always ground
return BattleField::fromString("sand_shore");
return BattleField(*VLC->modh->identifiers.getIdentifier("core", "battlefield", "sand_shore"));
return BattleField(*RandomGeneratorUtil::nextItem(t.terType->battleFields, rand));
}
void CGameState::fillUpgradeInfo(const CArmedInstance *obj, SlotID stackPos, UpgradeInfo &out) const
{
assert(obj);