summaryrefslogtreecommitdiff
path: root/server/src/data
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2024-08-13 16:48:38 +0200
committermetamuffin <metamuffin@disroot.org>2024-08-13 16:48:38 +0200
commitc75b83236e4345f1a705d878acb1d59c1ad38746 (patch)
tree6d97e7e435940d7cd23ee5c4a572f8d671873ee2 /server/src/data
parent8d83fcef94ce1558a2c0e29e8be6c966c7e10a5b (diff)
downloadhurrycurry-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')
-rw-r--r--server/src/data/demands.rs7
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,
})