Added mapping tool, reworked scene structure, and added test data.

This commit is contained in:
2026-09-06 16:50:32 -07:00
parent ab632f455d
commit a7ba813c81
20 changed files with 350 additions and 12 deletions
+13 -1
View File
@@ -2,5 +2,17 @@ extends Resource
class_name Dialogue
@export var character: Character
@export_multiline() var dialogue: String
@export_multiline() var dialogue_str: String
@export var choices: Array[Choice]
func _init(chr : String, str1:String, choices1:Array[Choice]):
# there's probably a better way to do this but idk yet
character = load("res://characters/"+chr+".tres")
dialogue_str = str1
choices = choices1
static func load_dict(dict: Dictionary) -> Dialogue:
var chs : Array[Choice] = []
for ch : Dictionary in dict["chs"]:
chs.append(Choice.load_dict(ch))
return new(dict["chr"], dict["d"], chs)