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:
Zed A. Shaw 2025-02-24 01:56:16 -05:00
parent 0878a9e978
commit dfd59065f7
8 changed files with 43 additions and 36 deletions

View file

@ -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];