Skip to content

Commit

Permalink
Added option to choose between "buy order" and "instant buy" price fo…
Browse files Browse the repository at this point in the history
…r the composter
  • Loading branch information
hannibal002 committed Apr 20, 2023
1 parent 8b42f1d commit c6ae8f4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,12 @@ public static class CustomSpeed {
@ConfigAccordionId(id = 17)
public boolean composterOverlay = true;

@Expose
@ConfigOption(name = "Overlay Price", desc = "Toggle for bazaar 'buy order' vs 'instant buy' price in composter overlay.")
@ConfigEditorDropdown(values = {"Instant Buy", "Buy Order"})
@ConfigAccordionId(id = 17)
public int composterOverlayPriceType = 0;

@Expose
public Position composterOverlayOrganicMatterPos = new Position(140, 152, false, true);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,8 @@ class ComposterOverlay {
}

private fun getPrice(internalName: String): Double {
val price = NEUItems.getPrice(internalName)
val useSellPrice = config.composterOverlayPriceType == 1
val price = NEUItems.getPrice(internalName, useSellPrice)
if (internalName == "BIOFUEL" && price > 20_000) return 20_000.0

return price
Expand Down

0 comments on commit c6ae8f4

Please sign in to comment.