Skip to content

Commit

Permalink
rename engine_interaction -> world_command
Browse files Browse the repository at this point in the history
  • Loading branch information
Uriopass committed Dec 15, 2023
1 parent 9117050 commit 8b6be29
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 21 deletions.
2 changes: 1 addition & 1 deletion headless/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use common::logger::MyLog;
use common::unwrap_or;
use networking::{Frame, Server, ServerConfiguration, ServerPollResult};
use simulation::engine_interaction::WorldCommands;
use simulation::world_command::WorldCommands;
use simulation::Simulation;
use std::time::{Duration, Instant};
use structopt::StructOpt;
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/addtrain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ use crate::inputmap::{InputAction, InputMap};
use crate::rendering::immediate::ImmediateDraw;
use crate::uiworld::UiWorld;
use geom::{Color, OBB};
use simulation::engine_interaction::WorldCommand;
use simulation::map::LaneKind;
use simulation::transportation::train::{train_length, wagons_positions_for_render};
use simulation::world_command::WorldCommand;
use simulation::Simulation;
use std::option::Option::None;

Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/chat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use egui::panel::TopBottomSide;
use egui::{Align2, Color32, Frame, RichText, ScrollArea, TextBuffer, TopBottomPanel};

use geom::Color;
use simulation::engine_interaction::WorldCommand;
use simulation::multiplayer::chat::{Message, MessageKind};
use simulation::multiplayer::MultiplayerState;
use simulation::utils::time::{GameInstant, GameTime, SECONDS_PER_REALTIME_SECOND};
use simulation::world_command::WorldCommand;
use simulation::Simulation;

use crate::inputmap::{InputAction, InputMap};
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/inspect/inspect_building.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::uiworld::UiWorld;
use egui::{Context, Ui, Widget};
use simulation::economy::{ItemRegistry, Market};
use simulation::engine_interaction::WorldCommand;
use simulation::world_command::WorldCommand;
use simulation::{Simulation, SoulID};

use crate::gui::inspect::entity_link;
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ use serde::{Deserialize, Serialize};

use crate::uiworld::UiWorld;
use roadbuild::RoadBuildResource;
use simulation::engine_interaction::WorldCommand;
use simulation::map::BuildingID;
use simulation::world_command::WorldCommand;
use simulation::{AnyEntity, Simulation};

pub mod addtrain;
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/roadbuild.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ use crate::uiworld::UiWorld;
use common::AudioKind;
use geom::{BoldLine, BoldSpline, Camera, PolyLine, ShapeEnum, Spline};
use geom::{PolyLine3, Spline3, Vec2, Vec3};
use simulation::engine_interaction::{WorldCommand, WorldCommands};
use simulation::map::{
Intersection, LanePatternBuilder, Map, MapProject, ProjectFilter, ProjectKind, PylonPosition,
};
use simulation::world_command::{WorldCommand, WorldCommands};
use simulation::Simulation;
use BuildState::{Hover, Interpolation, Start};
use ProjectKind::{Building, Ground, Inter, Road};
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/specialbuilding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::uiworld::UiWorld;
use common::AudioKind;
use geom::{Degrees, Intersect, Vec3, OBB};
use ordered_float::OrderedFloat;
use simulation::engine_interaction::WorldCommand;
use simulation::map::{ProjectFilter, ProjectKind};
use simulation::world_command::WorldCommand;
use simulation::Simulation;
use std::borrow::Cow;

Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/terraforming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::uiworld::UiWorld;
use common::timestep::UP_DT;
use egui_inspect::Inspect;
use geom::LinearColor;
use simulation::engine_interaction::WorldCommand;
use simulation::map::TerraformKind;
use simulation::world_command::WorldCommand;
use simulation::Simulation;

#[derive(Inspect)]
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/topgui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ use egui_inspect::{Inspect, InspectArgs};
use geom::{Polygon, Vec2};
use serde::{Deserialize, Serialize};
use simulation::economy::{Government, Item, ItemRegistry, Money};
use simulation::engine_interaction::WorldCommand;
use simulation::map::{
BuildingKind, LanePatternBuilder, LightPolicy, MapProject, TurnPolicy, Zone,
};
use simulation::souls::goods_company::GoodsCompanyRegistry;
use simulation::utils::time::{GameTime, SECONDS_PER_HOUR};
use simulation::world_command::WorldCommand;
use simulation::Simulation;
use std::sync::atomic::Ordering;
use std::time::{Duration, Instant};
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/windows/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ use crate::inputmap::InputMap;
use egui::Widget;
use engine::Tesselator;
use geom::{Camera, Color, LinearColor, Spline3, Vec2};
use simulation::engine_interaction::WorldCommand;
use simulation::map::{
IntersectionID, Map, MapSubscriber, RoadSegmentKind, TraverseKind, UpdateType,
};
use simulation::transportation::train::TrainReservations;
use simulation::world_command::WorldCommand;

