diff options
author | zuu <zuu@openttd.org> | 2013-09-21 13:07:42 +0000 |
---|---|---|
committer | zuu <zuu@openttd.org> | 2013-09-21 13:07:42 +0000 |
commit | ab69c6c2a0ba9ab36db4a20c0e6db2ea404746bf (patch) | |
tree | cadbe91c284755b63ace0e8a146bdbbb48cb2fdc /src/script/api/template | |
parent | 01dea4ec37e79b2db08bbeb99727592b01eeb492 (diff) | |
download | openttd-ab69c6c2a0ba9ab36db4a20c0e6db2ea404746bf.tar.xz |
(svn r25788) -Feature: [Script] Game Scripts can now charge fees and give money to companies
Diffstat (limited to 'src/script/api/template')
-rw-r--r-- | src/script/api/template/template_company.hpp.sq | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/script/api/template/template_company.hpp.sq b/src/script/api/template/template_company.hpp.sq index 5668e893e..7dc63f24b 100644 --- a/src/script/api/template/template_company.hpp.sq +++ b/src/script/api/template/template_company.hpp.sq @@ -19,6 +19,8 @@ namespace SQConvert { template <> inline int Return<ScriptCompany::CompanyID>(HSQUIRRELVM vm, ScriptCompany::CompanyID res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptCompany::Gender GetParam(ForceType<ScriptCompany::Gender>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::Gender)tmp; } template <> inline int Return<ScriptCompany::Gender>(HSQUIRRELVM vm, ScriptCompany::Gender res) { sq_pushinteger(vm, (int32)res); return 1; } + template <> inline ScriptCompany::ExpensesType GetParam(ForceType<ScriptCompany::ExpensesType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::ExpensesType)tmp; } + template <> inline int Return<ScriptCompany::ExpensesType>(HSQUIRRELVM vm, ScriptCompany::ExpensesType res) { sq_pushinteger(vm, (int32)res); return 1; } /* Allow ScriptCompany to be used as Squirrel parameter */ template <> inline ScriptCompany *GetParam(ForceType<ScriptCompany *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompany *)instance; } |