extends Node2D
class_name Station


# --- Timery ---
var sname: String = "Stacja noName"


func _ready():
	var area = $Sprite2D/Area2D
	area.connect("input_event", Callable(self, "_on_area_input"))

func _on_area_input(viewport, event, shape_idx):
	if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
		var panel = get_tree().root.get_node("Galaxy/UI/StationPanel")
		panel.show_for_station(self)
