Fixed resource extraction

* Formula was mis-copied from the wiki, the result was multiplied by the
provider's current quantity

* Changed extraction per work unit from 1 to 10
This commit is contained in:
Emmanuel BENOîT 2012-01-30 09:18:20 +01:00
parent b9bc5e038c
commit 44b6ec1920
3 changed files with 9 additions and 8 deletions
legacyworlds-server-data/db-structure/tests/admin/050-updates/120-planet-mining

View file

@ -60,12 +60,12 @@ BEGIN;
) );
SELECT diag_test_name( 'sys.gu_pmc_update_resource( ) - Provider udpated' );
SELECT is( resprov_quantity , 999.0::DOUBLE PRECISION )
SELECT is( resprov_quantity , 999.999::DOUBLE PRECISION )
FROM verse.resource_providers
WHERE planet_id = 1 AND resource_name_id = 1;
SELECT diag_test_name( 'sys.gu_pmc_update_resource( ) - Planet resources income udpated' );
SELECT is( pres_income , 1.0::DOUBLE PRECISION )
SELECT is( pres_income , 0.001::DOUBLE PRECISION )
FROM verse.planet_resources
WHERE planet_id = 1 AND resource_name_id = 1;
@ -78,12 +78,12 @@ BEGIN;
) );
SELECT diag_test_name( 'sys.gu_pmc_update_resource( ) - Bounded extraction quantity (1/2)' );
SELECT is( resprov_quantity , 0.0::DOUBLE PRECISION )
SELECT is( resprov_quantity , 990.0::DOUBLE PRECISION )
FROM verse.resource_providers
WHERE planet_id = 1 AND resource_name_id = 1;
SELECT diag_test_name( 'sys.gu_pmc_update_resource( ) - Bounded extraction quantity (2/2)' );
SELECT is( pres_income , 1000.0::DOUBLE PRECISION )
SELECT is( pres_income , 10.0::DOUBLE PRECISION )
FROM verse.planet_resources
WHERE planet_id = 1 AND resource_name_id = 1;