Restructured files and worked on more complex quest progression

This commit is contained in:
2025-08-11 02:16:39 -04:00
parent 434216ca29
commit 95a7db036b
47 changed files with 475 additions and 53 deletions

View File

@@ -0,0 +1,45 @@
extends Window
@onready var nameLabel : Label = %NameLabel
@onready var difficultyLabel : Label = %DifficultyLabel
@onready var locationLabel : Label = %LocationLabel
@onready var advRewardList : GridContainer = %AdventurerRewardList
@onready var guildRewardList : GridContainer = %GuildRewardList
var quest : Quest
func setup(qst : Quest) -> void:
quest = qst
quest.status_changed.connect(_on_quest_changed)
update()
#TODO: Show quest rewards
func update() -> void:
nameLabel.text = quest.name
difficultyLabel.text = quest.difficulty_name()
locationLabel.text = quest.location
#TODO: Show the current status of the quest
func close() -> void:
hide()
queue_free()
func _on_quest_changed(status : Quest.Status) -> void:
if status == Quest.Status.CLOSED:
close()
else:
update()
func _on_remove_quest_confirm() -> void:
Guild.remove_quest(quest)
close()
func _on_remove_quest_cancel() -> void:
%ConfirmDialog.hide()
func _on_remove_button_pressed() -> void:
pass
func _on_back_button_pressed() -> void:
close()