#[derive(Default)]
pub struct DebugState {
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/gui/zoneedit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use crate::rendering::immediate::ImmediateDraw;
use crate::uiworld::UiWorld;
use geom::{Polygon, Vec2};
use ordered_float::OrderedFloat;
use simulation::engine_interaction::WorldCommand;
use simulation::map::{ProjectFilter, ProjectKind, Zone, MAX_ZONE_AREA};
use simulation::world_command::WorldCommand;
use simulation::Simulation;
use std::borrow::Cow;

Expand Down
2 changes: 1 addition & 1 deletion native_app/src/init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use crate::uiworld::{ReceivedCommands, UiWorld};
use common::saveload::Encoder;
use serde::de::DeserializeOwned;
use serde::Serialize;
use simulation::engine_interaction::WorldCommands;
use simulation::world_command::WorldCommands;

/// init is called at the beginning of the program to initialize the globals
/// It is mostly to register types for serialization and initialization of the engine
Expand Down
4 changes: 2 additions & 2 deletions native_app/src/network.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ use crate::game_loop::{State, Timings};
use crate::gui::windows::settings::Settings;
use crate::uiworld::{ReceivedCommands, SaveLoadState};
use common::timestep::Timestep;
use simulation::engine_interaction::{WorldCommand, WorldCommands};
use simulation::utils::scheduler::SeqSchedule;
use simulation::world_command::{WorldCommand, WorldCommands};
use simulation::Simulation;

impl Default for NetworkState {
Expand Down Expand Up @@ -108,7 +108,7 @@ mod inner {
use networking::{
ConnectConf, Frame, PollResult, ServerConfiguration, ServerPollResult, VirtualClientConf,
};
use simulation::engine_interaction::WorldCommands;
use simulation::world_command::WorldCommands;
use simulation::Simulation;
use std::net::ToSocketAddrs;
use std::sync::Mutex;
Expand Down
2 changes: 1 addition & 1 deletion native_app/src/uiworld.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::init::{INIT_FUNCS, SAVELOAD_FUNCS};
use simulation::engine_interaction::{WorldCommand, WorldCommands};
use simulation::utils::resources::{Ref, RefMut, Resources};
use simulation::world_command::{WorldCommand, WorldCommands};
use simulation::{Simulation, SimulationReplayLoader};
use std::any::Any;
use std::sync::atomic::AtomicBool;
Expand Down
2 changes: 1 addition & 1 deletion simulation/src/economy/government.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::economy::Money;
use crate::engine_interaction::WorldCommand;
use crate::map::{LanePattern, MapProject, MAX_ZONE_AREA};
use crate::world_command::WorldCommand;
use crate::{BuildingKind, GoodsCompanyRegistry, Simulation};
use serde::{Deserialize, Serialize};

Expand Down
6 changes: 3 additions & 3 deletions simulation/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
#![allow(clippy::too_many_arguments)]
#![allow(clippy::type_complexity)]

use crate::engine_interaction::WorldCommand;
use crate::map::{BuildingKind, Map};
use crate::map_dynamic::{Itinerary, ItineraryLeader};
use crate::physics::CollisionWorld;
use crate::physics::Speed;
use crate::souls::add_souls_to_empty_buildings;
use crate::souls::goods_company::GoodsCompanyRegistry;
use crate::utils::resources::{Ref, RefMut, Resources};
use crate::world_command::WorldCommand;
use common::saveload::Encoder;
use derive_more::{From, TryInto};
use geom::Vec3;
Expand Down Expand Up @@ -36,7 +36,6 @@ extern crate egui_inspect;
extern crate log as extern_log;

pub mod economy;
pub mod engine_interaction;
pub mod init;
pub mod map;
pub mod map_dynamic;
Expand All @@ -48,13 +47,14 @@ mod tests;
pub mod transportation;
pub mod utils;
mod world;
pub mod world_command;

pub use world::*;

use crate::engine_interaction::WorldCommand::Init;
use crate::init::{GSYSTEMS, INIT_FUNCS, SAVELOAD_FUNCS};
use crate::utils::scheduler::RunnableSystem;
use crate::utils::time::{Tick, SECONDS_PER_REALTIME_SECOND};
use crate::world_command::WorldCommand::Init;
use common::FastMap;
pub use utils::config::*;
pub use utils::par_command_buffer::ParCommandBuffer;
Expand Down
2 changes: 1 addition & 1 deletion simulation/src/tests/mod.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
#![allow(dead_code)]
#![cfg(test)]

use crate::engine_interaction::{WorldCommand, WorldCommands};
use crate::map::{BuildingID, LanePatternBuilder, ProjectFilter};
use crate::map_dynamic::BuildingInfos;
use crate::utils::scheduler::SeqSchedule;
use crate::utils::time::Tick;
use crate::world_command::{WorldCommand, WorldCommands};
use crate::{Simulation, SimulationOptions};
use common::logger::MyLog;
use common::saveload::Encoder;
Expand Down
2 changes: 1 addition & 1 deletion simulation/src/utils/replay.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::engine_interaction::WorldCommand;
use crate::utils::scheduler::SeqSchedule;
use crate::utils::time::Tick;
use crate::world_command::WorldCommand;
use crate::Simulation;
use serde::{Deserialize, Serialize};

Expand Down
File renamed without changes.

0 comments on commit 8b6be29

Please sign in to comment.