diff --git a/src/common/mod.rs b/src/common/mod.rs index d02076e..c8adde9 100644 --- a/src/common/mod.rs +++ b/src/common/mod.rs @@ -1,7 +1,6 @@ pub mod cipherkeys; pub mod serverstate; pub mod mainloop; -pub mod leveltable; pub mod interserver; // https://www.reddit.com/r/rust/comments/33xhhu/how_to_create_an_array_of_structs_that_havent/ diff --git a/src/login/character.rs b/src/login/character.rs index 07969ef..ef74730 100644 --- a/src/login/character.rs +++ b/src/login/character.rs @@ -18,7 +18,7 @@ use entity::item; use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY}; use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId}; use crate::common::interserver::{ServerId, InterserverActor, LoginMessage, ShipMessage, Ship}; -use crate::common::leveltable::LEVEL_TABLE; +use stats::leveltable::LEVEL_TABLE; use libpso::{utf8_to_array, utf8_to_utf16_array}; use entity::gateway::{EntityGateway, GatewayError}; diff --git a/src/ship/character.rs b/src/ship/character.rs index afe73c6..90ba63b 100644 --- a/src/ship/character.rs +++ b/src/ship/character.rs @@ -1,5 +1,5 @@ use libpso::character::character; -use crate::common::leveltable::CharacterStats; +use stats::leveltable::CharacterStats; use entity::character::CharacterEntity; //use crate::ship::items::{CharacterInventory, CharacterBank}; use crate::ship::items::bank::BankState; diff --git a/src/ship/packet/builder/message.rs b/src/ship/packet/builder/message.rs index 85bc90b..d420187 100644 --- a/src/ship/packet/builder/message.rs +++ b/src/ship/packet/builder/message.rs @@ -1,7 +1,7 @@ use libpso::packet::messages::*; use libpso::packet::ship::*; use entity::item; -use crate::common::leveltable::CharacterStats; +use stats::leveltable::CharacterStats; use crate::ship::ship::{ShipError}; use crate::ship::items::ClientItemId; use crate::ship::items::inventory::InventoryItem; diff --git a/src/ship/packet/builder/mod.rs b/src/ship/packet/builder/mod.rs index f74015e..4872aaa 100644 --- a/src/ship/packet/builder/mod.rs +++ b/src/ship/packet/builder/mod.rs @@ -6,7 +6,7 @@ pub mod ship; use libpso::character::character::Inventory; use libpso::packet::ship::{PlayerHeader, PlayerInfo}; -use crate::common::leveltable::LEVEL_TABLE; +use stats::leveltable::LEVEL_TABLE; use crate::ship::character::CharacterBytesBuilder; use crate::ship::ship::ClientState; use crate::ship::location::AreaClient; diff --git a/src/ship/packet/handler/direct_message.rs b/src/ship/packet/handler/direct_message.rs index c43efc9..dea6911 100644 --- a/src/ship/packet/handler/direct_message.rs +++ b/src/ship/packet/handler/direct_message.rs @@ -3,7 +3,7 @@ use rand::Rng; use rand::seq::SliceRandom; use libpso::packet::ship::*; use libpso::packet::messages::*; -use crate::common::leveltable::LEVEL_TABLE; +use stats::leveltable::LEVEL_TABLE; use crate::common::serverstate::ClientId; use crate::ship::ship::{SendShipPacket, ShipError, Clients, ItemShops}; use crate::ship::location::ClientLocation; diff --git a/src/ship/packet/handler/lobby.rs b/src/ship/packet/handler/lobby.rs index ae95afb..d085cc6 100644 --- a/src/ship/packet/handler/lobby.rs +++ b/src/ship/packet/handler/lobby.rs @@ -1,6 +1,6 @@ use libpso::packet::ship::*; use crate::common::serverstate::ClientId; -use crate::common::leveltable::LEVEL_TABLE; +use stats::leveltable::LEVEL_TABLE; use crate::ship::ship::{SendShipPacket, ShipError, Clients, ShipEvent}; use crate::ship::room::Rooms; use crate::ship::character::{FullCharacterBytesBuilder}; diff --git a/src/ship/packet/handler/message.rs b/src/ship/packet/handler/message.rs index a46b90c..497f2d9 100644 --- a/src/ship/packet/handler/message.rs +++ b/src/ship/packet/handler/message.rs @@ -3,7 +3,7 @@ use libpso::packet::messages::*; use entity::gateway::EntityGateway; use entity::item::Meseta; use crate::common::serverstate::ClientId; -use crate::common::leveltable::LEVEL_TABLE; +use stats::leveltable::LEVEL_TABLE; use crate::ship::ship::{SendShipPacket, ShipError, Clients, ItemDropLocation}; use crate::ship::room::Rooms; use crate::ship::location::{ClientLocation, ClientLocationError}; diff --git a/src/ship/packet/handler/room.rs b/src/ship/packet/handler/room.rs index cf5d6af..9fc8ccc 100644 --- a/src/ship/packet/handler/room.rs +++ b/src/ship/packet/handler/room.rs @@ -6,7 +6,7 @@ use async_std::sync::Arc; use libpso::packet::ship::*; use libpso::packet::messages::*; use crate::common::serverstate::ClientId; -use crate::common::leveltable::LEVEL_TABLE; +use stats::leveltable::LEVEL_TABLE; use entity::gateway::EntityGateway; use entity::character::SectionID; use entity::room::{NewRoomEntity, RoomEntityMode, RoomNote}; diff --git a/stats/Cargo.toml b/stats/Cargo.toml index e1d5801..6cebc62 100644 --- a/stats/Cargo.toml +++ b/stats/Cargo.toml @@ -7,4 +7,5 @@ edition = "2021" entity = { workspace = true } toml = { workspace = true } serde = { workspace = true } +serde_json = { workspace = true } lazy_static = { workspace = true } diff --git a/src/common/leveltable.rs b/stats/src/leveltable.rs similarity index 100% rename from src/common/leveltable.rs rename to stats/src/leveltable.rs diff --git a/stats/src/lib.rs b/stats/src/lib.rs index 339b22d..0564e34 100644 --- a/stats/src/lib.rs +++ b/stats/src/lib.rs @@ -1 +1,4 @@ +#![feature(lazy_cell)] + pub mod items; +pub mod leveltable;