diff options
27 files changed, 38 insertions, 39 deletions
@@ -990,27 +990,13 @@ dependencies = [ "anyhow", "clap", "env_logger", - "hurrycurry-client-lib", + "hurrycurry-game-core", "hurrycurry-protocol", "log", "rustls", ] [[package]] -name = "hurrycurry-client-lib" -version = "3.0.0" -dependencies = [ - "anyhow", - "futures-util", - "hurrycurry-protocol", - "log", - "serde_json", - "tokio", - "tokio-tungstenite", - "tungstenite", -] - -[[package]] name = "hurrycurry-data" version = "0.1.0" dependencies = [ @@ -1050,7 +1036,7 @@ dependencies = [ "clap", "env_logger", "futures-util", - "hurrycurry-client-lib", + "hurrycurry-game-core", "hurrycurry-protocol", "log", "rustls", @@ -1063,6 +1049,20 @@ dependencies = [ ] [[package]] +name = "hurrycurry-game-core" +version = "3.0.0" +dependencies = [ + "anyhow", + "futures-util", + "hurrycurry-protocol", + "log", + "serde_json", + "tokio", + "tokio-tungstenite", + "tungstenite", +] + +[[package]] name = "hurrycurry-locale" version = "0.1.0" dependencies = [ @@ -1093,7 +1093,7 @@ version = "3.0.0" dependencies = [ "anyhow", "env_logger", - "hurrycurry-client-lib", + "hurrycurry-game-core", "hurrycurry-protocol", "log", "markup", @@ -1134,8 +1134,8 @@ dependencies = [ "futures-util", "get_if_addrs", "hurrycurry-bot", - "hurrycurry-client-lib", "hurrycurry-data", + "hurrycurry-game-core", "hurrycurry-locale", "hurrycurry-protocol", "igd", @@ -3,7 +3,7 @@ members = [ "server", "server/book-export", "server/bot", - "server/client-lib", + "server/game-core", "server/data", "server/discover", "server/editor", diff --git a/server/Cargo.toml b/server/Cargo.toml index add1329f..b6da3738 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -28,7 +28,7 @@ mdns-sd = { version = "0.15.1", optional = true } hurrycurry-locale = { path = "locale" } hurrycurry-protocol = { path = "protocol" } -hurrycurry-client-lib = { path = "client-lib" } +hurrycurry-game-core = { path = "game-core" } hurrycurry-bot = { path = "bot" } hurrycurry-data = { path = "data" } diff --git a/server/bot/Cargo.toml b/server/bot/Cargo.toml index c8717986..ad63f709 100644 --- a/server/bot/Cargo.toml +++ b/server/bot/Cargo.toml @@ -4,7 +4,7 @@ version = "3.0.0" edition = "2024" [dependencies] -hurrycurry-client-lib = { path = "../client-lib", features = ["tokio-network"] } +hurrycurry-game-core = { path = "../game-core", features = ["tokio-network"] } hurrycurry-protocol = { path = "../protocol" } log = "0.4.28" anyhow = "1.0.99" diff --git a/server/bot/src/algos/customer.rs b/server/bot/src/algos/customer.rs index bd757d9e..06dc373c 100644 --- a/server/bot/src/algos/customer.rs +++ b/server/bot/src/algos/customer.rs @@ -22,7 +22,7 @@ use crate::{ pathfinding::{Path, find_path}, random_float, }; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_protocol::{ DemandIndex, Hand, ItemLocation, Message, PacketS, PlayerClass, PlayerID, Score, glam::{IVec2, Vec2}, diff --git a/server/bot/src/algos/dishwasher.rs b/server/bot/src/algos/dishwasher.rs index 94368558..5dbf954f 100644 --- a/server/bot/src/algos/dishwasher.rs +++ b/server/bot/src/algos/dishwasher.rs @@ -17,7 +17,7 @@ */ use super::simple::State; use crate::{BotAlgo, BotInput, algos::simple::Context, pathfinding::Path}; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_protocol::{ItemIndex, PlayerID, glam::IVec2}; #[derive(Default)] diff --git a/server/bot/src/algos/frank.rs b/server/bot/src/algos/frank.rs index c815c75f..3515f96d 100644 --- a/server/bot/src/algos/frank.rs +++ b/server/bot/src/algos/frank.rs @@ -21,7 +21,7 @@ use crate::{ BotAlgo, BotInput, pathfinding::{Path, find_path_to_neighbour}, }; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_protocol::{Message, PacketS, PlayerClass, PlayerID, glam::Vec2}; #[derive(Default)] diff --git a/server/bot/src/algos/simple.rs b/server/bot/src/algos/simple.rs index f8d01b3a..0145cfcb 100644 --- a/server/bot/src/algos/simple.rs +++ b/server/bot/src/algos/simple.rs @@ -19,7 +19,7 @@ use crate::{ BotAlgo, BotInput, pathfinding::{Path, find_path_to_neighbour}, }; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_protocol::{ ItemIndex, Message, PlayerID, Recipe, RecipeIndex, TileIndex, glam::IVec2, }; diff --git a/server/bot/src/algos/test.rs b/server/bot/src/algos/test.rs index 361cf4ea..20abbabd 100644 --- a/server/bot/src/algos/test.rs +++ b/server/bot/src/algos/test.rs @@ -19,7 +19,7 @@ use crate::{ BotAlgo, BotInput, pathfinding::{Path, find_path_to_neighbour}, }; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_protocol::{ItemIndex, Message, PlayerID, glam::IVec2}; use log::info; diff --git a/server/bot/src/algos/waiter.rs b/server/bot/src/algos/waiter.rs index 8fccd34a..9273eb42 100644 --- a/server/bot/src/algos/waiter.rs +++ b/server/bot/src/algos/waiter.rs @@ -17,7 +17,7 @@ */ use super::simple::State; use crate::{BotAlgo, BotInput, algos::simple::Context, pathfinding::Path}; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_protocol::{ItemIndex, PlayerID, glam::IVec2}; use log::debug; diff --git a/server/bot/src/lib.rs b/server/bot/src/lib.rs index 927ac7b0..a3889021 100644 --- a/server/bot/src/lib.rs +++ b/server/bot/src/lib.rs @@ -19,7 +19,7 @@ pub mod algos; pub mod pathfinding; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_protocol::{ PacketS, PlayerID, glam::{IVec2, Vec2}, diff --git a/server/bot/src/main.rs b/server/bot/src/main.rs index 22dc2e3f..2fbf274f 100644 --- a/server/bot/src/main.rs +++ b/server/bot/src/main.rs @@ -18,7 +18,7 @@ use anyhow::Result; use clap::Parser; use hurrycurry_bot::{BotAlgo, BotInput, algos::ALGO_CONSTRUCTORS}; -use hurrycurry_client_lib::{Game, network::sync::Network}; +use hurrycurry_game_core::{Game, network::sync::Network}; use hurrycurry_protocol::{Character, Hand, ItemLocation, PacketC, PacketS, PlayerClass, PlayerID}; use log::warn; use std::{thread::sleep, time::Duration}; diff --git a/server/editor/Cargo.toml b/server/editor/Cargo.toml index a4fb8bc2..80b939fe 100644 --- a/server/editor/Cargo.toml +++ b/server/editor/Cargo.toml @@ -20,4 +20,4 @@ shlex = "1.3.0" serde_yml = "0.0.12" hurrycurry-protocol = { path = "../protocol" } -hurrycurry-client-lib = { path = "../client-lib", features = ["sync-network"] } +hurrycurry-game-core = { path = "../game-core", features = ["sync-network"] } diff --git a/server/editor/src/main.rs b/server/editor/src/main.rs index be0fcbc5..86cb4b40 100644 --- a/server/editor/src/main.rs +++ b/server/editor/src/main.rs @@ -3,7 +3,7 @@ pub mod save; use anyhow::{Result, anyhow}; use clap::Parser; use futures_util::{SinkExt, StreamExt}; -use hurrycurry_client_lib::network::sync::Network; +use hurrycurry_game_core::network::sync::Network; use hurrycurry_protocol::{ Character, Gamedata, Hand, Message, PacketC, PacketS, PlayerClass, PlayerID, TileIndex, VERSION, diff --git a/server/client-lib/Cargo.toml b/server/game-core/Cargo.toml index 47a75e7e..8d764ab8 100644 --- a/server/client-lib/Cargo.toml +++ b/server/game-core/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "hurrycurry-client-lib" +name = "hurrycurry-game-core" version = "3.0.0" edition = "2024" diff --git a/server/client-lib/src/gamedata_index.rs b/server/game-core/src/gamedata_index.rs index 8aa5e4af..8aa5e4af 100644 --- a/server/client-lib/src/gamedata_index.rs +++ b/server/game-core/src/gamedata_index.rs diff --git a/server/client-lib/src/lib.rs b/server/game-core/src/lib.rs index 79c2ed01..cc77e570 100644 --- a/server/client-lib/src/lib.rs +++ b/server/game-core/src/lib.rs @@ -29,7 +29,6 @@ use std::{ sync::Arc, time::Instant, }; - use crate::gamedata_index::GamedataIndex; #[derive(Debug, Clone, PartialEq)] diff --git a/server/client-lib/src/network/mod.rs b/server/game-core/src/network/mod.rs index 45963567..45963567 100644 --- a/server/client-lib/src/network/mod.rs +++ b/server/game-core/src/network/mod.rs diff --git a/server/client-lib/src/network/sync.rs b/server/game-core/src/network/sync.rs index 9854b58e..9854b58e 100644 --- a/server/client-lib/src/network/sync.rs +++ b/server/game-core/src/network/sync.rs diff --git a/server/client-lib/src/network/tokio.rs b/server/game-core/src/network/tokio.rs index 6e7f0902..6e7f0902 100644 --- a/server/client-lib/src/network/tokio.rs +++ b/server/game-core/src/network/tokio.rs diff --git a/server/client-lib/src/spatial_index.rs b/server/game-core/src/spatial_index.rs index 8dd0cc22..8dd0cc22 100644 --- a/server/client-lib/src/spatial_index.rs +++ b/server/game-core/src/spatial_index.rs diff --git a/server/registry/Cargo.toml b/server/registry/Cargo.toml index 8c5ad971..77ab7476 100644 --- a/server/registry/Cargo.toml +++ b/server/registry/Cargo.toml @@ -18,4 +18,4 @@ tokio-tungstenite = { version = "0.27.0", features = [ rustls = { version = "0.23.31", features = ["ring"] } hurrycurry-protocol = { path = "../protocol" } -hurrycurry-client-lib = { path = "../client-lib" } +hurrycurry-game-core = { path = "../game-core" } diff --git a/server/registry/src/conn_test.rs b/server/registry/src/conn_test.rs index e4f4fa63..bc371a10 100644 --- a/server/registry/src/conn_test.rs +++ b/server/registry/src/conn_test.rs @@ -16,7 +16,7 @@ */ use anyhow::{Context, Result, bail}; -use hurrycurry_client_lib::network::tokio::Network; +use hurrycurry_game_core::network::tokio::Network; use hurrycurry_protocol::PacketC; use log::info; use std::{ diff --git a/server/src/entity/mod.rs b/server/src/entity/mod.rs index 4bca9dc8..34815d0d 100644 --- a/server/src/entity/mod.rs +++ b/server/src/entity/mod.rs @@ -38,7 +38,7 @@ use campaign::{Gate, Map}; use conveyor::Conveyor; use customers::Customers; use environment_effect::{EnvironmentController, EnvironmentEffectController}; -use hurrycurry_client_lib::Game; +use hurrycurry_game_core::Game; use hurrycurry_data::{Serverdata, entities::EntityDecl}; use hurrycurry_locale::TrError; use hurrycurry_protocol::{Character, ItemLocation, PacketC, PacketS, PlayerID}; diff --git a/server/src/entity/tag_minigame.rs b/server/src/entity/tag_minigame.rs index 7c6c721f..a76b0511 100644 --- a/server/src/entity/tag_minigame.rs +++ b/server/src/entity/tag_minigame.rs @@ -17,7 +17,7 @@ */ use super::{Entity, EntityContext}; use anyhow::Result; -use hurrycurry_client_lib::{Item, Tile}; +use hurrycurry_game_core::{Item, Tile}; use hurrycurry_protocol::{ Hand, ItemIndex, ItemLocation, Message, PacketC, PlayerID, TileIndex, glam::IVec2, }; diff --git a/server/src/interaction.rs b/server/src/interaction.rs index dfe62121..a2e8643a 100644 --- a/server/src/interaction.rs +++ b/server/src/interaction.rs @@ -15,7 +15,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -use hurrycurry_client_lib::{Involvement, Item, gamedata_index::GamedataIndex}; +use hurrycurry_game_core::{Involvement, Item, gamedata_index::GamedataIndex}; use hurrycurry_protocol::{Gamedata, ItemLocation, PacketC, PlayerID, Recipe, Score, TileIndex}; use log::info; use std::collections::{BTreeSet, VecDeque}; diff --git a/server/src/server.rs b/server/src/server.rs index 1886715d..7ded8eb7 100644 --- a/server/src/server.rs +++ b/server/src/server.rs @@ -23,7 +23,7 @@ use crate::{ scoreboard::ScoreboardStore, }; use anyhow::{Context, Result}; -use hurrycurry_client_lib::{Game, Involvement, Item, Player, Tile}; +use hurrycurry_game_core::{Game, Involvement, Item, Player, Tile}; use hurrycurry_data::{Serverdata, index::DataIndex}; use hurrycurry_locale::{ FALLBACK_LOCALE, TrError, |