// The core's own boot step. It is both a working example of DESCENT_BOOT_STEP and a guard: every later system // can rely on the core seams existing in the world once boot has started, and a world without them (a game mode // or subsystem that failed to come up) fails the boot at once, by name, instead of crashing a system later. #include "Core/DescentBoot.h" #include "Core/DescentEnvQuery.h" #include "Core/DescentGameMode.h" #include "Core/DescentSimSubsystem.h" #include "Core/DescentStreamFocus.h" #include "TheDescent.h" #include "UI/DescentHudSubsystem.h" #include "Engine/World.h" DESCENT_BOOT_STEP(CoreSeams, Descent::Boot::Order::BeforeAll) { if (!UDescentSimSubsystem::Get(Ctx.World)) { Ctx.Fail(TEXT("UDescentSimSubsystem is missing from the world")); return; } if (!UDescentEnvQuerySubsystem::Get(Ctx.World)) { Ctx.Fail(TEXT("UDescentEnvQuerySubsystem is missing from the world")); return; } if (!UDescentStreamFocusSubsystem::Get(Ctx.World)) { Ctx.Fail(TEXT("UDescentStreamFocusSubsystem is missing from the world")); return; } if (!UDescentHudSubsystem::Get(Ctx.World)) { Ctx.Fail(TEXT("UDescentHudSubsystem is missing from the world")); return; } UE_LOG(LogDescent, Display, TEXT("Boot: core seams present (sim, env query, stream focus, HUD model); %s"), Ctx.bScenarioRunning ? TEXT("a scenario is running, boot steps run anyway") : TEXT("no scenario")); }