Segment MVP startup and pause flow
This commit is contained in:
@@ -16,10 +16,12 @@ EXPECTED = {
|
||||
"SaveAndQuit",
|
||||
],
|
||||
"AgrarianMvpFrontendWidget.cpp": [
|
||||
"NativeOnMouseButtonDown",
|
||||
"IsPointInside(LocalMousePosition, MaleCardPosition, CardSize)",
|
||||
"IsPointInside(LocalMousePosition, FemaleCardPosition, CardSize)",
|
||||
"UButton::StaticClass()",
|
||||
"HandleMaleCharacterClicked",
|
||||
"HandleFemaleCharacterClicked",
|
||||
"OnClicked.AddDynamic",
|
||||
"Save & Quit",
|
||||
"Saving World",
|
||||
"ConsoleCommand(TEXT(\"AgrarianSaveWorld\"))",
|
||||
"ConsoleCommand(TEXT(\"quit\"))",
|
||||
"PlayerController->SetIgnoreMoveInput(false)",
|
||||
@@ -32,6 +34,7 @@ EXPECTED = {
|
||||
"AgrarianGamePlayerController.cpp": [
|
||||
"SetIgnoreMoveInput(true)",
|
||||
"SetIgnoreLookInput(true)",
|
||||
"FInputModeUIOnly",
|
||||
"InputComponent->BindKey(EKeys::Enter",
|
||||
"InputComponent->BindKey(EKeys::SpaceBar",
|
||||
"InputComponent->BindKey(EKeys::Escape",
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Verify the MVP startup/menu flow is segmented and modal."""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
FRONTEND_H = ROOT / "Source" / "AgrarianGame" / "AgrarianMvpFrontendWidget.h"
|
||||
FRONTEND_CPP = ROOT / "Source" / "AgrarianGame" / "AgrarianMvpFrontendWidget.cpp"
|
||||
CONTROLLER_CPP = ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.cpp"
|
||||
ROADMAP = ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md"
|
||||
|
||||
|
||||
def require(condition: bool, message: str) -> None:
|
||||
if not condition:
|
||||
raise SystemExit(f"FAILED: {message}")
|
||||
|
||||
|
||||
def main() -> None:
|
||||
header = FRONTEND_H.read_text(encoding="utf-8")
|
||||
frontend = FRONTEND_CPP.read_text(encoding="utf-8")
|
||||
controller = CONTROLLER_CPP.read_text(encoding="utf-8")
|
||||
roadmap = ROADMAP.read_text(encoding="utf-8")
|
||||
|
||||
for token in (
|
||||
"SavingAndQuit",
|
||||
"ExecuteSaveAndQuit",
|
||||
):
|
||||
require(token in header, f"missing segmented flow declaration: {token}")
|
||||
|
||||
for token in (
|
||||
"Character Selection",
|
||||
"Server Join",
|
||||
"Loading Segment",
|
||||
"Pause Menu",
|
||||
"Gameplay is paused while this menu is active.",
|
||||
"Saving World",
|
||||
"Writing the current world state",
|
||||
"SetActiveScreen(EAgrarianMvpFrontendScreen::SavingAndQuit)",
|
||||
"GetTimerManager().SetTimer",
|
||||
"ExecuteSaveAndQuit",
|
||||
"ConsoleCommand(TEXT(\"AgrarianSaveWorld\"))",
|
||||
"ConsoleCommand(TEXT(\"quit\"))",
|
||||
):
|
||||
require(token in frontend, f"missing segmented frontend token: {token}")
|
||||
|
||||
require(
|
||||
controller.count("FInputModeUIOnly") >= 3,
|
||||
"startup/frontend/pause paths should use UI-only input while menus are active",
|
||||
)
|
||||
for token in (
|
||||
"SetIgnoreMoveInput(true)",
|
||||
"SetIgnoreLookInput(true)",
|
||||
"SetInputMode(FInputModeGameOnly())",
|
||||
"SetIgnoreMoveInput(false)",
|
||||
"SetIgnoreLookInput(false)",
|
||||
"saving",
|
||||
):
|
||||
require(token in controller + frontend, f"missing modal input or debug token: {token}")
|
||||
|
||||
require(
|
||||
"- [x] Make startup credits, character selection, server/join, loading, pause, save, and quit feel like separate intentional segments" in roadmap,
|
||||
"0.1.O segmented startup/menu roadmap item is not checked off",
|
||||
)
|
||||
|
||||
print("OK: MVP startup, menu, loading, pause, save, and quit flow is segmented and modal.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -39,7 +39,7 @@ REQUIRED = {
|
||||
ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.cpp": [
|
||||
"GetWorldTimerManager().SetTimer",
|
||||
"ShowMvpFrontend",
|
||||
"FInputModeGameAndUI",
|
||||
"FInputModeUIOnly",
|
||||
],
|
||||
ROOT / "Config" / "DefaultGame.ini": [
|
||||
"ProjectVersion=0.1.N-investor.20260518",
|
||||
|
||||
Reference in New Issue
Block a user