Add MVP interaction prompt toggle
This commit is contained in:
@@ -801,7 +801,7 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe
|
||||
- [x] Add HUD. Completed the MVP HUD pass with a separate `bShowMvpHudFrame` top status frame showing Ground Zero context, alive/dead state, health, food, water, and body temperature, while keeping the deeper developer overlay separately toggleable.
|
||||
- [x] Add inventory UI. Promoted the existing compact replicated-inventory HUD panel into the 0.1.N UI pass with `AgrarianToggleInventoryUI`, keeping the MVP inventory surface lightweight while full drag/drop inventory remains later work.
|
||||
- [x] Add crafting UI. Promoted the existing compact crafting HUD panel into the 0.1.N UI pass with `AgrarianToggleCraftingUI`, showing known recipes and ingredient readiness while keeping full crafting menus for later UX expansion.
|
||||
- [ ] Add interaction prompts.
|
||||
- [x] Add interaction prompts. Promoted the existing centered interactable prompt renderer into the 0.1.N UI pass with `AgrarianToggleInteractionPrompts`, keeping prompt text driven by focused interactables.
|
||||
- [ ] Add death/respawn UI.
|
||||
- [ ] Add debug/dev menu.
|
||||
- [ ] Add accessibility basics.
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
FILES = {
|
||||
"AgrarianDebugHUD.h": ROOT / "Source" / "AgrarianGame" / "AgrarianDebugHUD.h",
|
||||
"AgrarianDebugHUD.cpp": ROOT / "Source" / "AgrarianGame" / "AgrarianDebugHUD.cpp",
|
||||
"AgrarianGamePlayerController.h": ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.h",
|
||||
"AgrarianGamePlayerController.cpp": ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.cpp",
|
||||
"AGRARIAN_DEVELOPMENT_ROADMAP.md": ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md",
|
||||
}
|
||||
|
||||
EXPECTED = {
|
||||
"AgrarianDebugHUD.h": [
|
||||
"bShowInteractionPrompt",
|
||||
"PromptTextScale",
|
||||
"DrawInteractionPrompt",
|
||||
],
|
||||
"AgrarianDebugHUD.cpp": [
|
||||
"DrawInteractionPrompt(AgrarianCharacter)",
|
||||
"HasInteractionPrompt()",
|
||||
"GetInteractionPromptText()",
|
||||
"[E] %s",
|
||||
],
|
||||
"AgrarianGamePlayerController.h": [
|
||||
"AgrarianToggleInteractionPrompts",
|
||||
],
|
||||
"AgrarianGamePlayerController.cpp": [
|
||||
"AgrarianToggleInteractionPrompts",
|
||||
"bShowInteractionPrompt = !AgrarianHUD->bShowInteractionPrompt",
|
||||
"MVP interaction prompts shown.",
|
||||
"MVP interaction prompts hidden.",
|
||||
],
|
||||
"AGRARIAN_DEVELOPMENT_ROADMAP.md": [
|
||||
"[x] Add interaction prompts.",
|
||||
"`AgrarianToggleInteractionPrompts`",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
def main():
|
||||
missing = []
|
||||
for label, path in FILES.items():
|
||||
text = path.read_text(encoding="utf-8")
|
||||
for snippet in EXPECTED[label]:
|
||||
if snippet not in text:
|
||||
missing.append(f"{label}: {snippet}")
|
||||
|
||||
if missing:
|
||||
raise RuntimeError("MVP interaction prompt toggle verification failed: " + "; ".join(missing))
|
||||
|
||||
print("Agrarian MVP interaction prompt toggle verification complete.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -307,6 +307,19 @@ void AAgrarianGamePlayerController::AgrarianToggleCraftingUI()
|
||||
ClientMessage(AgrarianHUD->bShowCraftingHUD ? TEXT("MVP crafting UI shown.") : TEXT("MVP crafting UI hidden."));
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AgrarianToggleInteractionPrompts()
|
||||
{
|
||||
AAgrarianDebugHUD* AgrarianHUD = GetHUD<AAgrarianDebugHUD>();
|
||||
if (!AgrarianHUD)
|
||||
{
|
||||
ClientMessage(TEXT("No Agrarian HUD is active."));
|
||||
return;
|
||||
}
|
||||
|
||||
AgrarianHUD->bShowInteractionPrompt = !AgrarianHUD->bShowInteractionPrompt;
|
||||
ClientMessage(AgrarianHUD->bShowInteractionPrompt ? TEXT("MVP interaction prompts shown.") : TEXT("MVP interaction prompts hidden."));
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AgrarianSelectCharacter(FName Archetype)
|
||||
{
|
||||
if (!MvpFrontendWidget)
|
||||
|
||||
@@ -97,6 +97,9 @@ public:
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianToggleCraftingUI();
|
||||
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianToggleInteractionPrompts();
|
||||
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianSelectCharacter(FName Archetype);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user