summaryrefslogtreecommitdiffstats
path: root/source/Bindings.cpp
diff options
context:
space:
mode:
authorDaniel O'Brien <marmot.daniel@gmail.com>2013-11-16 12:00:45 +0100
committerDaniel O'Brien <marmot.daniel@gmail.com>2013-11-16 12:00:45 +0100
commitb72ced31649f8a851ffe60778e8a603bda941dc9 (patch)
treec5302f550182f4b0e67c5e72efe851116984d0ca /source/Bindings.cpp
parentfixed bug and added SpendExperience() (diff)
downloadcuberite-b72ced31649f8a851ffe60778e8a603bda941dc9.tar
cuberite-b72ced31649f8a851ffe60778e8a603bda941dc9.tar.gz
cuberite-b72ced31649f8a851ffe60778e8a603bda941dc9.tar.bz2
cuberite-b72ced31649f8a851ffe60778e8a603bda941dc9.tar.lz
cuberite-b72ced31649f8a851ffe60778e8a603bda941dc9.tar.xz
cuberite-b72ced31649f8a851ffe60778e8a603bda941dc9.tar.zst
cuberite-b72ced31649f8a851ffe60778e8a603bda941dc9.zip
Diffstat (limited to 'source/Bindings.cpp')
-rw-r--r--source/Bindings.cpp51
1 files changed, 8 insertions, 43 deletions
diff --git a/source/Bindings.cpp b/source/Bindings.cpp
index a03ee37e0..9fdd28383 100644
--- a/source/Bindings.cpp
+++ b/source/Bindings.cpp
@@ -1,6 +1,6 @@
/*
** Lua binding: AllToLua
-** Generated automatically by tolua++-1.0.92 on 11/16/13 21:19:32.
+** Generated automatically by tolua++-1.0.92 on 11/16/13 21:58:48.
*/
#ifndef __cplusplus
@@ -7684,9 +7684,9 @@ static int tolua_AllToLua_cPlayer_SetCurrentExperience00(lua_State* tolua_S)
}
#endif //#ifndef TOLUA_DISABLE
-/* method: AddExperience of class cPlayer */
-#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_AddExperience00
-static int tolua_AllToLua_cPlayer_AddExperience00(lua_State* tolua_S)
+/* method: DeltaExperience of class cPlayer */
+#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_DeltaExperience00
+static int tolua_AllToLua_cPlayer_DeltaExperience00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
tolua_Error tolua_err;
@@ -7702,51 +7702,17 @@ static int tolua_AllToLua_cPlayer_AddExperience00(lua_State* tolua_S)
cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0);
short a_Xp_delta = ((short) tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'AddExperience'", NULL);
+ if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DeltaExperience'", NULL);
#endif
{
- short tolua_ret = (short) self->AddExperience(a_Xp_delta);
+ short tolua_ret = (short) self->DeltaExperience(a_Xp_delta);
tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
}
}
return 1;
#ifndef TOLUA_RELEASE
tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'AddExperience'.",&tolua_err);
- return 0;
-#endif
-}
-#endif //#ifndef TOLUA_DISABLE
-
-/* method: SpendExperience of class cPlayer */
-#ifndef TOLUA_DISABLE_tolua_AllToLua_cPlayer_SpendExperience00
-static int tolua_AllToLua_cPlayer_SpendExperience00(lua_State* tolua_S)
-{
-#ifndef TOLUA_RELEASE
- tolua_Error tolua_err;
- if (
- !tolua_isusertype(tolua_S,1,"cPlayer",0,&tolua_err) ||
- !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
- !tolua_isnoobj(tolua_S,3,&tolua_err)
- )
- goto tolua_lerror;
- else
-#endif
- {
- cPlayer* self = (cPlayer*) tolua_tousertype(tolua_S,1,0);
- short a_Xp_delta = ((short) tolua_tonumber(tolua_S,2,0));
-#ifndef TOLUA_RELEASE
- if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SpendExperience'", NULL);
-#endif
- {
- short tolua_ret = (short) self->SpendExperience(a_Xp_delta);
- tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
- }
- }
- return 1;
-#ifndef TOLUA_RELEASE
- tolua_lerror:
- tolua_error(tolua_S,"#ferror in function 'SpendExperience'.",&tolua_err);
+ tolua_error(tolua_S,"#ferror in function 'DeltaExperience'.",&tolua_err);
return 0;
#endif
}
@@ -30485,8 +30451,7 @@ TOLUA_API int tolua_AllToLua_open (lua_State* tolua_S)
tolua_constant(tolua_S,"DROWNING_TICKS",cPlayer::DROWNING_TICKS);
tolua_constant(tolua_S,"MIN_EXPERIENCE",cPlayer::MIN_EXPERIENCE);
tolua_function(tolua_S,"SetCurrentExperience",tolua_AllToLua_cPlayer_SetCurrentExperience00);
- tolua_function(tolua_S,"AddExperience",tolua_AllToLua_cPlayer_AddExperience00);
- tolua_function(tolua_S,"SpendExperience",tolua_AllToLua_cPlayer_SpendExperience00);
+ tolua_function(tolua_S,"DeltaExperience",tolua_AllToLua_cPlayer_DeltaExperience00);
tolua_function(tolua_S,"GetXpLifetimeTotal",tolua_AllToLua_cPlayer_GetXpLifetimeTotal00);
tolua_function(tolua_S,"GetCurrentXp",tolua_AllToLua_cPlayer_GetCurrentXp00);
tolua_function(tolua_S,"GetXpLevel",tolua_AllToLua_cPlayer_GetXpLevel00);