1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

Merge pull request #4557 from utzuro/fix/rmg-road-type-not-saving

RMG: Enable only those roads, that are enabled in persistentStorage.json
This commit is contained in:
Ivan Savenko 2024-09-05 15:06:15 +03:00 committed by GitHub
commit a87ab4e4d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 3 deletions

View File

@ -601,6 +601,12 @@ void RandomMapTab::loadOptions()
{
w->setItem(mapGenOptions->getMapTemplate());
}
} else
{
// Default settings
mapGenOptions->setRoadEnabled(RoadId(Road::DIRT_ROAD), true);
mapGenOptions->setRoadEnabled(RoadId(Road::GRAVEL_ROAD), true);
mapGenOptions->setRoadEnabled(RoadId(Road::COBBLESTONE_ROAD), true);
}
updateMapInfoByHost();

View File

@ -30,9 +30,6 @@ CMapGenOptions::CMapGenOptions()
customizedPlayers(false)
{
initPlayersMap();
setRoadEnabled(RoadId(Road::DIRT_ROAD), true);
setRoadEnabled(RoadId(Road::GRAVEL_ROAD), true);
setRoadEnabled(RoadId(Road::COBBLESTONE_ROAD), true);
}
si32 CMapGenOptions::getWidth() const