Skip to content

Commit

Permalink
lil fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kokiddp committed May 4, 2022
1 parent 5d354ed commit 790b9a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion TBot/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,14 @@ private static void AutoResearch(object state) {
else {
research = Helpers.GetNextResearchToBuild(celestial as Planet, researches, (bool) settings.Brain.AutoMine.PrioritizeRobotsAndNanitesOnNewPlanets, slots, (int) settings.Brain.AutoResearch.MaxEnergyTechnology, (int) settings.Brain.AutoResearch.MaxLaserTechnology, (int) settings.Brain.AutoResearch.MaxIonTechnology, (int) settings.Brain.AutoResearch.MaxHyperspaceTechnology, (int) settings.Brain.AutoResearch.MaxPlasmaTechnology, (int) settings.Brain.AutoResearch.MaxCombustionDrive, (int) settings.Brain.AutoResearch.MaxImpulseDrive, (int) settings.Brain.AutoResearch.MaxHyperspaceDrive, (int) settings.Brain.AutoResearch.MaxEspionageTechnology, (int) settings.Brain.AutoResearch.MaxComputerTechnology, (int) settings.Brain.AutoResearch.MaxAstrophysics, (int) settings.Brain.AutoResearch.MaxIntergalacticResearchNetwork, (int) settings.Brain.AutoResearch.MaxWeaponsTechnology, (int) settings.Brain.AutoResearch.MaxShieldingTechnology, (int) settings.Brain.AutoResearch.MaxArmourTechnology, (bool) settings.Brain.AutoResearch.OptimizeForStart, (bool) settings.Brain.AutoResearch.EnsureExpoSlots);
}
if (research != Buildables.Null && research != Buildables.IntergalacticResearchNetwork && (int) settings.Brain.AutoResearch.MaxIntergalacticResearchNetwork >= Helpers.GetNextLevel(researches, Buildables.IntergalacticResearchNetwork)) {
if (
research != Buildables.Null &&
research != Buildables.IntergalacticResearchNetwork &&
celestial.Facilities.ResearchLab >= 10 &&
researches.ComputerTechnology >= 8 &&
researches.HyperspaceTechnology >= 8 &&
(int) settings.Brain.AutoResearch.MaxIntergalacticResearchNetwork >= Helpers.GetNextLevel(researches, Buildables.IntergalacticResearchNetwork)
) {
celestials = UpdatePlanets(UpdateType.Facilities);
var cumulativeLabLevel = Helpers.CalcCumulativeLabLevel(celestials, researches);
var researchTime = Helpers.CalcProductionTime(research, Helpers.GetNextLevel(researches, research), serverData.SpeedResearch, celestial.Facilities, cumulativeLabLevel, userInfo.Class == CharacterClass.Discoverer, staff.Technocrat);
Expand All @@ -1573,6 +1580,7 @@ private static void AutoResearch(object state) {
research = Buildables.IntergalacticResearchNetwork;
}
}

int level = Helpers.GetNextLevel(researches, research);
if (research != Buildables.Null) {
celestial = UpdatePlanet(celestial, UpdateType.Resources) as Planet;
Expand Down

0 comments on commit 790b9a8

Please sign in to comment.