diff options
author | Futuremappermydud <54294576+Futuremappermydud@users.noreply.github.com> | 2022-07-12 13:13:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-12 19:13:09 +0200 |
commit | e548f8974f402025692baa60c22a06c38a99c4a3 (patch) | |
tree | 259367531b7dd060e594f02da038047e138a7985 /src/main/java/io | |
parent | d4b8c67c9a8dec5f4f84f6385052e584d9cdcc01 (diff) | |
download | NotEnoughUpdates-e548f8974f402025692baa60c22a06c38a99c4a3.tar.gz NotEnoughUpdates-e548f8974f402025692baa60c22a06c38a99c4a3.tar.bz2 NotEnoughUpdates-e548f8974f402025692baa60c22a06c38a99c4a3.zip |
Add Craft Cost to Trade Window (#185)
* Add Craft Cost to Trade Window
* Allow Vanilla items whoops
Diffstat (limited to 'src/main/java/io')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java index 086b6e06..6107985c 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java @@ -21,6 +21,7 @@ package io.github.moulberry.notenoughupdates.miscgui; import com.google.gson.JsonObject; import io.github.moulberry.notenoughupdates.NotEnoughUpdates; +import io.github.moulberry.notenoughupdates.auction.APIManager; import io.github.moulberry.notenoughupdates.core.config.KeybindHelper; import io.github.moulberry.notenoughupdates.miscfeatures.SlotLocking; import io.github.moulberry.notenoughupdates.mixins.AccessorGuiContainer; @@ -138,6 +139,12 @@ public class TradeWindow { pricePer = auctionPricePer; } } + if (pricePer == -1) { + APIManager.CraftInfo craftCost = NotEnoughUpdates.INSTANCE.manager.auctionManager.getCraftCost(internalname); + if (craftCost != null) { + pricePer = (int) craftCost.craftCost; + } + } return pricePer; } |