Fixes #4547

Fixes #4547.
Ensures that one can only paint pipes within range and that there is no blocking floor tile.