65 lines
2.1 KiB
Python
65 lines
2.1 KiB
Python
from pathlib import Path
|
|
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
FILES = {
|
|
"AgrarianMvpFrontendWidget.h": ROOT / "Source" / "AgrarianGame" / "AgrarianMvpFrontendWidget.h",
|
|
"AgrarianMvpFrontendWidget.cpp": ROOT / "Source" / "AgrarianGame" / "AgrarianMvpFrontendWidget.cpp",
|
|
"AgrarianGamePlayerController.h": ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.h",
|
|
"AgrarianGamePlayerController.cpp": ROOT / "Source" / "AgrarianGame" / "AgrarianGamePlayerController.cpp",
|
|
"AgrarianDebugHUD.cpp": ROOT / "Source" / "AgrarianGame" / "AgrarianDebugHUD.cpp",
|
|
"AGRARIAN_DEVELOPMENT_ROADMAP.md": ROOT / "AGRARIAN_DEVELOPMENT_ROADMAP.md",
|
|
}
|
|
|
|
EXPECTED = {
|
|
"AgrarianMvpFrontendWidget.h": [
|
|
"bUseHighContrast",
|
|
"SetUiScale",
|
|
"SetHighContrastMode",
|
|
],
|
|
"AgrarianMvpFrontendWidget.cpp": [
|
|
"FMath::Clamp(NewUiScale, 0.75f, 1.5f)",
|
|
"BackdropColor = bUseHighContrast",
|
|
"PanelColor = bUseHighContrast",
|
|
"AccentColor = bUseHighContrast",
|
|
],
|
|
"AgrarianGamePlayerController.h": [
|
|
"AgrarianSetUiScale",
|
|
"AgrarianToggleHighContrastUI",
|
|
],
|
|
"AgrarianGamePlayerController.cpp": [
|
|
"AgrarianSetUiScale",
|
|
"SetUiScale(ClampedScale)",
|
|
"CriticalStatsTextScale = ClampedScale",
|
|
"PromptTextScale = ClampedScale",
|
|
"AgrarianToggleHighContrastUI",
|
|
"SetHighContrastMode",
|
|
],
|
|
"AgrarianDebugHUD.cpp": [
|
|
"AgrarianSetUiScale 0.75-1.5 / ToggleHighContrastUI",
|
|
],
|
|
"AGRARIAN_DEVELOPMENT_ROADMAP.md": [
|
|
"[x] Add accessibility basics.",
|
|
"`AgrarianSetUiScale 0.75-1.5`",
|
|
"`AgrarianToggleHighContrastUI`",
|
|
],
|
|
}
|
|
|
|
|
|
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 accessibility basics verification failed: " + "; ".join(missing))
|
|
|
|
print("Agrarian MVP accessibility basics verification complete.")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|