TBot icon indicating copy to clipboard operation
TBot copied to clipboard

Repatriate error when no dex left on servers with probe cargo

Open Deenayd opened this issue 2 years ago • 0 comments

Hello,

Inside the function: public static void AutoRepatriate(object state)

in this piece of code:

								} else {
									ships.Add(preferredShip, tempCelestial.Ships.GetAmount(preferredShip));
								}
								payload = Helpers.CalcMaxTransportableResources(ships, payload, researches.HyperspaceTechnology, userInfo.Class, probeCargo: serverData.ProbeCargo);

								if (payload.TotalResources > 0) {

"probeCargo:" is missing in original code.

This causes serverData.ProbeCargo to be entered into incorrect parameter (deutToLeave instead of probeCargo). If dex left on the planet is less than deutToLeave, than this leads to create a request to send "0 - serverData.ProbeCargo" dex. And this is a negative number!

Deenayd avatar Oct 05 '22 10:10 Deenayd