Skip to content
Closed
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
16 changes: 8 additions & 8 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
* For more details, see https://docs.gradle.org/8.0.1/userguide/java_library_plugin.html#sec:java_library_configurations_graph
*/
dependencies {
implementation("com.github.GTNewHorizons:NotEnoughItems:2.7.77-GTNH:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.6.39:dev")
compileOnly("com.github.GTNewHorizons:BetterQuesting:3.7.11-GTNH:dev")
implementation("com.github.GTNewHorizons:ModularUI2:2.2.18-1.7.10:dev")
// implementation("com.github.GTNewHorizons:ModularUI2:99.99:dev")
implementation("com.github.GTNewHorizons:StructureLib:1.4.18:dev")
implementation("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.440:dev")
implementation("com.github.GTNewHorizons:NotEnoughItems:2.8.6-GTNH:dev")
implementation("com.github.GTNewHorizons:GTNHLib:0.7.0:dev")
compileOnly("com.github.GTNewHorizons:BetterQuesting:3.8.4-GTNH:dev")
implementation("com.github.GTNewHorizons:ModularUI2:2.2.20-1.7.10:dev")
// implementation("com.github.GTNewHorizons:ModularUI2:2.2.20-1.7.10:dev")
implementation("com.github.GTNewHorizons:StructureLib:1.4.23:dev")
implementation("com.github.GTNewHorizons:GT5-Unofficial:5.09.52.19:dev")
}

// deps may transitively add Baubles, so we replace it
Expand All @@ -49,7 +49,7 @@ project.getConfigurations()
final DependencySubstitutions ds = c.getResolutionStrategy()
.getDependencySubstitution()
ds.substitute(ds.module("com.github.GTNewHorizons:Baubles"))
.using(ds.module("com.github.GTNewHorizons:Baubles-Expanded:2.1.9-GTNH"))
.using(ds.module("com.github.GTNewHorizons:Baubles-Expanded:2.2.0-GTNH"))
.withClassifier("dev")
.because("Baubles-Expanded replaces Baubles")
})
2 changes: 1 addition & 1 deletion settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ pluginManagement {
}

plugins {
id("com.gtnewhorizons.gtnhsettingsconvention") version("1.0.41")
id("com.gtnewhorizons.gtnhsettingsconvention") version("1.0.43")
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import static com.cubefury.vendingmachine.api.enums.Textures.VM_MACHINE_FRONT_ON_GLOW;
import static com.cubefury.vendingmachine.api.enums.Textures.VM_OVERLAY;
import static com.cubefury.vendingmachine.api.enums.Textures.VM_OVERLAY_ACTIVE;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofBlock;
import static com.gtnewhorizon.structurelib.structure.StructureUtility.ofChain;
import static gregtech.api.util.GTStructureUtility.ofHatchAdderOptional;

import java.util.ArrayList;
Expand Down Expand Up @@ -46,6 +48,7 @@
import com.cubefury.vendingmachine.trade.TradeRequest;
import com.cubefury.vendingmachine.util.BigItemStack;
import com.cubefury.vendingmachine.util.OverlayHelper;
import com.cubefury.vendingmachine.util.Translator;
import com.gtnewhorizon.structurelib.StructureLibAPI;
import com.gtnewhorizon.structurelib.alignment.IAlignment;
import com.gtnewhorizon.structurelib.alignment.IAlignmentLimits;
Expand Down Expand Up @@ -79,12 +82,14 @@ public class MTEVendingMachine extends MTEMultiBlockBase
.addShape("main", new String[][] { { "cc", "c~", "cc" } })
.addElement(
'c',
ofHatchAdderOptional(
MTEVendingMachine::addUplinkHatch,
((BlockCasings11) GregTechAPI.sBlockCasings11).getTextureIndex(0),
1,
GregTechAPI.sBlockCasings11,
0))
ofChain(
ofHatchAdderOptional(
MTEVendingMachine::addUplinkHatch,
((BlockCasings11) GregTechAPI.sBlockCasings11).getTextureIndex(0),
1,
GregTechAPI.sBlockCasings11,
0),
ofBlock(GregTechAPI.sBlockCasings11, 0)))
.build();

