ITelemetrySink with the null, log and JSON Lines sinks, FTelemetryEvent and the envelope, TelemetryEvents, UTelemetrySubsystem on the game instance, ASaltyGameMode minting the session id into the replicated ASaltyGameState, bs.TelemetryTest, the git hash in the build string (D-42) and four Salty.Core.Telemetry tests replacing the placeholder. Proved standalone and with a headless server plus client sharing one session id. Also enables the engine's Editor, AutomationTest, GameplayTags, ConfigSettings and LiveCoding MCP toolsets (D-43) so the editor's MCP server exposes more than the skills toolset. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
29 lines
1.0 KiB
C++
29 lines
1.0 KiB
C++
// The bs.* console commands. Every one marks the session as cheated through the telemetry subsystem, so a
|
|
// playtest file that had a cheat in it can be filtered out later. Each step adds its own commands here.
|
|
|
|
#include "Core/TelemetrySubsystem.h"
|
|
#include "Engine/GameInstance.h"
|
|
#include "Engine/World.h"
|
|
#include "HAL/IConsoleManager.h"
|
|
|
|
namespace
|
|
{
|
|
UTelemetrySubsystem* TelemetryFor(UWorld* World)
|
|
{
|
|
const UGameInstance* GameInstance = World ? World->GetGameInstance() : nullptr;
|
|
return GameInstance ? GameInstance->GetSubsystem<UTelemetrySubsystem>() : nullptr;
|
|
}
|
|
|
|
// bs.TelemetryTest: proves the seam end to end from the console. Emits cheat_used and taints the session.
|
|
FAutoConsoleCommandWithWorld CmdTelemetryTest(
|
|
TEXT("bs.TelemetryTest"),
|
|
TEXT("Emits a cheat_used telemetry event and marks the session as cheated."),
|
|
FConsoleCommandWithWorldDelegate::CreateLambda([](UWorld* World)
|
|
{
|
|
if (UTelemetrySubsystem* Telemetry = TelemetryFor(World))
|
|
{
|
|
Telemetry->MarkCheatUsed(TEXT("bs.TelemetryTest"));
|
|
}
|
|
}));
|
|
}
|