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/parts/050-updates

View file

@ -209,7 +209,7 @@ DECLARE
BEGIN
_extraction := _input.quantity * verse.get_extraction_factor(
_extraction := verse.get_extraction_factor(
_input.quantity / _input.quantity_max ,
_input.difficulty );
_allocation := _input.weight / _input.total_weight;
@ -219,7 +219,9 @@ BEGIN
* sys.get_constant( 'game.resources.extraction' )
/ 1440.0; -- FIXME: hardcoded!
RAISE NOTICE 'Extraction % , allocation % , production %' , _extraction , _allocation , _production;
PERFORM sys.write_sql_log( 'MiningUpdate' , 'TRACE' , 'Resource #' || _input.resource
|| ' @ planet #' || _input.planet || ': extraction ' || _extraction
|| ', allocation ' || _allocation || ', production ' || _production );
_quantity := _allocation * _production * _extraction;
IF _quantity > _input.quantity THEN
_quantity := _input.quantity;