summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-08-19 14:54:52 +0000
committeryexo <yexo@openttd.org>2009-08-19 14:54:52 +0000
commit5a863925ee6c1ba78ec1ca59e73cebe2840d4345 (patch)
tree78df47d24a73a7c6cc78db1b84e2116d22c6b5c7 /src/ai
parent4423000225364b880abd7f793d772bf51bdb2d87 (diff)
downloadopenttd-5a863925ee6c1ba78ec1ca59e73cebe2840d4345.tar.xz
(svn r17221) -Change [NoAI] [FS#3101]: when the API requests a string as parameter allow every squirrel type and convert to a string
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/api/ai_basestation.hpp.sq2
-rw-r--r--src/ai/api/ai_company.hpp.sq4
-rw-r--r--src/ai/api/ai_gamesettings.hpp.sq4
-rw-r--r--src/ai/api/ai_group.hpp.sq2
-rw-r--r--src/ai/api/ai_log.hpp.sq6
-rw-r--r--src/ai/api/ai_sign.hpp.sq4
-rw-r--r--src/ai/api/ai_vehicle.hpp.sq2
-rw-r--r--src/ai/api/squirrel_export.awk2
8 files changed, 13 insertions, 13 deletions
diff --git a/src/ai/api/ai_basestation.hpp.sq b/src/ai/api/ai_basestation.hpp.sq
index 315b2be3a..da465fff9 100644
--- a/src/ai/api/ai_basestation.hpp.sq
+++ b/src/ai/api/ai_basestation.hpp.sq
@@ -27,7 +27,7 @@ void SQAIBaseStation_Register(Squirrel *engine) {
SQAIBaseStation.DefSQStaticMethod(engine, &AIBaseStation::IsValidBaseStation, "IsValidBaseStation", 2, ".i");
SQAIBaseStation.DefSQStaticMethod(engine, &AIBaseStation::GetName, "GetName", 2, ".i");
- SQAIBaseStation.DefSQStaticMethod(engine, &AIBaseStation::SetName, "SetName", 3, ".is");
+ SQAIBaseStation.DefSQStaticMethod(engine, &AIBaseStation::SetName, "SetName", 3, ".i.");
SQAIBaseStation.DefSQStaticMethod(engine, &AIBaseStation::GetLocation, "GetLocation", 2, ".i");
SQAIBaseStation.DefSQStaticMethod(engine, &AIBaseStation::GetConstructionDate, "GetConstructionDate", 2, ".i");
diff --git a/src/ai/api/ai_company.hpp.sq b/src/ai/api/ai_company.hpp.sq
index 9441fb317..1c2390617 100644
--- a/src/ai/api/ai_company.hpp.sq
+++ b/src/ai/api/ai_company.hpp.sq
@@ -33,9 +33,9 @@ void SQAICompany_Register(Squirrel *engine) {
SQAICompany.DefSQStaticMethod(engine, &AICompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
SQAICompany.DefSQStaticMethod(engine, &AICompany::IsMine, "IsMine", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetName, "SetName", 2, ".s");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetName, "SetName", 2, "..");
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetName, "GetName", 2, ".i");
- SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentName, "SetPresidentName", 2, ".s");
+ SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentName, "SetPresidentName", 2, "..");
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentName, "GetPresidentName", 2, ".i");
SQAICompany.DefSQStaticMethod(engine, &AICompany::SetPresidentGender, "SetPresidentGender", 2, ".i");
SQAICompany.DefSQStaticMethod(engine, &AICompany::GetPresidentGender, "GetPresidentGender", 2, ".i");
diff --git a/src/ai/api/ai_gamesettings.hpp.sq b/src/ai/api/ai_gamesettings.hpp.sq
index 7ffb63ff2..d0df6d71b 100644
--- a/src/ai/api/ai_gamesettings.hpp.sq
+++ b/src/ai/api/ai_gamesettings.hpp.sq
@@ -17,8 +17,8 @@ void SQAIGameSettings_Register(Squirrel *engine) {
SQAIGameSettings.PreRegister(engine);
SQAIGameSettings.AddConstructor<void (AIGameSettings::*)(), 1>(engine, "x");
- SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::IsValid, "IsValid", 2, ".s");
- SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::GetValue, "GetValue", 2, ".s");
+ SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::IsValid, "IsValid", 2, "..");
+ SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::GetValue, "GetValue", 2, "..");
SQAIGameSettings.DefSQStaticMethod(engine, &AIGameSettings::IsDisabledVehicleType, "IsDisabledVehicleType", 2, ".i");
SQAIGameSettings.PostRegister(engine);
diff --git a/src/ai/api/ai_group.hpp.sq b/src/ai/api/ai_group.hpp.sq
index f54b984f5..c6ebdbdbc 100644
--- a/src/ai/api/ai_group.hpp.sq
+++ b/src/ai/api/ai_group.hpp.sq
@@ -29,7 +29,7 @@ void SQAIGroup_Register(Squirrel *engine) {
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::CreateGroup, "CreateGroup", 2, ".i");
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::DeleteGroup, "DeleteGroup", 2, ".i");
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::GetVehicleType, "GetVehicleType", 2, ".i");
- SQAIGroup.DefSQStaticMethod(engine, &AIGroup::SetName, "SetName", 3, ".is");
+ SQAIGroup.DefSQStaticMethod(engine, &AIGroup::SetName, "SetName", 3, ".i.");
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::GetName, "GetName", 2, ".i");
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::EnableAutoReplaceProtection, "EnableAutoReplaceProtection", 3, ".ib");
SQAIGroup.DefSQStaticMethod(engine, &AIGroup::GetAutoReplaceProtection, "GetAutoReplaceProtection", 2, ".i");
diff --git a/src/ai/api/ai_log.hpp.sq b/src/ai/api/ai_log.hpp.sq
index 8c432d4d9..0db625fcc 100644
--- a/src/ai/api/ai_log.hpp.sq
+++ b/src/ai/api/ai_log.hpp.sq
@@ -17,9 +17,9 @@ void SQAILog_Register(Squirrel *engine) {
SQAILog.PreRegister(engine);
SQAILog.AddConstructor<void (AILog::*)(), 1>(engine, "x");
- SQAILog.DefSQStaticMethod(engine, &AILog::Info, "Info", 2, ".s");
- SQAILog.DefSQStaticMethod(engine, &AILog::Warning, "Warning", 2, ".s");
- SQAILog.DefSQStaticMethod(engine, &AILog::Error, "Error", 2, ".s");
+ SQAILog.DefSQStaticMethod(engine, &AILog::Info, "Info", 2, "..");
+ SQAILog.DefSQStaticMethod(engine, &AILog::Warning, "Warning", 2, "..");
+ SQAILog.DefSQStaticMethod(engine, &AILog::Error, "Error", 2, "..");
SQAILog.PostRegister(engine);
}
diff --git a/src/ai/api/ai_sign.hpp.sq b/src/ai/api/ai_sign.hpp.sq
index 2c5ef8039..77a0bf490 100644
--- a/src/ai/api/ai_sign.hpp.sq
+++ b/src/ai/api/ai_sign.hpp.sq
@@ -29,10 +29,10 @@ void SQAISign_Register(Squirrel *engine) {
AIError::RegisterErrorMapString(AISign::ERR_SIGN_TOO_MANY_SIGNS, "ERR_SIGN_TOO_MANY_SIGNS");
SQAISign.DefSQStaticMethod(engine, &AISign::IsValidSign, "IsValidSign", 2, ".i");
- SQAISign.DefSQStaticMethod(engine, &AISign::SetName, "SetName", 3, ".is");
+ SQAISign.DefSQStaticMethod(engine, &AISign::SetName, "SetName", 3, ".i.");
SQAISign.DefSQStaticMethod(engine, &AISign::GetName, "GetName", 2, ".i");
SQAISign.DefSQStaticMethod(engine, &AISign::GetLocation, "GetLocation", 2, ".i");
- SQAISign.DefSQStaticMethod(engine, &AISign::BuildSign, "BuildSign", 3, ".is");
+ SQAISign.DefSQStaticMethod(engine, &AISign::BuildSign, "BuildSign", 3, ".i.");
SQAISign.DefSQStaticMethod(engine, &AISign::RemoveSign, "RemoveSign", 2, ".i");
SQAISign.PostRegister(engine);
diff --git a/src/ai/api/ai_vehicle.hpp.sq b/src/ai/api/ai_vehicle.hpp.sq
index 1782204f8..74a3cf023 100644
--- a/src/ai/api/ai_vehicle.hpp.sq
+++ b/src/ai/api/ai_vehicle.hpp.sq
@@ -102,7 +102,7 @@ void SQAIVehicle_Register(Squirrel *engine) {
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::IsValidVehicle, "IsValidVehicle", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetNumWagons, "GetNumWagons", 2, ".i");
- SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SetName, "SetName", 3, ".is");
+ SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::SetName, "SetName", 3, ".i.");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetName, "GetName", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetLocation, "GetLocation", 2, ".i");
SQAIVehicle.DefSQStaticMethod(engine, &AIVehicle::GetEngineType, "GetEngineType", 2, ".i");
diff --git a/src/ai/api/squirrel_export.awk b/src/ai/api/squirrel_export.awk
index 37b1cdfa1..b3b7b83ea 100644
--- a/src/ai/api/squirrel_export.awk
+++ b/src/ai/api/squirrel_export.awk
@@ -375,7 +375,7 @@ BEGIN {
sub("^[ ]*", "", params[len])
if (match(params[len], "\\*") || match(params[len], "&")) {
if (match(params[len], "^char")) {
- types = types "s"
+ types = types "."
} else if (match(params[len], "^void")) {
types = types "p"
} else if (match(params[len], "^Array")) {