added some new lua methods to determine day or night and new event

This commit is contained in:
Mark Vejvoda
2013-05-25 20:46:36 +00:00
parent de68fc759d
commit aa69a5818b
7 changed files with 132 additions and 8 deletions

View File

@@ -100,6 +100,7 @@ public:
int getReturnCount() const {return returnCount;}
void returnInt(int value);
void returnFloat(float value);
void returnString(const string &value);
void returnVec2i(const Vec2i &value);
void returnVec4i(const Vec4i &value);

View File

@@ -930,6 +930,13 @@ void LuaArguments::returnInt(int value){
lua_pushinteger(luaState, value);
}
void LuaArguments::returnFloat(float value){
Lua_STREFLOP_Wrapper streflopWrapper;
++returnCount;
lua_pushnumber(luaState, value);
}
void LuaArguments::returnString(const string &value){
Lua_STREFLOP_Wrapper streflopWrapper;