summaryrefslogtreecommitdiff
path: root/src/ai/api/squirrel_export.sh
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-08-19 15:37:28 +0000
committeryexo <yexo@openttd.org>2010-08-19 15:37:28 +0000
commitdc303e550bec650220038b727e4915f2e502a5a4 (patch)
tree3e882c182bd41904d817cef6132358ca370a96ec /src/ai/api/squirrel_export.sh
parent6c7384cabd9ffe684697f98a65a32871500284f8 (diff)
downloadopenttd-dc303e550bec650220038b727e4915f2e502a5a4.tar.xz
(svn r20563) -Change: [NoAI] rename AIAbstractList to AIList
Diffstat (limited to 'src/ai/api/squirrel_export.sh')
-rwxr-xr-xsrc/ai/api/squirrel_export.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ai/api/squirrel_export.sh b/src/ai/api/squirrel_export.sh
index aed180da6..90b506b32 100755
--- a/src/ai/api/squirrel_export.sh
+++ b/src/ai/api/squirrel_export.sh
@@ -89,7 +89,9 @@ echo "
print \$0
gsub(\"^.*/\", \"\")
print \" squirrel_register_std(this->engine);\" \$0
- split(\"`grep '^void SQAI.*_Register(Squirrel \*engine)$' *.hpp.sq | sed 's/^.*void //;s/Squirrel \*/this->/;s/$/;/;s/_Register/0000Register/g;' | sort | sed 's/0000Register/_Register/g' | tr -d '\r' | tr '\n' ' '`\", regs, \" \")
+ # AIList needs to be registered with squirrel before all AIList subclasses.
+ print \" SQAIList_Register(this->engine);\" \$0
+ split(\"`grep '^void SQAI.*_Register(Squirrel \*engine)$' *.hpp.sq | grep -v 'SQAIList_Register' | sed 's/^.*void //;s/Squirrel \*/this->/;s/$/;/;s/_Register/0000Register/g;' | sort | sed 's/0000Register/_Register/g' | tr -d '\r' | tr '\n' ' '`\", regs, \" \")
for (i = 1; regs[i] != \"\"; i++) {
if (regs[i] == \"SQAIController_Register(this->engine);\") continue