Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to replenish items from Sophisticated inventory when crafting with a Crafting Upgrade #127

Open
wants to merge 1 commit into
base: 1.18.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,12 @@ true, getButtonStateData(new UV(32, 48), Dimension.SQUARE_16, new Position(1, 1)
false, getButtonStateData(new UV(48, 48), Dimension.SQUARE_16, new Position(1, 1),
StorageTranslationHelper.INSTANCE.getTranslatedLines(StorageTranslationHelper.INSTANCE.translUpgradeButton("shift_click_into_inventory")))
));

public static final ButtonDefinition.Toggle<Boolean> REPLENISH = net.p3pp3rf1y.sophisticatedcore.client.gui.controls.ButtonDefinitions.createToggleButtonDefinition(
Map.of(
true, getButtonStateData(new UV(144, 64), Dimension.SQUARE_16, new Position(1, 1),
StorageTranslationHelper.INSTANCE.getTranslatedLines(StorageTranslationHelper.INSTANCE.translUpgradeButton("replenish"))),
false, getButtonStateData(new UV(160, 64), Dimension.SQUARE_16, new Position(1, 1),
StorageTranslationHelper.INSTANCE.getTranslatedLines(StorageTranslationHelper.INSTANCE.translUpgradeButton("do_not_replenish")))
));
}
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ public static void registerContainers(RegistryEvent.Register<MenuType<?>> evt) {
UpgradeGuiManager.registerTab(AUTO_BLASTING_TYPE, (AutoCookingUpgradeContainer<BlastingRecipe, AutoCookingUpgradeWrapper.AutoBlastingUpgradeWrapper> uc, Position p, StorageScreenBase<?> s) ->
new AutoCookingUpgradeTab.AutoBlastingUpgradeTab(uc, p, s, Config.COMMON.autoBlastingUpgrade.inputFilterSlotsInRow.get(), Config.COMMON.autoBlastingUpgrade.fuelFilterSlotsInRow.get()));
UpgradeGuiManager.registerTab(CRAFTING_TYPE, (CraftingUpgradeContainer uc, Position p, StorageScreenBase<?> s) ->
new CraftingUpgradeTab(uc, p, s, StorageButtonDefinitions.SHIFT_CLICK_TARGET));
new CraftingUpgradeTab(uc, p, s, StorageButtonDefinitions.SHIFT_CLICK_TARGET, StorageButtonDefinitions.REPLENISH));
UpgradeGuiManager.registerTab(STONECUTTER_TYPE, (StonecutterUpgradeContainer upgradeContainer, Position position, StorageScreenBase<?> screen) ->
new StonecutterUpgradeTab(upgradeContainer, position, screen, StorageButtonDefinitions.SHIFT_CLICK_TARGET));
UpgradeGuiManager.registerTab(JUKEBOX_TYPE, JukeboxUpgradeTab::new);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@
"gui.sophisticatedstorage.upgrades.buttons.match_storage_contents": "Match Storage Contents",
"gui.sophisticatedstorage.upgrades.buttons.shift_click_into_storage": "Shift Click Result Into\nStorage",
"gui.sophisticatedstorage.upgrades.buttons.shift_click_into_inventory": "Shift Click Result Into\nPlayer's Inventory",
"gui.sophisticatedstorage.upgrades.buttons.replenish": "Replenish crafting items",
"gui.sophisticatedstorage.upgrades.buttons.do_not_replenish": "Do not replenish crafting items",
"gui.sophisticatedstorage.buttons.upgrade_switch_enabled": "ON",
"gui.sophisticatedstorage.buttons.upgrade_switch_disabled": "OFF",
"gui.sophisticatedstorage.settings.buttons.context_storage": "Storage",
Expand Down