aboutsummaryrefslogtreecommitdiff
path: root/server/src/entity/demand_sink.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/entity/demand_sink.rs')
-rw-r--r--server/src/entity/demand_sink.rs9
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
}