Maybe to player trash? then ground marking it for deletion.
I've thought about player trash myself. But IIRC, player trash is not available from the start of the game; instead it requires that logistic bots are researched. So, before player trash is available, we could first try to move the used fuel to the player's main inventory, or skip the player entirely and spill everything on the ground directly.
I think it would also be OK to have it shrug and give up, possibly make an alert or something in the case of nowhere to put empty fuel too..
Adding a user setting may be a good idea …
but dropping the spent cannisters would possibly work?
It should. LuaSurface::spill_item_stack returns an array with the created item-on-ground entities, so we can directly loop over these items and mark them for deconstruction.
However, I'm not sure that marking spilled items for deconstruction would really be useful: Suppose the items have been spilled because there was no space in the vehicle trunk or player inventories. Now, if the player had a personal roboport, wouldn't the bots immediately try to pick up the items again? As the player doesn't have inventory space left, I imagine the bots would try to move the spilled items to a logistic chest (which may be far away) or remain in place because they can't drop the items (so if the vehicle would move on the bots would be lost to the player).