updating buff and debuff icons. separated COA classes from WoW classes on the character creation screen

This commit is contained in:
phenom committed 2026-08-16 11:16:51 -04:00
1 parent b5c9bce1aa
commit c00f3211ea
39 files changed
+2037 -208

No files matched your search

+21 -1
View File
@@ -42,6 +42,7 @@ export interface InputActions {
const keys = new Set<string>();
let actions: InputActions | null = null;
let jumpRequestAt: number | null = null;
// Pointer-lock implementations can emit a short burst of stale, very large
// movement events while the cursor is being recentered. Some Android WebViews have also been
@@ -69,6 +70,20 @@ function monotonicNow(): number {
return Date.now();
}
export function queueJumpRequest(nowMs = monotonicNow()): void {
if (Number.isFinite(nowMs)) jumpRequestAt = nowMs;
}
export function consumeJumpRequest(): number | null {
const requestedAt = jumpRequestAt;
jumpRequestAt = null;
return requestedAt;
}
export function clearJumpRequest(): void {
jumpRequestAt = null;
}
export function createMouseLookBuffer(now: () => number = monotonicNow) {
let x = 0;
let y = 0;
@@ -161,12 +176,13 @@ export type GameplayInputCommand =
| "party-defend"
| "party-stop"
| "party-recall"
| "jump"
| "target-clear";
export function controllerCommandForToken(token: string): GameplayInputCommand | null {
if (token === "Button9" || token === CONTROLLER_SYSTEM_BACK_TOKEN) return "pause";
if (token === "Button11") return "target-next";
if (token === "Button10") return "target-clear";
if (token === "Button10") return "jump";
if (token === "Button12") return "party-previous";
if (token === "Button13") return "party-next";
return null;
@@ -183,6 +199,7 @@ export function keyboardCommandForCode(code: string, shiftKey = false): Gameplay
if (code === "F2") return "party-defend";
if (code === "F3") return "party-stop";
if (code === "F4") return "party-recall";
if (code === "Space") return "jump";
if (code === "Tab") return shiftKey ? "target-previous" : "target-next";
return null;
}
@@ -202,6 +219,7 @@ function runCommand(command: GameplayInputCommand, nextActions: InputActions): v
else if (command === "party-defend") nextActions.setPartyCommand("defend");
else if (command === "party-stop") nextActions.setPartyCommand("stop");
else if (command === "party-recall") nextActions.recallParty();
else if (command === "jump") queueJumpRequest();
else if (command === "target-clear") nextActions.clearTarget();
}
@@ -303,6 +321,7 @@ export function installInput(nextActions: InputActions): () => void {
return;
}
if (nextActions.gameplayActionsBlocked()) return;
if (command === "jump") event.preventDefault();
if (event.code === "Tab") event.preventDefault();
runCommand(command, nextActions);
};
@@ -339,6 +358,7 @@ export function installInput(nextActions: InputActions): () => void {
keyboardModifiers.clear();
controllerL1 = false;
controllerL2 = false;
clearJumpRequest();
mouseLookDragActive = false;
previousMousePosition = null;
nextActions.setActionLayer("primary");