Thanks for this. I hadn't started modding in Avorion yet I was able to use this as a basis for something I wanted to do. Which was Clear Recent Items.
So 2 things I would like to see. First something to remember what you set so you don't have to keep setting it.
The second is a simple change is related to what I made my mod for. When you remove and add the items they come back as "new" items.
If you change
inv:addAt(iitem, index, amount)
to
inv:addAt(iitem, index, amount, 0)
It will change it so the item doesn't appear as "new" and flashing.
You could make it a checkbox option if you wanted but I would think if people are trashing items they don't care for it to show up as a new item.