diff options
author | YannickMG <yannickmg@gmail.com> | 2022-01-03 14:07:53 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-03 20:07:53 +0100 |
commit | 447e504f2fe57f5974da214b0d2391fb62e61f57 (patch) | |
tree | 0d4aca694eff9c7aa2f3ac8385b391b43ce78bf3 | |
parent | 5cf9aa8a9033d19ea7dd2b8739384c08006f4da2 (diff) | |
download | GT5-Unofficial-447e504f2fe57f5974da214b0d2391fb62e61f57.tar.gz GT5-Unofficial-447e504f2fe57f5974da214b0d2391fb62e61f57.tar.bz2 GT5-Unofficial-447e504f2fe57f5974da214b0d2391fb62e61f57.zip |
Basicmachine gui slots rework (#846)
* Updated build script
Also set developmentEnvironmentUserName = Developer
* Added .vscode to .gitignore
* Properly hide unused slots in basic machines
- Adds methods to GT_Recipe_Map to determine whether it contains fluid inputs or outputs
- Adds methods to GT_Slot_Holo to support turning it "off", which also turns off highlighting it on mouse-over
- Uses those changes in GT_GUIContainer_BasicMachine to "turn off" slots unused by a machine
- Some code clarification/deduplication in GT_GUIContainer_BasicMachine
* Hide unused Replicator fluid output slot
* Disallow filling fluid input tank if unused
-rw-r--r-- | src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java index cb5fa85ffb..8dc8813166 100644 --- a/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java +++ b/src/main/java/gregtech/api/gui/GT_Container_BasicMachine.java @@ -264,7 +264,9 @@ public class GT_Container_BasicMachine extends GT_Container_BasicTank { } GT_MetaTileEntity_BasicTank tTank = (GT_MetaTileEntity_BasicTank) mTileEntity.getMetaTileEntity(); IFluidAccess tFillableAccess = IFluidAccess.from(tTank, true); - ItemStack tToken = handleFluidSlotClick(tFillableAccess, aPlayer, aMouseclick == 0, true, true); + GT_Recipe_Map recipes = machine.getRecipeList(); + //If the machine has recipes but no fluid inputs, disallow filling this slot with fluids. + ItemStack tToken = handleFluidSlotClick(tFillableAccess, aPlayer, aMouseclick == 0, true, (recipes == null || recipes.hasFluidInputs())); if (mTileEntity.isServerSide() && tToken != null) mTileEntity.markInventoryBeenModified(); return tToken; |