Skip to content

Commit

Permalink
Fixes the biogenerator displaying item costs that were being divided …
Browse files Browse the repository at this point in the history
…by the machine's efficiency twice (#74939) (#3619)

It was really bugging me that I would see a price being displayed in my
biogenerator, only for it to then cost me far more than what was
displayed. Looking into it, I realized that it was simply an issue with
it dividing the cost by the efficiency in the TGUI, when that math was
already done DM-side.

Being charged the cost you see on the machine is good.

:cl: GoldenAlpharex
fix: Biogenerators now display the accurate price of their products
after having been upgraded, as they no longer visually apply the
efficiency discount twice.
/:cl:

Co-authored-by: GoldenAlpharex <[email protected]>
  • Loading branch information
Absolucy and GoldenAlpharex authored Oct 3, 2024
1 parent eebf82b commit 0333ad2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions tgui/packages/tgui/interfaces/Biogenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,11 +229,7 @@ const ItemList = (props) => {
<Button
fluid
align="right"
content={
parseFloat(
((item.cost * item.amount) / props.efficiency).toFixed(2),
) + ' BIO'
}
content={parseFloat((item.cost * item.amount).toFixed(2)) + ' BIO'}
disabled={item.disabled}
onClick={() =>
act('create', {
Expand Down

0 comments on commit 0333ad2

Please sign in to comment.