You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
(46) |
Dec
(57) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2009 |
Jan
(51) |
Feb
(10) |
Mar
|
Apr
|
May
(14) |
Jun
|
Jul
(13) |
Aug
(30) |
Sep
(83) |
Oct
(56) |
Nov
(148) |
Dec
(107) |
2010 |
Jan
(260) |
Feb
(164) |
Mar
(183) |
Apr
(99) |
May
(160) |
Jun
(40) |
Jul
(33) |
Aug
(48) |
Sep
(22) |
Oct
(24) |
Nov
(1) |
Dec
(12) |
2011 |
Jan
(6) |
Feb
(15) |
Mar
(13) |
Apr
(37) |
May
(27) |
Jun
(29) |
Jul
(33) |
Aug
(20) |
Sep
(17) |
Oct
(20) |
Nov
(33) |
Dec
(17) |
2012 |
Jan
(39) |
Feb
(38) |
Mar
(20) |
Apr
(21) |
May
(17) |
Jun
(22) |
Jul
(16) |
Aug
(3) |
Sep
(9) |
Oct
(10) |
Nov
|
Dec
|
From: Erik V. <ev...@us...> - 2010-01-18 18:49:42
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21858 Modified Files: my.properties Log Message: Initial implementation of Autopass and RequestTurn Index: my.properties =================================================================== RCS file: /cvsroot/rails/18xx/my.properties,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** my.properties 28 Nov 2009 22:41:05 -0000 1.10 --- my.properties 18 Jan 2010 18:49:30 -0000 1.11 *************** *** 69,76 **** #report.window.editable=yes ! ### Default players ! # Comma-separated list of player names. ! # Useful for game testing purposes. #default_players=Alice,Bob,Charlie ### Default game --- 69,82 ---- #report.window.editable=yes ! ### Player info ! ## Default players ! # Comma-separated list of player names. ! # Useful for game testing purposes. #default_players=Alice,Bob,Charlie + # + ## Local player name + # Useful for distributed usage (Internet, PBEM, cloud storage/dropbox) + # Required for "request turn" facility with cloud storage (dropbox) + #local.player.name=Alice ### Default game |
From: Erik V. <ev...@us...> - 2010-01-18 18:48:34
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21549/rails/ui/swing Modified Files: ORPanel.java Log Message: Added phase and train info to the status window Index: ORPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORPanel.java,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** ORPanel.java 16 Jan 2010 21:16:30 -0000 1.41 --- ORPanel.java 18 Jan 2010 18:47:29 -0000 1.42 *************** *** 47,50 **** --- 47,52 ---- private JMenuItem remainingTilesMenuItem; private JMenu privatesInfoMenu; + private JMenu trainsInfoMenu; + private JMenu phasesInfoMenu; private JMenu specialMenu; private JMenu loansMenu; *************** *** 157,161 **** addPrivatesInfo(); ! specialMenu = new JMenu(LocalText.getText("SPECIAL")); specialMenu.setBackground(Color.YELLOW); --- 159,165 ---- addPrivatesInfo(); ! addTrainsInfo(); ! addPhasesInfo(); ! specialMenu = new JMenu(LocalText.getText("SPECIAL")); specialMenu.setBackground(Color.YELLOW); *************** *** 464,499 **** } ! protected void addPrivatesInfo () { ! List<PrivateCompanyI> privates = orWindow.gameUIManager.getGameManager().getAllPrivateCompanies(); if (privates == null || privates.isEmpty()) return; ! privatesInfoMenu = new JMenu(LocalText.getText("PRIVATES")); privatesInfoMenu.setEnabled(true); infoMenu.add(privatesInfoMenu); ! JMenu item; List<SpecialPropertyI> sps; ! StringBuffer b; String info; for (PrivateCompanyI p : privates) { sps = p.getSpecialProperties(); ! b = new StringBuffer("<html>"); if (Util.hasValue(p.getLongName())) { ! b.append(p.getLongName()); } info = p.getInfoText(); if (Util.hasValue(info)) { ! if (b.length() > 6) b.append("<br>"); ! b.append(info); } else if (sps == null || sps.isEmpty()) { ! if (b.length() > 6) b.append("<br>"); ! b.append(LocalText.getText("NoSpecialProperty")); } else { for (SpecialPropertyI sp : sps) { ! if (b.length() > 6) b.append("<br>"); ! b.append(sp.toString()); } } --- 468,500 ---- } ! protected void addPrivatesInfo () { ! List<PrivateCompanyI> privates = orWindow.gameUIManager.getGameManager().getAllPrivateCompanies(); if (privates == null || privates.isEmpty()) return; ! privatesInfoMenu = new JMenu(LocalText.getText("PRIVATES")); privatesInfoMenu.setEnabled(true); infoMenu.add(privatesInfoMenu); ! JMenu item; List<SpecialPropertyI> sps; ! StringBuffer b = new StringBuffer("<html>"); String info; for (PrivateCompanyI p : privates) { sps = p.getSpecialProperties(); ! b.setLength(6); if (Util.hasValue(p.getLongName())) { ! appendInfoText (b, p.getLongName()); } info = p.getInfoText(); if (Util.hasValue(info)) { ! appendInfoText(b, info); } else if (sps == null || sps.isEmpty()) { ! appendInfoText(b, LocalText.getText("NoSpecialProperty")); } else { for (SpecialPropertyI sp : sps) { ! appendInfoText(b, sp.toString()); } } *************** *** 505,508 **** --- 506,569 ---- } + protected void addTrainsInfo() { + + TrainManager tm = orWindow.getGameUIManager().getGameManager().getTrainManager(); + List<TrainTypeI> types = tm.getTrainTypes(); + JMenu item; + StringBuffer b = new StringBuffer("<html>"); + + trainsInfoMenu = new JMenu(LocalText.getText("TRAINS")); + trainsInfoMenu.setEnabled(true); + infoMenu.add(trainsInfoMenu); + + for (TrainTypeI type : types) { + b.setLength(6); + if (Util.hasValue(type.getStartedPhaseName())) { + appendInfoText(b, LocalText.getText("StartsPhase", type.getStartedPhaseName())); + } + if (type.getRustedTrainType() != null) { + appendInfoText(b, LocalText.getText("RustsTrains", type.getRustedTrainType().getName())); + } + if (type.getReleasedTrainType() != null) { + appendInfoText(b, LocalText.getText("ReleasesTrains", type.getReleasedTrainType().getName())); + } + if (b.length() == 6) b.append(LocalText.getText("None")); + + item = new JMenu (LocalText.getText("N_Train", type.getName())); + item.setEnabled(true); + item.add(new JMenuItem(b.toString())); + trainsInfoMenu.add(item); + } + } + + protected void addPhasesInfo() { + + PhaseManager pm = orWindow.getGameUIManager().getGameManager().getPhaseManager(); + List<Phase> phases = pm.getPhases(); + JMenu item; + StringBuffer b = new StringBuffer("<html>"); + + phasesInfoMenu = new JMenu(LocalText.getText("Phases")); + phasesInfoMenu.setEnabled(true); + infoMenu.add(phasesInfoMenu); + + for (Phase phase : phases) { + b.setLength(6); + appendInfoText(b, LocalText.getText("PhaseTileColours", phase.getTileColoursString())); + appendInfoText(b, LocalText.getText("PhaseNumberOfORs", phase.getNumberOfOperatingRounds())); + appendInfoText(b, LocalText.getText("PhaseOffBoardStep", phase.getOffBoardRevenueStep())); + item = new JMenu (LocalText.getText("PhaseX", phase.getName())); + item.setEnabled(true); + item.add(new JMenuItem(b.toString())); + phasesInfoMenu.add(item); + } + } + + private void appendInfoText (StringBuffer b, String text) { + if (text == null || text.length() == 0) return; + if (b.length() > 6) b.append("<br>"); + b.append(text); + } + public void finish() { |
From: Erik V. <ev...@us...> - 2010-01-18 18:48:18
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21549 Modified Files: LocalisedText.properties Log Message: Added phase and train info to the status window Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.95 retrieving revision 1.96 diff -C2 -d -r1.95 -r1.96 *** LocalisedText.properties 16 Jan 2010 21:16:23 -0000 1.95 --- LocalisedText.properties 18 Jan 2010 18:47:16 -0000 1.96 *************** *** 9,12 **** --- 9,14 ---- AlreadySoldThisTurn={0} already sold {1} this turn AmountMustBeMultipleOf10=Amount ({0}) must be a multiple of 10 + Autopass=Autopass + Autopasses={0} autopasses BANK=Bank BANK_SHARES=Bank shares *************** *** 67,71 **** CannotLayTileOn={0} cannot lay tile {1} on {2} for {3}: {4} CannotPayOutRevenue={0} cannot pay out revenue of {1}: {2} ! CannotProcessRevenue=Cannot process revenue {0} of {1}: {2}. CannotRepayLoans={0} cannot repay {1} loan(s) of {2}: {3} CannotSplitRevenue={0} cannot split revenue of {1}: {2} --- 69,74 ---- CannotLayTileOn={0} cannot lay tile {1} on {2} for {3}: {4} CannotPayOutRevenue={0} cannot pay out revenue of {1}: {2} ! CannotProcessRevenue=Cannot process revenue {0} of {1}: {2} ! CannotRequestTurn=Cannot request turn for {0} CannotRepayLoans={0} cannot repay {1} loan(s) of {2}: {3} CannotSplitRevenue={0} cannot split revenue of {1}: {2} *************** *** 302,305 **** --- 305,313 ---- PRIVATES=Privates PaysLoanInterest={0} pays {1} interest for outstanding loans + PhaseNumberOfORs=Number of ORs: {0} + PhaseOffBoardStep=Off-board revenue step: {0} + Phases=Phases + PhaseTileColours=Allowed tile colours: {0} + PhaseX=Phase {0} PlayerCash=Each player receives {0} from the Bank. PlayerDoesNotOwn=Player {0} does not own {1} *************** *** 324,327 **** --- 332,336 ---- REDO=Redo ReleasedFromEscrow={0} receives {1} released from bank escrow + ReleasesTrains=Makes {0}-trains available for purchasing RemainingTiles=Remaining tiles RepayLoans=Repay loan(s) *************** *** 333,336 **** --- 342,346 ---- RotateTile=Click tile to rotate it, or select another tile or hex, or press Lay Tile to confirm tile, or press the No Tile button. RunsWithBorrowedTrain={0} runs with a borrowed {1}-train and must withhold revenue + RustsTrains=Rusts {0}-trains SAVE=Save SaveFailed=Save failed, reason: {0} *************** *** 385,388 **** --- 395,399 ---- StartOfPhase=Start of phase {0}. StartPacketHasNoClass=Start packet {0} has no class defined. + StartsPhase=Starts phase {0} StartStockRound=\n==================\nStart of Stock Round {0}\n================== Status_Unavailable=Currently unavailable |
From: Erik V. <ev...@us...> - 2010-01-18 18:47:59
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21549/rails/game Modified Files: PhaseManager.java Phase.java Log Message: Added phase and train info to the status window Index: PhaseManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PhaseManager.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** PhaseManager.java 31 Oct 2009 17:08:26 -0000 1.18 --- PhaseManager.java 18 Jan 2010 18:46:57 -0000 1.19 *************** *** 87,89 **** --- 87,93 ---- } + public List<Phase> getPhases() { + return phaseList; + } + } Index: Phase.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Phase.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Phase.java 31 Oct 2009 17:08:27 -0000 1.14 --- Phase.java 18 Jan 2010 18:47:16 -0000 1.15 *************** *** 33,37 **** /** May company buy more than one Train of each type from the Bank per turn? */ protected boolean oneTrainPerTypePerTurn = false; ! /** Is loan taking allowed */ protected boolean loanTakingAllowed = false; --- 33,37 ---- /** May company buy more than one Train of each type from the Bank per turn? */ protected boolean oneTrainPerTypePerTurn = false; ! /** Is loan taking allowed */ protected boolean loanTakingAllowed = false; *************** *** 126,134 **** oneTrainPerTypePerTurn); } ! Tag loansTag = tag.getChild("Loans"); if (loansTag != null) { loanTakingAllowed = loansTag.getAttributeAsBoolean("allowed", ! loanTakingAllowed); } --- 126,134 ---- oneTrainPerTypePerTurn); } ! Tag loansTag = tag.getChild("Loans"); if (loansTag != null) { loanTakingAllowed = loansTag.getAttributeAsBoolean("allowed", ! loanTakingAllowed); } *************** *** 164,167 **** --- 164,171 ---- } + public String getTileColoursString() { + return colourList; + } + public int getIndex() { return index; |
From: Erik V. <ev...@us...> - 2010-01-18 18:43:54
|
Update of /cvsroot/rails/18xx/data/18EU In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21101/data/18EU Modified Files: Game.xml Log Message: Fixed bug in phases definition Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18EU/Game.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Game.xml 17 Jan 2010 14:05:48 -0000 1.12 --- Game.xml 18 Jan 2010 18:43:36 -0000 1.13 *************** *** 99,106 **** <Tiles colour="yellow,green,brown"/> </Phase> ! <Phase name="7"> ! <Tiles colour="yellow,green,brown"/> ! </Phase> ! <Phase name="4D"> <Tiles colour="yellow,green,brown,grey"/> </Phase> --- 99,103 ---- <Tiles colour="yellow,green,brown"/> </Phase> ! <Phase name="8"> <Tiles colour="yellow,green,brown,grey"/> </Phase> |
From: Erik V. <ev...@us...> - 2010-01-17 22:49:45
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv6167/rails/game Modified Files: GameManager.java Log Message: Clear visibility hints after loading Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** GameManager.java 17 Jan 2010 14:05:48 -0000 1.77 --- GameManager.java 17 Jan 2010 22:49:06 -0000 1.78 *************** *** 832,835 **** --- 832,837 ---- DisplayBuffer.clear(); + guiHints.clearVisibilityHints(); + return true; } |
From: Erik V. <ev...@us...> - 2010-01-17 18:33:16
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv17440/rails/ui/swing Modified Files: GameUIManager.java Log Message: Fix for companies not being able to start at lowest price. Index: GameUIManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/GameUIManager.java,v retrieving revision 1.33 retrieving revision 1.34 diff -C2 -d -r1.33 -r1.34 *** GameUIManager.java 14 Jan 2010 20:49:22 -0000 1.33 --- GameUIManager.java 17 Jan 2010 18:32:46 -0000 1.34 *************** *** 462,466 **** int index = dialog.getSelectedOption(); ! if (index > 0) { int price = action.getStartPrices()[index]; action.setStartPrice(price); --- 462,466 ---- int index = dialog.getSelectedOption(); ! if (index >= 0) { int price = action.getStartPrices()[index]; action.setStartPrice(price); |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/1856 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/1856 Modified Files: Game.xml CompanyManager.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/CompanyManager.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** CompanyManager.xml 28 Dec 2009 14:53:00 -0000 1.31 --- CompanyManager.xml 17 Jan 2010 14:05:48 -0000 1.32 *************** *** 164,170 **** <Item name="Tunn" type="Private" basePrice="100"/> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleInFirstSR/> - </StockRoundRules> </CompanyManager> --- 164,166 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1856/Game.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** Game.xml 15 Jan 2010 19:53:57 -0000 1.29 --- Game.xml 17 Jan 2010 14:05:48 -0000 1.30 *************** *** 7,11 **** <GameParameters> <StockRound class="rails.game.specific._1856.StockRound_1856" ! sequence="SellBuyOrBuySell"/> <OperatingRound class="rails.game.specific._1856.OperatingRound_1856"/> <PlayerShareLimit percentage="60"/> --- 7,13 ---- <GameParameters> <StockRound class="rails.game.specific._1856.StockRound_1856" ! sequence="SellBuyOrBuySell"> ! <NoSaleInFirstSR/> ! </StockRound> <OperatingRound class="rails.game.specific._1856.OperatingRound_1856"/> <PlayerShareLimit percentage="60"/> |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/1870 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/1870 Modified Files: Game.xml CompanyManager.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1870/CompanyManager.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** CompanyManager.xml 19 Oct 2008 17:02:00 -0000 1.21 --- CompanyManager.xml 17 Jan 2010 14:05:48 -0000 1.22 *************** *** 77,83 **** <Item name="MKT" type="Private" basePrice="160"/> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleInFirstSR/> - </StockRoundRules> </CompanyManager> --- 77,79 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1870/Game.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** Game.xml 15 Jan 2010 19:53:56 -0000 1.21 --- Game.xml 17 Jan 2010 14:05:48 -0000 1.22 *************** *** 9,12 **** --- 9,15 ---- </PlayerShareLimit> <BankPoolLimit percentage="50"/> + <StockRound> + <NoSaleInFirstSR/> + </StockRound> </GameParameters> <EndOfGame> |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/18EU In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/18EU Modified Files: Game.xml CompanyManager.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18EU/CompanyManager.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** CompanyManager.xml 13 Dec 2009 21:12:12 -0000 1.12 --- CompanyManager.xml 17 Jan 2010 14:05:48 -0000 1.13 *************** *** 114,121 **** <Item name="15" type="Minor" basePrice="100"/> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleInFirstSR/> - <NoSaleIfNotOperated/> - </StockRoundRules> </CompanyManager> --- 114,116 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18EU/Game.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Game.xml 15 Jan 2010 19:53:57 -0000 1.11 --- Game.xml 17 Jan 2010 14:05:48 -0000 1.12 *************** *** 8,12 **** <StockRound class="rails.game.specific._18EU.StockRound_18EU" sequence="sellBuy" ! skipFirst="yes"/> <OperatingRound class="rails.game.specific._18EU.OperatingRound_18EU"/> <PlayerShareLimit percentage="60"/> --- 8,15 ---- <StockRound class="rails.game.specific._18EU.StockRound_18EU" sequence="sellBuy" ! skipFirst="yes"> ! <NoSaleInFirstSR/> ! <NoSaleIfNotOperated/> ! </StockRound> <OperatingRound class="rails.game.specific._18EU.OperatingRound_18EU"/> <PlayerShareLimit percentage="60"/> |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/18AL In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/18AL Modified Files: Game.xml CompanyManager.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18AL/CompanyManager.xml,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** CompanyManager.xml 26 Oct 2008 20:37:21 -0000 1.24 --- CompanyManager.xml 17 Jan 2010 14:05:47 -0000 1.25 *************** *** 93,99 **** <Item name="NDY" type="Private" basePrice="120"/> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleInFirstSR/> - </StockRoundRules> </CompanyManager> \ No newline at end of file --- 93,95 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18AL/Game.xml,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Game.xml 15 Jan 2010 19:53:55 -0000 1.22 --- Game.xml 17 Jan 2010 14:05:47 -0000 1.23 *************** *** 10,13 **** --- 10,16 ---- <PlayerShareLimit percentage="60"/> <BankPoolLimit percentage="50"/> + <StockRound> + <NoSaleInFirstSR/> + </StockRound> </GameParameters> <GuiClasses> |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/rails/game Modified Files: CompanyManager.java GameManager.java Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/CompanyManager.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CompanyManager.java 14 Jan 2010 21:04:26 -0000 1.19 --- CompanyManager.java 17 Jan 2010 14:05:48 -0000 1.20 *************** *** 1 **** ! /* $Header$ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.util.LocalText; import rails.util.Tag; public class CompanyManager implements CompanyManagerI, ConfigurableComponentI { /** A List with all private companies */ private List<PrivateCompanyI> lPrivateCompanies = new ArrayList<PrivateCompanyI>(); /** A List with all public companies */ private List<PublicCompanyI> lPublicCompanies = new ArrayList<PublicCompanyI>(); /** A map with all private companies by name */ private Map<String, PrivateCompanyI> mPrivateCompanies = new HashMap<String, PrivateCompanyI>(); /** A map with all public (i.e. non-private) companies by name */ private Map<String, PublicCompanyI> mPublicCompanies = new HashMap<String, PublicCompanyI>(); /** A map of all type names to maps of companies of that type by name */ // TODO Redundant, current usage can be replaced. private Map<String, HashMap<String, CompanyI>> mCompaniesByTypeAndName = new HashMap<String, HashMap<String, CompanyI>>(); /** A list of all start packets (usually one) */ private List<StartPacket> startPackets = new ArrayList<StartPacket>(); /** A map of all start packets, keyed by name. Default name is "Initial" */ private Map<String, StartPacket> startPacketMap = new HashMap<String, StartPacket>(); private int numberOfPublicCompanies = 0; protected static Logger log = Logger.getLogger(CompanyManager.class.getPackage().getName()); protected GameManagerI gameManager; /* * NOTES: 1. we don't have a map over all companies, because some games have * duplicate names, e.g. B&O in 1830. 2. we have both a map and a list of * private/public companies to preserve configuration sequence while * allowing direct access. */ /** * No-args constructor. */ public CompanyManager() { // Nothing to do here, everything happens when configured. } /** * @see rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element) */ public void configureFromXML(Tag tag) throws ConfigurationException { gameManager = GameManager.getInstance(); /** A map with all company types, by type name */ // Localised here as it has no permanent use Map<String, CompanyTypeI> mCompanyTypes = new HashMap<String, CompanyTypeI>(); for (Tag compTypeTag : tag.getChildren(CompanyTypeI.ELEMENT_ID)) { // Extract the attributes of the Component String name = compTypeTag.getAttributeAsString(CompanyTypeI.NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompanyType")); } String className = compTypeTag.getAttributeAsString(CompanyTypeI.CLASS_TAG); if (className == null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeHasNoClass", name)); } if (mCompanyTypes.get(name) != null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeConfiguredTwice", name)); } CompanyTypeI companyType = new CompanyType(name, className); mCompanyTypes.put(name, companyType); // Further parsing is done within CompanyType companyType.configureFromXML(compTypeTag); } /* Read and configure the companies */ for (Tag companyTag : tag.getChildren(CompanyI.COMPANY_ELEMENT_ID)) { // Extract the attributes of the Component String name = companyTag.getAttributeAsString(CompanyI.COMPANY_NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompany")); } String type = companyTag.getAttributeAsString(CompanyI.COMPANY_TYPE_TAG); if (type == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasNoType", name)); } CompanyTypeI cType = mCompanyTypes.get(type); if (cType == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasUnknownType", name, type )); } try { CompanyI company = cType.createCompany(name, companyTag); /* Private or public */ if (company instanceof PrivateCompanyI) { mPrivateCompanies.put(name, (PrivateCompanyI) company); lPrivateCompanies.add((PrivateCompanyI) company); } else if (company instanceof PublicCompanyI) { ((PublicCompanyI)company).setIndex (numberOfPublicCompanies++); mPublicCompanies.put(name, (PublicCompanyI) company); lPublicCompanies.add((PublicCompanyI) company); } /* By type and name */ if (!mCompaniesByTypeAndName.containsKey(type)) mCompaniesByTypeAndName.put(type, new HashMap<String, CompanyI>()); ((Map<String, CompanyI>) mCompaniesByTypeAndName.get(type)).put( name, company); } catch (Exception e) { throw new ConfigurationException(LocalText.getText( "ClassCannotBeInstantiated", cType.getClassName()), e); } } /* Read and configure the start packets */ List<Tag> packetTags = tag.getChildren("StartPacket"); if (packetTags != null) { for (Tag packetTag : tag.getChildren("StartPacket")) { // Extract the attributes of the Component String name = packetTag.getAttributeAsString("name", StartPacket.DEFAULT_NAME); String roundClass = packetTag.getAttributeAsString("roundClass"); if (roundClass == null) { throw new ConfigurationException(LocalText.getText( "StartPacketHasNoClass", name)); } StartPacket sp = new StartPacket(name, roundClass); startPackets.add(sp); startPacketMap.put(name, sp); sp.configureFromXML(packetTag); } } /* Read and configure additional rules */ /* This part may move later to a GameRules or GameManager XML */ Tag rulesTag = tag.getChild("StockRoundRules"); if (rulesTag != null) { for (String ruleTagName : rulesTag.getChildren().keySet()) { if (ruleTagName.equals("NoSaleInFirstSR")) { //StockRound.setNoSaleInFirstSR(); gameManager.setGameParameter(GameDef.Parm.NO_SALE_IN_FIRST_SR, true); } else if (ruleTagName.equals("NoSaleIfNotOperated")) { //StockRound.setNoSaleIfNotOperated(); gameManager.setGameParameter(GameDef.Parm.NO_SALE_IF_NOT_OPERATED, true); } } } } // Post XML parsing initialisations public void finishConfiguration (GameManagerI gameManager) throws ConfigurationException { for (PublicCompanyI comp : lPublicCompanies) { comp.finishConfiguration(gameManager); } for (PrivateCompanyI comp : lPrivateCompanies) { comp.finishConfiguration(gameManager); } } /** * @see rails.game.CompanyManagerI#getCompany(java.lang.String) * */ public PrivateCompanyI getPrivateCompany(String name) { return mPrivateCompanies.get(name); } public PublicCompanyI getPublicCompany(String name) { return mPublicCompanies.get(name); } public List<PrivateCompanyI> getAllPrivateCompanies() { return lPrivateCompanies; } public List<PublicCompanyI> getAllPublicCompanies() { return lPublicCompanies; } public PublicCompanyI getCompanyByName(String name) { for (int i = 0; i < lPublicCompanies.size(); i++) { PublicCompany co = (PublicCompany) lPublicCompanies.get(i); if (name.equalsIgnoreCase(co.getName())) { return lPublicCompanies.get(i); } } return null; } public CompanyI getCompany(String type, String name) { if (mCompaniesByTypeAndName.containsKey(type)) { return (mCompaniesByTypeAndName.get(type)).get(name); } else { return null; } } public void closeAllPrivates() { if (lPrivateCompanies == null) return; for (PrivateCompanyI priv : lPrivateCompanies) { priv.setClosed(); } } public List<PrivateCompanyI> getPrivatesOwnedByPlayers() { List<PrivateCompanyI> privatesOwnedByPlayers = new ArrayList<PrivateCompanyI>(); for (PrivateCompanyI priv : getAllPrivateCompanies()) { if (priv.getPortfolio().getOwner() instanceof Player) { privatesOwnedByPlayers.add(priv); } } return privatesOwnedByPlayers; } public StartPacket getStartPacket (int index) { return startPackets.get(index); } public StartPacket getStartPacket (String name) { return startPacketMap.get(name); } } \ No newline at end of file --- 1 ---- ! /* $Header$ */ package rails.game; import java.util.*; import org.apache.log4j.Logger; import rails.util.LocalText; import rails.util.Tag; public class CompanyManager implements CompanyManagerI, ConfigurableComponentI { /** A List with all private companies */ private List<PrivateCompanyI> lPrivateCompanies = new ArrayList<PrivateCompanyI>(); /** A List with all public companies */ private List<PublicCompanyI> lPublicCompanies = new ArrayList<PublicCompanyI>(); /** A map with all private companies by name */ private Map<String, PrivateCompanyI> mPrivateCompanies = new HashMap<String, PrivateCompanyI>(); /** A map with all public (i.e. non-private) companies by name */ private Map<String, PublicCompanyI> mPublicCompanies = new HashMap<String, PublicCompanyI>(); /** A map of all type names to maps of companies of that type by name */ // TODO Redundant, current usage can be replaced. private Map<String, HashMap<String, CompanyI>> mCompaniesByTypeAndName = new HashMap<String, HashMap<String, CompanyI>>(); /** A list of all start packets (usually one) */ private List<StartPacket> startPackets = new ArrayList<StartPacket>(); /** A map of all start packets, keyed by name. Default name is "Initial" */ private Map<String, StartPacket> startPacketMap = new HashMap<String, StartPacket>(); private int numberOfPublicCompanies = 0; protected static Logger log = Logger.getLogger(CompanyManager.class.getPackage().getName()); protected GameManagerI gameManager; /* * NOTES: 1. we don't have a map over all companies, because some games have * duplicate names, e.g. B&O in 1830. 2. we have both a map and a list of * private/public companies to preserve configuration sequence while * allowing direct access. */ /** * No-args constructor. */ public CompanyManager() { // Nothing to do here, everything happens when configured. } /** * @see rails.game.ConfigurableComponentI#configureFromXML(org.w3c.dom.Element) */ public void configureFromXML(Tag tag) throws ConfigurationException { gameManager = GameManager.getInstance(); /** A map with all company types, by type name */ // Localised here as it has no permanent use Map<String, CompanyTypeI> mCompanyTypes = new HashMap<String, CompanyTypeI>(); for (Tag compTypeTag : tag.getChildren(CompanyTypeI.ELEMENT_ID)) { // Extract the attributes of the Component String name = compTypeTag.getAttributeAsString(CompanyTypeI.NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompanyType")); } String className = compTypeTag.getAttributeAsString(CompanyTypeI.CLASS_TAG); if (className == null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeHasNoClass", name)); } if (mCompanyTypes.get(name) != null) { throw new ConfigurationException(LocalText.getText( "CompanyTypeConfiguredTwice", name)); } CompanyTypeI companyType = new CompanyType(name, className); mCompanyTypes.put(name, companyType); // Further parsing is done within CompanyType companyType.configureFromXML(compTypeTag); } /* Read and configure the companies */ for (Tag companyTag : tag.getChildren(CompanyI.COMPANY_ELEMENT_ID)) { // Extract the attributes of the Component String name = companyTag.getAttributeAsString(CompanyI.COMPANY_NAME_TAG); if (name == null) { throw new ConfigurationException( LocalText.getText("UnnamedCompany")); } String type = companyTag.getAttributeAsString(CompanyI.COMPANY_TYPE_TAG); if (type == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasNoType", name)); } CompanyTypeI cType = mCompanyTypes.get(type); if (cType == null) { throw new ConfigurationException(LocalText.getText( "CompanyHasUnknownType", name, type )); } try { CompanyI company = cType.createCompany(name, companyTag); /* Private or public */ if (company instanceof PrivateCompanyI) { mPrivateCompanies.put(name, (PrivateCompanyI) company); lPrivateCompanies.add((PrivateCompanyI) company); } else if (company instanceof PublicCompanyI) { ((PublicCompanyI)company).setIndex (numberOfPublicCompanies++); mPublicCompanies.put(name, (PublicCompanyI) company); lPublicCompanies.add((PublicCompanyI) company); } /* By type and name */ if (!mCompaniesByTypeAndName.containsKey(type)) mCompaniesByTypeAndName.put(type, new HashMap<String, CompanyI>()); ((Map<String, CompanyI>) mCompaniesByTypeAndName.get(type)).put( name, company); } catch (Exception e) { throw new ConfigurationException(LocalText.getText( "ClassCannotBeInstantiated", cType.getClassName()), e); } } /* Read and configure the start packets */ List<Tag> packetTags = tag.getChildren("StartPacket"); if (packetTags != null) { for (Tag packetTag : tag.getChildren("StartPacket")) { // Extract the attributes of the Component String name = packetTag.getAttributeAsString("name", StartPacket.DEFAULT_NAME); String roundClass = packetTag.getAttributeAsString("roundClass"); if (roundClass == null) { throw new ConfigurationException(LocalText.getText( "StartPacketHasNoClass", name)); } StartPacket sp = new StartPacket(name, roundClass); startPackets.add(sp); startPacketMap.put(name, sp); sp.configureFromXML(packetTag); } } } // Post XML parsing initialisations public void finishConfiguration (GameManagerI gameManager) throws ConfigurationException { for (PublicCompanyI comp : lPublicCompanies) { comp.finishConfiguration(gameManager); } for (PrivateCompanyI comp : lPrivateCompanies) { comp.finishConfiguration(gameManager); } } /** * @see rails.game.CompanyManagerI#getCompany(java.lang.String) * */ public PrivateCompanyI getPrivateCompany(String name) { return mPrivateCompanies.get(name); } public PublicCompanyI getPublicCompany(String name) { return mPublicCompanies.get(name); } public List<PrivateCompanyI> getAllPrivateCompanies() { return lPrivateCompanies; } public List<PublicCompanyI> getAllPublicCompanies() { return lPublicCompanies; } public PublicCompanyI getCompanyByName(String name) { for (int i = 0; i < lPublicCompanies.size(); i++) { PublicCompany co = (PublicCompany) lPublicCompanies.get(i); if (name.equalsIgnoreCase(co.getName())) { return lPublicCompanies.get(i); } } return null; } public CompanyI getCompany(String type, String name) { if (mCompaniesByTypeAndName.containsKey(type)) { return (mCompaniesByTypeAndName.get(type)).get(name); } else { return null; } } public void closeAllPrivates() { if (lPrivateCompanies == null) return; for (PrivateCompanyI priv : lPrivateCompanies) { priv.setClosed(); } } public List<PrivateCompanyI> getPrivatesOwnedByPlayers() { List<PrivateCompanyI> privatesOwnedByPlayers = new ArrayList<PrivateCompanyI>(); for (PrivateCompanyI priv : getAllPrivateCompanies()) { if (priv.getPortfolio().getOwner() instanceof Player) { privatesOwnedByPlayers.add(priv); } } return privatesOwnedByPlayers; } public StartPacket getStartPacket (int index) { return startPackets.get(index); } public StartPacket getStartPacket (String name) { return startPacketMap.get(name); } } \ No newline at end of file Index: GameManager.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/GameManager.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** GameManager.java 15 Jan 2010 19:55:59 -0000 1.76 --- GameManager.java 17 Jan 2010 14:05:48 -0000 1.77 *************** *** 278,282 **** srTag.getAttributeAsBoolean("skipFirst", skipFirstStockRound); ! } // OperatingRound class --- 278,291 ---- srTag.getAttributeAsBoolean("skipFirst", skipFirstStockRound); ! ! for (String ruleTagName : srTag.getChildren().keySet()) { ! if (ruleTagName.equals("NoSaleInFirstSR")) { ! setGameParameter(GameDef.Parm.NO_SALE_IN_FIRST_SR, true); ! } else if (ruleTagName.equals("NoSaleIfNotOperated")) { ! setGameParameter(GameDef.Parm.NO_SALE_IF_NOT_OPERATED, true); ! } ! ! } ! } // OperatingRound class |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/18Kaas In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/18Kaas Modified Files: CompanyManager.xml Game.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18Kaas/CompanyManager.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** CompanyManager.xml 8 Dec 2009 19:31:09 -0000 1.8 --- CompanyManager.xml 17 Jan 2010 14:05:48 -0000 1.9 *************** *** 89,95 **** </Item> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleInFirstSR/> - </StockRoundRules> </CompanyManager> --- 89,91 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/18Kaas/Game.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Game.xml 15 Jan 2010 19:53:56 -0000 1.7 --- Game.xml 17 Jan 2010 14:05:48 -0000 1.8 *************** *** 7,10 **** --- 7,13 ---- <PlayerShareLimit percentage="60"/> <BankPoolLimit percentage="50"/> + <StockRound> + <NoSaleInFirstSR/> + </StockRound> </GameParameters> <EndOfGame> |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/1851 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/1851 Modified Files: CompanyManager.xml Game.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1851/CompanyManager.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CompanyManager.xml 19 Oct 2008 17:02:00 -0000 1.5 --- CompanyManager.xml 17 Jan 2010 14:05:48 -0000 1.6 *************** *** 74,81 **** </IfOption> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleIfNotOperated/> - </StockRoundRules> <BaseTokens> <!-- Not sure if this belongs here --> --- 74,77 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1851/Game.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Game.xml 15 Jan 2010 19:53:57 -0000 1.6 --- Game.xml 17 Jan 2010 14:05:48 -0000 1.7 *************** *** 7,11 **** <BankPoolLimit percentage="50"/> <TreasuryShareLimit percentage="50"/> ! <StockRound sequence="SellBuy"/> </GameParameters> <EndOfGame> --- 7,13 ---- <BankPoolLimit percentage="50"/> <TreasuryShareLimit percentage="50"/> ! <StockRound sequence="SellBuy"> ! <NoSaleIfNotOperated/> ! </StockRound> </GameParameters> <EndOfGame> |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/1830 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/1830 Modified Files: Game.xml CompanyManager.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1830/CompanyManager.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** CompanyManager.xml 16 Jan 2010 21:16:16 -0000 1.28 --- CompanyManager.xml 17 Jan 2010 14:05:48 -0000 1.29 *************** *** 103,109 **** </Item> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleInFirstSR/> - </StockRoundRules> </CompanyManager> --- 103,105 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1830/Game.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** Game.xml 15 Jan 2010 19:53:57 -0000 1.26 --- Game.xml 17 Jan 2010 14:05:48 -0000 1.27 *************** *** 19,23 **** <GameOption name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> ! <GameParameters> <PlayerShareLimit percentage="60"> <!-- Option "NumberOfPlayers" is automatically set --- 19,23 ---- <GameOption name="UnlimitedTopTrains" parm="D" type="toggle" default="no"/> <GameOption name="LeaveAuctionOnPass" type="toggle" default="no"/> ! <GameParameters> <PlayerShareLimit percentage="60"> <!-- Option "NumberOfPlayers" is automatically set *************** *** 28,31 **** --- 28,34 ---- </PlayerShareLimit> <BankPoolLimit percentage="50"/> + <StockRound> + <NoSaleInFirstSR/> + </StockRound> </GameParameters> <EndOfGame> |
From: Erik V. <ev...@us...> - 2010-01-17 14:05:56
|
Update of /cvsroot/rails/18xx/data/1835 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv25060/data/1835 Modified Files: Game.xml CompanyManager.xml Log Message: Moved <StockRoundRules> contents, misplaced in CompanyManager.xml, to existing <StockRound> element in Game.xml. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1835/CompanyManager.xml,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** CompanyManager.xml 28 Oct 2008 21:01:34 -0000 1.21 --- CompanyManager.xml 17 Jan 2010 14:05:48 -0000 1.22 *************** *** 198,206 **** </Item> </StartPacket> - <StockRoundRules> - <!-- Will probably move later to a GameManager XML--> - <NoSaleInFirstSR/> - <NoSaleIfNotOperated/> - </StockRoundRules> <BaseTokens> <!-- Not sure if this belongs here --> --- 198,201 ---- Index: Game.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1835/Game.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Game.xml 15 Jan 2010 19:53:57 -0000 1.20 --- Game.xml 17 Jan 2010 14:05:48 -0000 1.21 *************** *** 8,12 **** <BankPoolLimit percentage="50"/> <StockRound class="rails.game.specific._1835.StockRound_1835" ! sequence="SellBuySell"/> </GameParameters> <EndOfGame> --- 8,15 ---- <BankPoolLimit percentage="50"/> <StockRound class="rails.game.specific._1835.StockRound_1835" ! sequence="SellBuySell"> ! <NoSaleInFirstSR/> ! <NoSaleIfNotOperated/> ! </StockRound> </GameParameters> <EndOfGame> |
From: Erik V. <ev...@us...> - 2010-01-16 21:17:07
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27323 Modified Files: LocalisedText.properties Log Message: Added special property info for PRR and B&O Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.94 retrieving revision 1.95 diff -C2 -d -r1.94 -r1.95 *** LocalisedText.properties 16 Jan 2010 15:06:44 -0000 1.94 --- LocalisedText.properties 16 Jan 2010 21:16:23 -0000 1.95 *************** *** 85,88 **** --- 85,90 ---- ClickForSell=Click to select for selling ClickToSelectForBuying=Click to select for buying + ComesWithCertificate=Comes with {0} {1}% certificate + ComesWithPresidency=Comes with {0} {1}% presidency certificate CompanyAlreadyStarted={0} has already been started. CompanyDiscardsTrain={0} discards a {1}-train to Pool |
From: Erik V. <ev...@us...> - 2010-01-16 21:17:07
|
Update of /cvsroot/rails/18xx/data/1830 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27323/data/1830 Modified Files: CompanyManager.xml Log Message: Added special property info for PRR and B&O Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1830/CompanyManager.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** CompanyManager.xml 16 Jan 2010 15:06:44 -0000 1.27 --- CompanyManager.xml 16 Jan 2010 21:16:16 -0000 1.28 *************** *** 54,61 **** --- 54,63 ---- <Company name="C&A" type="Private" basePrice="160" revenue="25" longName="Camden & Amboy"> + <Info key="ComesWithCertificate" parm="PRR,10"/> <Blocking hex="H18"/> </Company> <Company name="B&O" type="Private" basePrice="220" revenue="30" longName="Baltimore & Ohio"> + <Info key="ComesWithPresidency" parm="B&O,20"/> <Blocking hex="I13,I15"/> </Company> |
From: Erik V. <ev...@us...> - 2010-01-16 21:16:53
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27323/rails/game Modified Files: Company.java CompanyI.java PrivateCompany.java Log Message: Added special property info for PRR and B&O Index: CompanyI.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/CompanyI.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** CompanyI.java 4 Jun 2008 19:00:31 -0000 1.5 --- CompanyI.java 16 Jan 2010 21:16:14 -0000 1.6 *************** *** 25,32 **** * @return the name of the Company */ ! String getName(); public String getLongName(); /** * Returns the CompanyType of the Company --- 25,34 ---- * @return the name of the Company */ ! public String getName(); public String getLongName(); + public String getInfoText(); + /** * Returns the CompanyType of the Company Index: Company.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Company.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Company.java 8 Jan 2010 21:30:37 -0000 1.11 --- Company.java 16 Jan 2010 21:15:58 -0000 1.12 *************** *** 15,18 **** --- 15,19 ---- protected int companyNumber; // For internal use protected Portfolio portfolio = null; + protected String infoText = ""; /** *************** *** 87,90 **** --- 88,95 ---- return longName; } + + public String getInfoText(){ + return infoText; + } /** Index: PrivateCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PrivateCompany.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** PrivateCompany.java 16 Jan 2010 15:06:44 -0000 1.29 --- PrivateCompany.java 16 Jan 2010 21:16:14 -0000 1.30 *************** *** 71,74 **** --- 71,82 ---- } } + + // Extra info text(usually related to extra-share special properties) + Tag infoTag = tag.getChild("Info"); + if (infoTag != null) { + String infoKey = infoTag.getAttributeAsString("key"); + String[] infoParms = infoTag.getAttributeAsString("parm", "").split(","); + infoText = LocalText.getText(infoKey, (Object[])infoParms); + } // Closing conditions |
From: Erik V. <ev...@us...> - 2010-01-16 21:16:50
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv27323/rails/ui/swing Modified Files: ORPanel.java Log Message: Added special property info for PRR and B&O Index: ORPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORPanel.java,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** ORPanel.java 16 Jan 2010 15:06:44 -0000 1.40 --- ORPanel.java 16 Jan 2010 21:16:30 -0000 1.41 *************** *** 477,480 **** --- 477,481 ---- List<SpecialPropertyI> sps; StringBuffer b; + String info; for (PrivateCompanyI p : privates) { *************** *** 484,488 **** b.append(p.getLongName()); } ! if (sps == null || sps.isEmpty()) { if (b.length() > 6) b.append("<br>"); b.append(LocalText.getText("NoSpecialProperty")); --- 485,493 ---- b.append(p.getLongName()); } ! info = p.getInfoText(); ! if (Util.hasValue(info)) { ! if (b.length() > 6) b.append("<br>"); ! b.append(info); ! } else if (sps == null || sps.isEmpty()) { if (b.length() > 6) b.append("<br>"); b.append(LocalText.getText("NoSpecialProperty")); |
From: Erik V. <ev...@us...> - 2010-01-16 15:06:52
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8948 Modified Files: LocalisedText.properties Log Message: Added Privates item to Info menu. Added long private names for 1830. Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.93 retrieving revision 1.94 diff -C2 -d -r1.93 -r1.94 *** LocalisedText.properties 16 Jan 2010 14:09:51 -0000 1.93 --- LocalisedText.properties 16 Jan 2010 15:06:44 -0000 1.94 *************** *** 260,263 **** --- 260,264 ---- NoSharePriceSet=A share price should have been set for {0} NoSharesAvailable=No {1} shares are available. + NoSpecialProperty=No special property NoTile=No Tile NoTiles=At the moment there is no valid tile or upgrade for this hex. Select another hex or press the No Tile button. |
From: Erik V. <ev...@us...> - 2010-01-16 15:06:52
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8948/rails/game Modified Files: PrivateCompany.java Log Message: Added Privates item to Info menu. Added long private names for 1830. Index: PrivateCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PrivateCompany.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** PrivateCompany.java 8 Jan 2010 21:30:46 -0000 1.28 --- PrivateCompany.java 16 Jan 2010 15:06:44 -0000 1.29 *************** *** 41,44 **** --- 41,45 ---- /* Configure private company features */ try { + longName= tag.getAttributeAsString("longName", ""); basePrice = tag.getAttributeAsInteger("basePrice", 0); revenue = tag.getAttributeAsInteger("revenue", 0); |
From: Erik V. <ev...@us...> - 2010-01-16 15:06:52
|
Update of /cvsroot/rails/18xx/rails/ui/swing In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8948/rails/ui/swing Modified Files: ORPanel.java Log Message: Added Privates item to Info menu. Added long private names for 1830. Index: ORPanel.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/ui/swing/ORPanel.java,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** ORPanel.java 14 Jan 2010 20:50:08 -0000 1.39 --- ORPanel.java 16 Jan 2010 15:06:44 -0000 1.40 *************** *** 13,18 **** --- 13,20 ---- import rails.game.*; import rails.game.action.*; + import rails.game.special.SpecialPropertyI; import rails.ui.swing.elements.*; import rails.util.LocalText; + import rails.util.Util; public class ORPanel extends GridPanel *************** *** 44,47 **** --- 46,50 ---- private JMenu infoMenu; private JMenuItem remainingTilesMenuItem; + private JMenu privatesInfoMenu; private JMenu specialMenu; private JMenu loansMenu; *************** *** 153,156 **** --- 156,161 ---- menuBar.add(infoMenu); + addPrivatesInfo(); + specialMenu = new JMenu(LocalText.getText("SPECIAL")); specialMenu.setBackground(Color.YELLOW); *************** *** 459,462 **** --- 464,502 ---- } + + protected void addPrivatesInfo () { + + List<PrivateCompanyI> privates = orWindow.gameUIManager.getGameManager().getAllPrivateCompanies(); + if (privates == null || privates.isEmpty()) return; + + privatesInfoMenu = new JMenu(LocalText.getText("PRIVATES")); + privatesInfoMenu.setEnabled(true); + infoMenu.add(privatesInfoMenu); + + JMenu item; + List<SpecialPropertyI> sps; + StringBuffer b; + + for (PrivateCompanyI p : privates) { + sps = p.getSpecialProperties(); + b = new StringBuffer("<html>"); + if (Util.hasValue(p.getLongName())) { + b.append(p.getLongName()); + } + if (sps == null || sps.isEmpty()) { + if (b.length() > 6) b.append("<br>"); + b.append(LocalText.getText("NoSpecialProperty")); + } else { + for (SpecialPropertyI sp : sps) { + if (b.length() > 6) b.append("<br>"); + b.append(sp.toString()); + } + } + item = new JMenu (p.getName()); + item.setEnabled(true); + item.add(new JMenuItem(b.toString())); + privatesInfoMenu.add(item); + } + } public void finish() { |
From: Erik V. <ev...@us...> - 2010-01-16 15:06:52
|
Update of /cvsroot/rails/18xx/data/1830 In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8948/data/1830 Modified Files: CompanyManager.xml Log Message: Added Privates item to Info menu. Added long private names for 1830. Index: CompanyManager.xml =================================================================== RCS file: /cvsroot/rails/18xx/data/1830/CompanyManager.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** CompanyManager.xml 13 Dec 2009 16:39:49 -0000 1.26 --- CompanyManager.xml 16 Jan 2010 15:06:44 -0000 1.27 *************** *** 18,26 **** <Trains number="4,4,3,2"/> </CompanyType> ! <Company name="SVNRR" type="Private" basePrice="20" revenue="5"> ! <Blocking hex="G15"/> ! </Company> ! <Company name="C&StL" type="Private" basePrice="40" revenue="10"> ! <Blocking hex="B20"/> <SpecialProperties> <SpecialProperty condition="ifOwnedByCompany" when="tileLayingStep" class="rails.game.special.SpecialTileLay"> --- 18,28 ---- <Trains number="4,4,3,2"/> </CompanyType> ! <Company name="SVNRR" type="Private" basePrice="20" revenue="5" ! longName="Schuylkill Valley Navigation & Railroad Company"> ! <Blocking hex="G15"/> ! </Company> ! <Company name="C&StL" type="Private" basePrice="40" revenue="10" ! longName="Champlain & St.Lawrence"> ! <Blocking hex="B20"/> <SpecialProperties> <SpecialProperty condition="ifOwnedByCompany" when="tileLayingStep" class="rails.game.special.SpecialTileLay"> *************** *** 29,34 **** </SpecialProperties> </Company> ! <Company name="D&H" type="Private" basePrice="70" revenue="15"> ! <Blocking hex="F16"/> <SpecialProperties> <SpecialProperty condition="ifOwnedByCompany" when="tileLayingStep" class="rails.game.special.SpecialTileLay"> --- 31,37 ---- </SpecialProperties> </Company> ! <Company name="D&H" type="Private" basePrice="70" revenue="15" ! longName="Delaware & Hudson"> ! <Blocking hex="F16"/> <SpecialProperties> <SpecialProperty condition="ifOwnedByCompany" when="tileLayingStep" class="rails.game.special.SpecialTileLay"> *************** *** 40,45 **** </SpecialProperties> </Company> ! <Company name="M&H" type="Private" basePrice="110" revenue="20"> ! <Blocking hex="D18"/> <SpecialProperties> <SpecialProperty condition="ifOwnedByPlayer" when="anyTime" class="rails.game.special.ExchangeForShare"> --- 43,49 ---- </SpecialProperties> </Company> ! <Company name="M&H" type="Private" basePrice="110" revenue="20" ! longName="Mohawk & Hudson"> ! <Blocking hex="D18"/> <SpecialProperties> <SpecialProperty condition="ifOwnedByPlayer" when="anyTime" class="rails.game.special.ExchangeForShare"> *************** *** 48,57 **** </SpecialProperties> </Company> ! <Company name="C&A" type="Private" basePrice="160" revenue="25"> ! <Blocking hex="H18"/> ! </Company> ! <Company name="B&O" type="Private" basePrice="220" revenue="30"> ! <Blocking hex="I13,I15"/> ! </Company> <!-- Note two supported colour specification formats: --- 52,63 ---- </SpecialProperties> </Company> ! <Company name="C&A" type="Private" basePrice="160" revenue="25" ! longName="Camden & Amboy"> ! <Blocking hex="H18"/> ! </Company> ! <Company name="B&O" type="Private" basePrice="220" revenue="30" ! longName="Baltimore & Ohio"> ! <Blocking hex="I13,I15"/> ! </Company> <!-- Note two supported colour specification formats: |
From: Erik V. <ev...@us...> - 2010-01-16 14:09:59
|
Update of /cvsroot/rails/18xx In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4766 Modified Files: LocalisedText.properties Log Message: Fixed escrow message Index: LocalisedText.properties =================================================================== RCS file: /cvsroot/rails/18xx/LocalisedText.properties,v retrieving revision 1.92 retrieving revision 1.93 diff -C2 -d -r1.92 -r1.93 *** LocalisedText.properties 14 Jan 2010 22:10:51 -0000 1.92 --- LocalisedText.properties 16 Jan 2010 14:09:51 -0000 1.93 *************** *** 185,189 **** HasPriority={0} has the Priority Deal HIDE_OPTIONS=Hide Options ! HoldMoneyInEscrow=The price ({0}) is paid to the Bank which holds it in escrow for {1} HOW_MANY_SHARES=How many shares? INFO=Game Notes --- 185,189 ---- HasPriority={0} has the Priority Deal HIDE_OPTIONS=Hide Options ! HoldMoneyInEscrow=The price of {0} is paid to the Bank, which now holds {1} in escrow for {2} HOW_MANY_SHARES=How many shares? INFO=Game Notes |