mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-31 09:08:30 +01:00
Fixes the biogenerator displaying item costs that were being divided by the machine's efficiency twice (#74939)
## About The Pull Request 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. ## Why It's Good For The Game Being charged the cost you see on the machine is good. ## Changelog 🆑 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. /🆑
This commit is contained in:
@@ -213,11 +213,7 @@ const ItemList = (props, context) => {
|
||||
<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', {
|
||||
|
||||
Reference in New Issue
Block a user