Skip to content

Commit

Permalink
Map example for new games is *only an example* not the real map
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 committed Feb 6, 2025
1 parent 0dfed62 commit 5c3251f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
}
}
Expand Down

0 comments on commit 5c3251f

Please sign in to comment.