diff options
| author | troido <troido@protonmail.com> | 2020-02-22 22:00:32 +0100 |
|---|---|---|
| committer | troido <troido@protonmail.com> | 2020-02-22 22:00:32 +0100 |
| commit | f4331041e5d906f95063f317852f32f19e6cdf9c (patch) | |
| tree | e855402de7b2dcec81c91d97ab6a7e359689ecc5 /src/playerstate.rs | |
| parent | 2b0cc677f4092d94b31e95f3e9961ec6ed91327b (diff) | |
items now have an action enum
Diffstat (limited to 'src/playerstate.rs')
| -rw-r--r-- | src/playerstate.rs | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/playerstate.rs b/src/playerstate.rs index 150b9eb..36c932c 100644 --- a/src/playerstate.rs +++ b/src/playerstate.rs @@ -9,7 +9,8 @@ use crate::{ components::{Visible, Player, Inventory, Health, Item}, Result, aerr, - Sprite + Sprite, + Encyclopedia }; #[derive(Debug, Clone)] @@ -85,14 +86,20 @@ impl PlayerState { }) } - pub fn construct(&self) -> PreEntity { + pub fn construct(&self, encyclopedia: &Encyclopedia) -> PreEntity { vec