Skip to content

Commit 458d5a6

Browse files
committed
Improved, added ogg source files to export
1 parent 74a4d19 commit 458d5a6

1 file changed

Lines changed: 22 additions & 22 deletions

File tree

addons/resource_importer/Main-Window.gd

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -24,55 +24,55 @@ func get_all_resources_from_folder(resources_path : String) -> Array:
2424
print(jEssentials.crawl_directory_for(resources_path + resource_subfolder + "/Objects", "obj"))
2525
print(found_resources)
2626
found_resources.append_array(jEssentials.crawl_directory_for(resources_path + resource_subfolder + "/RailTypes", "tscn"))
27-
27+
2828
found_resources.append_array(jEssentials.crawl_directory_for(resources_path + resource_subfolder + "/SignalTypes", "tscn"))
29-
29+
3030
found_resources.append_array(jEssentials.crawl_directory_for(resources_path + resource_subfolder + "/Sounds", "ogg"))
31-
31+
3232
found_resources.append_array(jEssentials.crawl_directory_for(resources_path + resource_subfolder + "/Textures", "png"))
33-
33+
3434
print("returning")
3535
return found_resources
3636

3737

3838
func import_resources():
39-
39+
4040
$MainView/Label.text = ""
41-
41+
4242
jEssentials.remove_folder_recursively("res://Resources")
43-
44-
print("Mami")
45-
43+
jEssentials.remove_folder_recursively("res://.import")
44+
4645
jEssentials.copy_folder_recursively(editor_directory_path + "Resources", "res://Resources")
47-
46+
4847
emit_signal("resources_imported")
49-
48+
5049
print("Finished copying files.")
51-
50+
5251
# jEssentials.call_delayed(0.5, self, "export_pck")
5352

5453
func export_pck():
5554
# var found_resources = get_all_resources_from_folder("res://Resources")
5655
var files_to_export = []
57-
56+
5857
files_to_export.append_array(jEssentials.crawl_directory_for("res://.import/", "stex"))
5958
files_to_export.append_array(jEssentials.crawl_directory_for("res://.import/", "mesh"))
59+
files_to_export.append_array(jEssentials.crawl_directory_for("res://.import/", "oggstr"))
6060
files_to_export.append_array(jEssentials.crawl_directory_for("res://Resources/", "import"))
6161
files_to_export.append_array(jEssentials.crawl_directory_for("res://Resources/", "tres"))
6262
files_to_export.append_array(jEssentials.crawl_directory_for("res://Resources/", "tscn"))
63-
63+
6464
print(files_to_export)
65-
65+
6666
var pck_path = editor_directory_path + "/.cache/additional_resources.pck"
6767
var packer = PCKPacker.new()
6868
packer.pck_start(pck_path)
6969
for file in files_to_export:
7070
packer.add_file(file, file)
7171
packer.flush()
72-
72+
7373
$MainView/Label.text = "Sucessfully exported Pck. You may restart Libre TrainSIm now."
74-
75-
74+
75+
7676
# packer.pck_start(pck_path)
7777
#
7878
# if resource_path.get_extension() == "obj":
@@ -85,10 +85,10 @@ func export_pck():
8585
# if resource == resource_path: continue
8686
# packer.add_file("res://Resources/" + resource, "res://Resources/" + resource)
8787
# packer.flush()
88-
89-
90-
91-
88+
89+
90+
91+
9292
#
9393
#func get_all_loaded_additional_resources() -> Array:
9494
# var found_resources = []

0 commit comments

Comments
 (0)