Revert "Empty"

This reverts commit b98fdd0f29.
This commit is contained in:
2025-05-01 19:08:20 -05:00
parent b98fdd0f29
commit dd5ba6f414
137 changed files with 2021 additions and 0 deletions
@@ -0,0 +1,8 @@
class_name QuestObjective
var name:String
func _init(
name:String
):
self.name = name;
@@ -0,0 +1 @@
uid://bakmt6ufpq33o
+36
View File
@@ -0,0 +1,36 @@
class_name Quest
const QuestObjective = preload("res://scripts/Quest/Objective/QuestObjective.gd");
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];
+1
View File
@@ -0,0 +1 @@
uid://kuxak18kbjr5
+6
View File
@@ -0,0 +1,6 @@
class_name QuestExample extends "res://scripts/Quest/Quest.gd"
func _init() -> void:
super("Example Quest", [
QuestObjective.new("Test")
]);
+1
View File
@@ -0,0 +1 @@
uid://cg3piglr8rbfs