(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:
yexo
2009-04-19 15:14:23 +00:00
parent ef90925226
commit a91ff2d5e8
5 changed files with 27 additions and 1 deletions

View File

@@ -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()