Page 1 of 1

Add option to surface.get_connected_tiles(position, tiles)

Posted: Fri Aug 09, 2019 1:31 am
by TheFunnySide
surface.get_connected_tiles(position, tiles)

position :: Position: The tile position to start at.
tiles :: array of string: The tiles to search for.

new option : collision_mask (instead of tiles)
Edit: new option : radius (only consider tiles within the radius of given position)
Edit: new option : area (only consider tiles within the area )
Edit: new option : no_entities_on_tile(only consider tiles which are empty)

I think this function is mostly used to flood fill. And it would be easier and more efficent to just specifiy {"ground-tile"} instead of all possible tiles.