From: <Dr....@t-...> - 2012-04-01 09:31:29
|
Hi John, this is indeed a bug as the game engine right now doesnt know that the chosen hex is a home hex for a company. Two ways of fixing it in the code: (I'll defer to Erik and Stefan here as my way is as usual quick and ugly :)) diff --git a/rails/game/specific/_18EU/StockRound_18EU.java b/rails/game/specific/_18EU/StockRound_18EU.java index 5387e71..39620ba 100644 --- a/rails/game/specific/_18EU/StockRound_18EU.java +++ b/rails/game/specific/_18EU/StockRound_18EU.java @@ -4,6 +4,7 @@ import rails.common.DisplayBuffer; import rails.common.LocalText; +import rails.common.parser.ConfigurationException; import rails.game.*; import rails.game.action.*; import rails.game.move.AddToList; @@ -396,6 +397,14 @@ } company.setHomeHex(homeHex); company.setHomeCityNumber(homeCityNumber); + //Bugfix for Error reported by John Galt- Mar 31 2012 ; Martin Brumm + //The maphex needs to have the homes map set with the company value. + try { + homeHex.addHome(company, homeCityNumber); + } catch (ConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } company.start(startSpace); ReportBuffer.add(LocalText.getText("START_COMPANY_LOG", The other way around that bug would be to alter in ORUIManager.java the routine getMustConnectRequirement to check if the current hex is contained in the homehexes Map of that Company. public boolean getMustConnectRequirement (GUIHex hex,TileI tile) { if (tile == null || hex == null) return false; return tile.getColourName().equalsIgnoreCase(Tile.YELLOW_COLOUR_NAME) // Does not apply to the current company's home hex(es) && !hex.getHexModel().isHomeFor(orComp) // Does not apply to special tile lays && !isUnconnectedTileLayTarget(hex.getHexModel()); } We will find a fix :) The good news is that the first fix doesnt break your save file. So no need to replay the game. Kind regards, Martin Von: John David Galt <jd...@di...> An: rai...@li... Betreff: [Rails-devel] Bug: 18EU, 1.7.0 Datum: Sun, 01 Apr 2012 02:33:35 +0200 This save file actually came from Rails 1.6.0, but I've upgraded to 1.7.0 and reloaded the game, and the bug persists. At the point of this save file, it is the first operating turn of KBS (light blue company), but the program is not allowing KBS to place its home tile. In 1.6.0, when I try to lay the tile (#57 at hex G4), the game complains that "there is no valid orientation for the tile." In 1.7.0, I can't even get that far because the tile image is grayed out, thus causing the same problem without the explanation. |