|
|
|
@ -607,6 +607,7 @@ static void FillGrfidMap(const GRFConfig *c, GrfIdMap *grfid_map)
|
|
|
|
|
|
|
|
|
|
static void NewGRFConfirmationCallback(Window *w, bool confirmed);
|
|
|
|
|
static void ShowSavePresetWindow(const char *initial_text);
|
|
|
|
|
void PostCheckNewGRFLoadWarnings();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Window for showing NewGRF files
|
|
|
|
@ -691,6 +692,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
|
|
|
|
|
CopyGRFConfigList(this->orig_list, this->actives, true);
|
|
|
|
|
ResetGRFConfig(false);
|
|
|
|
|
ReloadNewGRFData();
|
|
|
|
|
PostCheckNewGRFLoadWarnings();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Remove the temporary copy of grf-list used in window */
|
|
|
|
@ -1113,6 +1115,7 @@ struct NewGRFWindow : public Window, NewGRFScanCallback {
|
|
|
|
|
CopyGRFConfigList(this->orig_list, this->actives, true);
|
|
|
|
|
ResetGRFConfig(false);
|
|
|
|
|
ReloadNewGRFData();
|
|
|
|
|
PostCheckNewGRFLoadWarnings();
|
|
|
|
|
}
|
|
|
|
|
this->DeleteChildWindows(WC_QUERY_STRING); // Remove the parameter query window
|
|
|
|
|
break;
|
|
|
|
@ -1975,6 +1978,7 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed)
|
|
|
|
|
GamelogGRFUpdate(_grfconfig, nw->actives); // log GRF changes
|
|
|
|
|
CopyGRFConfigList(nw->orig_list, nw->actives, false);
|
|
|
|
|
ReloadNewGRFData();
|
|
|
|
|
PostCheckNewGRFLoadWarnings();
|
|
|
|
|
GamelogStopAction();
|
|
|
|
|
|
|
|
|
|
/* Show new, updated list */
|
|
|
|
@ -1993,6 +1997,12 @@ static void NewGRFConfirmationCallback(Window *w, bool confirmed)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void PostCheckNewGRFLoadWarnings()
|
|
|
|
|
{
|
|
|
|
|
if (_grf_bug_too_many_strings) {
|
|
|
|
|
ShowErrorMessage(STR_NEWGRF_TOO_MANY_STRINGS, STR_NEWGRF_TOO_MANY_STRINGS_DETAIL, WL_WARNING);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|