summaryrefslogtreecommitdiff
path: root/src/script/api/template/template_news.hpp.sq
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2015-02-22 17:25:29 +0000
committeralberth <alberth@openttd.org>2015-02-22 17:25:29 +0000
commit0143f486f29d1e72082bcb3ac6c1d16c695b09af (patch)
tree7d8a4e4f144a78a36a597cfd8770562b2e9017b9 /src/script/api/template/template_news.hpp.sq
parentc639fb0d8eb0371a95c39027a986636f1ca8f764 (diff)
downloadopenttd-0143f486f29d1e72082bcb3ac6c1d16c695b09af.tar.xz
(svn r27164) -Add: [NoGo] Game scripts can point to a location, station, industry, or town when publishing news.
Diffstat (limited to 'src/script/api/template/template_news.hpp.sq')
-rw-r--r--src/script/api/template/template_news.hpp.sq2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/api/template/template_news.hpp.sq b/src/script/api/template/template_news.hpp.sq
index f0a09bb49..445a055e1 100644
--- a/src/script/api/template/template_news.hpp.sq
+++ b/src/script/api/template/template_news.hpp.sq
@@ -15,6 +15,8 @@ namespace SQConvert {
/* Allow enums to be used as Squirrel parameters */
template <> inline ScriptNews::NewsType GetParam(ForceType<ScriptNews::NewsType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptNews::NewsType)tmp; }
template <> inline int Return<ScriptNews::NewsType>(HSQUIRRELVM vm, ScriptNews::NewsType res) { sq_pushinteger(vm, (int32)res); return 1; }
+ template <> inline ScriptNews::NewsReferenceType GetParam(ForceType<ScriptNews::NewsReferenceType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptNews::NewsReferenceType)tmp; }
+ template <> inline int Return<ScriptNews::NewsReferenceType>(HSQUIRRELVM vm, ScriptNews::NewsReferenceType res) { sq_pushinteger(vm, (int32)res); return 1; }
/* Allow ScriptNews to be used as Squirrel parameter */
template <> inline ScriptNews *GetParam(ForceType<ScriptNews *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptNews *)instance; }