aboutsummaryrefslogtreecommitdiff
path: root/src/text_file_functions.cpp
diff options
context:
space:
mode:
authorCrystalwarrior <Varsash@Gmail.com>2022-07-30 15:38:37 +0300
committerGitHub <noreply@github.com>2022-07-30 14:38:37 +0200
commitd9bdb7e6bca8c5168d1b280fce4ee60c894a9a7e (patch)
treef6826b6f6dd3dd00b5c42e227c8b6f407661fe5d /src/text_file_functions.cpp
parentd8c89f056bcf7326519784633c374fdda5999736 (diff)
Fix get_effect_property ignoring the provided effect folder and using the char.ini instead. Makes it consistent with get_effect behavior (#828)
Diffstat (limited to 'src/text_file_functions.cpp')
-rw-r--r--src/text_file_functions.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp
index ed3b036a..48e13592 100644
--- a/src/text_file_functions.cpp
+++ b/src/text_file_functions.cpp
@@ -968,10 +968,13 @@ QString AOApplication::get_effect(QString effect, QString p_char,
}
QString AOApplication::get_effect_property(QString fx_name, QString p_char,
- QString p_property)
+ QString p_folder, QString p_property)
{
+ if (p_folder == "")
+ p_folder = read_char_ini(p_char, "effects", "Options");
+
const auto paths = get_asset_paths("effects/effects.ini", current_theme, get_subtheme(), default_theme, "");
- const auto misc_paths = get_asset_paths("effects.ini", current_theme, get_subtheme(), default_theme, read_char_ini(p_char, "effects", "Options"));
+ const auto misc_paths = get_asset_paths("effects.ini", current_theme, get_subtheme(), default_theme, p_folder);
QString path;
QString f_result;
for (const VPath &p : paths + misc_paths) {