1
0
forked from 0ad/0ad

Fix auto-complete chat entries for Biome names in GameSetup

The line altered here was returning an Array of Objects. This array
would
eventually passed to code that expected it to be an Array of Strings.
This was
causing an error to thrown that could be replicated by going to the
Multiplayer
GameSetup, entering text (e.g. "Winter", "Dry", "lol") into the chat
field, and
pressing `Tab` to trigger the auto-complete.

This line now returns an Array containing the user-facing names of the
Biomes
available to the selected map (if it has them), which is what this
method was
returning prior to dc18d94030.


Related: dc18d94030, dc18d94030

This was SVN commit r25403.
This commit is contained in:
s0600204 2021-05-08 20:45:20 +00:00
parent 0dbf417171
commit 14324b8918

View File

@ -40,7 +40,7 @@ GameSettingControls.Biome = class Biome extends GameSettingControlDropdown
getAutocompleteEntries()
{
return g_GameSettings.biome.biomes;
return g_GameSettings.biome.getAvailableBiomeData().map(biome => biome.Title);
}
onSelectionChange(itemIdx)