summaryrefslogtreecommitdiff
path: root/src/script/api/ai
diff options
context:
space:
mode:
authorPeter Nelson <peter1138@openttd.org>2019-02-13 22:05:08 +0000
committerNiels Martin Hansen <nielsm@indvikleren.dk>2019-03-03 09:15:39 +0100
commite0c2ad1b6591859a1a30216e396cdab6e6bb028f (patch)
treeb8d65be4898bbb1e783be8f589a48b465c7745a9 /src/script/api/ai
parent3c047b124e28db45621de06d5556c96598352fc7 (diff)
downloadopenttd-e0c2ad1b6591859a1a30216e396cdab6e6bb028f.tar.xz
Add: AI functions to get/set company colours.
Diffstat (limited to 'src/script/api/ai')
-rw-r--r--src/script/api/ai/ai_company.hpp.sq65
1 files changed, 55 insertions, 10 deletions
diff --git a/src/script/api/ai/ai_company.hpp.sq b/src/script/api/ai/ai_company.hpp.sq
index 7ed55d97b..ecab99c91 100644
--- a/src/script/api/ai/ai_company.hpp.sq
+++ b/src/script/api/ai/ai_company.hpp.sq
@@ -21,16 +21,57 @@ void SQAICompany_Register(Squirrel *engine)
SQAICompany.PreRegister(engine);
SQAICompany.AddConstructor<void (ScriptCompany::*)(), 1>(engine, "x");
- SQAICompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER");
- SQAICompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER");
- SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST");
- SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST");
- SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID");
- SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF");
- SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR");
- SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE");
- SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE");
- SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID");
+ SQAICompany.DefSQConst(engine, ScriptCompany::CURRENT_QUARTER, "CURRENT_QUARTER");
+ SQAICompany.DefSQConst(engine, ScriptCompany::EARLIEST_QUARTER, "EARLIEST_QUARTER");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_FIRST, "COMPANY_FIRST");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_LAST, "COMPANY_LAST");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_INVALID, "COMPANY_INVALID");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SELF, "COMPANY_SELF");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COMPANY_SPECTATOR, "COMPANY_SPECTATOR");
+ SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_MALE, "GENDER_MALE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_FEMALE, "GENDER_FEMALE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::GENDER_INVALID, "GENDER_INVALID");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_DEFAULT, "LS_DEFAULT");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_STEAM, "LS_STEAM");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_DIESEL, "LS_DIESEL");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_ELECTRIC, "LS_ELECTRIC");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_MONORAIL, "LS_MONORAIL");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_MAGLEV, "LS_MAGLEV");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_DMU, "LS_DMU");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_EMU, "LS_EMU");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_STEAM, "LS_PASSENGER_WAGON_STEAM");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_DIESEL, "LS_PASSENGER_WAGON_DIESEL");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_ELECTRIC, "LS_PASSENGER_WAGON_ELECTRIC");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MONORAIL, "LS_PASSENGER_WAGON_MONORAIL");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_WAGON_MAGLEV, "LS_PASSENGER_WAGON_MAGLEV");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_WAGON, "LS_FREIGHT_WAGON");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_BUS, "LS_BUS");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_TRUCK, "LS_TRUCK");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_SHIP, "LS_PASSENGER_SHIP");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_SHIP, "LS_FREIGHT_SHIP");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_HELICOPTER, "LS_HELICOPTER");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_SMALL_PLANE, "LS_SMALL_PLANE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_LARGE_PLANE, "LS_LARGE_PLANE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_PASSENGER_TRAM, "LS_PASSENGER_TRAM");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_FREIGHT_TRAM, "LS_FREIGHT_TRAM");
+ SQAICompany.DefSQConst(engine, ScriptCompany::LS_INVALID, "LS_INVALID");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_BLUE, "COLOUR_DARK_BLUE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PALE_GREEN, "COLOUR_PALE_GREEN");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PINK, "COLOUR_PINK");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_YELLOW, "COLOUR_YELLOW");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_RED, "COLOUR_RED");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_LIGHT_BLUE, "COLOUR_LIGHT_BLUE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_GREEN, "COLOUR_GREEN");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_DARK_GREEN, "COLOUR_DARK_GREEN");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_BLUE, "COLOUR_BLUE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_CREAM, "COLOUR_CREAM");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_MAUVE, "COLOUR_MAUVE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_PURPLE, "COLOUR_PURPLE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_ORANGE, "COLOUR_ORANGE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_BROWN, "COLOUR_BROWN");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_GREY, "COLOUR_GREY");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_WHITE, "COLOUR_WHITE");
+ SQAICompany.DefSQConst(engine, ScriptCompany::COLOUR_INVALID, "COLOUR_INVALID");
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::ResolveCompanyID, "ResolveCompanyID", 2, ".i");
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::IsMine, "IsMine", 2, ".i");
@@ -59,6 +100,10 @@ void SQAICompany_Register(Squirrel *engine)
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMonths, "GetAutoRenewMonths", 2, ".i");
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetAutoRenewMoney, "SetAutoRenewMoney", 2, ".i");
SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetAutoRenewMoney, "GetAutoRenewMoney", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetPrimaryLiveryColour, "SetPrimaryLiveryColour", 3, ".ii");
+ SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::SetSecondaryLiveryColour, "SetSecondaryLiveryColour", 3, ".ii");
+ SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetPrimaryLiveryColour, "GetPrimaryLiveryColour", 2, ".i");
+ SQAICompany.DefSQStaticMethod(engine, &ScriptCompany::GetSecondaryLiveryColour, "GetSecondaryLiveryColour", 2, ".i");
SQAICompany.PostRegister(engine);
}