Skip to content

Commit

Permalink
Project manager fix
Browse files Browse the repository at this point in the history
  • Loading branch information
voylin committed Mar 8, 2024
1 parent 45547a5 commit e6ec104
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/autoloads/al_project_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,12 @@ func new_project(title: String, path: String, resolution: Vector2i, framerate: i

func load_project(path: String) -> void:
if !path.to_lower().contains(".gozen"):
Printer.error("Can't load project as path does not have '*.gozen' extension!")
return
var new_path: String = "%s.gozen" % path
if !FileAccess.file_exists(new_path):
Printer.error("Can't load project as path does not have '*.gozen' extension!\n\t%s" % path)
get_tree().quit()
return
path = new_path
if config == null:
config = ConfigFile.new()
if config.load(path):
Expand Down Expand Up @@ -83,7 +87,6 @@ func get_title() -> String:


func set_title(new_title: String, update: bool = true) -> void:
print("set title")
config.set_value("general", "title", new_title)
_on_title_changed.emit(new_title)
save_project()
Expand Down

0 comments on commit e6ec104

Please sign in to comment.