From 1b16cbf376cde3edddf45f763a1bb2b9157cc8fa Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 26 Apr 2020 00:29:43 +0200 Subject: [PATCH] Fix running desktop export. --- game/scenes/MainScene.gd | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/game/scenes/MainScene.gd b/game/scenes/MainScene.gd index ee7a5e5d..0d6491f9 100644 --- a/game/scenes/MainScene.gd +++ b/game/scenes/MainScene.gd @@ -74,10 +74,18 @@ func load_modules_at(path : String) -> void: continue if dir.current_is_dir(): - load_modules_at(path + "/" + file_name) + if path == "res://": + load_modules_at(path + file_name) + else: + load_modules_at(path + "/" + file_name) else: if file_name == "game_module.tres": - var res : Resource = ResourceLoader.load(path + "/" + file_name) + var res : Resource = null + + if path == "res://": + res = ResourceLoader.load(path + file_name) + else: + res = ResourceLoader.load(path + "/" + file_name) _modules.append(res)