diff options
| author | metamuffin <metamuffin@disroot.org> | 2024-06-29 20:30:45 +0200 | 
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2024-06-29 20:30:45 +0200 | 
| commit | f2292af3b9442ea3db7435d3e455792d270f722a (patch) | |
| tree | fa47ede3336f50c527ae246ab97fec669b6712dc /server/src/customer/mod.rs | |
| parent | f8943df9e38483788eafa170912f00a62b4cffe3 (diff) | |
| download | hurrycurry-f2292af3b9442ea3db7435d3e455792d270f722a.tar hurrycurry-f2292af3b9442ea3db7435d3e455792d270f722a.tar.bz2 hurrycurry-f2292af3b9442ea3db7435d3e455792d270f722a.tar.zst | |
customers send effects on timeout and satisfied demand
Diffstat (limited to 'server/src/customer/mod.rs')
| -rw-r--r-- | server/src/customer/mod.rs | 14 | 
1 files changed, 14 insertions, 0 deletions
| diff --git a/server/src/customer/mod.rs b/server/src/customer/mod.rs index 92e6e94c..f90b2eb2 100644 --- a/server/src/customer/mod.rs +++ b/server/src/customer/mod.rs @@ -165,6 +165,13 @@ impl DemandState {                                  persist: true,                              },                          )); +                        packets_out.push(( +                            id, +                            PacketS::Communicate { +                                message: Some(Message::Effect("angry".to_string())), +                                persist: false, +                            }, +                        ));                          let path = find_path(                              &self.walkable,                              p.movement.position.as_ivec2(), @@ -205,6 +212,13 @@ impl DemandState {                                      message: None,                                  },                              )); +                            packets_out.push(( +                                id, +                                PacketS::Communicate { +                                    message: Some(Message::Effect("satisfied".to_string())), +                                    persist: false, +                                }, +                            ));                              for edge in [true, false] {                                  packets_out.push((id, PacketS::Interact { pos, edge }))                              } | 
