GoldenGnu / jeveassets

jEveAssets is an out-of-game asset manager for Eve-Online, written in Java
http://eve.nikr.net/jeveasset
GNU General Public License v2.0
156 stars 38 forks source link

Feature/reaction calculations #428

Closed EdThelleres closed 6 months ago

EdThelleres commented 1 year ago

This PR aims to fix a missing calculation for reactions.

Compared to regular manufacturing, reactions are limited to LS or NS space and refinery type structures. Material Efficiency is reduced only by using structure rigs. T1 rig gives 2% and T2 gives 2.4% (same as manufacturing). The real difference comes from the bonus applied to the rig based on the system's security. Low sec gives 1.0 modifier (no bonus) and nullsec gives 1.1 (+10%).

In the current version of the program, reaction materials are computed using manufacturing logic and at the same time it's not possible to set a rig / system security for reactions. That results in having unbonused reactions in stockpiles (or at least in the past having them bonused at ~15%).

Rounding is still kept at 2 decimal points (as it uses the same method), but I recommend bumping that up to 5 places (see #426 ).

I've decided to duplicate ManufacturingRigs even though ReactionRigs are identical as it feels like it should be separate pieces of code. Handling of the StockpileItemDialog is not pretty but works.

Tested with JDK8 and JDK17 on macOS Sonoma (M2 Apple Silicon)

GoldenGnu commented 6 months ago

Thank you very much for your contribution! 🎉 I really appreciate the perfect code quality 👍

I'm sorry it took this long to get it review and merged.

Please, PM or Ping me on the jEveAssets discord if you want the discord contributor role.