1
0

Removed obsoleted cWorld functions from the API:

GetClassStatic() (is used only internally by ManualBindings)
GetTime() (is replaced with GetWorldAge() and GetTimeOfDay()
This commit is contained in:
madmaxoft 2013-09-15 21:53:36 +02:00
parent 5d2d0fe109
commit 5514a6169f
3 changed files with 5 additions and 70 deletions

View File

@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
** Generated automatically by tolua++-1.0.92 on 09/15/13 21:24:51.
** Generated automatically by tolua++-1.0.92 on 09/15/13 21:52:06.
*/
#ifndef __cplusplus
@ -11006,62 +11006,6 @@ static int tolua_AllToLua_cServer_GetServerID00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetClassStatic of class cWorld */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetClassStatic00
static int tolua_AllToLua_cWorld_GetClassStatic00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"cWorld",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
{
const char* tolua_ret = (const char*) cWorld::GetClassStatic();
tolua_pushstring(tolua_S,(const char*)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetClassStatic'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetTime of class cWorld */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetTime00
static int tolua_AllToLua_cWorld_GetTime00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
if (
!tolua_isusertable(tolua_S,1,"cWorld",0,&tolua_err) ||
!tolua_isnoobj(tolua_S,2,&tolua_err)
)
goto tolua_lerror;
else
#endif
{
{
float tolua_ret = (float) cWorld::GetTime();
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
tolua_error(tolua_S,"#ferror in function 'GetTime'.",&tolua_err);
return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE
/* method: GetTicksUntilWeatherChange of class cWorld */
#ifndef TOLUA_DISABLE_tolua_AllToLua_cWorld_GetTicksUntilWeatherChange00
static int tolua_AllToLua_cWorld_GetTicksUntilWeatherChange00(lua_State* tolua_S)
@ -29900,8 +29844,6 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_endmodule(tolua_S);
tolua_cclass(tolua_S,"cWorld","cWorld","",NULL);
tolua_beginmodule(tolua_S,"cWorld");
tolua_function(tolua_S,"GetClassStatic",tolua_AllToLua_cWorld_GetClassStatic00);
tolua_function(tolua_S,"GetTime",tolua_AllToLua_cWorld_GetTime00);
tolua_function(tolua_S,"GetTicksUntilWeatherChange",tolua_AllToLua_cWorld_GetTicksUntilWeatherChange00);
tolua_function(tolua_S,"GetWorldAge",tolua_AllToLua_cWorld_GetWorldAge00);
tolua_function(tolua_S,"GetTimeOfDay",tolua_AllToLua_cWorld_GetTimeOfDay00);

View File

@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
** Generated automatically by tolua++-1.0.92 on 09/15/13 21:24:52.
** Generated automatically by tolua++-1.0.92 on 09/15/13 21:52:06.
*/
/* Exported function */

View File

@ -90,20 +90,13 @@ public:
} ;
// tolua_begin
static const char * GetClassStatic(void)
static const char * GetClassStatic(void) // Needed for ManualBindings's ForEach templates
{
return "cWorld";
}
/// Return time in seconds
inline static float GetTime(void)
{
LOGWARNING("cWorld:GetTime() is obsolete, use GetWorldAge() or GetTimeOfDay() for a specific world instead.");
return 0;
}
// tolua_begin
int GetTicksUntilWeatherChange(void) const { return m_WeatherInterval; }
Int64 GetWorldAge(void) const { return m_WorldAge; }
Int64 GetTimeOfDay(void) const { return m_TimeOfDay; }