replaces onInventoryChanged() with markDirty()