Commit graph

29 commits

Author SHA1 Message Date
ce6d86d344 Planet resources and resource providers in XML dumps
* 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
2012-01-18 09:28:35 +01:00
95e6019c12 Mock result set class
* Added a mock result set class which can be used to write unit tests
for e.g. RowMapper-based classes. The class is incomplete and should be
extended as necessary.

* Added unit test for BuildingsInformationMapper as a proof of concept
2012-01-17 16:47:05 +01:00
426a1fdfd4 XML dumps code clean-up
* Moved empire summary generator to a separate package, moved all empire
summary data classes to a sub-package of the former

* All row mappers for empire summary contents have been moved to
separate classes with default access

* Added comments to the component and to the mapper classes
2012-01-17 10:50:51 +01:00
2adc754a2c Dependency upgrades
* Spring upgraded from 3.0.3 to 3.1.0 - As a consequence, all code that
used SimpleJdbcTemplate has been modified to use JdbcTemplate, as the
former has been deprecated.

* SLF4J upgraded from 1.5.11 to 1.6.4

* Apache Commons: DBCP upgraded from 1.2.2 to 1.4, Codec upgraded from
1.4 to 1.6

* CGLib upgraded from 2.2 to 2.2.2

* javax.mail upgraded from 1.4.1 to 1.4.4

* XStream upgraded from 1.3.1 to 1.4.2

* JUnit upgraded from 4.7 to 4.10

* FreeMarker upgraded from 2.3.16 to 2.3.18

* PostgreSQL JDBC glue upgraded from 8.4-701 to 9.1-901

* legacyworlds-server-tests no longer considered a dummy package
2012-01-16 18:09:45 +01:00
a981d1653e Universe generator fix
* 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.
2012-01-16 17:42:11 +01:00
30a1080e6e Maven projects fixes and improvements
* Fixed copy of the SQL files to the distribution

* Distribution packages will now execute an automatic clean-up before
assembling. While this will avoid having dirty, old files in the
distribution directory, it also has a negative consequence -
configuration files will be destroyed if they exist.
2012-01-16 16:06:44 +01:00
24f40c5549 Fix for dirty SQL tests
* Fixed an error in the main post-build script which caused dirty SQL
tests to be skipped
2012-01-16 12:50:10 +01:00
74b6f2ab09 Mining computation update
* 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)
2012-01-16 12:35:20 +01:00
038bba896a Mining computations update
* 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
2012-01-10 16:28:25 +01:00
c18bdc2d1f Dirty SQL test system
* 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.
2012-01-14 09:02:24 +01:00
04e550709a Empire resources update
* Added a new update that computes the amount of resources possessed and
owed by empires. At the moment this computation ignores fleets, as their
upkeep does not use the resource system.
2012-01-10 13:29:56 +01:00
b49bc1a44f Planet resources
* Added missing table that should store a planet's resources data
(income and upkeep for each type of resource).

* Modified resource definition functions and universe generator to
initialise planet resource records as well

* Heavy clean-up in resource definition function unit tests
2012-01-10 12:30:47 +01:00
37555841ce Empire resources initialisation
* Empire resources will be initialised when an empire is created

* When a new resource is created through the appropriate defs.uoc_...
function, it will be added to all empires as well.
2012-01-10 10:48:56 +01:00
afc66166e0 Mining settings
* Changed the way mining settings work: use a priority value (between 0
and 4) as the weight. Leaving them as they were before would have caused
numerous problems (and a lot of unnecessary code to work around them)

* Empire mining settings will be created along with the empire's own
record. By default all natural resources will have weight = 2.

* Added a set of four stored procedures which can be used to update an
empire's mining settings, including planet-specific settings. The
emp.mset_update_start() function can be used to start an update (on an
empire's settings if there is only one parameter, or on a planet's
settings if there are two parameters); the emp.mset_update_set() and
emp.mset_update_apply() functions are then used to modify the settings
and apply the changes, respectively.
2012-01-10 10:17:47 +01:00
3e109b13bc SQL logging fixes
* Added user mapping on the "remote" logging database for the
administrative user. This allows calls to sys.write_sql_log() to succeed
when they are executed by code with administrative privileges.

* Added test suites for both the link to the database and the function
itself.

* Replaced RAISE NOTICE with actual logging in the universe generator
2012-01-07 11:14:17 +01:00
e50775ec76 Database definition & tests organisation
* The main loader script has been updated to generate the list of files
it needs to load automatically. As a consequence, files that contained
manually-maintained lists of scripts have been removed, and definition
directories have been renamed accordingly.

* PostgreSQL extension loading and configuration has been moved to a
separate script to be loaded automatically in the main transaction.

* Data and function definition scripts that had the -data or -functions
suffix have been renamed (the suffix is unnecessary).

* Unit tests have been reorganised to follow the definition's structure.

* Documentation has been improved
2012-01-06 11:19:19 +01:00
b054a379a9 Universe generator: resource providers
* The universe generator has been modified to generate resource
providers. The code attempts to keep the universe balanced according to
the natural resources definitions.
2012-01-06 10:05:47 +01:00
e7d2072813 SQL privileges fix and unit tests
* Fixed privileges on both variants of defs.uoc_natural_resource()

* Added user unit tests which check execution privileges on all (new)
stored procedures and INSERT/UPDATE/SELECT/DELETE privileges on all
(new) tables
2012-01-03 09:35:57 +01:00
d4945d8e21 Maven project for resources-related component
Added a Maven project that will contain all resources-related
components. Updated list of children in the top-level components
project. Added dependency to the main project.
2012-01-02 15:11:17 +01:00
66c72ef718 Resource provider regeneration
Implemented resource regeneration computation in the
verse.compute_provider_regeneration() function.

Created the PLANET_RES_REGEN update type, and added the corresponding
implementation.

Added resource regeneration constants registration.
2012-01-02 15:10:04 +01:00
d768766214 Main web interface update
* Added the new interface style, including the necessary pictures and page
layout template.

* Updated existing style sheet in order to accommodate the new fluid
layout and to use some more CSS3 goodness.

* Upgraded JQuery from 1.4.2 to 1.7.1.
2012-01-02 08:57:06 +01:00
bed784a8e1 Resource management functions
* Added defs.uoc_resources() set of functions which create or update
basic resources.

 * Added defs.uoc_natural_resources() set of functions which create or
update natural resources.
2011-12-19 16:00:01 +01:00
4e1bb91780 Resource database structures
* Added structures for resource definitions, natural resources
definitions, resource providers, empire resources and empire mining
settings (both empire-wide and planet-specific).

* Added a few common utility functions to the SQL test suite. These
functions allow test initialisation to be a little shorter.

* Added "MINE" production type and an associated building definition.
The production will not be added to the XML dump or to the output of the
planets summary page, as this is extremely temporary.
2011-12-19 11:57:08 +01:00
631f49fb86 Command line tools
* Added base classes for all importable data. These new classes should
be used for all future loaders; all existing loaders that are modified
should be updated.

* I18N loader rewritten to make use of the new base classes. External
strings are now read using the XML data file's path as the base
directory.

* Updated all external I18N definitions and moved the existing files
around in an attempt to make the data directory somewhat more livable.

* Added dependency management entry for the server's main package to the
root project, updated server distribution package accordingly. Added
dependency on the server's main package to the server's testing package.
2011-12-17 12:37:01 +01:00
be3106c463 Database management changes
* Added in-base logging through a foreign data wrapper, which is only
possible using PostgreSQL 9.1
* Renamed database-related configuration files to indicate that they are
samples, and added the "real" names to the Git ignore list. Server
distribution modified accordingly.
* Removed PL/PgSQL registration (it was only necessary on 8.4)
* Added pgTAP SQL definitions and a script which will (hopefully) be
executed by the build system after the main Java build in order to
execute database unit tests. The script supports both admin- and user-
level testing. I also added a few tests to make sure the testing framework
actually runs them.
* Added documentation about the database definitions structure
2011-12-15 15:38:46 +01:00
f682594cbd Finished migration to Git and the build system
* Added web interface packaging
* Added documentation about the development workflow
2011-12-15 13:41:27 +01:00
0665a760de Project: * Clean-up (Eclipse cruft, unused files, etc...) * Git-specific changes * Maven POMs clean-up and changes for the build system * Version set to 1.0.0-0 in the development branches * Maven plug-ins updated to latest versions * Very partial dev. documentation added 2011-12-09 08:07:33 +01:00
c74e30d5ba
Manually import single change from old staging repo 2025-01-04 15:28:26 +01:00
fc4c6bd340 Importing SVN archives - B6M1 2018-10-23 09:38:02 +02:00