lua/wrappers/game/lua_item.cpp
/**
	 * Sets size of the inventory size in inventory units.
	 *
	 * @param integer width The width in inventory units.
	 * @param integer height The height in inventory units.
	 * @returns am.item This
	 */
Sets size of the inventory size in inventory units.
@param integer width The width in inventory units.
@param integer height The height in inventory units.
Sets size of the inventory size in inventory units . @param integer width The width in inventory units . @param integer height The height in inventory units .
int Item_inventory_size(lua_State *lua)
	{
		Item *item = castUData<Item>(lua, 1);
		if (item)
		{
			if (lua_gettop(lua) == 1)
			{
				lua_pushinteger(lua, item->getInventorySizeX());
				lua_pushinteger(lua, item->getInventorySizeY());
				return 2;
			}
			else if (lua_isnum(lua, 2) && lua_isnum(lua, 3))
			{
				short width = static_cast<short>(lua_tointeger(lua, 2));
				short height = static_cast<short>(lua_tointeger(lua, 3));
				item->setInventorySize(width, height);
				lua_first(lua);
			}
			return LuaState::expectedArgs(lua, "inventory_size", "integer width, integer height");
		}
		return LuaState::expectedContext(lua, "inventory_size", "am.item");
	}
int Item_inventory_size ( lua_State * lua ) { Item * item = castUData < Item > ( lua , 1 ) ; if ( item ) { if ( lua_gettop ( lua ) == 1 ) { lua_pushinteger ( lua , item -> getInventorySizeX ( ) ) ; lua_pushinteger ( lua , item -> getInventorySizeY ( ) ) ; return 2 ; } else if ( lua_isnum ( lua , 2 ) && lua_isnum ( lua , 3 ) ) { short width = static_cast < short > ( lua_tointeger ( lua , 2 ) ) ; short height = static_cast < short > ( lua_tointeger ( lua , 3 ) ) ; item -> setInventorySize ( width , height ) ; lua_first ( lua ) ; } return LuaState :: expectedArgs ( lua , " " , " " ) ; } return LuaState :: expectedContext ( lua , " " , " " ) ; }
Sets size of the inventory size in inventory units.
Sets size of the inventory size in inventory units .