Update of /cvsroot/rails/18xx/rails/ui/swing
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv1357/rails/ui/swing
Modified Files:
ORUIManager.java
Log Message:
Home base on green OO tile can now be chosen in first turn
Index: ORUIManager.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORUIManager.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** ORUIManager.java 3 Feb 2010 05:37:55 -0000 1.49
--- ORUIManager.java 3 Feb 2010 20:16:36 -0000 1.50
***************
*** 529,536 ****
for (LayTile action : possibleActions.getType(LayTile.class)) {
if (action.getType() == LayTile.SPECIAL_PROPERTY
! && !action.getSpecialProperty().requiresConnection() // sfy 1889
! && action.getSpecialProperty().getLocations().contains(mapHex)
! )
! {
// log.debug(hex.getName()+" is a special property target");
return true;
--- 529,533 ----
for (LayTile action : possibleActions.getType(LayTile.class)) {
if (action.getType() == LayTile.SPECIAL_PROPERTY
! && action.getSpecialProperty().getLocations().contains(mapHex)) {
// log.debug(hex.getName()+" is a special property target");
return true;
***************
*** 631,635 ****
String selected =
(String) JOptionPane.showInputDialog(orWindow,
! LocalText.getText("SelectStationForToken"),
LocalText.getText("WhichStation"),
JOptionPane.PLAIN_MESSAGE, null,
--- 628,635 ----
String selected =
(String) JOptionPane.showInputDialog(orWindow,
! LocalText.getText("SelectStationForToken",
! action.getPlayerName(),
! selectedHex.getName(),
! action.getCompanyName()),
LocalText.getText("WhichStation"),
JOptionPane.PLAIN_MESSAGE, null,
***************
*** 786,790 ****
Bank.format(bTrain.getPresidentCashToAdd())));
}
!
if (bTrain.getExtraMessage() != null) {
b.append(" (").append(bTrain.getExtraMessage()+")");
--- 786,790 ----
Bank.format(bTrain.getPresidentCashToAdd())));
}
!
if (bTrain.getExtraMessage() != null) {
b.append(" (").append(bTrain.getExtraMessage()+")");
***************
*** 810,814 ****
}
setMessage(msgbuf.toString());
!
String selectedActionText =
(String) JOptionPane.showInputDialog(orWindow,
--- 810,814 ----
}
setMessage(msgbuf.toString());
!
String selectedActionText =
(String) JOptionPane.showInputDialog(orWindow,
***************
*** 1119,1122 ****
--- 1119,1131 ----
orWindow.requestFocus();
+ // Check first action.
+ // If it's to lay a home token, handle that here
+ LayBaseToken lbt = possibleActions.getType(LayBaseToken.class).get(0);
+ if (lbt.getType() == LayBaseToken.HOME_CITY) {
+ map.setSelectedHex(map.getHexByName(lbt.getChosenHex().getName()));
+ layBaseToken (lbt);
+ return;
+ }
+
// Include bonus tokens
List<LayToken> possibleTokenLays =
|