Skip to content

Commit

Permalink
fix autocargo and autorepatriate
Browse files Browse the repository at this point in the history
  • Loading branch information
kokiddp committed Mar 29, 2021
1 parent 2abbef8 commit 887cfae
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ private static void AutoBuildCargo(object state)
xaSem[(int)Feature.BrainAutobuildCargo].WaitOne();
Helpers.WriteLog(LogType.Info, LogSender.Brain, "Checking capacity...");
celestials = UpdatePlanets(UpdateType.Techs);
celestials = UpdatePlanets(UpdateType.Resources);
celestials = UpdatePlanets(UpdateType.Productions);
foreach (Celestial planet in celestials)
{
Expand Down Expand Up @@ -784,6 +785,7 @@ private static void AutoRepatriate(object state)
xaSem[(int)Feature.BrainAutoRepatriate].WaitOne();
Helpers.WriteLog(LogType.Info, LogSender.Brain, "Reaptriating resources...");
celestials = UpdatePlanets(UpdateType.Techs);
celestials = UpdatePlanets(UpdateType.Resources);

var rand = new Random();
foreach (Celestial celestial in settings.Brain.AutoRepatriate.RandomOrder ? celestials.OrderBy(celestial => rand.Next()).ToList() : celestials)
Expand Down

0 comments on commit 887cfae

Please sign in to comment.