I've finally gotten around to messing with this, and have written a new Asteroid "mining" system that destroys the Asteroid when you're done.
Anyhow, I took a look at the FleetInteractionDialogPluginImpl, because I'm contemplating doing a custom, Janino-friendly version that changes things, but I'm really confused thus far

I have figured out the basics:
1. playerFleet and otherFleet are determined at the start of the script via who's talking to whom.
2. dialog.startBattle(BattleCreationContext) takes us to a Battle.
3. After a Battle, I presume that backFromEngagement() is called immediately. I'm not sure how the cases are working there, though.
Stuff I'm confused about:
1. I'm not sure how we get to the Loot screen, or how the Loot screen is populated with Stuff.