From dc89b713bcf9268bf67c375bd0f1f57c2e01417e Mon Sep 17 00:00:00 2001 From: Wiso <61384316+WisoAltred@users.noreply.github.com> Date: Wed, 5 Feb 2025 16:32:09 +0200 Subject: [PATCH] Add hints in testimony, add pause alias. (#397) * Add hints in testimony, add pause alias. end is most commonly used, provides more clarity that the testimony has "stopped" and further testimony is via /add and /update. * Fix examine cmd on-going examination check Previously did not stop users from calling examine mid-examination. * formating attempt i am sorry clang-format * Change "your" to "the". Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com> --------- Co-authored-by: in1tiate <32779090+in1tiate@users.noreply.github.com> --- bin/config_sample/command_extensions.ini | 5 ++++- src/commands/casing.cpp | 28 ++++++++++++++---------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/bin/config_sample/command_extensions.ini b/bin/config_sample/command_extensions.ini index 1691578..c18bf78 100644 --- a/bin/config_sample/command_extensions.ini +++ b/bin/config_sample/command_extensions.ini @@ -89,4 +89,7 @@ aliases = kickother aliases = jukeboxskip [play_ambience] -aliases = playambience playa \ No newline at end of file +aliases = playambience playa + +[pause] +aliases = end \ No newline at end of file diff --git a/src/commands/casing.cpp b/src/commands/casing.cpp index 53e5972..5210b23 100644 --- a/src/commands/casing.cpp +++ b/src/commands/casing.cpp @@ -113,12 +113,12 @@ void AOClient::cmdTestify(int argc, QStringList argv) AreaData *l_area = server->getAreaById(areaId()); if (l_area->testimonyRecording() == AreaData::TestimonyRecording::RECORDING) { - sendServerMessage("Testimony recording is already in progress. Please stop it before starting a new one."); + sendServerMessage("Testimony recording is already in progress. Please stop it with /end before starting a new one."); } else { clearTestimony(); l_area->setTestimonyRecording(AreaData::TestimonyRecording::RECORDING); - sendServerMessage("Started testimony recording."); + sendServerMessage("Started testimony recording. The next IC message will be a title. Use /end to stop recording."); } } @@ -129,15 +129,19 @@ void AOClient::cmdExamine(int argc, QStringList argv) AreaData *l_area = server->getAreaById(areaId()); if (l_area->testimony().size() - 1 > 0) { - l_area->restartTestimony(); - server->broadcast(PacketFactory::createPacket("RT", {"testimony2", "0"}), areaId()); - server->broadcast(PacketFactory::createPacket("MS", {l_area->testimony()[0]}), areaId()); - return; + if (l_area->testimonyRecording() == AreaData::TestimonyRecording::PLAYBACK) { + sendServerMessage("An examination is already running. Use /testimony to view the testimony."); + } + else { + l_area->restartTestimony(); + server->broadcast(PacketFactory::createPacket("RT", {"testimony2", "0"}), areaId()); + server->broadcast(PacketFactory::createPacket("MS", {l_area->testimony()[0]}), areaId()); + return; + } + } + else { + sendServerMessage("Unable to start replay without prior testimony. Use /testify to start Or load a testimony with /loadtestimony."); } - if (l_area->testimonyRecording() == AreaData::TestimonyRecording::PLAYBACK) - sendServerMessage("Unable to examine while another examination is running"); - else - sendServerMessage("Unable to start replay without prior examination."); } void AOClient::cmdTestimony(int argc, QStringList argv) @@ -182,7 +186,7 @@ void AOClient::cmdUpdateStatement(int argc, QStringList argv) Q_UNUSED(argv); server->getAreaById(areaId())->setTestimonyRecording(AreaData::TestimonyRecording::UPDATE); - sendServerMessage("The next IC-Message will replace the last displayed replay message."); + sendServerMessage("The next IC-Message will replace the currently selected testimony line."); } void AOClient::cmdPauseTestimony(int argc, QStringList argv) @@ -193,7 +197,7 @@ void AOClient::cmdPauseTestimony(int argc, QStringList argv) AreaData *l_area = server->getAreaById(areaId()); l_area->setTestimonyRecording(AreaData::TestimonyRecording::STOPPED); server->broadcast(PacketFactory::createPacket("RT", {"testimony1", "1"}), areaId()); - sendServerMessage("Testimony has been stopped."); + sendServerMessage("Testimony has been stopped. Use /examine to begin cross-examination."); } void AOClient::cmdAddStatement(int argc, QStringList argv)