For this question, define a line $L$ in $\mathbb Z\oplus\mathbb Z$ as any subset of the form
$$L = L(u,v) = \{x = u + n v ∈ \mathbb Z\oplus\mathbb Z \mid n \in \mathbb Z\},$$
where $u \in\mathbb Z\oplus\mathbb Z$, and $v = (K,L) \in\mathbb Z \oplus\mathbb Z$ with $\gcd(K,L) = 1$, are otherwise arbitrary.
We are interested in the existence of an injective map $f : \mathbb Z\oplus\mathbb Z \to (0, 1) \cap \mathbb Q$ such that for any line $L$ in $\mathbb Z\oplus\mathbb Z$, the sum of $f(x)$ over all $x \in L$ is finite and independent of $L$. (So let's assume it is always equal to $1$.)
Call such an $f$ a "magic integer square". Does such an $f$ exist?
Even better if $f$ takes every value in $\mathbb Q \cap (0, 1)$.
(Note: I don't know if this would be considered "infinite combinatorics", but was unable to find a tag that seemed more appropriate.)
This question seems at least somewhat related to this one: Magic square on an infinite lattice.
Edit: Ilya Bogdanov's answeranswer points out that achieving $\mathbb Q \cap (0, 1)$ is clearly impossible. But what about achieving $\mathbb Q \cap (0, 1/2]$ ?
Edit: Now it does!