summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-05-26 14:16:12 +0000
committerfrosch <frosch@openttd.org>2012-05-26 14:16:12 +0000
commit5187c2b721f81a16fb5526df75df79e3994a855f (patch)
tree206a27d2e4db8b152248bf27307bd26f8bdd58a2
parent01100053ff5308e0a07b1faa449255527cc12c31 (diff)
downloadopenttd-5187c2b721f81a16fb5526df75df79e3994a855f.tar.xz
(svn r24286) -Add: [GS] Some more GSNews::NewsItem::NewsTypes.
-rw-r--r--src/script/api/game/game_news.hpp.sq10
-rw-r--r--src/script/api/game_changelog.hpp1
-rw-r--r--src/script/api/script_news.hpp5
3 files changed, 13 insertions, 3 deletions
diff --git a/src/script/api/game/game_news.hpp.sq b/src/script/api/game/game_news.hpp.sq
index 16f187204..70416f6b7 100644
--- a/src/script/api/game/game_news.hpp.sq
+++ b/src/script/api/game/game_news.hpp.sq
@@ -21,9 +21,13 @@ void SQGSNews_Register(Squirrel *engine)
SQGSNews.PreRegister(engine);
SQGSNews.AddConstructor<void (ScriptNews::*)(), 1>(engine, "x");
- SQGSNews.DefSQConst(engine, ScriptNews::NT_ECONOMY, "NT_ECONOMY");
- SQGSNews.DefSQConst(engine, ScriptNews::NT_SUBSIDIES, "NT_SUBSIDIES");
- SQGSNews.DefSQConst(engine, ScriptNews::NT_GENERAL, "NT_GENERAL");
+ SQGSNews.DefSQConst(engine, ScriptNews::NT_ACCIDENT, "NT_ACCIDENT");
+ SQGSNews.DefSQConst(engine, ScriptNews::NT_COMPANY_INFO, "NT_COMPANY_INFO");
+ SQGSNews.DefSQConst(engine, ScriptNews::NT_ECONOMY, "NT_ECONOMY");
+ SQGSNews.DefSQConst(engine, ScriptNews::NT_ADVICE, "NT_ADVICE");
+ SQGSNews.DefSQConst(engine, ScriptNews::NT_ACCEPTANCE, "NT_ACCEPTANCE");
+ SQGSNews.DefSQConst(engine, ScriptNews::NT_SUBSIDIES, "NT_SUBSIDIES");
+ SQGSNews.DefSQConst(engine, ScriptNews::NT_GENERAL, "NT_GENERAL");
SQGSNews.DefSQStaticMethod(engine, &ScriptNews::Create, "Create", 4, ".i.i");
diff --git a/src/script/api/game_changelog.hpp b/src/script/api/game_changelog.hpp
index 19279c8e5..ab6678c49 100644
--- a/src/script/api/game_changelog.hpp
+++ b/src/script/api/game_changelog.hpp
@@ -20,6 +20,7 @@
* 1.3.0 is not yet released. The following changes are not set in stone yet.
*
* API additions:
+ * \li GSNews::NT_ACCIDENT, GSNews::NT_COMPANY_INFO, GSNews::NT_ADVICE, GSNews::NT_ACCEPTANCE
* \li GSStation::IsAirportClosed
* \li GSStation::OpenCloseAirport
*
diff --git a/src/script/api/script_news.hpp b/src/script/api/script_news.hpp
index 0867b91fe..8defa3a85 100644
--- a/src/script/api/script_news.hpp
+++ b/src/script/api/script_news.hpp
@@ -25,7 +25,12 @@ public:
* Enumeration for the news types that a script can create news for.
*/
enum NewsType {
+ /* Arbitrary selection of NewsTypes which might make sense for scripts */
+ NT_ACCIDENT = ::NT_ACCIDENT, ///< Category accidents.
+ NT_COMPANY_INFO = ::NT_COMPANY_INFO, ///< Category company info.
NT_ECONOMY = ::NT_ECONOMY, ///< Category economy.
+ NT_ADVICE = ::NT_ADVICE, ///< Category vehicle advice.
+ NT_ACCEPTANCE = ::NT_ACCEPTANCE, ///< Category acceptance changes.
NT_SUBSIDIES = ::NT_SUBSIDIES, ///< Category subsidies.
NT_GENERAL = ::NT_GENERAL, ///< Category general.
};