mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
lua: hud library
This commit is contained in:
parent
ffed4319da
commit
7e553efdec
14 changed files with 140 additions and 31 deletions
|
|
@ -33,6 +33,10 @@ void Inventories::store(std::shared_ptr<Inventory> inv) {
|
|||
map[inv->getId()] = inv;
|
||||
}
|
||||
|
||||
void Inventories::remove(int64_t id) {
|
||||
map.erase(id);
|
||||
}
|
||||
|
||||
std::shared_ptr<Inventory> Inventories::get(int64_t id) {
|
||||
auto found = map.find(id);
|
||||
if (found == map.end())
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ public:
|
|||
/* Store inventory */
|
||||
void store(std::shared_ptr<Inventory> inv);
|
||||
|
||||
/* Remove inventory from map */
|
||||
void remove(int64_t id);
|
||||
|
||||
/* Get inventory by id (works with both real and virtual)*/
|
||||
std::shared_ptr<Inventory> get(int64_t id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue