Skip to content

Commit

Permalink
fix freight station test
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Jan 17, 2024
1 parent 3419f77 commit 50cbed0
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 0 additions & 1 deletion native_app/src/newgui/topgui.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use std::f32::consts::TAU;
use yakui::{Alignment, Color, Dim2, Vec2};

use simulation::map_dynamic::ElectricityFlow;
Expand Down
4 changes: 2 additions & 2 deletions simulation/src/map_dynamic/electricity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use crate::map::{BuildingKind, ElectricityNetworkID, Map};
use crate::map_dynamic::BuildingInfos;
use crate::utils::resources::Resources;
use crate::{SoulID, World};
use common::FastMap;
use prototypes::Power;
use serde::Deserialize;
use slotmapd::__impl::Serialize;
use std::collections::BTreeMap;

#[derive(Default, Serialize, Deserialize)]
pub struct ElectricityFlow {
flowmap: FastMap<ElectricityNetworkID, NetworkFlow>,
flowmap: BTreeMap<ElectricityNetworkID, NetworkFlow>,
}

impl ElectricityFlow {
Expand Down
4 changes: 3 additions & 1 deletion simulation/src/souls/freight_station.rs
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ mod tests {

test.apply(&[WorldCommand::MapBuildSpecialBuilding {
pos: OBB::new(vec2(50.0, 50.0), vec2(1.0, 0.0), 5.0, 5.0),
kind: BuildingKind::RailFreightStation(FreightStationPrototypeID::new("test")),
kind: BuildingKind::RailFreightStation(FreightStationPrototypeID::new(
"freight-station",
)),
gen: BuildingGen::NoWalkway {
door_pos: vec2(50.0, 50.0),
},
Expand Down

0 comments on commit 50cbed0

Please sign in to comment.