From febbc005cfac682257af0b74be5b307d4f23f91c Mon Sep 17 00:00:00 2001 From: metamuffin Date: Sat, 20 Jul 2024 19:43:14 +0200 Subject: send score menu on game end --- server/src/entity/mod.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'server/src/entity/mod.rs') diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index c471a6d4..ec5ec744 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -18,18 +18,18 @@ pub mod conveyor; pub mod customers; pub mod portal; -use std::collections::{HashMap, HashSet}; +use std::collections::{HashMap, HashSet, VecDeque}; use crate::{data::ItemTileRegistry, game::Game, interaction::Recipe}; use anyhow::{anyhow, Result}; use conveyor::Conveyor; use customers::{demands::generate_demands, Customers}; -use hurrycurry_protocol::{glam::IVec2, ItemIndex, TileIndex}; +use hurrycurry_protocol::{glam::IVec2, ItemIndex, PacketC, TileIndex}; use portal::Portal; use serde::{Deserialize, Serialize}; pub trait EntityT: Clone { - fn tick(&mut self, game: &mut Game, dt: f32) -> Result<()>; + fn tick(&mut self, game: &mut Game, packet_out: &mut VecDeque, dt: f32) -> Result<()>; } macro_rules! entities { @@ -37,8 +37,8 @@ macro_rules! entities { #[derive(Debug, Clone)] pub enum Entity { $($e($e)),* } impl EntityT for Entity { - fn tick(&mut self, game: &mut Game, dt: f32) -> Result<()> { - match self { $(Entity::$e(x) => x.tick(game, dt)),*, } + fn tick(&mut self, game: &mut Game, packet_out: &mut VecDeque, dt: f32) -> Result<()> { + match self { $(Entity::$e(x) => x.tick(game, packet_out, dt)),*, } } } }; -- cgit v1.2.3-70-g09d2