31 lines
849 B
GDScript
31 lines
849 B
GDScript
extends Node
|
|
|
|
var player : Player = null
|
|
var panel : GamePanel = null
|
|
var quest_log : QuestLog = null
|
|
var active : bool = true
|
|
var end_shift_confirmation : ConfirmationDialog
|
|
var end_shift_confirm_template = preload("res://end_shift_confirmation.tscn")
|
|
func _ready() -> void:
|
|
end_shift_confirmation = end_shift_confirm_template.instantiate()
|
|
add_child(end_shift_confirmation)
|
|
|
|
func _process(delta: float) -> void:
|
|
if active and Input.is_action_just_pressed("switch modes"):
|
|
confirm_end_shift()
|
|
|
|
|
|
func add_quest_progress_bar(quest : Quest) -> void:
|
|
panel.add_quest_progress_bar(quest)
|
|
|
|
func confirm_end_shift() -> void:
|
|
end_shift_confirmation.popup_centered()
|
|
|
|
func setup_visitor_ui(spawner: VisitorSpawner)-> void:
|
|
if panel:
|
|
panel.connect_visitor_spawner(spawner)
|
|
|
|
func end_shift() -> void:
|
|
active = false
|
|
panel.switch_panel(active)
|