Browse Source

fix for incorrectly referencing files in res when exported

Jonathan Higgins 1 month ago
parent
commit
e1459aa129
2 changed files with 15 additions and 7 deletions
  1. 1 0
      global/config_handler.gd.uid
  2. 14 7
      global/utilities.gd

+ 1 - 0
global/config_handler.gd.uid

@@ -0,0 +1 @@
+uid://d28wppnott7xa

+ 14 - 7
global/utilities.gd

@@ -5,10 +5,17 @@ var nodes := {} #stores all scenes that can be loaded as utilities
 # Called when the node enters the scene tree for the first time.
 func _ready() -> void:
 	#check utilities folder for all scenes and load into nodes dictionary
-	var dir = DirAccess.open("res://scenes/Nodes/utilities/")
-	if dir:
-		for file in dir.get_files():
-			if file.ends_with(".tscn"):
-				var name = file.get_basename()
-				var path = "res://scenes/Nodes/utilities/" + file
-				nodes[name] = load(path)
+	#var dir = DirAccess.open("res://scenes/Nodes/utilities/")
+	#if dir:
+		#for file in dir.get_files():
+			#if file.ends_with(".tscn"):
+				#var name = file.get_basename()
+				#var path = "res://scenes/Nodes/utilities/" + file
+				#nodes[name] = load(path)
+	nodes["calculator"] = load("res://scenes/Nodes/utilities/calculator.tscn")
+	nodes["convert_time"] = load("res://scenes/Nodes/utilities/convert_time.tscn")
+	nodes["inputfile"] = load("res://scenes/Nodes/utilities/inputfile.tscn")
+	nodes["notes"] = load("res://scenes/Nodes/utilities/notes.tscn")
+	nodes["note_to_hz"] = load("res://scenes/Nodes/utilities/note_to_hz.tscn")
+	nodes["outputfile"] = load("res://scenes/Nodes/utilities/outputfile.tscn")
+	nodes["preview"] = load("res://scenes/Nodes/utilities/preview.tscn")