From 8b6be294bee9c536977f24c2b29bb8a7181a41c8 Mon Sep 17 00:00:00 2001 From: Paris DOUADY Date: Fri, 15 Dec 2023 11:32:56 +0100 Subject: [PATCH] rename engine_interaction -> world_command --- headless/src/main.rs | 2 +- native_app/src/gui/addtrain.rs | 2 +- native_app/src/gui/chat.rs | 2 +- native_app/src/gui/inspect/inspect_building.rs | 2 +- native_app/src/gui/mod.rs | 2 +- native_app/src/gui/roadbuild.rs | 2 +- native_app/src/gui/specialbuilding.rs | 2 +- native_app/src/gui/terraforming.rs | 2 +- native_app/src/gui/topgui.rs | 2 +- native_app/src/gui/windows/debug.rs | 2 +- native_app/src/gui/zoneedit.rs | 2 +- native_app/src/init.rs | 2 +- native_app/src/network.rs | 4 ++-- native_app/src/uiworld.rs | 2 +- simulation/src/economy/government.rs | 2 +- simulation/src/lib.rs | 6 +++--- simulation/src/tests/mod.rs | 2 +- simulation/src/utils/replay.rs | 2 +- simulation/src/{engine_interaction.rs => world_command.rs} | 0 19 files changed, 21 insertions(+), 21 deletions(-) rename simulation/src/{engine_interaction.rs => world_command.rs} (100%) diff --git a/headless/src/main.rs b/headless/src/main.rs index 1f43359e..e6a248de 100644 --- a/headless/src/main.rs +++ b/headless/src/main.rs @@ -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; diff --git a/native_app/src/gui/addtrain.rs b/native_app/src/gui/addtrain.rs index 1419b498..ca2a24de 100644 --- a/native_app/src/gui/addtrain.rs +++ b/native_app/src/gui/addtrain.rs @@ -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; diff --git a/native_app/src/gui/chat.rs b/native_app/src/gui/chat.rs index c2ade8ea..30371727 100644 --- a/native_app/src/gui/chat.rs +++ b/native_app/src/gui/chat.rs @@ -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}; diff --git a/native_app/src/gui/inspect/inspect_building.rs b/native_app/src/gui/inspect/inspect_building.rs index e4e2f943..dd12c4a4 100644 --- a/native_app/src/gui/inspect/inspect_building.rs +++ b/native_app/src/gui/inspect/inspect_building.rs @@ -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; diff --git a/native_app/src/gui/mod.rs b/native_app/src/gui/mod.rs index f6f4344f..340838c4 100644 --- a/native_app/src/gui/mod.rs +++ b/native_app/src/gui/mod.rs @@ -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; diff --git a/native_app/src/gui/roadbuild.rs b/native_app/src/gui/roadbuild.rs index 06f645bf..6d611896 100644 --- a/native_app/src/gui/roadbuild.rs +++ b/native_app/src/gui/roadbuild.rs @@ -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}; diff --git a/native_app/src/gui/specialbuilding.rs b/native_app/src/gui/specialbuilding.rs index 793b4fea..d518eee2 100644 --- a/native_app/src/gui/specialbuilding.rs +++ b/native_app/src/gui/specialbuilding.rs @@ -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; diff --git a/native_app/src/gui/terraforming.rs b/native_app/src/gui/terraforming.rs index ac81ecb4..6a0ac067 100644 --- a/native_app/src/gui/terraforming.rs +++ b/native_app/src/gui/terraforming.rs @@ -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)] diff --git a/native_app/src/gui/topgui.rs b/native_app/src/gui/topgui.rs index b7c36f06..96c26d2e 100644 --- a/native_app/src/gui/topgui.rs +++ b/native_app/src/gui/topgui.rs @@ -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}; diff --git a/native_app/src/gui/windows/debug.rs b/native_app/src/gui/windows/debug.rs index d66609f5..d8504eca 100644 --- a/native_app/src/gui/windows/debug.rs +++ b/native_app/src/gui/windows/debug.rs @@ -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 { diff --git a/native_app/src/gui/zoneedit.rs b/native_app/src/gui/zoneedit.rs index a1a183d4..aa02ce10 100644 --- a/native_app/src/gui/zoneedit.rs +++ b/native_app/src/gui/zoneedit.rs @@ -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; diff --git a/native_app/src/init.rs b/native_app/src/init.rs index a2268ac5..596803b6 100644 --- a/native_app/src/init.rs +++ b/native_app/src/init.rs @@ -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 diff --git a/native_app/src/network.rs b/native_app/src/network.rs index ca501258..9915f659 100644 --- a/native_app/src/network.rs +++ b/native_app/src/network.rs @@ -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 { @@ -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; diff --git a/native_app/src/uiworld.rs b/native_app/src/uiworld.rs index a47a8b00..82d2ff20 100644 --- a/native_app/src/uiworld.rs +++ b/native_app/src/uiworld.rs @@ -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; diff --git a/simulation/src/economy/government.rs b/simulation/src/economy/government.rs index c0fa33ad..1084e573 100644 --- a/simulation/src/economy/government.rs +++ b/simulation/src/economy/government.rs @@ -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}; diff --git a/simulation/src/lib.rs b/simulation/src/lib.rs index f0a99263..838874a2 100644 --- a/simulation/src/lib.rs +++ b/simulation/src/lib.rs @@ -1,7 +1,6 @@ #![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; @@ -9,6 +8,7 @@ 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; @@ -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; @@ -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; diff --git a/simulation/src/tests/mod.rs b/simulation/src/tests/mod.rs index c721383e..1f873c62 100644 --- a/simulation/src/tests/mod.rs +++ b/simulation/src/tests/mod.rs @@ -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; diff --git a/simulation/src/utils/replay.rs b/simulation/src/utils/replay.rs index f1768085..3ed35875 100644 --- a/simulation/src/utils/replay.rs +++ b/simulation/src/utils/replay.rs @@ -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}; diff --git a/simulation/src/engine_interaction.rs b/simulation/src/world_command.rs similarity index 100% rename from simulation/src/engine_interaction.rs rename to simulation/src/world_command.rs