Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/rotp/model/empires/Empire.java
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ public AI ai() {
ai = new AI(this, options().selectedAI(this));
return ai;
}
public void resetAi() {
ai = null;
}
public Diplomat diplomatAI() { return ai().diplomat(); }
public FleetCommander fleetCommanderAI() { return ai().fleetCommander(); }
public ShipCaptain shipCaptainAI() { return ai().shipCaptain(); }
Expand Down
14 changes: 14 additions & 0 deletions src/rotp/ui/main/overlay/MapOverlayNone.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
import rotp.model.Sprite;
import rotp.model.galaxy.ShipFleet;
import rotp.model.galaxy.StarSystem;
import rotp.model.game.GameSession;
import rotp.ui.BasePanel;
import rotp.ui.RotPUI;
import rotp.ui.main.GalaxyMapPanel;
import rotp.ui.main.MainUI;
import rotp.ui.main.TransportDeploymentPanel;
import rotp.ui.notifications.GameAlert;
import rotp.ui.sprites.ShipRelocationSprite;
import rotp.ui.sprites.SystemTransportSprite;

Expand Down Expand Up @@ -282,6 +284,18 @@ else if (parent.clickedSprite() instanceof ShipRelocationSprite) {
}
parent.repaint();
break;
case KeyEvent.VK_F4:
String newAutoPlayOption = options().nextAutoplayOption();
options().selectedAutoplayOption(newAutoPlayOption);
galaxy().player().resetAi();
String str = text(options().selectedAutoplayOption());
GameSession.instance().addAlert(new GameAlert() {
@Override
public String description() {
return "Auto play switched to " + str;
}
});
break;
case KeyEvent.VK_F5:
systems = player().orderedShipConstructingColonies();
currSys = null;
Expand Down