extends Node2D @onready var camera: Camera = get_viewport().get_camera_2d() func _ready() -> void: camera.zoomed.connect(func(_zoom): queue_redraw() ) func _draw(): var area = Client.current_stage.map.get_used_rect() var cell_size = Client.current_stage.map.tile_set.tile_size var offset = area.position for row in range(0, area.size.y + 1): draw_line( Vector2(offset.x * cell_size.x, offset.y * cell_size.y + row * cell_size.y), Vector2(offset.x * cell_size.x + area.size.x * cell_size.x, offset.y * cell_size.y + row * cell_size.y), Color(1, 1, 1, 0.25), 1.0 / camera.zoom.x ) for column in range(0, area.size.x + 1): draw_line( Vector2(offset.x * cell_size.x + column * cell_size.x, offset.y * cell_size.y), Vector2(offset.x * cell_size.x + column * cell_size.x, offset.y * cell_size.y + area.size.y * cell_size.y), Color(1, 1, 1, 0.25), 1.0 / camera.zoom.x )