diff options
| author | metamuffin <metamuffin@disroot.org> | 2025-12-14 20:58:38 +0100 |
|---|---|---|
| committer | metamuffin <metamuffin@disroot.org> | 2025-12-14 20:58:38 +0100 |
| commit | 72fb49bd96cf5a4c878a5b8a53dcad7500d3b54e (patch) | |
| tree | 2923831691c64a1be6fa97058014cd53c98779f4 /server/src | |
| parent | c6f3e492d3e5a58fca683ceac0282381b5e066f9 (diff) | |
| download | hurrycurry-72fb49bd96cf5a4c878a5b8a53dcad7500d3b54e.tar hurrycurry-72fb49bd96cf5a4c878a5b8a53dcad7500d3b54e.tar.bz2 hurrycurry-72fb49bd96cf5a4c878a5b8a53dcad7500d3b54e.tar.zst | |
satisfied effect on demand sink
Diffstat (limited to 'server/src')
| -rw-r--r-- | server/src/entity/demand_sink.rs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/entity/demand_sink.rs b/server/src/entity/demand_sink.rs index a653fe3e..2955e444 100644 --- a/server/src/entity/demand_sink.rs +++ b/server/src/entity/demand_sink.rs @@ -19,7 +19,7 @@ use crate::entity::{Entity, EntityContext}; use anyhow::Result; use hurrycurry_locale::TrError; -use hurrycurry_protocol::glam::IVec2; +use hurrycurry_protocol::{ItemLocation, PacketC, glam::IVec2}; pub struct DemandSink { pub pos: IVec2, @@ -35,8 +35,11 @@ impl Entity for DemandSink { if let Some(demand) = c.game.data.demands.iter().find(|d| d.input == item.kind) { c.game.score.demands_completed += 1; c.game.score.points += demand.points; - *c.score_changed = true - // TODO satisfied effect + *c.score_changed = true; + c.packet_out.push_back(PacketC::Effect { + name: "satisfied".to_string(), + location: ItemLocation::Tile(self.pos), + }); } else { // No effect } |