aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriamgoofball <iamgoofball@gmail.com>2019-01-19 14:39:42 -0800
committeriamgoofball <iamgoofball@gmail.com>2019-01-19 14:39:42 -0800
commitc44832a707f655191e4337e3b3fc567ff02636eb (patch)
treeb16439f5c917930011520befa3861d50121848d2
parent248444307ff7cbe87ec4fe4024073cddb999dabc (diff)
guard -> disable modcalls, bugfixes for guard button, etc.
-rw-r--r--base/sounds/general/adminhelp.oggbin0 -> 17220 bytes
-rw-r--r--base/themes/default/courtroom_design.ini2
-rw-r--r--base/themes/default/courtroom_sounds.ini2
-rw-r--r--src/courtroom.cpp15
4 files changed, 10 insertions, 9 deletions
diff --git a/base/sounds/general/adminhelp.ogg b/base/sounds/general/adminhelp.ogg
new file mode 100644
index 00000000..704c0fd6
--- /dev/null
+++ b/base/sounds/general/adminhelp.ogg
Binary files differ
diff --git a/base/themes/default/courtroom_design.ini b/base/themes/default/courtroom_design.ini
index fe8fadf2..f2dd2d78 100644
--- a/base/themes/default/courtroom_design.ini
+++ b/base/themes/default/courtroom_design.ini
@@ -107,7 +107,7 @@ pre = 5, 490, 80, 21
flip = 104, 490, 51, 21
; Guard button
-guard = 200, 560, 61, 21
+guard = 200, 580, 81, 21
pre_no_interrupt = 200, 490, 80, 21
diff --git a/base/themes/default/courtroom_sounds.ini b/base/themes/default/courtroom_sounds.ini
index b24e2ce9..050576e5 100644
--- a/base/themes/default/courtroom_sounds.ini
+++ b/base/themes/default/courtroom_sounds.ini
@@ -3,6 +3,6 @@ witness_testimony = sfx-testimony2.wav
cross_examination = sfx-testimony.wav
evidence_present = sfx-evidenceshoop.wav
word_call = sfx-gaspen-yeah!.wav
-mod_call = sfx-gallery.wav
+mod_call = adminhelp.ogg
not_guilty = sfx-notguilty.wav
guilty = sfx-guilty.wav \ No newline at end of file
diff --git a/src/courtroom.cpp b/src/courtroom.cpp
index ce4ccf1d..da1b090f 100644
--- a/src/courtroom.cpp
+++ b/src/courtroom.cpp
@@ -193,7 +193,7 @@ Courtroom::Courtroom(AOApplication *p_ao_app) : QMainWindow()
ui_flip->setText("Flip");
ui_flip->hide();
ui_guard = new QCheckBox(this);
- ui_guard->setText("Guard");
+ ui_guard->setText("Disable Modcalls");
ui_guard->hide();
ui_casing = new QCheckBox(this);
ui_casing->setChecked(ao_app->get_casing_enabled());
@@ -1085,6 +1085,12 @@ void Courtroom::append_server_chatmessage(QString p_name, QString p_message, QSt
colour = ao_app->get_color("ooc_default_color", "courtroom_design.ini").name();
if (p_colour == "1")
colour = ao_app->get_color("ooc_server_color", "courtroom_design.ini").name();
+ qDebug() << p_message;
+ if(p_message == "Logged in as a moderator.")
+ {
+ ui_guard->show();
+ append_server_chatmessage("CLIENT", "You were granted the Disable Modcalls button.", "1");
+ }
ui_server_chatlog->append_chatmessage(p_name, p_message, colour);
}
@@ -2855,7 +2861,7 @@ void Courtroom::toggle_judge_buttons(bool is_on)
void Courtroom::mod_called(QString p_ip)
{
ui_server_chatlog->append(p_ip);
- if (ui_guard->isChecked())
+ if (!ui_guard->isChecked())
{
modcall_player->play(ao_app->get_sfx("mod_call"));
ao_app->alert(this);
@@ -2897,11 +2903,6 @@ void Courtroom::on_ooc_return_pressed()
toggle_judge_buttons(false);
}
}
- else if (ooc_message.startsWith("/login"))
- {
- ui_guard->show();
- append_server_chatmessage("CLIENT", "You were granted the Guard button.", "1");
- }
else if (ooc_message.startsWith("/rainbow") && ao_app->yellow_text_enabled && !rainbow_appended)
{
//ui_text_color->addItem("Rainbow");