diff --git a/common/src/lib.rs b/common/src/lib.rs index 9b336432e2..3ef7b3604c 100644 --- a/common/src/lib.rs +++ b/common/src/lib.rs @@ -18,6 +18,7 @@ pub mod comp; pub mod figure; pub mod inventory; pub mod msg; +pub mod npc; pub mod ray; pub mod state; pub mod sys; @@ -25,7 +26,6 @@ pub mod terrain; pub mod util; pub mod vol; pub mod volumes; -pub mod npc; /// The networking module containing high-level wrappers of `TcpListener` and `TcpStream` (`PostOffice` and `PostBox` respectively) and data types used by both the server and client. /// # Examples diff --git a/common/src/npc.rs b/common/src/npc.rs index 1436b767ed..2e16f849fd 100644 --- a/common/src/npc.rs +++ b/common/src/npc.rs @@ -1,17 +1,17 @@ -use serde_json; use rand::seq::SliceRandom; +use serde_json; use std::fs::File; pub enum NpcKind { Wolf, - Pig + Pig, } impl NpcKind { fn as_str(&self) -> &'static str { match *self { NpcKind::Wolf => "wolf", - NpcKind::Pig => "pig" + NpcKind::Pig => "pig", } } } diff --git a/server/src/cmd.rs b/server/src/cmd.rs index 5dbae5c0cb..cdcc19f1f2 100644 --- a/server/src/cmd.rs +++ b/server/src/cmd.rs @@ -3,7 +3,11 @@ //! and provide a handler function. use crate::Server; -use common::{comp, msg::ServerMsg, npc::{NpcKind, get_npc_name}}; +use common::{ + comp, + msg::ServerMsg, + npc::{get_npc_name, NpcKind}, +}; use specs::{Builder, Entity as EcsEntity, Join}; use vek::*;