Skip to content
This repository has been archived by the owner on Jul 15, 2024. It is now read-only.

Commit

Permalink
Merge pull request #748 from diamante0018/main
Browse files Browse the repository at this point in the history
fix(scripts): fix for me being a bit silly
  • Loading branch information
diamante0018 committed May 20, 2023
2 parents 9a5f69c + 480d130 commit eb21878
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/client/component/script.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ namespace script
}
}

std::optional<std::string> get_game_type_specific_folder()
std::optional<std::filesystem::path> get_game_type_specific_folder()
{
switch (game::Com_SessionMode_GetMode())
{
Expand All @@ -135,7 +135,7 @@ namespace script
const auto data_folder = game::get_appdata_path() / "data";
const auto boiii_folder = host.get_folder() / "boiii";

const auto load = [&data_folder, &boiii_folder](const std::string& folder, const bool is_custom)
const auto load = [&data_folder, &boiii_folder](const std::filesystem::path& folder, const bool is_custom)
{
load_scripts_folder((data_folder / folder).string(), is_custom);
load_scripts_folder((boiii_folder / folder).string(), is_custom);
Expand All @@ -149,7 +149,7 @@ namespace script

if (const auto game_type = get_game_type_specific_folder(); game_type.has_value())
{
load(game_type.value(), true);
load("custom_scripts" / game_type.value(), true);
}
}

Expand Down

0 comments on commit eb21878

Please sign in to comment.