diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-06-20 14:49:12 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-06-23 19:24:14 +0200 | 
| commit | 870b572f3edf33825d1b74010baae935d3439d95 (patch) | |
| tree | 25b79cc6a7ac1eca6b62c3c6e0ad6c27d9d6204e | |
| parent | 96dd53c9ea8fe124a699de3b04069102a6002128 (diff) | |
| download | hurrycurry-870b572f3edf33825d1b74010baae935d3439d95.tar hurrycurry-870b572f3edf33825d1b74010baae935d3439d95.tar.bz2 hurrycurry-870b572f3edf33825d1b74010baae935d3439d95.tar.zst | |
no hats for customerss
| -rw-r--r-- | server/src/customer/mod.rs | 2 | ||||
| -rw-r--r-- | server/src/game.rs | 2 | ||||
| -rw-r--r-- | server/src/protocol.rs | 4 | ||||
| -rw-r--r-- | test-client/visual.ts | 10 | 
4 files changed, 10 insertions, 8 deletions
| diff --git a/server/src/customer/mod.rs b/server/src/customer/mod.rs index 23770ef2..fa67de57 100644 --- a/server/src/customer/mod.rs +++ b/server/src/customer/mod.rs @@ -146,7 +146,7 @@ impl CustomerManager {                  id,                  PacketS::Join {                      name: "George".to_string(), -                    character: 0, +                    character: -2,                  },              ));              let chair = select_chair(&mut self.chairs); diff --git a/server/src/game.rs b/server/src/game.rs index 973b257b..b478c037 100644 --- a/server/src/game.rs +++ b/server/src/game.rs @@ -32,7 +32,7 @@ pub struct Tile {  pub struct Player {      pub name: String, -    pub character: usize, +    pub character: i32,      pub position: Vec2,      pub interacting: Option<IVec2>,      pub item: Option<Item>, diff --git a/server/src/protocol.rs b/server/src/protocol.rs index a629ffbf..a82dad96 100644 --- a/server/src/protocol.rs +++ b/server/src/protocol.rs @@ -24,7 +24,7 @@ pub struct DemandIndex(pub usize);  pub enum PacketS {      Join {          name: String, -        character: usize, +        character: i32,      },      Leave,      Position { @@ -66,7 +66,7 @@ pub enum PacketC {      AddPlayer {          id: PlayerID,          position: Vec2, -        character: usize, +        character: i32,          name: String,      },      RemovePlayer { diff --git a/test-client/visual.ts b/test-client/visual.ts index 4bbfac6c..37ae732d 100644 --- a/test-client/visual.ts +++ b/test-client/visual.ts @@ -133,10 +133,12 @@ function draw_character(character: number) {      ctx.arc(0, 0, PLAYER_SIZE, 0, Math.PI * 2)      ctx.fill() -    ctx.fillStyle = `hsl(${character}rad, 80%, 10%)` -    ctx.beginPath() -    ctx.arc(0, -0.2, PLAYER_SIZE, 0, Math.PI * 2) -    ctx.fill() +    if (character > 0) { +        ctx.fillStyle = `hsl(${character}rad, 80%, 10%)` +        ctx.beginPath() +        ctx.arc(0, -0.2, PLAYER_SIZE, 0, Math.PI * 2) +        ctx.fill() +    }      ctx.fillStyle = `hsl(${character}rad, 80%, 70%)`      ctx.beginPath() | 
