load evidence w command
Some checks are pending
CI / build-windows (push) Blocked by required conditions
CI / build-linux (push) Blocked by required conditions
CI / check-clang-format (push) Waiting to run

This commit is contained in:
simio 2025-03-03 05:43:54 -03:00
parent 06ebe3c166
commit fcd2771e21
4 changed files with 14 additions and 0 deletions

View File

@ -113,6 +113,7 @@ const QMap<QString, AOClient::CommandInfo> AOClient::COMMANDS{
{"loadtestimony", {{ACLRole::CM}, 1, &AOClient::cmdLoadTestimony}}, {"loadtestimony", {{ACLRole::CM}, 1, &AOClient::cmdLoadTestimony}},
{"permitsaving", {{ACLRole::MODCHAT}, 1, &AOClient::cmdPermitSaving}}, {"permitsaving", {{ACLRole::MODCHAT}, 1, &AOClient::cmdPermitSaving}},
{"saveevidence", {{ACLRole::MODCHAT}, 0, &AOClient::cmdSaveEvidence}}, {"saveevidence", {{ACLRole::MODCHAT}, 0, &AOClient::cmdSaveEvidence}},
{"loadevidence", {{ACLRole::MODCHAT}, 0, &AOClient::cmdLoadEvidence}},
{"mutepm", {{ACLRole::NONE}, 0, &AOClient::cmdMutePM}}, {"mutepm", {{ACLRole::NONE}, 0, &AOClient::cmdMutePM}},
{"toggleadverts", {{ACLRole::NONE}, 0, &AOClient::cmdToggleAdverts}}, {"toggleadverts", {{ACLRole::NONE}, 0, &AOClient::cmdToggleAdverts}},
{"ooc_mute", {{ACLRole::MUTE}, 1, &AOClient::cmdOocMute}}, {"ooc_mute", {{ACLRole::MUTE}, 1, &AOClient::cmdOocMute}},

View File

@ -920,6 +920,7 @@ class AOClient : public QObject
* @iscommand * @iscommand
*/ */
void cmdSaveEvidence(int argc, QStringList argv); void cmdSaveEvidence(int argc, QStringList argv);
void cmdLoadEvidence(int argc, QStringList argv);
void cmdArea(int argc, QStringList argv); void cmdArea(int argc, QStringList argv);
/** /**

View File

@ -282,6 +282,7 @@ void AreaData::replaceEvidence(int f_eviId, const AreaData::Evidence &f_newEvi_r
void AreaData::loadInventory(QSettings& settings) void AreaData::loadInventory(QSettings& settings)
{ {
m_evidence.clear();
// Retrieve all keys from the QSettings object // Retrieve all keys from the QSettings object
QStringList keys = settings.allKeys(); QStringList keys = settings.allKeys();

View File

@ -88,6 +88,17 @@ void AOClient::cmdSaveEvidence(int argc, QStringList argv)
sendServerMessage("Evidence for this area has been saved."); sendServerMessage("Evidence for this area has been saved.");
} }
void AOClient::cmdLoadEvidence(int argc, QStringList argv)
{
Q_UNUSED(argc);
Q_UNUSED(argv);
AreaData *l_area = server->getAreaById(areaId());
QString l_area_name = l_area->name();
server->loadInventoryForArea(l_area, l_area_name);
sendEvidenceList(l_area);
}
void AOClient::cmdClearDoc(int argc, QStringList argv) void AOClient::cmdClearDoc(int argc, QStringList argv)
{ {
Q_UNUSED(argc); Q_UNUSED(argc);