diff options
author | metamuffin <metamuffin@disroot.org> | 2024-08-13 16:48:38 +0200 |
---|---|---|
committer | metamuffin <metamuffin@disroot.org> | 2024-08-13 16:48:38 +0200 |
commit | c75b83236e4345f1a705d878acb1d59c1ad38746 (patch) | |
tree | 6d97e7e435940d7cd23ee5c4a572f8d671873ee2 /server/src/data/demands.rs | |
parent | 8d83fcef94ce1558a2c0e29e8be6c966c7e10a5b (diff) | |
download | hurrycurry-c75b83236e4345f1a705d878acb1d59c1ad38746.tar hurrycurry-c75b83236e4345f1a705d878acb1d59c1ad38746.tar.bz2 hurrycurry-c75b83236e4345f1a705d878acb1d59c1ad38746.tar.zst |
customers work except for points and return to spawn
Diffstat (limited to 'server/src/data/demands.rs')
-rw-r--r-- | server/src/data/demands.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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 <https://www.gnu.org/licenses/>. */ -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, }) |