Inventory and lighting improved, now to get ready for going down a level and that's most of the game loop working.
This commit is contained in:
parent
0878a9e978
commit
dfd59065f7
8 changed files with 43 additions and 36 deletions
|
@ -14,6 +14,10 @@ namespace components {
|
|||
items.push_back(new_item);
|
||||
}
|
||||
|
||||
bool Inventory::has_item(size_t at) {
|
||||
return at < items.size();
|
||||
}
|
||||
|
||||
InventoryItem& Inventory::get(size_t at) {
|
||||
dbc::check(at < items.size(), fmt::format("inventory index {} too big", at));
|
||||
return items[at];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue