summaryrefslogtreecommitdiff
path: root/src/script
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-12-19 20:54:37 +0000
committertruebrain <truebrain@openttd.org>2011-12-19 20:54:37 +0000
commitb4f832f29f44dcd48e8f0806d47ce78b1963d639 (patch)
treec637dffb7be81c82611b7345785899768b7917ac /src/script
parent12aa5b6a583aa7ca9092ec6c77e7b12677cdd6a4 (diff)
downloadopenttd-b4f832f29f44dcd48e8f0806d47ce78b1963d639.tar.xz
(svn r23605) -Add: GAME_DIR and CONTENT_TYPE_GAME, and read gamescript from that directory
Diffstat (limited to 'src/script')
-rw-r--r--src/script/squirrel.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/squirrel.cpp b/src/script/squirrel.cpp
index 0465bd31c..bc02be5f4 100644
--- a/src/script/squirrel.cpp
+++ b/src/script/squirrel.cpp
@@ -449,6 +449,8 @@ SQRESULT Squirrel::LoadFile(HSQUIRRELVM vm, const char *filename, SQBool printer
if (strncmp(this->GetAPIName(), "AI", 2) == 0) {
file = FioFOpenFile(filename, "rb", AI_DIR, &size);
if (file == NULL) file = FioFOpenFile(filename, "rb", AI_LIBRARY_DIR, &size);
+ } else if (strncmp(this->GetAPIName(), "GS", 2) == 0) {
+ file = FioFOpenFile(filename, "rb", GAME_DIR, &size);
} else {
NOT_REACHED();
}