mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
feat: Add ability to toggle skipping of cinematics (#1312)
* Cinematics: Add ability to toggle skipping them * Add docs * Move sections
This commit is contained in:
@@ -85,6 +85,7 @@
|
||||
|
||||
#include "CDObjectsTable.h"
|
||||
#include "CDZoneTableTable.h"
|
||||
#include "ePlayerFlag.h"
|
||||
|
||||
void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entity* entity, const SystemAddress& sysAddr) {
|
||||
auto commandCopy = command;
|
||||
@@ -171,6 +172,21 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
|
||||
return;
|
||||
}
|
||||
|
||||
if (chatCommand == "toggleskipcinematics" && (Game::config->GetValue("allow_players_to_skip_cinematics") == "1" || entity->GetGMLevel() >= eGameMasterLevel::DEVELOPER)) {
|
||||
auto* character = entity->GetCharacter();
|
||||
if (!character) return;
|
||||
bool current = character->GetPlayerFlag(ePlayerFlag::DLU_SKIP_CINEMATICS);
|
||||
character->SetPlayerFlag(ePlayerFlag::DLU_SKIP_CINEMATICS, !current);
|
||||
if (!current) {
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"You have elected to skip cinematics. Note that not all cinematics can be skipped, but most will be skipped now.");
|
||||
} else {
|
||||
ChatPackets::SendSystemMessage(sysAddr, u"Cinematics will no longer be skipped.");
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
//HANDLE ALL NON GM SLASH COMMANDS RIGHT HERE!
|
||||
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
Reference in New Issue
Block a user