Skip to content

Commit

Permalink
Merge branch 'master' into slim
Browse files Browse the repository at this point in the history
  • Loading branch information
wintertime committed Jan 6, 2020
2 parents abf8c2f + 4a66f88 commit d25a3a7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/net/sf/freecol/common/networking/ServerAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ private boolean ask(Message message) {
}
}
return false;

}


Expand Down
3 changes: 2 additions & 1 deletion src/net/sf/freecol/server/control/InGameController.java
Original file line number Diff line number Diff line change
Expand Up @@ -3797,6 +3797,8 @@ public ChangeSet spySettlement(ServerPlayer serverPlayer, Unit unit,
Settlement settlement) {
ChangeSet cs = new ChangeSet();

logger.info("Spy settlement for " + unit.getId()
+ " at " + settlement.getId() + "(" + settlement.getName() + ")");
cs.addSpy(unit, settlement);
unit.setMovesLeft(0);
cs.addPartial(See.only(serverPlayer), unit,
Expand All @@ -3814,7 +3816,6 @@ public ChangeSet spySettlement(ServerPlayer serverPlayer, Unit unit,
*/
public ChangeSet trainUnitInEurope(ServerPlayer serverPlayer,
UnitType type) {

Europe europe = serverPlayer.getEurope();
if (europe == null) {
return serverPlayer.clientError("No Europe to train in.");
Expand Down
11 changes: 5 additions & 6 deletions test/src/net/sf/freecol/client/ClientTestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ public class ClientTestHelper {

private static FreeColClient client = null;

public static FreeColClient startClient(FreeColServer freeColServer, Specification specification) {
public static FreeColClient startClient(FreeColServer freeColServer,
Specification specification) {
// This is not ideal, but headless mode allows cutting off
// some excessive resource loading, especially in the sound
// tests where the resource manager is exercised.
Expand All @@ -52,18 +53,16 @@ public static FreeColClient startClient(FreeColServer freeColServer, Specificati
Messages.loadMessageBundle(FreeCol.getLocale());

logger.info("Debug value: " + FreeColDebugger.isInDebugMode());

client = FreeColClient.startTestClient(specification);
assertNotNull(client);

ConnectController connectController = client.getConnectController();
client.setFreeColServer(freeColServer);
client.setSinglePlayer(true);

assertTrue(connectController.requestLogin("test",
freeColServer.getHost(),
freeColServer.getPort()));

boolean ok = connectController.requestLogin("test",
freeColServer.getHost(), freeColServer.getPort());
assertTrue("test login", ok);
connectController.startSinglePlayerGame(specification);
return client;
}
Expand Down

0 comments on commit d25a3a7

Please sign in to comment.