From: Erik V. <ev...@us...> - 2009-11-20 20:57:03
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9296/rails/ui/swing Modified Files: ORUIManager.java Log Message: Allow not buying a train when trainless, with a warning that this is only allowed without a route Index: ORUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORUIManager.java,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** ORUIManager.java 5 Nov 2009 22:50:38 -0000 1.32 --- ORUIManager.java 20 Nov 2009 20:56:50 -0000 1.33 *************** *** 1182,1186 **** orPanel.initTrainBuying(true); ! setMessage(LocalText.getText("BuyTrain")); } else if (possibleActions.contains(DiscardTrain.class)) { --- 1182,1198 ---- orPanel.initTrainBuying(true); ! StringBuffer b = new StringBuffer(LocalText.getText("BuyTrain")); ! ! // TEMPORARY extra message about having no route ! for (BuyTrain bTrain : possibleActions.getType(BuyTrain.class)) { ! if (bTrain.hasNoTrains()) { ! b.append("<br><font color=\"red\">"); ! b.append(LocalText.getText("MustBuyTrainIfNoRoute")); ! b.append("</font>"); ! break; ! } ! } ! ! setMessage(b.toString()); } else if (possibleActions.contains(DiscardTrain.class)) { |