Add quest objectives to quest menu
This commit is contained in:
@@ -2,16 +2,18 @@ class_name EventShowQuest extends "res://scripts/Event/Event.gd"
|
||||
|
||||
@export var quest:QuestSystem.QuestKey = QuestSystem.QuestKey.TEST_QUEST
|
||||
@export var waitUntilClosed:bool = true
|
||||
@export var showQuest:bool = true
|
||||
|
||||
func start():
|
||||
UI.QUEST_MENU.open(quest)
|
||||
if showQuest:
|
||||
UI.QUEST_MENU.open(quest)
|
||||
pass
|
||||
|
||||
func isDone() -> bool:
|
||||
if !super.isDone():
|
||||
return false
|
||||
|
||||
if waitUntilClosed:
|
||||
if waitUntilClosed and showQuest:
|
||||
return !UI.QUEST_MENU.isOpen()
|
||||
|
||||
return true
|
||||
|
6
scripts/Event/Quest/EventStartQuest.gd
Normal file
6
scripts/Event/Quest/EventStartQuest.gd
Normal file
@@ -0,0 +1,6 @@
|
||||
class_name EventStartQuest extends "res://scripts/Event/Quest/EventShowQuest.gd"
|
||||
|
||||
func start():
|
||||
assert(QUEST.quests.has(quest), "Quest not found.")
|
||||
QUEST.quests[quest].start()
|
||||
super.start()
|
1
scripts/Event/Quest/EventStartQuest.gd.uid
Normal file
1
scripts/Event/Quest/EventStartQuest.gd.uid
Normal file
@@ -0,0 +1 @@
|
||||
uid://c4d7nithqnx5y
|
Reference in New Issue
Block a user