Add MVP crafting UI toggle
This commit is contained in:
@@ -800,7 +800,7 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe
|
||||
- [x] Add loading screen. Added a native `Loading` frontend screen with Ground Zero preparation copy, selected character/server context, a deterministic placeholder progress bar, and join-screen keyboard flow into loading.
|
||||
- [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.
|
||||
- [ ] Add crafting UI.
|
||||
- [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.
|
||||
- [ ] Add death/respawn UI.
|
||||
- [ ] Add debug/dev menu.
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
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": [
|
||||
"bShowCraftingHUD",
|
||||
"DrawCraftingPanel",
|
||||
],
|
||||
"AgrarianDebugHUD.cpp": [
|
||||
"DrawCraftingPanel(AgrarianCharacter",
|
||||
"CRAFTING %d recipes",
|
||||
"CraftingComponent->CanCraft",
|
||||
"InventoryComponent->GetItemCount",
|
||||
],
|
||||
"AgrarianGamePlayerController.h": [
|
||||
"AgrarianToggleCraftingUI",
|
||||
],
|
||||
"AgrarianGamePlayerController.cpp": [
|
||||
"AgrarianToggleCraftingUI",
|
||||
"bShowCraftingHUD = !AgrarianHUD->bShowCraftingHUD",
|
||||
"MVP crafting UI shown.",
|
||||
"MVP crafting UI hidden.",
|
||||
],
|
||||
"AGRARIAN_DEVELOPMENT_ROADMAP.md": [
|
||||
"[x] Add crafting UI.",
|
||||
"`AgrarianToggleCraftingUI`",
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
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 crafting UI toggle verification failed: " + "; ".join(missing))
|
||||
|
||||
print("Agrarian MVP crafting UI toggle verification complete.")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -294,6 +294,19 @@ void AAgrarianGamePlayerController::AgrarianToggleInventoryUI()
|
||||
ClientMessage(AgrarianHUD->bShowInventoryHUD ? TEXT("MVP inventory UI shown.") : TEXT("MVP inventory UI hidden."));
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AgrarianToggleCraftingUI()
|
||||
{
|
||||
AAgrarianDebugHUD* AgrarianHUD = GetHUD<AAgrarianDebugHUD>();
|
||||
if (!AgrarianHUD)
|
||||
{
|
||||
ClientMessage(TEXT("No Agrarian HUD is active."));
|
||||
return;
|
||||
}
|
||||
|
||||
AgrarianHUD->bShowCraftingHUD = !AgrarianHUD->bShowCraftingHUD;
|
||||
ClientMessage(AgrarianHUD->bShowCraftingHUD ? TEXT("MVP crafting UI shown.") : TEXT("MVP crafting UI hidden."));
|
||||
}
|
||||
|
||||
void AAgrarianGamePlayerController::AgrarianSelectCharacter(FName Archetype)
|
||||
{
|
||||
if (!MvpFrontendWidget)
|
||||
|
||||
@@ -94,6 +94,9 @@ public:
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianToggleInventoryUI();
|
||||
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianToggleCraftingUI();
|
||||
|
||||
UFUNCTION(Exec)
|
||||
void AgrarianSelectCharacter(FName Archetype);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user