Skip to content

Commit

Permalink
Fixed composter gfs stuff (biofuel is now in sacks)
Browse files Browse the repository at this point in the history
  • Loading branch information
Obsidianninja11 committed Dec 26, 2023
1 parent 69b7a46 commit ccd99f7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public String toString() {
@Expose
@ConfigOption(name = "Retrieve From", desc = "Change where to retrieve the materials from in the composter overlay: The Bazaar or Sacks.")
@ConfigEditorDropdown()
public RetrieveFromEntry retrieveFrom = RetrieveFromEntry.BAZAAR;
public RetrieveFromEntry retrieveFrom = RetrieveFromEntry.SACKS;

public enum RetrieveFromEntry implements HasLegacyId {
BAZAAR("Bazaar", 0),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -470,8 +470,8 @@ object ComposterOverlay {
}

private fun retrieveMaterials(internalName: NEUInternalName, itemName: String, itemsNeeded: Int) {
if (itemsNeeded == 0 || internalName.equals("BIOFUEL")) return
if (config.retrieveFrom == ComposterConfig.RetrieveFromEntry.BAZAAR && !LorenzUtils.noTradeMode) {
if (itemsNeeded == 0) return
if (config.retrieveFrom == ComposterConfig.RetrieveFromEntry.BAZAAR && !LorenzUtils.noTradeMode && !internalName.equals("BIOFUEL")) {
BazaarApi.searchForBazaarItem(itemName, itemsNeeded)
return
}
Expand All @@ -486,9 +486,9 @@ object ComposterOverlay {
val sackStatus = sackItem.getStatus()

if (sackStatus == SackStatus.MISSING || sackStatus == SackStatus.OUTDATED) {
if (sackStatus == SackStatus.OUTDATED) LorenzUtils.sendCommandToServer("gfs ${internalName.asString()} ${itemsNeeded - having}")
LorenzUtils.sendCommandToServer("gfs ${internalName.asString()} ${itemsNeeded - having}")
// TODO Add sack type repo data
val sackType = if (internalName.equals("VOLTA") || internalName.equals("OIL_BARREL")) "Mining"
val sackType = if (internalName.equals("VOLTA") || internalName.equals("OIL_BARREL") || internalName.equals("BIOFUEL")) "Mining §eor §9Dwarven"
else "Enchanted Agronomy"
LorenzUtils.clickableChat(
"Sacks could not be loaded. Click here and open your §9$sackType Sack §eto update the data!",
Expand Down

0 comments on commit ccd99f7

Please sign in to comment.