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
|