+void Inventory_pickupitem(Pickup this, entity player)
+{
+ //LOG_DEBUGF("entity %i picked up %s", player, this.m_name);
+ entity store = IS_PLAYER(player) ? PS(player) : player;
+ ++store.inventory.inv_items[this.m_id];
+ Inventory_update(store);
+}
+
+void Inventory_clear(entity store)
+{
+ // NOTE: you will need to perform Inventory_update after this to update the storage entity
+ // (unless store is the storage entity)
+ FOREACH(Items, true, {
+ .int fld = inv_items[it.m_id];
+ store.(fld) = 0;
+ });
+}
+