summaryrefslogtreecommitdiff
path: root/src/playerstate.rs
diff options
context:
space:
mode:
authortroido <troido@protonmail.com>2020-03-05 14:47:48 +0100
committertroido <troido@protonmail.com>2020-03-05 14:47:48 +0100
commita520382eb19e4234ed52fd1eb9fb965b5967d522 (patch)
tree5b4a8831cd544f57c6119eac5785973dc9e9bd50 /src/playerstate.rs
parent7846b871f5c9d57a19dbf09b7acbf0d6b38a69ca (diff)
equipment is now a part of the inventory
Diffstat (limited to 'src/playerstate.rs')
-rw-r--r--src/playerstate.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/playerstate.rs b/src/playerstate.rs
index acf718a..0e4fd3d 100644
--- a/src/playerstate.rs
+++ b/src/playerstate.rs
@@ -131,7 +131,7 @@ impl PlayerState {
let item_ent = encyclopedia.construct(template).unwrap();
for component in item_ent {
if let ComponentWrapper::Item(item) = component {
- return item;
+ return (item, false);
}
}
panic!("Item in inventory does not have item component")
@@ -144,7 +144,7 @@ impl PlayerState {
ComponentWrapper::Movable(Movable{cooldown: 2}),
ComponentWrapper::Autofight(Autofight::default()),
ComponentWrapper::Faction(Faction::Good),
- ComponentWrapper::Equipment(Equipment{equipment: hashmap!(Slot::Hand => None, Slot::Body => None)})
+ ComponentWrapper::Equipment(Equipment{slots: vec!(Slot::Hand, Slot::Body)})
]
}
}