@@ -28,12 +28,13 @@
#include "highscore.h"
#include "base_media_base.h"
#include "company_base.h"
#include "company_func.h"
#include "viewport_func.h"
#include "core/geometry_func.hpp"
#include "ai/ai.hpp"
#include <map>
#include "table/sprites.h"
#include "table/strings.h"
static const StringID _units_dropdown[] = {
@@ -650,12 +651,17 @@ public:
/* save value in temporary variable */
WriteValue(GetVariableAddress(&this->opt_mod_temp, &sd->save), sd->save.conv, val);
this->RaiseWidget(GDW_LVL_EASY + this->opt_mod_temp.difficulty.diff_level);
SetDifficultyLevel(3, &this->opt_mod_temp.difficulty); // set difficulty level to custom
this->LowerWidget(GDW_LVL_CUSTOM);
this->InvalidateData();
if (widget / 3 == 0 && this->opt_mod_temp.difficulty.max_no_competitors != 0 &&
AI::GetInfoList()->size() == 0) {
ShowErrorMessage(STR_WARNING_NO_SUITABLE_AI, INVALID_STRING_ID, 0, 0, true);
}
return;
switch (widget) {
case GDW_LVL_EASY:
case GDW_LVL_MEDIUM: