Added tables that store event access interfaces and event states per
interface, as well as functions which allow events to be retrieved:
* events.interfaces lists access interfaces,
* events.unprocessed_events lists events which haven't been processed
for each type of interface, with a "pre-processed" flag
* events.ep_read() is a set of function variants which will read events
* events.ep_access() is a set of function variants which read events
then update their states.
Added the necessary database code to convert the contents of event
queues into actual event records. The changes include:
* a new table, events.pending_events, which is automatically filled by
a trigger when events are inserted into queue tables,
* the game.events.batchSize constant which defines the maximal amount
of events to process in a single transaction,
* the events.eq_process() stored procedure, which processes the events.
In addition, the "hstore" extension was added as it is the easiest way
to convert events from the queues' table model to the store's
meta-model.
Because the events management functions are definitely going to be quite
big, I thought it would be better to split them into multiple SQL files.
For now, there's a file for event definition functions and one for
functions that manipulate priority overrides. The old file containing
the old code stays around for now.
Added tables allowing event data to be stored on the long term:
* events.events_v2 (which will need to be renamed) contains the events'
main entry
* events.field_values stores field values for all events.
Added stored procedures which can be used to update customisable event
priorities:
* events.evcp_set() adds or modifies an override,
* events.clear() can be used to remove a specific override or all
overrides for a given player.
Fixed a bug which caused events.evdef_finalise() to fail with an
exception when the event type identifier was wrong, and to register the
event type event if error had occurred on field definitions.
Added functions that allow new event types to be defined. The functions
are:
* events.evdef_start() which starts recording a definition,
* events.evdef_addfld_*(), a set of functions to add fields to
the current definition,
* events.evdef_finalise() which adds the definition records and creates
the event queue table.
It is not possible to modify or delete event definitions at this time.
They will be added if and when they become necessary.
* Modified buildable definitions and loader to use technologies from the
tech graph as dependencies instead of the old research system
* Modified planet-related views and functions accordingly
* Added legacyworlds-server-beans-technologies Maven module, including
the player-level DAO and controller.
* Added session classes to carry technology information, modified web
client session façade accordingly
* Various changes to common UI elements (forms, lists, etc...) so the
start and end of some element can be drawn separately
* Added controller, templates and JavaScript for research page
* Removed data classes and database access that were used to display
technology information
* Removed "Research" tab from Overview page on the web client
* 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)
* Added game.research.weightBase constant
* Added view which computes the weights for each in-progress research
* Added view which computes total weights per empire
* Added new research-related constants
* Added set of views and functions to list empires' technologies. This
includes a view which determines the visibility of an in-progress
research's details, and a main list view.
* A stored procedure which implements technologies has been added. It
will mark a pending technology as implemented and remove the
corresponding quantity of money from the empire, then add any newly
available research items to the empire's research.
* When an empire is created, all technologies that have no dependencies
will be added as ongoing research with default priority and no points in
the empire research table.
* Added "dummy" data file for technologies (for now it simply copies the
old, line-based technologies) and corresponding XML schema
* Added missing SQL stored procedure to clear all dependencies and
reverse dependencies from a technology
* Added import classes, loader and import tool for the technology graph
* Added tech graph import tool to post-build tests
* Added stored procedures which manipulate technology definitions
themselves (defs.uoc_technology) or their dependencies (defs.techdep_add
and defs.techdep_remove)
* Added table to store empire technologies. The table will store
technologies in all states.
* Note: this table is called "emp.technologies_v2" for now. It will need
to be renamed when the old tech system is gone.
* 030-data/110-empires.sql needs to be executed to create the new table
and a type it uses.
* Added table that will contain the cached technology dependencies.
* Implemented trigger functions that update the cache and make sure
there are no cycles or redundancies in the technology graph.
* The following SQL files need to be (re-)executed:
-> 030-data/080-techs.sql (for the defs.techdep_cache table)
-> 040-functions/026-technology-dependencies.sql (new file)
* Added a pair of tables that will contain graph-like technology
definitions. The first table describes a technology, while the second
table is used to list dependencies between technologies. The new tables
contain the basic checks and foreign keys. However, integrity checks on
the dependency graph are not implemented.
* The following SQL files need to be re-executed:
-> 030-data/080-techs.sql
* Modified the empire resources update to check for vacation mode and
apply the modifier from vacation.cashDivider if necessary.
* Some parts of the database need to be reloaded:
-> 050-updates/015-empire-resources.sql
* Added resource information records to the planet list's response.
* Added a database view and the corresponding row mapper and DAO method
which can be used as the data source for the planet list's resource
information. For now this view always returns 0 for both civilian and
military investments.
* Added new tab to display resource information on the planet list page.
The old version of the economy tab will be kept until the corresponding
data no longer exists.
* The following SQL scripts must be re-executed to upgrade a database:
-> 040-functions/167-planet-list.sql
* The quantities of resources extracted from mines will now be updated
as soon as they have a reason to. This includes planet assignment,
abandonment, ownership changes, and updates to mining priorities.
* The mining update will now remove the current resource income from the
providers, and only then re-compute all extracted quantities. This is
more logical and corresponds to the way the other game updates work.
* Fixed bug in extraction computation where the size of the planet's
happy population was used instead of the happy/total ratio when
adjusting the mining production for riots.
* The following SQL scripts must be re-executed to upgrade a database:
-> 040-functions/040-empire.sql
-> 040-functions/145-resource-providers.sql
-> 040-functions/147-empire-mining.sql
-> 050-updates/120-planet-mining.sql
* The production adjustment function was completely off (and always has
been). It has been fixed.
* The problem with the adjustment function not being reported means that
no-one ever encountered it. As a consequence, happiness strike threshold
has been increased to 50%
/!\ Full database reset required (or at least much easier than other
options).
* 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
* Modified mining settings stored procedures to use text identifiers
instead of numeric identifiers
* Added DAO for mining settings and controller for resource operations
* Added UpdateEmpireMiningSettingsCommand and associated command
delegate. The command always returns NullResponse.
* Overview page templates split into multiple files for clarity, added
priority update form to the empire economy view and associated web
server handler
* Because some resources were moved in a previous commit, Git decided to
automatically remove a directory. Re-added that directory with a hidden
file to prevent Git from being such a moron.
* Regrouped component definitions into one single file per package in
most cases, with a few exceptions
* Added documentation about how the configuration is stored and which
guidelines should be followed when adding or modifying Spring component
configurations.
* Added session records to carry resource information over to the
clients
* Added SQL support code for the various views
* Added interface and implementation of the resource information access
component
* Hooked resources information queries into both the empire and planet
management component
* Added resources display to planet and overview pages
* 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
* Empire mining settings have been included in the empire's resource
information records
* Planet-specific mining settings have been included in the resource
provider information records
* Added dump view for empire resources
* Added empire resource information storage class and associated row
mapper
* Integrated empire resource information into the summary generator
* Dump version bumped up to 2
* Added SQL view that shows resource delta and provider information for
all empire-owned planets
* Added new storage classes for resource providers and resource deltas
* Added row mapper which extracts all planet resources information
(providers and deltas)
* Modified dump generator to include planet resources / resource
providers
* A function called by the initial universe generator was changed, but
the call wasn't updated accordingly. This problem has been fixed.
* Variable / procedure name errors in some of the old, untested
functions.
* Added various views and helper functions used by the mining
computation but which may be re-used in other parts.
* Added mining computation update type and associated update function
* New constants: game.resources.weightBase (the value used to compute
weights from mining settings) and game.resources.extraction (the
quantity extracted in a day from a full provider at difficulty 0)
* Added a few that can be used to retrieve mining settings for resource
providers from empire-owned planets from either the empire-wide or
planet-specific settings
* Added a system that allows "dirty" tests to be written. These tests
actually need to change the database, so a temporary test database must
be created to run them.