From 0b2fa7ab6e2e9649c6c3dcc0386baa7645a54bc9 Mon Sep 17 00:00:00 2001 From: Emmanouil Papadeas <35376950+OverloadedOrama@users.noreply.github.com> Date: Fri, 29 Nov 2024 01:08:46 +0200 Subject: [PATCH] Draw tiles on all selected draw cels Not working properly yet --- src/Tools/BaseDraw.gd | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Tools/BaseDraw.gd b/src/Tools/BaseDraw.gd index fb14fa909..21cd49057 100644 --- a/src/Tools/BaseDraw.gd +++ b/src/Tools/BaseDraw.gd @@ -321,12 +321,12 @@ func draw_end(pos: Vector2i) -> void: func draw_tile(pos: Vector2i, tile_index: int) -> void: - if Global.current_project.get_current_cel() is not CelTileMap: - return - pos = Global.current_project.tiles.get_canon_position(pos) - var tile_position := get_cell_position(pos) - var cel := Global.current_project.get_current_cel() as CelTileMap - cel.set_index(tile_position, tile_index) + for cel in _get_selected_draw_cels(): + if cel is not CelTileMap: + return + pos = Global.current_project.tiles.get_canon_position(pos) + var tile_position := get_cell_position(pos) + (cel as CelTileMap).set_index(tile_position, tile_index) func _prepare_tool() -> void: