From c75b83236e4345f1a705d878acb1d59c1ad38746 Mon Sep 17 00:00:00 2001 From: metamuffin Date: Tue, 13 Aug 2024 16:48:38 +0200 Subject: customers work except for points and return to spawn --- server/src/data/demands.rs | 7 +++---- server/src/entity/bot.rs | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'server/src') diff --git a/server/src/data/demands.rs b/server/src/data/demands.rs index 176ca232..3f4b839d 100644 --- a/server/src/data/demands.rs +++ b/server/src/data/demands.rs @@ -15,8 +15,7 @@ along with this program. If not, see . */ -use super::Demand; -use hurrycurry_protocol::{ItemIndex, Recipe, TileIndex}; +use hurrycurry_protocol::{Demand, ItemIndex, Recipe, TileIndex}; use std::collections::{HashMap, HashSet}; pub fn generate_demands( @@ -79,8 +78,8 @@ pub fn generate_demands( .iter() .filter_map(|(i, o, d)| { producable.get(i).map(|cost| Demand { - from: *i, - to: *o, + input: *i, + output: *o, duration: *d, points: *cost as i64, }) diff --git a/server/src/entity/bot.rs b/server/src/entity/bot.rs index 301dbca3..cc67f640 100644 --- a/server/src/entity/bot.rs +++ b/server/src/entity/bot.rs @@ -75,6 +75,7 @@ impl Entity for BotDriver { boost: input.boost, pos: None, }); + c.packet_in.extend(input.extra); Ok(()) } fn destructor(&mut self, c: EntityContext<'_>) { -- cgit v1.2.3-70-g09d2