Skip to content

Commit

Permalink
Merge pull request #7 from SnowdenWintermute/feature
Browse files Browse the repository at this point in the history
0.5.0
  • Loading branch information
SnowdenWintermute authored Feb 15, 2024
2 parents 3fdf9c3 + 229f54d commit eab9c2c
Show file tree
Hide file tree
Showing 187 changed files with 4,603 additions and 2,927 deletions.
27 changes: 27 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 12 additions & 11 deletions client/cypress/e2e/first-user.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,21 @@ describe("a test test", () => {
cy.task("waitForCheckpoint", "second player character created");

cy.findByRole("button", { name: "Ready" }).click();
cy.findByText("Open Inventory").click();
cy.findAllByText("HP Autoinjector").first().click();
cy.findByText("Use").click();
cy.findByText("Execute").click();
cy.findByText("Close Inventory").click();
// cy.findByText("Ready to explore").click();
// cy.findByText("Open Inventory").click();
// cy.findAllByText("HP Autoinjector").first().click();
// cy.findByText("Use").click();
// cy.findByText("Execute").click();
// cy.findByText("Close Inventory").click();

cy.findByText("Ready to explore").click();
cy.findByText("Attack").click();
cy.findByText("Execute").click();
// cy.findByText("Ready to explore").click();
// cy.findByText("Attack").click();
// cy.findByText("Execute").click();

cy.wait(2000);
// cy.wait(2000);

cy.findByText("Attack").click();
cy.findByText("Execute").click();
// cy.findByText("Attack").click();
// cy.findByText("Execute").click();
// cy.task("checkpoint", "first attack executed");

// cy.findAllByText("Take").first().click({ force: true });
Expand Down
10 changes: 5 additions & 5 deletions client/cypress/e2e/second-user.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ describe("a test test", () => {
cy.task("checkpoint", "second player character created");
cy.findByRole("button", { name: "Ready" }).click();

cy.findByText("Open Inventory").click();
cy.findAllByText("HP Autoinjector").first().click();
cy.findByText("Use").click();
cy.findByText("Execute").click();
cy.findByText("Close Inventory").click();
// cy.findByText("Open Inventory").click();
// cy.findAllByText("HP Autoinjector").first().click();
// cy.findByText("Use").click();
// cy.findByText("Execute").click();
// cy.findByText("Close Inventory").click();

cy.findByText("Ready to explore").click();

Expand Down
8 changes: 4 additions & 4 deletions client/dist/index.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<!DOCTYPE html><html><head>
<meta charset="utf-8">
<title>Roguelike Racing</title>
<link rel="stylesheet" href="/output-3a7d22295aa4068d.css">
<link rel="stylesheet" href="/output-c6e428860f4c4c96.css">

<base href="/">

<link rel="preload" href="/roguelike-racing-client-1290ce234f6245d9_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/roguelike-racing-client-1290ce234f6245d9.js"></head>
<link rel="preload" href="/roguelike-racing-client-ce14b84345e37cbf_bg.wasm" as="fetch" type="application/wasm" crossorigin="">
<link rel="modulepreload" href="/roguelike-racing-client-ce14b84345e37cbf.js"></head>
<body>

<script type="module">import init from '/roguelike-racing-client-1290ce234f6245d9.js';init('/roguelike-racing-client-1290ce234f6245d9_bg.wasm');</script><script>(function () {
<script type="module">import init from '/roguelike-racing-client-ce14b84345e37cbf.js';init('/roguelike-racing-client-ce14b84345e37cbf_bg.wasm');</script><script>(function () {
var protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
var url = protocol + '//' + window.location.host + '/_trunk/ws';
var poll_interval = 5000;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,17 @@
use common::combatants::abilities::CombatantAbilityNames;
use common::items::consumables::ConsumableProperties;
use common::items::consumables::ConsumableTypes;
use common::combat::combat_actions::CombatAction;
use yew::prelude::*;

#[derive(Properties, PartialEq)]
pub struct Props {
pub ability_name_option: Option<CombatantAbilityNames>,
pub consumable_option: Option<ConsumableProperties>,
pub combat_action: CombatAction,
}

#[function_component(TargetingIndicator)]
pub fn targeting_indicator(props: &Props) -> Html {
let mut color = "yellow-700";

if let Some(consumable) = &props.consumable_option {
match consumable.consumable_type {
ConsumableTypes::HpAutoinjector => color = "green-600",
ConsumableTypes::Grenade => (),
ConsumableTypes::SmokeBomb => color = "gray-700",
}
}
let color = match props.combat_action {
CombatAction::AbilityUsed(_) => "yellow-700",
CombatAction::ConsumableUsed(_) => "green-600",
};
html!(
<div class={format!("w-0 h-0 border-t-[1.5rem] border-t-{color}
border-r-[1.5rem] border-r-transparent border-l-[1.5rem] border-l-transparent
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit eab9c2c

Please sign in to comment.