Added the ability to give characters custom realisation sounds.

This commit is contained in:
Cerapter 2018-09-20 22:13:03 +02:00
parent 1ea16339e0
commit ab49e69067
3 changed files with 13 additions and 1 deletions

View File

@ -234,6 +234,9 @@ public:
//Not in use
int get_text_delay(QString p_char, QString p_emote);
// Returns the custom realisation used by the character.
QString get_custom_realization(QString p_char);
//Returns the name of p_char
QString get_char_name(QString p_char);

View File

@ -1557,7 +1557,7 @@ void Courtroom::handle_chatmessage_3()
{
realization_timer->start(60);
ui_vp_realization->show();
sfx_player->play(ao_app->get_sfx("realization"));
sfx_player->play(ao_app->get_custom_realization(m_chatmessage[CHAR_NAME]));
}
int f_evi_id = m_chatmessage[EVIDENCE_ID].toInt();

View File

@ -497,6 +497,15 @@ int AOApplication::get_text_delay(QString p_char, QString p_emote)
else return f_result.toInt();
}
QString AOApplication::get_custom_realization(QString p_char)
{
QString f_result = read_char_ini(p_char, "realization", "Options");
if (f_result == "")
return get_sfx("realization");
else return f_result;
}
bool AOApplication::get_blank_blip()
{
QString result = configini->value("blank_blip", "false").value<QString>();