From d9bdb7e6bca8c5168d1b280fce4ee60c894a9a7e Mon Sep 17 00:00:00 2001 From: Crystalwarrior Date: Sat, 30 Jul 2022 15:38:37 +0300 Subject: Fix get_effect_property ignoring the provided effect folder and using the char.ini instead. Makes it consistent with get_effect behavior (#828) --- src/text_file_functions.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/text_file_functions.cpp') 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) { -- cgit