Skip to content

Commit

Permalink
Tweaked the log for loading global scripts
Browse files Browse the repository at this point in the history
* it should be after the game scripts check.
  • Loading branch information
NovaRain committed Mar 2, 2024
1 parent 71a7545 commit e9b40f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sfall/Modules/ScriptExtender.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -548,10 +548,10 @@ static void PrepareGlobalScriptsListByMask() {
std::string baseName(name);
int lastDot = baseName.find_last_of('.');
if ((baseName.length() - lastDot) > 4) continue; // skip files with invalid extension (bug in db_get_file_list fuction)
dlog_f("Found global script: %s\n", DL_SCRIPT, name);

baseName = baseName.substr(0, lastDot); // script name without extension
if (basePath != fo::var::script_path_base || !IsGameScript(baseName.c_str())) {
dlog_f("Found global script: %s\n", DL_SCRIPT, name);
std::string fullPath(basePath);
fullPath += name;
// prevent loading global scripts with the same name from different directories
Expand Down

0 comments on commit e9b40f5

Please sign in to comment.