Planet mining settings interface
* Modified owned planet view to include a field which indicates whether mining settings are specific to the planet or come from the empire; modified "simple" game components accordingly * Modified stored procedures to only allow planet-specific mining settings updates when the planet actually uses planet-specific settings, and added a stored procedure which toggles the source of a planet's settings * Added corresponding parts to mining settings DAO and resources controller * Added session commands and server command handlers that toggle the source of the settings and that upload the settings * Split planet page template into multiple files for clarity and added the mining priorities form to the natural resources tab
This commit is contained in:
parent
51b529a09f
commit
e64f847ec3
25 changed files with 1009 additions and 152 deletions
legacyworlds-web-beans/src/main/java/com/deepclone/lw/web/csess
|
@ -164,6 +164,36 @@ public class PlayerSession
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send a {@link ToggleMiningSettingsCommand} to the server
|
||||
*
|
||||
* @param pId
|
||||
* the planet whose mining settings are to be switched between empire-wide and
|
||||
* planet-specific
|
||||
*/
|
||||
public void toggleMiningSettingsFor( int pId )
|
||||
throws SessionException , SessionServerException , SessionMaintenanceException
|
||||
{
|
||||
this.execute( new ToggleMiningSettingsCommand( pId ) );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Send a {@link UpdatePlanetMiningSettingsCommand} to the server
|
||||
*
|
||||
* @param pId
|
||||
* the identifier of the planet to udpate
|
||||
* @param settings
|
||||
* the map of settings, as associations between resource identifiers and priority
|
||||
* values
|
||||
*/
|
||||
public void updatePlanetMiningSettings( int pId , Map< String , Integer > settings )
|
||||
throws SessionException , SessionServerException , SessionMaintenanceException
|
||||
{
|
||||
this.execute( new UpdatePlanetMiningSettingsCommand( pId , settings ) );
|
||||
}
|
||||
|
||||
|
||||
public ViewPlanetResponse rename( int planetId , String name )
|
||||
throws SessionException , SessionServerException , SessionMaintenanceException
|
||||
{
|
||||
|
|
Reference in a new issue