Research update

* Implemented new research update. Old research system no longer
updates.

* Fixed a major bug in the constants registrar

* Added game.research.vacation constant (determines the rate of
research when players are in vacation mode)
This commit is contained in:
Emmanuel BENOîT 2012-04-02 13:29:43 +02:00
parent a14601df37
commit c7949e41cc
11 changed files with 414 additions and 85 deletions
legacyworlds-server-beans-system/src/main/java/com/deepclone/lw/beans/sys

View file

@ -53,7 +53,7 @@ public class ConstantsRegistrarBean
true ) );
cDesc = "Initial universe size (offset relative to the centre).";
defs.add( new ConstantDefinition( "game.universe.initialSize" , "Universe" , cDesc , 1.0 , 1.0 , true ) );
// Natural resources
cDesc = "Global recovery rate multiplier for natural resources. This should be kept close to 0.";
defs.add( new ConstantDefinition( "game.resources.recovery" , "Natural resources" , cDesc , 0.01 , 0.00001 ,
@ -125,12 +125,12 @@ public class ConstantsRegistrarBean
defs.add( new ConstantDefinition( wcNames[ 6 ] , cat , cDesc , 0.50 , 0.01 , true ) );
cDesc = "Proportion of queue investments that is recovered when flushing the queue.";
defs.add( new ConstantDefinition( wcNames[ 7 ] , cat , cDesc , 0.1 , 0.01 , 1.0 ) );
// Research
String[] rcNames = {
"basePoints" , "visibility.points" , "visibility.ratio" , "weightBase"
"basePoints" , "visibility.points" , "visibility.ratio" , "weightBase" , "vacation"
};
for ( int i = 0 ; i < wcNames.length ; i++ ) {
for ( int i = 0 ; i < rcNames.length ; i++ ) {
rcNames[ i ] = "game.research." + rcNames[ i ];
}
cat = "Research & technologies";
@ -144,6 +144,8 @@ public class ConstantsRegistrarBean
+ "to compute the actual weight when determining how research points are distributed between "
+ "an empire's in-progress research.";
defs.add( new ConstantDefinition( rcNames[ 3 ] , cat , cDesc , 10.0 , 1.0 , true ) );
cDesc = "Research points multiplier used when the player is on vacation.";
defs.add( new ConstantDefinition( rcNames[ 4 ] , cat , cDesc , 0.1 , 0.01 , 0.99 ) );
// Vacation mode
cDesc = "Initial vacation credits.";
@ -188,7 +190,7 @@ public class ConstantsRegistrarBean
// Ticker
cDesc = "Interval between ticks with the highest frequency, in milliseconds.";
defs.add( new ConstantDefinition( "ticker.interval" , "Ticker" , cDesc , 5000.0 , 1000.0 , true ) );
// Accounts
cDesc = "Minimal interval between address change requests (seconds)";
defs.add( new ConstantDefinition( "accounts.acrDelay" , "Accounts" , cDesc , 14400.0 , 1.0 , true ) );
@ -202,25 +204,32 @@ public class ConstantsRegistrarBean
defs.add( new ConstantDefinition( "accounts.banDelay" , "Accounts" , cDesc , 178000.0 , 3600.0 , true ) );
cDesc = "Delay before a ban request expires (seconds)";
defs.add( new ConstantDefinition( "accounts.banExpiration" , "Accounts" , cDesc , oneWeek , 3600.0 , true ) );
// Accounts - warnings
cDesc = "Amount of warnings that triggers an automatic ban request.";
defs.add( new ConstantDefinition( "accounts.warnings.autoBan" , "Accounts - Warnings" , cDesc , 3.0 , 1.0 , true ) );
defs.add( new ConstantDefinition( "accounts.warnings.autoBan" , "Accounts - Warnings" , cDesc , 3.0 , 1.0 ,
true ) );
cDesc = "Period after a warning is received during which additional warnings will be ignored (seconds).";
defs.add( new ConstantDefinition( "accounts.warnings.grace" , "Accounts - Warnings" , cDesc , 7200.0 , 60.0 , true ) );
defs.add( new ConstantDefinition( "accounts.warnings.grace" , "Accounts - Warnings" , cDesc , 7200.0 , 60.0 ,
true ) );
cDesc = "Time after which warnings are decreased (expressed in units as defined by a.w.expiration.units).";
defs.add( new ConstantDefinition( "accounts.warnings.expiration" , "Accounts - Warnings" , cDesc , 60.0 , 1.0 , true ) );
defs.add( new ConstantDefinition( "accounts.warnings.expiration" , "Accounts - Warnings" , cDesc , 60.0 , 1.0 ,
true ) );
cDesc = "Units used to express warning expiration time (seconds).";
defs.add( new ConstantDefinition( "accounts.warnings.expiration.units" , "Accounts - Warnings" , cDesc , 86400.0 , 1.0 , true ) );
defs.add( new ConstantDefinition( "accounts.warnings.expiration.units" , "Accounts - Warnings" , cDesc ,
86400.0 , 1.0 , true ) );
// Account inactivity
cDesc = "Time units (seconds)";
defs.add( new ConstantDefinition( "accounts.inactivity.units" , "Accounts - Inactivity" , cDesc , oneWeek , 3600.0 , true ) );
defs.add( new ConstantDefinition( "accounts.inactivity.units" , "Accounts - Inactivity" , cDesc , oneWeek ,
3600.0 , true ) );
cDesc = "Time after which the inactivity warning e-mail is to be sent, expressed using units defined by a.i.units.";
defs.add( new ConstantDefinition( "accounts.inactivity.warningMail" , "Accounts - Inactivity" , cDesc , 3.0 , 1.0 , true ) );
defs.add( new ConstantDefinition( "accounts.inactivity.warningMail" , "Accounts - Inactivity" , cDesc , 3.0 ,
1.0 , true ) );
cDesc = "Time between the inactivity warning e-mail and actual account deletion, expressed using units defined by a.i.units.";
defs.add( new ConstantDefinition( "accounts.inactivity.deletion" , "Accounts - Inactivity" , cDesc , 1.0 , 1.0 , true ) );
defs.add( new ConstantDefinition( "accounts.inactivity.deletion" , "Accounts - Inactivity" , cDesc , 1.0 , 1.0 ,
true ) );
// Bug reports
cDesc = "Amount of credits granted for low priority bug reports.";
defs.add( new ConstantDefinition( "bugtracker.lowCredits" , "Bug tracking system" , cDesc , 1.0 , 1.0 , true ) );