diff options
author | rubidium <rubidium@openttd.org> | 2012-02-12 10:58:18 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2012-02-12 10:58:18 +0000 |
commit | 6356178a259d0734c49ef5c62bfbffb86097053b (patch) | |
tree | ab99429845ab4be9a15d179887f74a52ce5a3a9a /src/script/script_config.cpp | |
parent | 58269b7ad2a70b94de104ede2c69e126b58be534 (diff) | |
download | openttd-6356178a259d0734c49ef5c62bfbffb86097053b.tar.xz |
(svn r23936) -Feature [FS#5047]: readme/licence/changelog viewer for AI and game scripts (LordAro)
Diffstat (limited to 'src/script/script_config.cpp')
-rw-r--r-- | src/script/script_config.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/script/script_config.cpp b/src/script/script_config.cpp index 70ffbfd83..7f41304d4 100644 --- a/src/script/script_config.cpp +++ b/src/script/script_config.cpp @@ -13,6 +13,7 @@ #include "../settings_type.h" #include "../core/random_func.hpp" #include "script_info.hpp" +#include "../textfile_gui.h" void ScriptConfig::Change(const char *name, int version, bool force_exact_match, bool is_random) { @@ -198,3 +199,10 @@ void ScriptConfig::SettingsToString(char *string, size_t size) const size_t len = strlen(string); if (len > 0) string[len - 1] = '\0'; } + +const char *ScriptConfig::GetTextfile(TextfileType type, CompanyID slot) const +{ + if (slot == INVALID_COMPANY || this->GetInfo() == NULL) return NULL; + + return ::GetTextfile(type, (slot == OWNER_DEITY) ? GAME_DIR : AI_DIR, this->GetInfo()->GetMainScript()); +} |