Browse Source

move leveltable to stats crate

pull/141/head
jake 1 year ago
parent
commit
5d98fb8cc9
  1. 1
      src/common/mod.rs
  2. 2
      src/login/character.rs
  3. 2
      src/ship/character.rs
  4. 2
      src/ship/packet/builder/message.rs
  5. 2
      src/ship/packet/builder/mod.rs
  6. 2
      src/ship/packet/handler/direct_message.rs
  7. 2
      src/ship/packet/handler/lobby.rs
  8. 2
      src/ship/packet/handler/message.rs
  9. 2
      src/ship/packet/handler/room.rs
  10. 1
      stats/Cargo.toml
  11. 0
      stats/src/leveltable.rs
  12. 3
      stats/src/lib.rs

1
src/common/mod.rs

@ -1,7 +1,6 @@
pub mod cipherkeys; pub mod cipherkeys;
pub mod serverstate; pub mod serverstate;
pub mod mainloop; pub mod mainloop;
pub mod leveltable;
pub mod interserver; pub mod interserver;
// https://www.reddit.com/r/rust/comments/33xhhu/how_to_create_an_array_of_structs_that_havent/ // https://www.reddit.com/r/rust/comments/33xhhu/how_to_create_an_array_of_structs_that_havent/

2
src/login/character.rs

@ -18,7 +18,7 @@ use entity::item;
use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY}; use crate::common::cipherkeys::{ELSEWHERE_PRIVATE_KEY, ELSEWHERE_PARRAY};
use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId}; use crate::common::serverstate::{SendServerPacket, RecvServerPacket, ServerState, OnConnect, ClientId};
use crate::common::interserver::{ServerId, InterserverActor, LoginMessage, ShipMessage, Ship}; 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 libpso::{utf8_to_array, utf8_to_utf16_array};
use entity::gateway::{EntityGateway, GatewayError}; use entity::gateway::{EntityGateway, GatewayError};

2
src/ship/character.rs

@ -1,5 +1,5 @@
use libpso::character::character; use libpso::character::character;
use crate::common::leveltable::CharacterStats;
use stats::leveltable::CharacterStats;
use entity::character::CharacterEntity; use entity::character::CharacterEntity;
//use crate::ship::items::{CharacterInventory, CharacterBank}; //use crate::ship::items::{CharacterInventory, CharacterBank};
use crate::ship::items::bank::BankState; use crate::ship::items::bank::BankState;

2
src/ship/packet/builder/message.rs

@ -1,7 +1,7 @@
use libpso::packet::messages::*; use libpso::packet::messages::*;
use libpso::packet::ship::*; use libpso::packet::ship::*;
use entity::item; use entity::item;
use crate::common::leveltable::CharacterStats;
use stats::leveltable::CharacterStats;
use crate::ship::ship::{ShipError}; use crate::ship::ship::{ShipError};
use crate::ship::items::ClientItemId; use crate::ship::items::ClientItemId;
use crate::ship::items::inventory::InventoryItem; use crate::ship::items::inventory::InventoryItem;

2
src/ship/packet/builder/mod.rs

@ -6,7 +6,7 @@ pub mod ship;
use libpso::character::character::Inventory; use libpso::character::character::Inventory;
use libpso::packet::ship::{PlayerHeader, PlayerInfo}; 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::character::CharacterBytesBuilder;
use crate::ship::ship::ClientState; use crate::ship::ship::ClientState;
use crate::ship::location::AreaClient; use crate::ship::location::AreaClient;

2
src/ship/packet/handler/direct_message.rs

@ -3,7 +3,7 @@ use rand::Rng;
use rand::seq::SliceRandom; use rand::seq::SliceRandom;
use libpso::packet::ship::*; use libpso::packet::ship::*;
use libpso::packet::messages::*; use libpso::packet::messages::*;
use crate::common::leveltable::LEVEL_TABLE;
use stats::leveltable::LEVEL_TABLE;
use crate::common::serverstate::ClientId; use crate::common::serverstate::ClientId;
use crate::ship::ship::{SendShipPacket, ShipError, Clients, ItemShops}; use crate::ship::ship::{SendShipPacket, ShipError, Clients, ItemShops};
use crate::ship::location::ClientLocation; use crate::ship::location::ClientLocation;

2
src/ship/packet/handler/lobby.rs

@ -1,6 +1,6 @@
use libpso::packet::ship::*; use libpso::packet::ship::*;
use crate::common::serverstate::ClientId; 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::ship::{SendShipPacket, ShipError, Clients, ShipEvent};
use crate::ship::room::Rooms; use crate::ship::room::Rooms;
use crate::ship::character::{FullCharacterBytesBuilder}; use crate::ship::character::{FullCharacterBytesBuilder};

2
src/ship/packet/handler/message.rs

@ -3,7 +3,7 @@ use libpso::packet::messages::*;
use entity::gateway::EntityGateway; use entity::gateway::EntityGateway;
use entity::item::Meseta; use entity::item::Meseta;
use crate::common::serverstate::ClientId; 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::ship::{SendShipPacket, ShipError, Clients, ItemDropLocation};
use crate::ship::room::Rooms; use crate::ship::room::Rooms;
use crate::ship::location::{ClientLocation, ClientLocationError}; use crate::ship::location::{ClientLocation, ClientLocationError};

2
src/ship/packet/handler/room.rs

@ -6,7 +6,7 @@ use async_std::sync::Arc;
use libpso::packet::ship::*; use libpso::packet::ship::*;
use libpso::packet::messages::*; use libpso::packet::messages::*;
use crate::common::serverstate::ClientId; use crate::common::serverstate::ClientId;
use crate::common::leveltable::LEVEL_TABLE;
use stats::leveltable::LEVEL_TABLE;
use entity::gateway::EntityGateway; use entity::gateway::EntityGateway;
use entity::character::SectionID; use entity::character::SectionID;
use entity::room::{NewRoomEntity, RoomEntityMode, RoomNote}; use entity::room::{NewRoomEntity, RoomEntityMode, RoomNote};

1
stats/Cargo.toml

@ -7,4 +7,5 @@ edition = "2021"
entity = { workspace = true } entity = { workspace = true }
toml = { workspace = true } toml = { workspace = true }
serde = { workspace = true } serde = { workspace = true }
serde_json = { workspace = true }
lazy_static = { workspace = true } lazy_static = { workspace = true }

0
src/common/leveltable.rs → stats/src/leveltable.rs

3
stats/src/lib.rs

@ -1 +1,4 @@
#![feature(lazy_cell)]
pub mod items; pub mod items;
pub mod leveltable;
Loading…
Cancel
Save