tool
extends TileMap

export var do_it = false

func please_do_it():
	var all_cells = get_used_cells()
	for coords in all_cells:
		var cell = get_cell(coords.x, coords.y)
		var target = 9
		if int(abs(coords.x)) % 2 == 1:
			target += 1
		if int(abs(coords.y)) % 2 == 1:
			target += 2
		if cell >= 9 and cell <= 12:
			print(str(coords.x) + " " + str(coords.y) + " " + str(target))
			set_cell(coords.x, coords.y, target)

func _process(_delta):
	if Engine.editor_hint:
		if do_it:
			please_do_it()
			do_it = false
			
