Update of /cvsroot/rails/18xx/rails/game
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv30729/rails/game
Modified Files:
OperatingRound.java
Log Message:
Fixed holes that allowed not specifying the exchanged train in a train exchange action.
Index: OperatingRound.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/OperatingRound.java,v
retrieving revision 1.128
retrieving revision 1.129
diff -C2 -d -r1.128 -r1.129
*** OperatingRound.java 7 May 2010 20:03:49 -0000 1.128
--- OperatingRound.java 13 May 2010 09:51:32 -0000 1.129
***************
*** 1645,1648 ****
--- 1645,1660 ----
}
}
+
+ if (action.isForExchange()) {
+ if (exchangedTrain == null) {
+ errMsg = LocalText.getText("NoExchangedTrainSpecified");
+ break;
+ } else if (operatingCompany.getPortfolio().getTrainOfType(exchangedTrain.getType()) == null) {
+ errMsg = LocalText.getText("CompanyDoesNotOwnTrain",
+ operatingCompany.getName(),
+ exchangedTrain.getName());
+ break;
+ }
+ }
stb = action.getSpecialProperty();
|