From: Erik V. <ev...@us...> - 2012-02-21 22:26:28
|
data/1835/CompanyManager.xml | 3 --- rails/game/special/SpecialTileLay.java | 2 +- rails/ui/swing/ORUIManager.java | 11 ++++++++++- 3 files changed, 11 insertions(+), 5 deletions(-) New commits: commit d34b91f49c0ddbb9ffab3273bbe5af025652bfdd Author: Erik Vos <eri...@xs...> Date: Tue Feb 21 23:25:10 2012 +0100 Always address the company president when a home token must be relaid. This is a provisional fix for the issue that arises when in 1835 the BA has started but not yet operated, and another company uses the PfB to lay a green tile in the BA home hex L6. In this case the BA president must lay the home token in the turn of that other company. The fix is to always address the token company president instead of the acting player during a token relay. WARNING: this fix breaks the intended client/server architecture, because the UI is not supposed to have direct access to the president's identity, as this is a state variable. So this is a provisional fix only. diff --git a/data/1835/CompanyManager.xml b/data/1835/CompanyManager.xml index 58db0e2..baa4fd8 100644 --- a/data/1835/CompanyManager.xml +++ b/data/1835/CompanyManager.xml @@ -171,9 +171,6 @@ <Company name="BA" longname="Badische Eisenbahn" type="Major" startspace="B4" available="no" tokens="2" fgColour="FFFFFF" bgColour="808000" alias="Bad"> <Home hex="L6" city="0"/> - <BaseTokens> - <HomeBase lay="firstOR"/> - </BaseTokens> <Certificate type="President" shares="2"/> <Certificate shares="1" number="6"/> <Certificate shares="2" number="1"/> diff --git a/rails/game/special/SpecialTileLay.java b/rails/game/special/SpecialTileLay.java index 3e1dea6..859f7fe 100644 --- a/rails/game/special/SpecialTileLay.java +++ b/rails/game/special/SpecialTileLay.java @@ -143,7 +143,7 @@ public class SpecialTileLay extends SpecialProperty { public String toString() { return "SpecialTileLay comp=" + originalCompany.getName() + " hex=" + locationCodes - + " colour="+tileColours + + " colour="+Util.joinWithDelimiter(tileColours, ",") + " extra=" + extra + " cost=" + free + " connected=" + connected; } diff --git a/rails/ui/swing/ORUIManager.java b/rails/ui/swing/ORUIManager.java index ea2d561..e3b7a3a 100644 --- a/rails/ui/swing/ORUIManager.java +++ b/rails/ui/swing/ORUIManager.java @@ -970,7 +970,16 @@ public class ORUIManager implements DialogOwner { String selected = (String) JOptionPane.showInputDialog(orWindow, LocalText.getText("SelectStationForToken", - action.getPlayerName(), + //action.getPlayerName(), + /* In some cases, it's not the acting player that must take this action, + * but it's always the president. + * TODO WARNING: THE NEXT LINE BREAKS THE CLIENT/SERVER SEPARATION + * so this is a provisional fix only. + * It is for 1835, and intends to address the BA president if the BA home token + * must be laid in case another company, having the turn, lays a green tile in L6 + * using the PfB when the BA has started but not yet operated. + */ + company.getPresident().getName(), hex.getName(), company.getName() ), |