private final ArrayList<MTEVendingUplinkHatch> uplinkHatches = new ArrayList<>();
Expand Down Expand Up @@ -343,7 +348,7 @@ public boolean getDefaultHasMaintenanceChecks() {

@Override
public String[] getStructureDescription(ItemStack stackSize) {
return getTooltip().getStructureHint();
return new String[] { Translator.translate("structure.vendingmachine.hint.1") };
}

@Override
Expand All @@ -359,6 +364,7 @@ protected MultiblockTooltipBuilder getTooltip() {
.beginStructureBlock(2, 3, 1, false)
.addController("Middle")
.addOtherStructurePart("Tin Item Pipe Casings", "Everything except the controller")
.addOtherStructurePart("ME Vending Uplink Hatch", "Any Pipe Casing, Optional")
.addStructureInfo("Cannot be flipped onto its side")
.toolTipFinisher();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public ModularPanel build(PosGuiData guiData, PanelSyncManager syncManager, UISe
panel.child(
new Column().size(20)
.right(5));
panel.child(createIOColumn(syncManager));
panel.child(createIOColumn());
return panel;
}

Expand Down Expand Up @@ -253,7 +253,7 @@ private void doEjectItems() {
ejectItems = false;
}

private IWidget createIOColumn(PanelSyncManager syncManager) {
private IWidget createIOColumn() {
return new ParentWidget<>().excludeAreaInNEI()
.width(50)
.height(178)
Expand All @@ -268,7 +268,7 @@ private IWidget createIOColumn(PanelSyncManager syncManager) {
.width(30)
.height(20))
.child(
new Row().child(createInputRow().center())
new Row().child(createInputSlots().center())
.top(20)
.height(18 * 3))
.child(
Expand Down Expand Up @@ -299,7 +299,7 @@ private IWidget createIOColumn(PanelSyncManager syncManager) {
.right(1));
}

private SlotGroupWidget createInputRow() {
private SlotGroupWidget createInputSlots() {
return SlotGroupWidget.builder()
.matrix("II", "II", "II")
.key('I', index -> {
Expand Down Expand Up @@ -336,10 +336,9 @@ private SlotGroupWidget createOutputSlots() {
return SlotGroupWidget.builder()
.matrix("II", "II", "II")
.key('I', index -> {
ModularSlot ms = new ModularSlot(base.outputItems, index).accessibility(false, true)
.slotGroup("outputSlotGroup");
ms.changeListener((newItem, onlyAmountChanged, client, init) -> {});
return new ItemSlot().slot(ms);
return new ItemSlot().slot(
new ModularSlot(base.outputItems, index).accessibility(false, true)
.slotGroup("outputSlotGroup"));
})
.build();
}
Expand Down Expand Up @@ -388,6 +387,7 @@ private IWidget createTradeUI(TradeMainPanel rootPanel, PagedWidget.Controller t

builder.emptyLine();
builder.addLine(IKey.str(cur.label).style(IKey.GRAY));
builder.addLine(IKey.str(Translator.translate("vendingmachine.gui.trade_hint")).style(IKey.GRAY));
}
}
}
Expand Down Expand Up @@ -488,8 +488,8 @@ private IWidget createInventoryRow() {
@Override
protected void registerSyncValues(PanelSyncManager syncManager) {
super.registerSyncValues(syncManager);
syncManager.registerSlotGroup("inputSlotGroup", 6, true);
syncManager.registerSlotGroup("outputSlotGroup", 4, false);
syncManager.registerSlotGroup("inputSlotGroup", 2, true);
syncManager.registerSlotGroup("outputSlotGroup", 2, false);

BooleanSyncValue ejectItemsSyncer = new BooleanSyncValue(() -> this.ejectItems, val -> {
this.ejectItems = val;
Expand Down
3 changes: 3 additions & 0 deletions src/main/resources/assets/vendingmachine/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ item.vendingmachine.placeholder.name=Placeholder Item

tooltip.vendingmachine=Who's even restocking this...

structure.vendingmachine.hint.1=Hint 1 Dot: Tin Item Pipe Casing, ME Vending Uplink Hatch

vendingmachine.gui.requirementHeader=Requirements:
vendingmachine.gui.requirement.unknown=Unknown Requirement
vendingmachine.gui.requirement.betterquesting=Quest
Expand All @@ -14,6 +16,7 @@ vendingmachine.gui.coin_eject=Eject All Coins
vendingmachine.gui.single_coin_type_eject_hint=Shift-Click to Extract
vendingmachine.gui.search=Search
vendingmachine.gui.required_inputs=Requires:
vendingmachine.gui.trade_hint=Shift-Click to Purchase

vendingmachine.gui.cooldown_display.second=s
vendingmachine.gui.cooldown_display.minute=m
Expand Down