Game updates improvements
* Added a set of tables which define game updates and their targets. These definitions replace the old enumerate type. Added a set of triggers which automatically create specific update tables, insert missing entries, etc... when game update types are being manipulated. * Removed manual insertion of game updates from empire creation function and universe generator. * Added registration of core update targets (i.e. planets and empires), updated all existing game update processing functions and added type registrations * Created Maven project for game updates control components, moved existing components from the -simple project, rewritten most of what they contained, added new components for server-side update batch processing
This commit is contained in:
parent
ba6a1e2b41
commit
56eddcc4f0
93 changed files with 4004 additions and 578 deletions
legacyworlds-server-data/src/main/java/com/deepclone/lw/sqld/sys
|
@ -0,0 +1,82 @@
|
|||
package com.deepclone.lw.sqld.sys;
|
||||
|
||||
|
||||
/**
|
||||
* The result of a game update
|
||||
*
|
||||
* <p>
|
||||
* This class is used to transmit the results of the game updates processor. The results may
|
||||
* indicate:
|
||||
* <ul>
|
||||
* <li>a finished game update cycle that needs no further processing,
|
||||
* <li>an in-progress update cycle for which further in-base processing is needed,
|
||||
* <li>an in-progress update cycle where some processing must be done in the server.
|
||||
* </ul>
|
||||
*
|
||||
* @author <a href="mailto:tseeker@legacyworlds.com">E. Benoît</a>
|
||||
*/
|
||||
public class GameUpdateResult
|
||||
{
|
||||
|
||||
/** Whether the update cycle is finished */
|
||||
private final boolean finished;
|
||||
|
||||
/**
|
||||
* Name of the type of processing that needs to be run on the server, or <code>null</code> if
|
||||
* the update is finished or was processed in-base
|
||||
*/
|
||||
private final String localExecution;
|
||||
|
||||
|
||||
/**
|
||||
* Initialise a "finished" game update result
|
||||
*
|
||||
* <p>
|
||||
* This constructor will set {@link #finished} to <code>true</code> and {@link #localExecution}
|
||||
* to <code>null</code>.
|
||||
*/
|
||||
public GameUpdateResult( )
|
||||
{
|
||||
this.finished = true;
|
||||
this.localExecution = null;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Initialise an "incomplete" game update result
|
||||
*
|
||||
* <p>
|
||||
* This constructor will set {@link #finished} to <code>false</code> and {@link #localExecution}
|
||||
* to the parameter's value.
|
||||
*
|
||||
* @param localExecution
|
||||
* the name of the type of processing to be executed on the server, or
|
||||
* <code>null</code> if the update was processed in-base.
|
||||
*/
|
||||
public GameUpdateResult( String localExecution )
|
||||
{
|
||||
this.finished = false;
|
||||
this.localExecution = localExecution;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return <code>true</code> if the update cycle was completed or <code>false</code> if further
|
||||
* processing is required.
|
||||
*/
|
||||
public boolean isFinished( )
|
||||
{
|
||||
return this.finished;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return Name of the type of processing that needs to be run on the server, or
|
||||
* <code>null</code> if the update is finished or was processed in-base
|
||||
*/
|
||||
public String getLocalExecution( )
|
||||
{
|
||||
return this.localExecution;
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue