mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-21 19:32:54 +01:00
(svn r16093) -Feature [FS#2808]: Add GetURL() as possible function to info.nut. If AIs implement it, that url is shown when the AI crashes and also in the AI selection window.
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
#define DEFINE_SCRIPT_FILES
|
||||
|
||||
#include "ai_info.hpp"
|
||||
#include "ai_config.hpp"
|
||||
#include "ai_storage.hpp"
|
||||
#include "ai_instance.hpp"
|
||||
#include "ai_gui.hpp"
|
||||
@@ -258,6 +259,12 @@ void AIInstance::Died()
|
||||
if (strcmp(GetCompany(_current_company)->ai_info->GetMainScript(), "%_dummy") != 0) {
|
||||
ShowErrorMessage(INVALID_STRING_ID, STR_AI_PLEASE_REPORT_CRASH, 0, 0);
|
||||
}
|
||||
|
||||
const AIInfo *info = AIConfig::GetConfig(_current_company)->GetInfo();
|
||||
if (info->GetURL() != NULL) {
|
||||
AILog::Info("Please report the error to the following URL:");
|
||||
AILog::Info(info->GetURL());
|
||||
}
|
||||
}
|
||||
|
||||
void AIInstance::GameLoop()
|
||||
|
||||
Reference in New Issue
Block a user