summaryrefslogtreecommitdiffstats
path: root/map.gd
diff options
context:
space:
mode:
Diffstat (limited to 'map.gd')
-rw-r--r--map.gd14
1 files changed, 3 insertions, 11 deletions
diff --git a/map.gd b/map.gd
index 42a5c29..4f39972 100644
--- a/map.gd
+++ b/map.gd
@@ -4,23 +4,15 @@ extends CanvasLayer
@onready var top: Top = get_tree().root.get_node("Top")
var active_map_room: MapRoom
-@export var inactive_color: Color
-@export var active_color: Color
-
func _ready():
hide_map()
func set_active_name(map_room_name: String):
- if active_map_room:
- active_map_room.color = inactive_color
+ if active_map_room: active_map_room.unhighlight()
- if has_node(map_room_name):
- active_map_room = get_node(map_room_name)
- else:
- active_map_room = null
+ active_map_room = get_node_or_null(map_room_name)
- if active_map_room:
- active_map_room.color = active_color
+ if active_map_room: active_map_room.highlight()
func show_map():
visible = true