Map example for new games is *only an example* not the real map

This commit is contained in:
yairm210 2025-02-06 10:11:15 +02:00
parent 0dfed62cfc
commit 5c3251f17b

View File

@ -138,10 +138,12 @@ class MapParametersTable(
private fun generateExampleMap(){
val ruleset = if (previousScreen is NewGameScreen) previousScreen.ruleset else RulesetCache.getVanillaRuleset()
Concurrency.run("Generate example map") {
val exampleMap = MapGenerator(ruleset).generateMap(mapParameters, GameParameters(), emptyList())
val mapParametersForExample = if (forMapEditor) mapParameters else mapParameters.clone().apply { seed = 0 }
val exampleMap = MapGenerator(ruleset).generateMap(mapParametersForExample, GameParameters(), emptyList())
Concurrency.runOnGLThread {
mapTypeExample.clear()
mapTypeExample.add(LoadMapPreview(exampleMap, maxMapSize, maxMapSize))
pack()
}
}
}