From: Erik V. <ev...@us...> - 2010-03-01 22:27:40
|
Update of /cvsroot/rails/18xx/rails/game In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv16112/rails/game Modified Files: Company.java PublicCompany.java PrivateCompany.java Log Message: Add SP info text at the end of other info Index: PublicCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PublicCompany.java,v retrieving revision 1.88 retrieving revision 1.89 diff -C2 -d -r1.88 -r1.89 *** PublicCompany.java 28 Feb 2010 21:38:04 -0000 1.88 --- PublicCompany.java 1 Mar 2010 22:27:31 -0000 1.89 *************** *** 270,275 **** public void configureFromXML(Tag tag) throws ConfigurationException { - super.configureFromXML(tag); - longName = tag.getAttributeAsString("longname", name); infoText = "<html>"+longName; --- 270,273 ---- *************** *** 342,345 **** --- 340,346 ---- } + // Special properties (as in the 1835 black minors) + super.configureFromXML(tag); + // TODO Normally set in the default train type. May be wrong place. // Ridiculous to reparse with each train type. *************** *** 725,728 **** --- 726,731 ---- } + infoText += parentInfoText; + parentInfoText = ""; } Index: Company.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/Company.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** Company.java 28 Feb 2010 21:38:04 -0000 1.14 --- Company.java 1 Mar 2010 22:27:30 -0000 1.15 *************** *** 22,25 **** --- 22,26 ---- protected Portfolio portfolio = null; protected String infoText = ""; + protected String parentInfoText = ""; /** *************** *** 76,80 **** specialProperties.add(sp); sp.configureFromXML(spTag); ! infoText += "<br>" + sp.getInfo(); } } --- 77,81 ---- specialProperties.add(sp); sp.configureFromXML(spTag); ! parentInfoText += "<br>" + sp.getInfo(); } } Index: PrivateCompany.java =================================================================== RCS file: /cvsroot/rails/18xx/rails/game/PrivateCompany.java,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** PrivateCompany.java 28 Feb 2010 21:38:05 -0000 1.37 --- PrivateCompany.java 1 Mar 2010 22:27:32 -0000 1.38 *************** *** 44,50 **** try { - // For special properties (now included in Company). - super.configureFromXML(tag); - longName= tag.getAttributeAsString("longname", name); infoText = "<html>"+longName; --- 44,47 ---- *************** *** 71,74 **** --- 68,75 ---- } + + // For special properties (now included in Company). + super.configureFromXML(tag); + // Closing conditions // Currently only used to handle closure following laying *************** *** 129,133 **** } } ! } /** Initialisation, to be called directly after instantiation (cloning) */ --- 130,137 ---- } } ! ! infoText += parentInfoText; ! parentInfoText = ""; ! } /** Initialisation, to be called directly after instantiation (cloning) */ |