diff options
author | yexo <yexo@openttd.org> | 2011-01-02 12:41:24 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2011-01-02 12:41:24 +0000 |
commit | b22945350f6a574e8cb8c5ec30c032c01a107cba (patch) | |
tree | bba4330ac54f02fed0f6fa50fc7159575c5860cb /src/toolbar_gui.cpp | |
parent | 3ca65ab7b3ee218fc1bfbeb72df16b3a42fe0287 (diff) | |
download | openttd-b22945350f6a574e8cb8c5ec30c032c01a107cba.tar.xz |
(svn r21696) -Feature [FS#4362]: allow changing the AI configuration in the scenario editor / in game
Diffstat (limited to 'src/toolbar_gui.cpp')
-rw-r--r-- | src/toolbar_gui.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/toolbar_gui.cpp b/src/toolbar_gui.cpp index 17d130b50..60c873c12 100644 --- a/src/toolbar_gui.cpp +++ b/src/toolbar_gui.cpp @@ -289,6 +289,7 @@ enum OptionMenuEntries { OME_GAMEOPTIONS, OME_DIFFICULTIES, OME_SETTINGS, + OME_AI_SETTINGS, OME_NEWGRFSETTINGS, OME_TRANSPARENCIES, OME_SHOW_TOWNNAMES, @@ -307,6 +308,10 @@ static CallBackFunction ToolbarOptionsClick(Window *w) list->push_back(new DropDownListStringItem(STR_SETTINGS_MENU_GAME_OPTIONS, OME_GAMEOPTIONS, false)); list->push_back(new DropDownListStringItem(STR_SETTINGS_MENU_DIFFICULTY_SETTINGS, OME_DIFFICULTIES, false)); list->push_back(new DropDownListStringItem(STR_SETTINGS_MENU_CONFIG_SETTINGS, OME_SETTINGS, false)); + /* Changes to the per-AI settings don't get send from the server to the clients. Clients get + * the settings once they join but never update it. As such don't show the window at all + * to network clients. */ + if (!_networking || _network_server) list->push_back(new DropDownListStringItem(STR_SETTINGS_MENU_AI_SETTINGS, OME_AI_SETTINGS, false)); list->push_back(new DropDownListStringItem(STR_SETTINGS_MENU_NEWGRF_SETTINGS, OME_NEWGRFSETTINGS, false)); list->push_back(new DropDownListStringItem(STR_SETTINGS_MENU_TRANSPARENCY_OPTIONS, OME_TRANSPARENCIES, false)); list->push_back(new DropDownListItem(-1, false)); @@ -330,6 +335,7 @@ static CallBackFunction MenuClickSettings(int index) case OME_GAMEOPTIONS: ShowGameOptions(); return CBF_NONE; case OME_DIFFICULTIES: ShowGameDifficulty(); return CBF_NONE; case OME_SETTINGS: ShowGameSettings(); return CBF_NONE; + case OME_AI_SETTINGS: ShowAIConfigWindow(); return CBF_NONE; case OME_NEWGRFSETTINGS: ShowNewGRFSettings(!_networking && _settings_client.gui.UserIsAllowedToChangeNewGRFs(), true, true, &_grfconfig); return CBF_NONE; case OME_TRANSPARENCIES: ShowTransparencyToolbar(); break; |