Skip to content

Commit

Permalink
Revert "add forced fleetsave speed setting"
Browse files Browse the repository at this point in the history
This reverts commit a55f8de.
  • Loading branch information
ogame-tbot committed Oct 10, 2023
1 parent 7879415 commit 3a27697
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
10 changes: 0 additions & 10 deletions TBot/Workers/FleetScheduler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -215,16 +215,6 @@ public async Task AutoFleetSave(Celestial celestial, bool isSleepTimeFleetSave =

List<FleetHypotesis> fleetHypotesis = await GetFleetSaveDestination(_tbotInstance.UserData.celestials, celestial, departureTime, minDuration, mission, maxDeuterium, forceUnsafe);
if (fleetHypotesis.Count() > 0) {
if ((bool) _tbotInstance.InstanceSettings.SleepMode.AutoFleetSave.ForceSpeed.Active) {
var speed = (decimal) _tbotInstance.InstanceSettings.SleepMode.AutoFleetSave.ForceSpeed.Speed / 10;
var validSpeeds = _tbotInstance.UserData.userInfo.Class == CharacterClass.General ? Speeds.GetGeneralSpeedsList() : Speeds.GetNonGeneralSpeedsList();
if (validSpeeds.Contains(speed)) {
fleetHypotesis = fleetHypotesis.Where(x => x.Speed == speed).ToList();
} else {
_tbotInstance.log(LogLevel.Warning, LogSender.FleetScheduler, $"Error: Could not parse 'ForceSpeed' from settings, value set to 10%.");
}
fleetHypotesis = fleetHypotesis.Where(x => x.Speed == Speeds.TenPercent).ToList();
}
foreach (FleetHypotesis fleet in fleetHypotesis.OrderBy(pf => pf.Fuel).ThenBy(pf => pf.Duration <= minDuration)) {
_tbotInstance.log(LogLevel.Warning, LogSender.FleetScheduler, $"checking {mission} fleet to: {fleet.Destination}");
if (CheckFuel(fleet, celestial)) {
Expand Down
6 changes: 1 addition & 5 deletions TBot/instance_settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,7 @@
"ForceUnsafe": true,
"DeutToLeave": 200000,
"Recall": true,
"DefaultMission": "Deploy",
"ForceSpeed": {
"Active": false,
"Speed": 10
}
"DefaultMission": "Deploy"
}
},
"Defender": {
Expand Down

0 comments on commit 3a27697

Please sign in to comment.