summaryrefslogtreecommitdiff
path: root/src/purgatory.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/purgatory.rs')
-rw-r--r--src/purgatory.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/purgatory.rs b/src/purgatory.rs
index df7f3e9..b96065e 100644
--- a/src/purgatory.rs
+++ b/src/purgatory.rs
@@ -6,7 +6,7 @@ use specs::{
use crate::{
RoomId,
- defaultencyclopedia::default_encyclopedia,
+ Encyclopedia,
room::Room,
roomtemplate::RoomTemplate,
systems::{
@@ -26,7 +26,7 @@ pub fn purgatory_id() -> RoomId {
RoomId{name: String::from("+")}
}
-pub fn create_purgatory<'a, 'b>() -> Room<'a, 'b> {
+pub fn create_purgatory<'a, 'b>(encyclopedia: Encyclopedia) -> Room<'a, 'b> {
let dispatcher = DispatcherBuilder::new()
.with(Volate, "volate", &[])
.with(RegisterNew::default(), "registernew", &[])
@@ -38,7 +38,7 @@ pub fn create_purgatory<'a, 'b>() -> Room<'a, 'b> {
.with(Create, "create", &["view"])
.with(Remove, "remove", &["view", "move"])
.build();
- let mut room = Room::new(purgatory_id(), default_encyclopedia(), dispatcher);
+ let mut room = Room::new(purgatory_id(), encyclopedia, dispatcher);
room.load_from_template(&RoomTemplate::from_json(&json!({
"width": 11,
"height": 11,