Add the whip to the office toolbar: slackers hustle back to their desks
- New bottom toolbar on the pixel office floor with a Whip tool; toggling it turns the cursor to a crosshair, clicks whip instead of opening the detail card, Escape puts the whip away - Simulation.whip(): an agent inside the snack bar or restroom drops whatever they are carrying and hustles back to their desk at 1.8x speed for a few seconds; agents at their desks, in the CEO office, or in the meeting room are working and stay untouched - Room membership decides the outcome (rectContains against the same floor-plan rooms the renderer draws), so the rule matches what the player sees - Unit tests cover the whip matrix; e2e drives the toolbar toggle in the live shell
This commit is contained in:
1 parent
2bb2acd635
commit
4ab20e679c
6 files changed
+161
-4
No files matched your search
@@ -85,6 +85,17 @@ test("the office floor opens agent details on click", async () => {
|
||||
}
|
||||
await expect(canvas).toBeVisible();
|
||||
|
||||
// The bottom toolbar carries the whip tool; in whip mode a click on an
|
||||
// at-desk agent disciplines nobody and opens no card.
|
||||
const whip = page.getByRole("button", { name: "Whip" });
|
||||
await expect(whip).toBeVisible();
|
||||
await whip.click();
|
||||
await expect(whip).toHaveAttribute("aria-pressed", "true");
|
||||
await page.mouse.click(clickX, clickY);
|
||||
await expect(page.getByRole("dialog", { name: /Agent / })).not.toBeVisible();
|
||||
await page.keyboard.press("Escape");
|
||||
await expect(whip).toHaveAttribute("aria-pressed", "false");
|
||||
|
||||
// Hired agents take open-floor desks in hire order and are clickable too.
|
||||
await hireAgent(page, "Ava Patel", "Designer", "Design");
|
||||
await hireAgent(page, "Ken Ito", "Engineer", "Engineering");
|
||||
|
||||
Reference in new issue
Block a user