Add MVP inventory UI toggle
This commit is contained in:
@@ -799,7 +799,7 @@ Target deliverable: A small group can join a server, spawn into one biome, gathe
|
|||||||
- [x] Add join server screen. Added a native `JoinServer` frontend screen showing the selected character and `play.agrariangame.com:7777`, with keyboard flow from character selection and a dev command to display the screen directly.
|
- [x] Add join server screen. Added a native `JoinServer` frontend screen showing the selected character and `play.agrariangame.com:7777`, with keyboard flow from character selection and a dev command to display the screen directly.
|
||||||
- [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 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 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.
|
||||||
- [ ] Add inventory UI.
|
- [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.
|
- [ ] Add crafting UI.
|
||||||
- [ ] Add interaction prompts.
|
- [ ] Add interaction prompts.
|
||||||
- [ ] Add death/respawn UI.
|
- [ ] Add death/respawn UI.
|
||||||
|
|||||||
@@ -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": [
|
||||||
|
"bShowInventoryHUD",
|
||||||
|
"DrawInventoryPanel",
|
||||||
|
],
|
||||||
|
"AgrarianDebugHUD.cpp": [
|
||||||
|
"DrawInventoryPanel(AgrarianCharacter)",
|
||||||
|
"INVENTORY %d/%d slots %.1f wt",
|
||||||
|
"InventoryComponent->GetTotalWeight()",
|
||||||
|
],
|
||||||
|
"AgrarianGamePlayerController.h": [
|
||||||
|
"AgrarianToggleInventoryUI",
|
||||||
|
],
|
||||||
|
"AgrarianGamePlayerController.cpp": [
|
||||||
|
"#include \"AgrarianDebugHUD.h\"",
|
||||||
|
"AgrarianToggleInventoryUI",
|
||||||
|
"bShowInventoryHUD = !AgrarianHUD->bShowInventoryHUD",
|
||||||
|
"MVP inventory UI shown.",
|
||||||
|
"MVP inventory UI hidden.",
|
||||||
|
],
|
||||||
|
"AGRARIAN_DEVELOPMENT_ROADMAP.md": [
|
||||||
|
"[x] Add inventory UI.",
|
||||||
|
"`AgrarianToggleInventoryUI`",
|
||||||
|
],
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
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 inventory UI toggle verification failed: " + "; ".join(missing))
|
||||||
|
|
||||||
|
print("Agrarian MVP inventory UI toggle verification complete.")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
main()
|
||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "AgrarianGamePlayerController.h"
|
#include "AgrarianGamePlayerController.h"
|
||||||
#include "AgrarianCampfire.h"
|
#include "AgrarianCampfire.h"
|
||||||
#include "AgrarianCraftingComponent.h"
|
#include "AgrarianCraftingComponent.h"
|
||||||
|
#include "AgrarianDebugHUD.h"
|
||||||
#include "AgrarianGameCharacter.h"
|
#include "AgrarianGameCharacter.h"
|
||||||
#include "AgrarianInventoryComponent.h"
|
#include "AgrarianInventoryComponent.h"
|
||||||
#include "AgrarianItemPickup.h"
|
#include "AgrarianItemPickup.h"
|
||||||
@@ -280,6 +281,19 @@ void AAgrarianGamePlayerController::AgrarianCraftStatus()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AAgrarianGamePlayerController::AgrarianToggleInventoryUI()
|
||||||
|
{
|
||||||
|
AAgrarianDebugHUD* AgrarianHUD = GetHUD<AAgrarianDebugHUD>();
|
||||||
|
if (!AgrarianHUD)
|
||||||
|
{
|
||||||
|
ClientMessage(TEXT("No Agrarian HUD is active."));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
AgrarianHUD->bShowInventoryHUD = !AgrarianHUD->bShowInventoryHUD;
|
||||||
|
ClientMessage(AgrarianHUD->bShowInventoryHUD ? TEXT("MVP inventory UI shown.") : TEXT("MVP inventory UI hidden."));
|
||||||
|
}
|
||||||
|
|
||||||
void AAgrarianGamePlayerController::AgrarianSelectCharacter(FName Archetype)
|
void AAgrarianGamePlayerController::AgrarianSelectCharacter(FName Archetype)
|
||||||
{
|
{
|
||||||
if (!MvpFrontendWidget)
|
if (!MvpFrontendWidget)
|
||||||
|
|||||||
@@ -91,6 +91,9 @@ public:
|
|||||||
UFUNCTION(Exec)
|
UFUNCTION(Exec)
|
||||||
void AgrarianCraftStatus();
|
void AgrarianCraftStatus();
|
||||||
|
|
||||||
|
UFUNCTION(Exec)
|
||||||
|
void AgrarianToggleInventoryUI();
|
||||||
|
|
||||||
UFUNCTION(Exec)
|
UFUNCTION(Exec)
|
||||||
void AgrarianSelectCharacter(FName Archetype);
|
void AgrarianSelectCharacter(FName Archetype);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user