Research page - Unlocked buildings

* The research page now includes a list of buildings unlocked by each
technology when that technology is not in the "unknown" state.
This commit is contained in:
Emmanuel BENOîT 2012-04-09 13:08:08 +02:00
parent 96c296e9d5
commit ab04752169
7 changed files with 149 additions and 7 deletions
legacyworlds-session/src/main/java/com/deepclone/lw/cmd/player/gdata/empire

View file

@ -78,7 +78,10 @@ public class ResearchData
private List< String > dependencies = new ArrayList< String >( );
/** List of identifiers of technologies that depend on the current technology. */
private List< String > revDependencies = new LinkedList< String >( );
private final List< String > revDependencies = new LinkedList< String >( );
/** List of buildings the current technology unlocks. */
private List< String > buildings = new ArrayList< String >( );
/**
@ -320,6 +323,41 @@ public class ResearchData
}
/**
* Update the list of unlocked buildings
*
* @param buildings
* the new list of buildings
*/
public void setBuildings( String[] buildings )
{
this.buildings = Arrays.asList( buildings );
}
/**
* Update the list of unlocked buildings
*
* @param buildings
* the new list of buildings
*/
public void setBuildings( List< String > buildings )
{
this.buildings = buildings;
}
/**
* Gets the list of buildings the current technology unlocks.
*
* @return the list of buildings the current technology unlocks
*/
public List< String > getBuildings( )
{
return this.buildings;
}
/**
* Research page entry comparison
*