If you have a tile down such as a stone-brick and place a concrete ghost
over it, an exception will be thrown because calling player.mine_tile
invalidates the ghost. This causes the original tile to be removed
(mined) and the ghost to be cleared but the new tile is not placed and
the item isn't returned to inventory. Instead, we allow the mining to
be attempted and then check if the ghost is still valid. Finally, if the
tile was mined, we have to manually set the tile since we can't revive
the ghost.
If you have a tile down such as a stone-brick and place a concrete ghost over it, an exception will be thrown because calling player.mine_tile invalidates the ghost. This causes the original tile to be removed (mined) and the ghost to be cleared but the new tile is not placed and the item isn't returned to inventory. Instead, we allow the mining to be attempted and then check if the ghost is still valid. Finally, if the tile was mined, we have to manually set the tile since we can't revive the ghost.