LocalisedText.properties | 2 ++
data/18EU/Game.xml | 2 +-
rails/game/Phase.java | 7 ++++++-
rails/game/PublicCompany.java | 6 ++++++
rails/ui/swing/ORPanel.java | 1 +
5 files changed, 16 insertions(+), 2 deletions(-)
New commits:
commit 68d4bf75fa548674c61cdfa1e2670a2d7df4f2b1
Author: Erik Vos <eri...@xs...>
Date: Tue Nov 1 14:10:21 2011 +0100
18EU: fixed wrong train limit step from phase 5.
Added train limits to Company Info.
Added train limit steps to Phase Info.
diff --git a/LocalisedText.properties b/LocalisedText.properties
index fa742de..6516a23 100644
--- a/LocalisedText.properties
+++ b/LocalisedText.properties
@@ -162,6 +162,7 @@ CompanyTakesLoans={0} takes {1} loans of {2} and receives {3}
CompanyTypeConfiguredTwice=Company type {0} configured twice.
CompanyTypeHasNoClass=Company type {0} has no class defined.
CompanyWithholds={0} withholds dividend of {1}.
+CompInfoMaxTrains=Max. trains per limit step: {0}
ComponentConfiguredTwice=Component {0} is configured twice.
ComponentHasNoClass=Component {0} has no class defined.
ComponentInitAs=Component {0} is initialized as class {1}
@@ -475,6 +476,7 @@ Pass=Pass
PhaseClosesAllPrivates=Close all privates
PhaseNumberOfORs=Number of ORs: {0}
PhaseOffBoardStep=Off-board revenue step: {0}
+PhaseTrainLimitStep=Train limit step: {0}
PhaseRemoves=Remove {0}
Phases=Phases
PhaseTileColours=Allowed tile colours: {0}
diff --git a/data/18EU/Game.xml b/data/18EU/Game.xml
index d8ae7ba..01e39f5 100644
--- a/data/18EU/Game.xml
+++ b/data/18EU/Game.xml
@@ -119,7 +119,7 @@
</Phase>
<Phase name="5">
<Tiles colour="yellow,green,brown"/>
- <Trains limitStep="2"/>
+ <Trains limitStep="3"/>
<OffBoardRevenue step="2"/>
</Phase>
<Phase name="6">
diff --git a/rails/game/Phase.java b/rails/game/Phase.java
index 40adcfc..5b50f25 100644
--- a/rails/game/Phase.java
+++ b/rails/game/Phase.java
@@ -337,7 +337,12 @@ public class Phase implements PhaseI {
}
public String getTileColoursString() {
- return tileColoursString;
+ StringBuilder b = new StringBuilder();
+ for (String colour : tileColours) {
+ if (b.length() > 0) b.append(",");
+ b.append (colour);
+ }
+ return b.toString();
}
public int getTileLaysPerColour (String companyTypeName, String colourName) {
diff --git a/rails/game/PublicCompany.java b/rails/game/PublicCompany.java
index 0a0aeb9..f4ff236 100644
--- a/rails/game/PublicCompany.java
+++ b/rails/game/PublicCompany.java
@@ -759,6 +759,12 @@ public class PublicCompany extends Company implements PublicCompanyI {
privateToCloseOnFirstTrainName);
}
+ if (trainLimit != null) {
+ infoText += "<br>" + LocalText.getText("CompInfoMaxTrains",
+ Util.joinWithDelimiter(trainLimit, ", "));
+
+ }
+
infoText += parentInfoText;
parentInfoText = "";
diff --git a/rails/ui/swing/ORPanel.java b/rails/ui/swing/ORPanel.java
index 7ca57da..fa5313d 100644
--- a/rails/ui/swing/ORPanel.java
+++ b/rails/ui/swing/ORPanel.java
@@ -564,6 +564,7 @@ implements ActionListener, KeyListener, RevenueListener {
appendInfoText(b, LocalText.getText("PhaseTileColours", phase.getTileColoursString()));
appendInfoText(b, LocalText.getText("PhaseNumberOfORs", phase.getNumberOfOperatingRounds()));
appendInfoText(b, LocalText.getText("PhaseOffBoardStep", phase.getOffBoardRevenueStep()));
+ appendInfoText(b, LocalText.getText("PhaseTrainLimitStep", phase.getTrainLimitStep()));
if (phase.doPrivatesClose()) {
appendInfoText(b, LocalText.getText("PhaseClosesAllPrivates"));
}
|