Ah ok, so You must have designed an iteration, that worked too fast, as it was based on time isntead of on action, like on move ?
I might have mentioned setget
funbctionality in your previous questions. It will allow You to mark a movement action when new tile is approached. Next, You will be able to use this mark to trigger actions and checks.
var tile : Vector2 setget newtile
func process():
self.tile = Tilemap.world_to_map(global_position)
func newtile(value)
if value != tile :
tile = value
checkcollisions()
This last function will trigger once per new move action on grid. Checkcollisions is just an example, You can also insert some signal there. Basically You want to check for collisions in this place of code and if there are mineral spots - take 1 energy and set tile to corresponding one. It will happen once.