Skip to content

Commit

Permalink
fix: don't queue new mounts while mounting
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel committed Oct 7, 2023
1 parent 84a22a5 commit fa7786d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -704,4 +704,22 @@ zero cost, at some amount of time to produce?

### No debugging tools for surveys.

Write a tool to list how many surveys deep we have?
Write a tool to list how many surveys deep we have?


### Optimize requests:

^CRequest stats:
6508 /my/ships/N/navigate
6323 /my/ships/N/dock
6322 /my/ships/N/orbit
5797 /my/ships/N/sell
5753 /my/ships/N/extract/survey
3118 /my/ships/N/refuel
2522 /systems/N/waypoints/N/market
1422 /my/ships/N/survey
756 /my/ships/N/jump
677 /my/ships/N/purchase
122 /systems/N/waypoints/N/shipyard
36 /my/ships
29 /systems/N/waypoints
5 changes: 5 additions & 0 deletions packages/cli/lib/behavior/central_command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ class CentralCommand {
if (_mountRequests.any((m) => m.shipSymbol == ship.shipSymbol)) {
return;
}
// Don't queue a new mount request if we're currently executing one.
if (_behaviorCache.getBehavior(ship.shipSymbol)?.behavior ==
Behavior.mountFromBuy) {
continue;
}
final template = templateForShip(ship);
if (template == null) {
continue;
Expand Down

0 comments on commit fa7786d

Please sign in to comment.