Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit b18acd9

Browse files
fix: 🐛 Take resource remapping into account (#482)
added `ResourceLoader.exists()` to `_ModLoaderFile.file_exists()` closes #481
1 parent fcb1f4d commit b18acd9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎addons/mod_loader/internal/file.gd‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,13 @@ static func file_exists(path: String, zip_path: String = "") -> bool:
196196
if not zip_path.is_empty():
197197
return file_exists_in_zip(path, zip_path)
198198

199-
return FileAccess.file_exists(path)
199+
var exists := FileAccess.file_exists(path)
200+
201+
# If the file is not found, check if it has been remapped because it is a Resource.
202+
if not exists:
203+
exists = ResourceLoader.exists(path)
204+
205+
return exists
200206

201207

202208
static func dir_exists(path: String) -> bool:

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /