From: <ste...@us...> - 2010-07-10 22:25:16
|
Revision: 1335 http://rails.svn.sourceforge.net/rails/?rev=1335&view=rev Author: stefanfrey Date: 2010-07-10 22:25:10 +0000 (Sat, 10 Jul 2010) Log Message: ----------- Fixed bug 18AL delayed obsolecence in report window - ID: 3026083 - Added report text after obsoletion and delayed rusting. Modified Paths: -------------- trunk/18xx/LocalisedText.properties trunk/18xx/rails/game/Portfolio.java trunk/18xx/rails/game/TrainManager.java Modified: trunk/18xx/LocalisedText.properties =================================================================== --- trunk/18xx/LocalisedText.properties 2010-07-10 17:02:39 UTC (rev 1334) +++ trunk/18xx/LocalisedText.properties 2010-07-10 22:25:10 UTC (rev 1335) @@ -534,6 +534,8 @@ TRADE_TREASURY_SHARES_TITLE=Rails: Game Status - TRADING TREASURY SHARES OF COMPANY {0} TrainInfo={0}-train, price: {1}, quantity: {2} TrainsAvailable={0}-trains are now available. +TrainsObsolete=All {0}-trains are obsolete and will be removed after the next run. +TrainsObsoleteRusted=Obsolete Train {0} of company {1} rusted. TrainsRusted=All {0}-trains have rusted and have been removed. TREASURY_SHARES=<html>Treasury<br>shares TreasuryOverHoldLimit=Treasury would get over the {0}% hold limit Modified: trunk/18xx/rails/game/Portfolio.java =================================================================== --- trunk/18xx/rails/game/Portfolio.java 2010-07-10 17:02:39 UTC (rev 1334) +++ trunk/18xx/rails/game/Portfolio.java 2010-07-10 22:25:10 UTC (rev 1335) @@ -721,6 +721,8 @@ // Need to separate selection and execution, // otherwise we get a ConcurrentModificationException on trains. for (TrainI train : trainsToRust) { + ReportBuffer.add(LocalText.getText("TrainsObsoleteRusted", + train.getName(), name)); log.debug("Obsolete train " + train.getUniqueId() + " (owned by " + name + ") rusted"); train.setRusted(); Modified: trunk/18xx/rails/game/TrainManager.java =================================================================== --- trunk/18xx/rails/game/TrainManager.java 2010-07-10 17:02:39 UTC (rev 1334) +++ trunk/18xx/rails/game/TrainManager.java 2010-07-10 22:25:10 UTC (rev 1335) @@ -161,9 +161,14 @@ TrainTypeI rustedType = boughtType.getRustedTrainType(); if (rustedType != null && !rustedType.hasRusted()) { rustedType.setRusted(train.getHolder()); // Or obsolete, - // where applicable - ReportBuffer.add(LocalText.getText("TrainsRusted", + // where applicable + if (rustedType.isObsoleting()) { + ReportBuffer.add(LocalText.getText("TrainsObsolete", + rustedType.getName())); + } else { + ReportBuffer.add(LocalText.getText("TrainsRusted", rustedType.getName())); + } trainsHaveRusted = true; trainAvailabilityChanged = true; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |