Add quest objectives to quest menu

This commit is contained in:
2025-05-07 11:49:52 -05:00
parent 55081f777a
commit cf149e676c
11 changed files with 132 additions and 30 deletions

View File

@@ -2,3 +2,26 @@ class_name Quest extends Node
@export var questName:String = "Some quest"
@export var questKey:QuestSystem.QuestKey = QuestSystem.QuestKey.TEST_QUEST
var questStarted:bool = false
var questComplete:bool = false
var objectives:Array[QuestObjective]
func _ready() -> void:
objectives = []
for child in get_children():
if child is QuestObjective:
objectives.append(child)
func start() -> void:
questStarted = true
questComplete = false
QUEST.questStarted.emit(questKey)
QUEST.questUpdated.emit(questKey)
func isCompleted() -> bool:
return questComplete
func isStarted() -> bool:
return questStarted