Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf committed Jul 21, 2024
1 parent 46ee505 commit 349228e
Show file tree
Hide file tree
Showing 15 changed files with 950 additions and 99 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ catch (Exception ignored) {

// Pulls version first from the VERSION env and then git tag
String identifiedVersion = null
String versionOverride = '0.0.17p9'
String versionOverride = '0.0.17p10'
try {
// Produce a version based on the tag, or for branches something like 0.2.2-configurable-maven-and-extras.38+43090270b6-dirty
if (versionOverride == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,67 +113,7 @@

public class BufferedDualInputHatch extends DualInputHatch implements IRecipeProcessingAwareDualHatch {
public Deque<Long> scheduled=new LinkedList<>();//no randomaccess, LinkedList will work fine
public Widget circuitSlot(IItemHandlerModifiable inventory, int slot) {

List<String> tooltip = Arrays.asList(
EnumChatFormatting.DARK_GRAY + (LangManager.translateToLocal("GT5U.machines.select_circuit.tooltip.1")),

EnumChatFormatting.DARK_GRAY
+ (LangManager.translateToLocal("GT5U.machines.select_circuit.tooltip.3")));

return new SlotWidget(new BaseSlot(inventory, slot, true)) {

@Override
protected void phantomClick(ClickData clickData, ItemStack cursorStack) {
final ItemStack newCircuit;
if (clickData.shift) {
if (clickData.mouseButton == 0) {
// if (NetworkUtils.isClient() && !dialogOpened.get()) {
// openSelectCircuitDialog(getContext(), dialogOpened);
// }
return;
} else {
newCircuit = null;
}
} else {
final List<ItemStack> tCircuits = BufferedDualInputHatch.this.getConfigurationCircuits();
final int index = GT_Utility.findMatchingStackInList(tCircuits, cursorStack);
if (index < 0) {
int curIndex = GT_Utility.findMatchingStackInList(tCircuits, inventory.getStackInSlot(slot))
+ 1;
if (clickData.mouseButton == 0) {
curIndex += 1;
} else {
curIndex -= 1;
}
curIndex = Math.floorMod(curIndex, tCircuits.size() + 1) - 1;
newCircuit = curIndex < 0 ? null : tCircuits.get(curIndex);
} else {
// set to whatever it is
newCircuit = tCircuits.get(index);
}
}
inventory.setStackInSlot(slot, GT_Utility.copyAmount(0, newCircuit));

}

@Override
protected void phantomScroll(int direction) {
phantomClick(new ClickData(direction > 0 ? 1 : 0, false, false, false));
}

@Override
public List<String> getExtraTooltip() {
return tooltip;
}

}.setOverwriteItemStackTooltip(list -> {
list.removeIf(line -> line.contains(LangManager.translateToLocal("gt.integrated_circuit.tooltip.0"))
|| line.contains(LangManager.translateToLocal("gt.integrated_circuit.tooltip.1")));
return list;
}).disableShiftInsert().setHandlePhantomActionClient(true).setGTTooltip(() -> new TooltipData(tooltip, tooltip))
.setBackground(getGUITextureSet().getItemSlot(), GT_UITextures.OVERLAY_SLOT_INT_CIRCUIT);
}




Expand Down Expand Up @@ -621,6 +561,7 @@ public boolean recordRecipeOrClassify(ListeningFluidTank[] fin, ItemStack[] iin)
@Override
public ItemStack[] getItemInputs() {
ItemStack[] condensed = filterStack.apply(mStoredItemInternal);
//System.out.print(Arrays.toString(condensed));
ItemStack additional = getStackInSlot(getCircuitSlot());
if (additional == null)
return condensed;
Expand Down Expand Up @@ -967,7 +908,10 @@ public List<String> getExtraTooltip() {
LangManager.translateToLocal("programmable_hatches.gt.marking.slot.1")),
Arrays.asList(LangManager.translateToLocal("programmable_hatches.gt.marking.slot.0"),
LangManager.translateToLocal("programmable_hatches.gt.marking.slot.1"))))).setPos(0,
18 * i));
18 * i)


);

builder.widget(sc.setSize(18, 18 * 2).setPos(3 + 18 * 5, 3));

Expand Down Expand Up @@ -1634,5 +1578,10 @@ public boolean isInputEmpty() {
}
return true;
}
@Override
public boolean onRightclick(IGregTechTileEntity aBaseMetaTileEntity, EntityPlayer aPlayer, ForgeDirection side,
float aX, float aY, float aZ) {

return super.onRightclick(aBaseMetaTileEntity, aPlayer, side, aX, aY, aZ);
}
}
Loading

0 comments on commit 349228e

Please sign in to comment.