New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Registry for customized charger rates. #3139

Merged
merged 7 commits into from Oct 8, 2017

Conversation

Projects
None yet
2 participants
@yueh
Member

yueh commented Oct 6, 2017

No description provided.

{
extractedAmount += this.getProxy().getEnergy().extractAEPower( toExtract, Actionable.MODULATE, PowerMultiplier.ONE );
}
catch( GridAccessException e1 )

This comment has been minimized.

@orod-org

orod-org Oct 6, 2017

MAJOR Either log or rethrow this exception. rule

@orod-org

orod-org Oct 6, 2017

MAJOR Either log or rethrow this exception. rule

yueh added some commits Aug 12, 2017

Now using Item instead of ItemStack as key.
In preparation of 1.13 as well as to make the lookup easier without
having to take wildcard values into account.

Added rates for all chargable items/block.
Changed internal buffer to match the usual values for AE.
Charger and Inscriber now store 1.6k AE each instead of 1.5k
A crank applies 160 AE instead of 150
Charged certus now requires 1.6k instead of 1.5k
final double adjustment = ps.injectAEPower( myItem, this.extractAEPower( 150.0, Actionable.MODULATE, PowerMultiplier.CONFIG ),
Actionable.MODULATE );
this.setInternalCurrentPower( this.getInternalCurrentPower() + adjustment );
if( extractedAmount > 0 )

This comment has been minimized.

@orod-org

orod-org Oct 8, 2017

CRITICAL Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@orod-org

orod-org Oct 8, 2017

CRITICAL Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

if( ps.getAEMaxPower( myItem ) > ps.getAECurrentPower( myItem ) )
{
final double oldPower = this.getInternalCurrentPower();
try

This comment has been minimized.

@orod-org

orod-org Oct 8, 2017

CRITICAL Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

@orod-org

orod-org Oct 8, 2017

CRITICAL Refactor this code to not nest more than 3 if/for/while/switch/try statements. rule

yueh added some commits Oct 8, 2017

@orod-org

This comment has been minimized.

Show comment
Hide comment
@orod-org

orod-org Oct 8, 2017

SonarQube analysis reported 11 issues

  • CRITICAL 2 critical
  • MAJOR 8 major
  • MINOR 1 minor

Watch the comments in this conversation to review them.

8 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MAJOR Registration.java#L129: Add a constructor to the class. rule
  2. MAJOR Registration.java#L152: This block of commented-out lines of code should be removed. rule
  3. MAJOR Registration.java#L240: Remove this useless assignment to local variable "partHelper". rule
  4. MAJOR Registration.java#L249: This block of commented-out lines of code should be removed. rule
  5. MAJOR Registration.java#L346: This block of commented-out lines of code should be removed. rule
  6. MAJOR Registration.java#L480: This block of commented-out lines of code should be removed. rule
  7. MAJOR TileCharger.java#L212: Change this condition so that it does not always evaluate to "true" rule
  8. MINOR Registration.java#L240: Remove this unused "partHelper" local variable. rule

orod-org commented Oct 8, 2017

SonarQube analysis reported 11 issues

  • CRITICAL 2 critical
  • MAJOR 8 major
  • MINOR 1 minor

Watch the comments in this conversation to review them.

8 extra issues

Note: The following issues were found on lines that were not modified in the pull request. Because these issues can't be reported as line comments, they are summarized here:

  1. MAJOR Registration.java#L129: Add a constructor to the class. rule
  2. MAJOR Registration.java#L152: This block of commented-out lines of code should be removed. rule
  3. MAJOR Registration.java#L240: Remove this useless assignment to local variable "partHelper". rule
  4. MAJOR Registration.java#L249: This block of commented-out lines of code should be removed. rule
  5. MAJOR Registration.java#L346: This block of commented-out lines of code should be removed. rule
  6. MAJOR Registration.java#L480: This block of commented-out lines of code should be removed. rule
  7. MAJOR TileCharger.java#L212: Change this condition so that it does not always evaluate to "true" rule
  8. MINOR Registration.java#L240: Remove this unused "partHelper" local variable. rule

@yueh yueh merged commit 95b27f4 into rv5-1.12 Oct 8, 2017

3 of 4 checks passed

sonarqube SonarQube reported 11 issues, with 2 critical
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
jenkins Success
Details

@yueh yueh deleted the feature-charger-registry branch Oct 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment