Update of /cvsroot/rails/18xx/rails/game/action
In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv18873/rails/game/action
Modified Files:
BuyTrain.java
Log Message:
Fixed missing storage of exchange train id, made save files with train exchanges unloadable beyond that point
Index: BuyTrain.java
===================================================================
RCS file: /cvsroot/rails/18xx/rails/game/action/BuyTrain.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** BuyTrain.java 13 May 2010 09:51:32 -0000 1.21
--- BuyTrain.java 21 Jun 2010 21:35:50 -0000 1.22
***************
*** 65,70 ****
trainsForExchangeUniqueIds = new String[trains.size()];
for (int i = 0; i < trains.size(); i++) {
! trainsForExchangeUniqueIds[i] = trains.get(i).getName();
! // TODO: Must be replaced by unique Ids
}
}
--- 65,70 ----
trainsForExchangeUniqueIds = new String[trains.size()];
for (int i = 0; i < trains.size(); i++) {
! trainsForExchangeUniqueIds[i] = trains.get(i).getUniqueId();
! // Must be replaced by unique Ids - why was this a todo?
}
}
***************
*** 202,206 ****
this.exchangedTrain = exchangedTrain;
if (exchangedTrain != null)
! this.exchangedTrainUniqueId = exchangedTrain.getName();
}
--- 202,206 ----
this.exchangedTrain = exchangedTrain;
if (exchangedTrain != null)
! this.exchangedTrainUniqueId = exchangedTrain.getUniqueId();
}
|