From 883fa8547d2d650ab28fcc91169e1d0068760ac9 Mon Sep 17 00:00:00 2001 From: in1tiate <32779090+in1tiate@users.noreply.github.com> Date: Sat, 9 Jan 2021 09:24:06 -0600 Subject: [PATCH] replace "gender" with "blips" (#386) Co-authored-by: Crystalwarrior --- include/aoapplication.h | 4 ++-- src/courtroom.cpp | 5 ++--- src/text_file_functions.cpp | 11 +++++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/include/aoapplication.h b/include/aoapplication.h index 3465202..3325156 100644 --- a/include/aoapplication.h +++ b/include/aoapplication.h @@ -403,8 +403,8 @@ public: // Returns the desk modifier for p_char's p_emote int get_desk_mod(QString p_char, int p_emote); - // Returns p_char's gender - QString get_gender(QString p_char); + // Returns p_char's blips (previously called their "gender") + QString get_blips(QString p_char); // ====== // These are all casing-related settings. diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 0613bad..be7dab1 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2891,14 +2891,13 @@ void Courtroom::start_chat_ticking() current_display_speed = 3; chat_tick_timer->start(0); // Display the first char right away - QString f_gender = ao_app->get_gender(m_chatmessage[CHAR_NAME]); - last_misc = current_misc; current_misc = ao_app->get_char_shouts(m_chatmessage[CHAR_NAME]); if (last_misc != current_misc) gen_char_rgb_list(m_chatmessage[CHAR_NAME]); - blip_player->set_blips(f_gender); + QString f_blips = ao_app->get_blips(m_chatmessage[CHAR_NAME]); + blip_player->set_blips(f_blips); // means text is currently ticking text_state = 1; diff --git a/src/text_file_functions.cpp b/src/text_file_functions.cpp index eb0976a..3524d87 100644 --- a/src/text_file_functions.cpp +++ b/src/text_file_functions.cpp @@ -625,12 +625,15 @@ QString AOApplication::get_char_side(QString p_char) return f_result; } -QString AOApplication::get_gender(QString p_char) +QString AOApplication::get_blips(QString p_char) { - QString f_result = read_char_ini(p_char, "gender", "Options"); + QString f_result = read_char_ini(p_char, "blips", "Options"); - if (f_result == "") - f_result = "male"; + if (f_result == "") { + f_result = read_char_ini(p_char, "gender", "Options"); // not very PC, FanatSors + if (f_result == "") + f_result = "male"; + } if (!file_exists(get_sfx_suffix(get_sounds_path(f_result)))) { if (file_exists(get_sfx_suffix(get_sounds_path("../blips/" + f_result))))