From: <ev...@us...> - 2011-06-15 11:12:11
|
Revision: 1577 http://rails.svn.sourceforge.net/rails/?rev=1577&view=rev Author: evos Date: 2011-06-15 11:12:05 +0000 (Wed, 15 Jun 2011) Log Message: ----------- Fixed spurious report line in 1830/56 that D-trains are available after buying the *last* 6-train. Add report line to mention added president's cash in case of emergency train buying. Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/rails/game/OperatingRound.java trunk/18xx/rails/game/TrainManager.java Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2011-06-13 19:10:45 UTC (rev 1576) +++ trunk/18xx/LocalisedText.properties 2011-06-15 11:12:05 UTC (rev 1577) @@ -485,6 +485,7 @@ PoolOverHoldLimit=Pool would get over its share holding limit PoolWouldGetOverLimit=The Pool would get over its share holding limit of {0} PresidentMayNotAddMoreThan=The president may not add more than {0} +PresidentAddsCash={0} president {1} contributes {2} to buy a train PriceAboveUpperLimit=Price ({0}) is above the maximum buy price ({1}) of {2} PriceBelowLowerLimit=Price ({0}) is below the minimum buy price ({1}) of {2} PriceIsPaidTo=The price ({0}) is paid to {1} Modified: trunk/18xx/rails/game/OperatingRound.java =================================================================== --- trunk/18xx/rails/game/OperatingRound.java 2011-06-13 19:10:45 UTC (rev 1576) +++ trunk/18xx/rails/game/OperatingRound.java 2011-06-15 11:12:05 UTC (rev 1577) @@ -1801,6 +1801,10 @@ if (actualPresidentCash > 0) { new CashMove(currentPlayer, operatingCompany.get(), presidentCash); + ReportBuffer.add(LocalText.getText("PresidentAddsCash", + operatingCompany.get().getName(), + currentPlayer.getName(), + Bank.format(actualPresidentCash))); } Portfolio oldHolder = train.getHolder(); Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2011-06-13 19:10:45 UTC (rev 1576) +++ trunk/18xx/rails/game/TrainManager.java 2011-06-15 11:12:05 UTC (rev 1577) @@ -174,11 +174,13 @@ if (newTypeIndex.intValue() < lTrainTypes.size()) { nextType = (lTrainTypes.get(newTypeIndex.intValue())); if (nextType != null) { - if (!nextType.isAvailable()) nextType.setAvailable(bank); - trainAvailabilityChanged = true; - ReportBuffer.add("All " + boughtType.getName() - + "-trains are sold out, " - + nextType.getName() + "-trains now available"); + if (!nextType.isAvailable()) { + nextType.setAvailable(bank); + trainAvailabilityChanged = true; + ReportBuffer.add("All " + boughtType.getName() + + "-trains are sold out, " + + nextType.getName() + "-trains now available"); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |