As far as I can tell, currently the only way for the scripting interface to remove an item from a SurfaceComponent or SocketComponent is to destroy either the ItemComponent or the SurfaceComponent/SocketComponent containing it. Adding the item to a different surface/container/inventory does not remove it from the original surface, it just results in the item being contained in two surfaces/inventories at once (which in turn causes havoc if the game is saved/loaded).
Since it is not possible to duplicate an ItemComponent (no way to set its onEquipItem etc. hooks), this makes it very hard to work with items on surfaces or in sockets:
- there is no way to move an item from one surface to another, except for convincing the player to pick the item up themselves and do it
- there is no way to expel an item from a surface without destroying either the item or the surface
It would be really nice to be able to cleanly remove an item like the player can.