More work on quests

This commit is contained in:
2025-11-19 14:42:59 -05:00
parent 379fa4bd70
commit 4ed4ab95f3
36 changed files with 3911 additions and 75 deletions

View File

@@ -2,21 +2,23 @@ extends Control
var quest : Quest
var selected_location : Quest.Locations = -1
var min_difficulty : int = 0
var max_difficulty : int = 5
@onready var map : QuestMap = $Map
func generate_quest() -> void:
quest = Quest.new()
quest.name = "A Test Quest"
quest.location = Quest.Locations.NESTORS_WOODS
quest.difficulty = 1
quest.length = 60
quest.rewards = {"exp":100,"gold":1}
quest = Quest.generate({
"location":selected_location,
"min_difficulty": min_difficulty,
"max_difficulty": max_difficulty,
})
func update_quest_window() -> void:
if quest:
%NameField.text = quest.name
%DifficultyField.text = quest.difficulty_name()
%LocationField.text = quest.location_name()
%LocationField.text = quest.get_location_name()
#for reward in quest.rewards.:
func reset() -> void:
@@ -45,3 +47,15 @@ func _on_post_back_button_pressed() -> void:
func _on_generate_back_button_pressed() -> void:
hide()
reset()
func _on_location_options_pressed() -> void:
map.visible = true
func _on_map_location_selected(location: Quest.Locations) -> void:
selected_location = location
%LocationOptions.text = Quest.location_name(location)
map.visible = false
#TODO: Make Location show up correctly