Commit graph

87 commits

Author SHA1 Message Date
1dd1da5ae3 Comments in event definition data classes
Some comments were missing in the classes used to load event definitions
from the XML file. They have been added.
2012-06-30 15:43:26 +02:00
75c5245764 Event definition loader
Implemented the ImportEvents command line tool, which allows event
definitions to be imported. In all cases the tool will try to import all
definitions; if an error occurs, the process continues but the
transaction is rolled back. It skips existing definitions rather than
taking the risk of doing something inappropriate (e.g. deletion of
existing events).
2012-06-30 14:52:55 +02:00
c8f19a4c06 Event record creation bugfix
When I18N strings (name and template) were added to the event definition
table, some of the code was not modified.
2012-06-30 14:47:02 +02:00
7e3d8a558a XML event definitions
Added a dummy event definitions file, and more importantly the
associated XML schema.
2012-06-30 14:30:46 +02:00
aaec345957 Event definition stored procedures bugfix
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.
2012-06-30 12:43:29 +02:00
a6562052d3 Event definitions - missing I18N properties
Added the display name and template I18N properties to event
definitions. Modified events.evdef_start() accordingly.
2012-06-29 17:31:14 +02:00
8f2fd29c71 Player-defined priority storage
Added the events.custom_priorities that ought to store player-defined
priorities for event types which support it.
2012-06-29 17:19:23 +02:00
0c67d1e799 Event definition functions
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.
2012-06-29 15:18:18 +02:00
ff78c6a2d6 Added event definition tables
* New events.event_definitions table
* New events.field_definitions table
* New types for event field type specification
2012-06-28 12:40:47 +02:00
071257786c Renamed technology tables and views
* Removed the _v2 suffix from some tables and views.
2012-04-09 15:01:04 +02:00
ab04752169 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.
2012-04-09 13:08:08 +02:00
96c296e9d5 Removed old research system
* Removed all tables, views and functions

* Removed references to old system in Java code, including old import
tool

* Replaced XML dump code
2012-04-09 11:36:09 +02:00
070d55dc05 "Buildables" depend on tech graph
* 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
2012-04-08 14:30:43 +02:00
76a01cbf1c Fixed research page bug
* In some cases, it was impossible to implement a technology or set its
research priority, due to the JS click handler exiting with a "false"
return value.
2012-04-08 14:29:16 +02:00
6dcd59d7bc New research and technology page
* 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
2012-04-07 13:06:03 +02:00
154f215e24 Removed client-side display for old technology system
* Removed data classes and database access that were used to display
technology information

* Removed "Research" tab from Overview page on the web client
2012-04-03 10:35:57 +02:00
9a7bc03171 Improved I18N support:
* GamePageData now includes the selected language's code.
* Added support for multiple fetches in one call to the Translator
service.
2012-04-05 11:25:08 +02:00
c7949e41cc 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)
2012-04-02 13:29:43 +02:00
a14601df37 Research weight computations
* Added game.research.weightBase constant

* Added view which computes the weights for each in-progress research

* Added view which computes total weights per empire
2012-03-01 12:42:05 +01:00
c9d8a077bd Moved empire research SQL to separate file
* Empire research & technology SQL code was getting dense, so it was
moved to a separate file.
2012-03-01 11:50:40 +01:00
1dcde71dff Research priorities
* Added stored procedures meant to update research priorities.
2012-03-01 10:52:52 +01:00
b15acadc1b Empire technology views
* 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.
2012-03-01 09:50:20 +01:00
e01eab9c09 Technology dependencies view
* Added SQL view that lists dependencies of technologies as
comma-separated lists of identifiers
2012-02-29 11:50:04 +01:00
f4e38e4943 Technology implementation
* 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.
2012-02-28 16:15:02 +01:00
8c0b4abd1e Empire research initialisation
* 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.
2012-02-28 12:34:59 +01:00
1f3c7a9202 Technology definitions loader
* 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
2012-02-27 20:04:02 +01:00
c5464212bc Deleted old "test" buildables and technologies
* These 2 definition files were remnants of B6M1's early tests. They did
not belong in the repo any more.
2012-02-27 14:27:33 +01:00
26fe4b926d Fixed package for resources data tests
* The tests for resource definition import classes were not in the right
package. They have been moved.
2012-02-27 18:18:35 +01:00
af57e7d3b5 Technology definition functions
* Added stored procedures which manipulate technology definitions
themselves (defs.uoc_technology) or their dependencies (defs.techdep_add
and defs.techdep_remove)
2012-02-27 14:14:00 +01:00
3b2ec4bb64 Empire technologies table
* 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.
2012-02-17 07:46:51 +01:00
1ae9a15f6e Improvements to developer SQL tests runner
* The script will no longer fail when there are no tests matching the
requested name in either admin/ or user/

* The script will ignore non-SQL files when running with --run-name
2012-02-16 18:32:44 +01:00
4f083830f2 Technology dependencies caching and integrity checks
* 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)
2012-02-16 18:30:58 +01:00
b90491ca73 Technology definition tables
* 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
2012-02-16 11:07:43 +01:00
cb65a6e643 Empire resources and vacation mode
* 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
2012-02-16 10:22:30 +01:00
96670d45be Resources information on planet list
* 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
2012-02-15 14:45:43 +01:00
bf6bea5a79 Extracted quantities update as soon as possible
* 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
2012-02-09 10:54:00 +01:00
f3aa563758 Planet resources interface fix
* Some text in the English version of the planet page's "natural
resources" tab incorrectly used the term "settings" instead of
"priorities".

* The English version of the planet page's "natural resources" tab did
not display any explanation when the planet was following empire-wide
mining priorities.
2012-02-08 11:54:01 +01:00
afa1224391 Production adjustment fix
* 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).
2012-02-08 15:38:12 +01:00
c94958a058 Added log files to Git ignore list
* Added both "normal" log files and compressed files created when
full-debug.log is rotated.
2012-02-08 08:56:07 +01:00
cb2553d1e5 Build system and documentation update
* Added tests of the command line tools to the post-build scripts

* Local deployment documentation mentions ImportResources
2012-02-08 08:38:56 +01:00
fd117f6f7b Fixed consequences of Spring config clean-up
* While the server works fine, the tools - which use hardcoded paths to
specific parts of the Spring config - were not updated last time. They
should work now.
2012-02-07 19:40:57 +01:00
e64f847ec3 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
2012-02-07 17:03:55 +01:00
51b529a09f Removed TODO file
* Since we're now using tasks.legacyworlds.com, the TODO file is no
longer useful.
2012-02-07 09:42:03 +01:00
d38576a5cf Empire mining settings
* 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
2012-02-05 10:10:43 +01:00
92dd01ffce Fixed project directories
* 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.
2012-02-04 15:32:20 +01:00
b4903d78e4 Object name validator component
* Moved the component from the -user package to the -naming package

* Added a separate interface to the component
2012-02-04 15:26:53 +01:00
35d8891fe3 Spring configuration clean-up
* 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.
2012-02-04 12:56:58 +01:00
597429fadf In-game resources views
* 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
2012-02-04 10:43:12 +01:00
56eddcc4f0 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
2012-02-03 16:25:03 +01:00
ba6a1e2b41 SQL unit tests fixes
* Added plan() instead of no_plan() where necessary

* Removed junk from dirty tests system self-check
2012-01-31 12:14:38 +01:00