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>
91 lines
2.5 KiB
C#
91 lines
2.5 KiB
C#
// Gameplay: actors, components, subsystems, abilities, UI. Depends on SaltyCore, never the reverse.
|
|
// The Variant_* folders are the engine template's reference code (D-41); nothing new is built on them.
|
|
|
|
using UnrealBuildTool;
|
|
|
|
public class Salty : ModuleRules
|
|
{
|
|
public Salty(ReadOnlyTargetRules Target) : base(Target)
|
|
{
|
|
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
|
|
|
|
PublicDependencyModuleNames.AddRange(new string[] {
|
|
"Core",
|
|
"CoreUObject",
|
|
"SaltyCore",
|
|
"GameplayTags",
|
|
"GameplayAbilities",
|
|
"GameplayTasks",
|
|
"NetCore",
|
|
"Engine",
|
|
"InputCore",
|
|
"EnhancedInput",
|
|
"AIModule",
|
|
"StateTreeModule",
|
|
"GameplayStateTreeModule",
|
|
"UMG",
|
|
"Slate"
|
|
});
|
|
|
|
PrivateDependencyModuleNames.AddRange(new string[] { "Json" });
|
|
|
|
// The telemetry envelope's build string carries the git hash. Read here at build time; a new commit
|
|
// changes the definition and rebuilds this module, which is the price of never lying about the build.
|
|
PrivateDefinitions.Add("SALTY_GIT_HASH=\"" + ReadGitHash() + "\"");
|
|
|
|
PublicIncludePaths.AddRange(new string[] {
|
|
"Salty",
|
|
"Salty/Core",
|
|
"Salty/Variant_Platforming",
|
|
"Salty/Variant_Platforming/Animation",
|
|
"Salty/Variant_Combat",
|
|
"Salty/Variant_Combat/AI",
|
|
"Salty/Variant_Combat/Animation",
|
|
"Salty/Variant_Combat/Gameplay",
|
|
"Salty/Variant_Combat/Interfaces",
|
|
"Salty/Variant_Combat/UI",
|
|
"Salty/Variant_SideScrolling",
|
|
"Salty/Variant_SideScrolling/AI",
|
|
"Salty/Variant_SideScrolling/Gameplay",
|
|
"Salty/Variant_SideScrolling/Interfaces",
|
|
"Salty/Variant_SideScrolling/UI"
|
|
});
|
|
|
|
// Uncomment if you are using Slate UI
|
|
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
|
|
|
|
// Uncomment if you are using online features
|
|
// PrivateDependencyModuleNames.Add("OnlineSubsystem");
|
|
|
|
// To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true
|
|
}
|
|
|
|
private string ReadGitHash()
|
|
{
|
|
try
|
|
{
|
|
var StartInfo = new System.Diagnostics.ProcessStartInfo("git", "rev-parse --short HEAD")
|
|
{
|
|
WorkingDirectory = ModuleDirectory,
|
|
RedirectStandardOutput = true,
|
|
RedirectStandardError = true,
|
|
UseShellExecute = false,
|
|
CreateNoWindow = true
|
|
};
|
|
using (var Process = System.Diagnostics.Process.Start(StartInfo))
|
|
{
|
|
string Output = Process.StandardOutput.ReadToEnd().Trim();
|
|
Process.WaitForExit();
|
|
if (Process.ExitCode == 0 && Output.Length > 0)
|
|
{
|
|
return Output;
|
|
}
|
|
}
|
|
}
|
|
catch (System.Exception)
|
|
{
|
|
}
|
|
return "nogit";
|
|
}
|
|
}
|