summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-10 23:25:26 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2013-04-10 23:25:26 +0200
commit1fbc77f9ed44bd86be9445624d78ac9a99535e59 (patch)
treecbcef0c5c9e119bf05021044b14301d0ad97d6aa
parentItemGrid: Renamed all Item to Slot - better and consistent naming (diff)
downloadcuberite-1fbc77f9ed44bd86be9445624d78ac9a99535e59.tar
cuberite-1fbc77f9ed44bd86be9445624d78ac9a99535e59.tar.gz
cuberite-1fbc77f9ed44bd86be9445624d78ac9a99535e59.tar.bz2
cuberite-1fbc77f9ed44bd86be9445624d78ac9a99535e59.tar.lz
cuberite-1fbc77f9ed44bd86be9445624d78ac9a99535e59.tar.xz
cuberite-1fbc77f9ed44bd86be9445624d78ac9a99535e59.tar.zst
cuberite-1fbc77f9ed44bd86be9445624d78ac9a99535e59.zip
-rw-r--r--source/ManualBindings.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/source/ManualBindings.cpp b/source/ManualBindings.cpp
index bf8776457..1c14f6fce 100644
--- a/source/ManualBindings.cpp
+++ b/source/ManualBindings.cpp
@@ -1111,18 +1111,20 @@ static int Lua_ItemGrid_GetSlotCoords(lua_State * L)
goto tolua_lerror;
}
- const cItemGrid * self = (const cItemGrid *)tolua_tousertype(L, 1, 0);
- int SlotNum = (int)tolua_tonumber(L, 2, 0);
- if (self == NULL)
{
- tolua_error(L, "invalid 'self' in function 'cItemGrid:GetSlotCoords'", NULL);
- return 0;
+ const cItemGrid * self = (const cItemGrid *)tolua_tousertype(L, 1, 0);
+ int SlotNum = (int)tolua_tonumber(L, 2, 0);
+ if (self == NULL)
+ {
+ tolua_error(L, "invalid 'self' in function 'cItemGrid:GetSlotCoords'", NULL);
+ return 0;
+ }
+ int X, Y;
+ self->GetSlotCoords(SlotNum, X, Y);
+ tolua_pushnumber(L, (lua_Number)X);
+ tolua_pushnumber(L, (lua_Number)Y);
+ return 2;
}
- int X, Y;
- self->GetSlotCoords(SlotNum, X, Y);
- tolua_pushnumber(L, (lua_Number)X);
- tolua_pushnumber(L, (lua_Number)Y);
- return 2;
tolua_lerror:
tolua_error(L, "#ferror in function 'FindKey'.", &tolua_err);