Bit more cleanup

This commit is contained in:
2025-05-06 18:11:37 -05:00
parent 0dfb9743f6
commit 12746a520e
61 changed files with 148 additions and 622 deletions

View File

@@ -1,36 +1,3 @@
class_name Quest
const QuestObjective = preload("res://scripts/Quest/Objective/QuestObjective.gd");
class_name Quest extends Node
enum QuestState {
NOT_STARTED,
ACTIVE,
INACTIVE,
FINISHED
};
var questName:String;
var questState:QuestState = QuestState.NOT_STARTED;
var objectives:Array[QuestObjective] = [];
var currentObjective = -1;
func _init(
questName:String,
objectives:Array[QuestObjective]
) -> void:
self.questName = questName;
self.objectives = objectives;
func getState() -> QuestState:
return questState;
func start():
print("Starting quest: " + questName);
questState = QuestState.ACTIVE;
currentObjective = 0;
func nextObjective():
currentObjective = currentObjective + 1;
if currentObjective >= objectives.size():
questState = QuestState.FINISHED;
return null;
return objectives[currentObjective];
@export var questName:String = "Some quest"