Skip to content
This repository was archived by the owner on May 15, 2026. It is now read-only.

Commit fd94626

Browse files
committed
handle new path requirements for 4.1
1 parent aa7cb64 commit fd94626

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

addons/tbloader/src/toFgd.gd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func remove_attached_scripts(files):
5656
return filtered_files
5757

5858
func get_entity_properties(files = []):
59-
var properties = ["// Generated by Godot FGD Generator https://github.com/krazyjakee/godot-fgd\n\n"]
59+
var properties = []
6060

6161
for file in files:
6262
if file.ends_with(".gd"):
@@ -248,7 +248,11 @@ func build(entities_dir = "entities"):
248248
var files = remove_attached_scripts(all_files) # Remove attached scripts
249249
var properties = get_entity_properties(files) # Get the properties of each entity
250250

251-
var file = FileAccess.open("Game.fgd", FileAccess.WRITE)
251+
var file = FileAccess.open("res://Game.fgd", FileAccess.WRITE)
252+
if !file:
253+
push_error("Failed to open/create Game.fgd!")
254+
return
255+
252256
for property in properties:
253257
if property:
254258
file.store_string(property)

0 commit comments

Comments
 (0)