Skip to content

Commit

Permalink
[Feature] Shift to pause wireless crafting terminal item movement (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeldoylecs authored Jan 29, 2025
1 parent 2f00f8d commit 4c491ba
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
8 changes: 4 additions & 4 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Add your dependencies here

dependencies {
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-464-GTNH:dev")
api("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-532-GTNH:dev")

implementation("com.github.GTNewHorizons:Baubles:1.0.4:dev")
compileOnly("curse.maven:cofh-core-69162:2388751")
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.6.39-GTNH:dev")
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.17-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:EnderIO:2.8.18:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:NotEnoughItems:2.7.27-GTNH:dev")
compileOnly("com.github.GTNewHorizons:MouseTweaks:2.4.20-GTNH:dev") { transitive = false }
compileOnly("com.github.GTNewHorizons:EnderIO:2.9.2:dev") { transitive = false }
}
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.27'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.31'
}


Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import appeng.api.config.TerminalStyle;
import appeng.api.config.YesNo;
import appeng.api.storage.data.IAEItemStack;
import appeng.api.storage.data.IDisplayRepo;
import appeng.api.util.IConfigManager;
import appeng.api.util.IConfigurableObject;
import appeng.client.ActionKey;
Expand Down Expand Up @@ -88,7 +89,7 @@ public class GuiWirelessCraftingTerminal extends AEBaseGui
public static int craftingGridOffsetX = 80;
public static int craftingGridOffsetY;
private static String memoryText = "";
private final ItemRepo repo;
private final IDisplayRepo repo;
private final int offsetX = 8;
private final IConfigManager configSrc;
private GuiTabButton craftingStatusBtn;
Expand Down Expand Up @@ -654,6 +655,18 @@ protected void keyTyped(final char character, final int key) {
}
}

@Override
public void handleKeyboardInput() {
super.handleKeyboardInput();

// Pause the terminal when holding shift
this.repo.setPaused(hasShiftDown());
}

private boolean hasShiftDown() {
return Keyboard.isKeyDown(Keyboard.KEY_LSHIFT) || Keyboard.isKeyDown(Keyboard.KEY_RSHIFT);
}

protected boolean isPowered() {
return this.repo.hasPower();
}
Expand Down

0 comments on commit 4c491ba

Please sign in to comment.