diff options
| author | troido <troido@protonmail.com> | 2020-03-03 19:52:11 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-03-03 19:52:11 +0100 |
| commit | 42448500c1c2e3dd5d6a0a62c59f1f0367c12b04 (patch) | |
| tree | d075540851213a90d6d77b582a5216d9f107f8c4 /src/purgatory.rs | |
| parent | f844ed18e29465177a339f244800fb7a2e77daa9 (diff) | |
moved default encyclopedia to data file
Diffstat (limited to 'src/purgatory.rs')
| -rw-r--r-- | src/purgatory.rs | 6 |
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, |
