Got lucky once again! I found the function that was blagging cash to the hangar and was able to prevent it. However, the AI trader still makes the attempt to deliver the cargo, but fails and leaves the hangar with the cargo still in its pod.
The ideal solution would be to prevent the AI from taking the mission in the first place. I'm still aiming for that goal. This is just a stop-gap to sort of prevent cheating. You can still rob those traders that are leaving your hangar with those goods and steal them. But nothing stops you from doing that from any other location in the game anyway. So I'm not sure how far to pursue this.
Ugh... for ever step forward. While testing my fix for preventing AI traders blagging cash to players hangar I had noticed a new bug. After a few days production will stop on several factories. I tried reversing my fix to see if maybe I had broken it, but the effect was the same either way.
I don't yet know why but I did find out, at least, what was causing it. It turns out that custom recipes (manufdat) is acting up again. Actually it is a function related to setting up hangars to use custom recipes that is causing hangars to stop producing after a few days. So now I've disabled custom recipes completely until someone with more talent than me comes along or until I get some more luck.
Thanks for checking that out for me. I think I found the offending code. Removing lwdat accidentally broke fusion limit because the fusion limit code references a lightwell in the lwdat file. I believe I've corrected it by making fusion limit reference a lightwell in the .wld instead. So far it ain't crashing. But it still needs to be tested if it is actually doing its job.
The prices are a direct result from econmod.dll. The version that I wrote is a very basic supply vs demand with a 12.5% to 66% markup depending on what hangar makes the item. Econmod also bases the prices from the cost of the ingredients used in production. I would welcome the help to make a better economy dll.
I found a glitch with that last version I had posted when manufacturing moths in players hangars. Well, I got lucky again and managed to get it working now. I want to mess around with it for a few days before I post yet another update. If everything works out it should be before the weekend is out. It makes it harder to type but I'm keeping my fingers crossed.