itemtypes, and filtering items by itemtype/buc/etc.

This commit is contained in:
Llywelwyn 2023-10-05 03:54:31 +01:00
parent f3af75bf44
commit 9c1298df6b
10 changed files with 386 additions and 227 deletions

View file

@ -18,6 +18,11 @@ pub fn restore_invkeys(invkeys: HashMap<UniqueInventoryItem, usize>) {
INVKEYS.lock().unwrap().extend(invkeys);
}
pub fn check_key(idx: usize) -> bool {
let lock = ASSIGNEDKEYS.lock().unwrap();
lock[idx]
}
pub fn item_exists(item: &UniqueInventoryItem) -> Option<usize> {
let invkeys = INVKEYS.lock().unwrap();
use bracket_lib::prelude::*;