From ab69c6c2a0ba9ab36db4a20c0e6db2ea404746bf Mon Sep 17 00:00:00 2001 From: zuu Date: Sat, 21 Sep 2013 13:07:42 +0000 Subject: (svn r25788) -Feature: [Script] Game Scripts can now charge fees and give money to companies --- src/script/api/template/template_company.hpp.sq | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/script/api/template') 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(HSQUIRRELVM vm, ScriptCompany::CompanyID res) { sq_pushinteger(vm, (int32)res); return 1; } template <> inline ScriptCompany::Gender GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::Gender)tmp; } template <> inline int Return(HSQUIRRELVM vm, ScriptCompany::Gender res) { sq_pushinteger(vm, (int32)res); return 1; } + template <> inline ScriptCompany::ExpensesType GetParam(ForceType, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (ScriptCompany::ExpensesType)tmp; } + template <> inline int Return(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, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (ScriptCompany *)instance; } -- cgit v1.2.3-70-g09d2