protected void actionExtracting ( double extrp ) { if ( extractable == null || extractable . getResourceQuantity ( ) > 0 ) { if ( extractable != null ) { progress += Math . min ( extractable . getResourceQuantity ( ) , speed * extrp ) ; } else { progress += speed * extrp ; } final int curProgress = Math . min ( ( int ) Math . floor ( progress ) , extractionCapacity ) ; // Check increases if ( curProgress > lastProgress ) { extract ( curProgress ) ; } } }
Action called from update extraction in extract state .