From 1a600ff8e5ce9afba04323b39d3ebff8dab19e00 Mon Sep 17 00:00:00 2001 From: Mike Silverman Date: Fri, 26 Jan 2024 16:44:34 -0500 Subject: [PATCH 1/3] gamewide messages for party wipes, descents and escapes and color coded combat log messages and fixed bugs where character focus wouldnt move correctly and if inventory was open during animation the client would desync --- client/cypress/e2e/test.cy.ts | 24 +++---- client/dist/index.html | 8 +-- .../action_button_click_handlers/mod.rs | 8 --- .../game/character_autofocus_manager/mod.rs | 16 ++++- .../game/combat_log/combat_log_message.rs | 27 ++++++++ client/src/components/game/combat_log/mod.rs | 27 +++++++- ...swing_to_hit_animation_finished_handler.rs | 37 ++++++++--- .../src/components/game/dungeon_room/mod.rs | 4 +- .../dungeon_room/players_ready_to_explore.rs | 2 +- client/src/components/game/mod.rs | 3 +- .../handle_combat_turn_results/mod.rs | 18 +++-- .../websocket_manager/handle_packet.rs | 4 ++ .../src/components/websocket_manager/mod.rs | 3 +- .../new_game_message_handler.rs | 37 +++++++++++ client/src/lib.rs | 1 + client/src/store/game_store.rs | 4 +- client/src/utils/mod.rs | 16 +++++ client/style/output.css | 15 +++++ common/src/app_consts/mod.rs | 1 + common/src/character/outfit_new_warrior.rs | 2 +- common/src/packets/mod.rs | 7 ++ common/src/packets/server_to_client.rs | 2 + .../src/websocket_server/game_server/mod.rs | 3 +- .../mod.rs | 65 ++++++++++++++++--- .../toggle_ready_to_descend_handler.rs | 37 +++++++++++ .../leave_game_handler.rs | 2 + 26 files changed, 310 insertions(+), 63 deletions(-) create mode 100644 client/src/components/game/combat_log/combat_log_message.rs create mode 100644 client/src/components/websocket_manager/new_game_message_handler.rs create mode 100644 client/src/utils/mod.rs diff --git a/client/cypress/e2e/test.cy.ts b/client/cypress/e2e/test.cy.ts index ebf66766..5cfaedd7 100644 --- a/client/cypress/e2e/test.cy.ts +++ b/client/cypress/e2e/test.cy.ts @@ -12,19 +12,19 @@ describe("a test test", () => { cy.findByRole("button", { name: "Create Character" }).focus(); cy.findByRole("button", { name: "Create Character" }).click(); - cy.findByPlaceholderText("Character name...") - .click() - .clear() - .type("character 2", { delay: 0 }); - cy.findByRole("button", { name: "Create Character" }).focus(); - cy.findByRole("button", { name: "Create Character" }).click(); + // cy.findByPlaceholderText("Character name...") + // .click() + // .clear() + // .type("Rebecca Chambers", { delay: 0 }); + // cy.findByRole("button", { name: "Create Character" }).focus(); + // cy.findByRole("button", { name: "Create Character" }).click(); - cy.findByPlaceholderText("Character name...") - .click() - .clear() - .type("character 3", { delay: 0 }); - cy.findByRole("button", { name: "Create Character" }).focus(); - cy.findByRole("button", { name: "Create Character" }).click(); + // cy.findByPlaceholderText("Character name...") + // .click() + // .clear() + // .type("character 3", { delay: 0 }); + // cy.findByRole("button", { name: "Create Character" }).focus(); + // cy.findByRole("button", { name: "Create Character" }).click(); cy.findByRole("button", { name: "Ready" }).click(); // cy.findByText("Open Inventory").click(); diff --git a/client/dist/index.html b/client/dist/index.html index 65179a60..529db4f5 100644 --- a/client/dist/index.html +++ b/client/dist/index.html @@ -1,15 +1,15 @@ Roguelike Racing - + - - + + -