Saving autotile coords

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By thadiusII

In my game, you can place different rotations/varieties of an object (houses rotated at different angles, different flower/tree types, etc) which is done by changing the autotile coord of the atlas. I am saving all of this in a dictionary and then during loading I use for loops to place the tiles and then use update_bitmask_region(). However, this doesn’t keep the atlas autotile coords. Here’s the dictionary for reference:

var data = {
	"Houses" : buildings.get_used_cells_by_id(0),
	"Roads" : buildings.get_used_cells_by_id(1),
	"Crosses" : buildings.get_used_cells_by_id(2),
	"Sidewalks" : buildings.get_used_cells_by_id(3),
	"Trees" : buildings.get_used_cells_by_id(4),
	"Directions" : buildings.get_cell_autotile_coord(buildings.get_used_cells().x, buildings.get_used_cells().y),
}

Also the attempted for loop for “Directions”:

for tile in playerData.Directions:
			buildings.set_cell(tile.x, tile.y, tile, false, false, false, playerData.Directions)
			buildings.update_bitmask_region()

(Buildings is the tilemap)
Directions is what is supposed to save the coords. The code for it definitely isn’t correct though. I’ve tried a few different things but this is what I keep coming back to. All this to say, how should I be approaching this? Again the goal is to save the autotile coord of all used tiles and then correctly place them.

I’m pretty stumped at this point so any help is appreciated.