Add MVP inventory HUD panel

This commit is contained in:
2026-05-17 13:43:21 -07:00
parent cb663fbfaf
commit 09eed7c4c4
6 changed files with 155 additions and 1 deletions
+66
View File
@@ -0,0 +1,66 @@
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",
"InventoryDataModel.md": ROOT / "Docs" / "InventoryDataModel.md",
"TechnicalDesignDocument.md": ROOT / "Docs" / "TechnicalDesignDocument.md",
"AGRARIAN_DEVELOPMENT_ROADMAP.md": ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md",
}
EXPECTED = {
"AgrarianDebugHUD.h": [
"bShowInventoryHUD",
"InventoryTextScale",
"MaxInventoryPanelRows",
"DrawInventoryPanel",
],
"AgrarianDebugHUD.cpp": [
"DrawInventoryPanel(AgrarianCharacter)",
"AAgrarianDebugHUD::DrawInventoryPanel",
"InventoryComponent->Items.Num()",
"InventoryComponent->MaxSlots",
"InventoryComponent->GetTotalWeight()",
"MaxInventoryPanelRows",
"Stack.UnitWeight * Stack.Quantity",
],
"InventoryDataModel.md": [
"compact inventory panel",
"occupied slots",
"total carried weight",
"visible item stacks",
],
"TechnicalDesignDocument.md": [
"The MVP inventory UI is a compact `AAgrarianDebugHUD` inventory panel",
"enabled",
"separately from the full developer HUD",
"shows occupied slots",
"total carried weight",
"server-authoritative commands",
],
"AGRARIAN_DEVELOPMENT_ROADMAP.md": [
"[x] Add inventory UI.",
"compact MVP HUD inventory panel",
"replicated inventory component",
],
}
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("Inventory UI verification failed: " + "; ".join(missing))
print("Agrarian inventory UI verification complete.")
if __name__ == "__main__":
main()