Skip to content

Commit

Permalink
Minor adjustment to relay GUI.
Browse files Browse the repository at this point in the history
Signed-off-by: King Lemming <kinglemming@gmail.com>
  • Loading branch information
KingLemming committed Jan 2, 2018
1 parent f2bf107 commit 5ae9f68
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ dependencies {
compile "mezz.jei:jei_${config.jei_mc_version}:${config.jei_version}"
}

version = "${project.config.mod_version}." + (System.getenv("BUILD_NUMBER") ?: "16")
version = "${project.config.mod_version}." + (System.getenv("BUILD_NUMBER") ?: "1")

println config.mc_version + "-" + config.forge_version
// Setup the Forge/Minecraft plugin data. Specify the preferred Forge/Minecraft version here.
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/cofh/thermaldynamics/block/BlockTDBase.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class BlockTDBase extends BlockCoreTile {

protected BlockTDBase(Material material) {

super(material);
super(material, "thermaldynamics");
setSoundType(SoundType.STONE);
setCreativeTab(ThermalDynamics.tabCommon);
}
Expand Down
16 changes: 7 additions & 9 deletions src/main/java/cofh/thermaldynamics/gui/client/GuiRelay.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,13 @@ private void update() {

buttonInvert.setToolTip("info.thermaldynamics.relay.invert." + relay.invert);

int colorX = relay.color * 20;
if (relay.color > 11) {
colorX -= 100;
}
int colorX = (relay.color % 8) * 20;
int colorY = relay.color < 8 ? 124 : 164;

buttonColor.setSheetX(colorX);
buttonColor.setHoverX(colorX);
buttonColor.setSheetY(relay.color <= 11 ? 164 : 204);
buttonColor.setHoverY(relay.color <= 11 ? 184 : 224);
buttonColor.setSheetY(colorY);
buttonColor.setHoverY(colorY + 20);

buttonColor.setToolTip("info.thermaldynamics.relay.color." + relay.color);

Expand All @@ -116,15 +114,15 @@ public void handleElementButtonClick(String buttonName, int mouseButton) {
if ("ButtonInvert".equals(buttonName)) {
relay.invert = (byte) ((relay.invert + 4 + v) % 4);
relay.sendUpdatePacket();
playClickSound(v == 1 ? 0.5f : 0.8f);
playClickSound(v == 1 ? 0.6f : 0.5f);
} else if ("ButtonType".equals(buttonName)) {
relay.type = (byte) ((relay.type + 3 + v) % 3);
relay.sendUpdatePacket();
playClickSound(v == 1 ? 0.5f : 0.8f);
playClickSound(v == 1 ? 0.6f : 0.5f);
} else if ("ButtonColor".equals(buttonName)) {
relay.color = (byte) ((relay.color + 16 + v) % 16);
relay.sendUpdatePacket();
playClickSound(v == 1 ? 0.5f : 0.8f);
playClickSound(v == 1 ? 0.6f : 0.5f);
}
update();
}
Expand Down
20 changes: 10 additions & 10 deletions src/main/resources/assets/thermaldynamics/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,6 @@ info.thermaldynamics.info.tracker.avg=5 Sec. Avg. Level
info.thermaldynamics.info.tracker.avgInOut=5 Sec. Avg. In/Out
info.thermaldynamics.info.tracker.cur=Current Level

info.thermaldynamics.relay.gridRS=Duct Power
info.thermaldynamics.relay.invert.0=Scaled
info.thermaldynamics.relay.invert.1=Inverted Scaled
info.thermaldynamics.relay.invert.2=Threshold
info.thermaldynamics.relay.invert.3=Inverted Threshold
info.thermaldynamics.relay.relayRS=Relay Power
info.thermaldynamics.relay.threshold=Threshold >=
info.thermaldynamics.relay.type.0=Redstone Input
info.thermaldynamics.relay.type.1=Redstone Output
info.thermaldynamics.relay.type.2=Comparator Input
info.thermaldynamics.relay.color.0=Red
info.thermaldynamics.relay.color.1=Green
info.thermaldynamics.relay.color.2=Brown
Expand All @@ -90,6 +80,16 @@ info.thermaldynamics.relay.color.12=Magenta
info.thermaldynamics.relay.color.13=Orange
info.thermaldynamics.relay.color.14=White
info.thermaldynamics.relay.color.15=Black
info.thermaldynamics.relay.gridRS=Duct Power
info.thermaldynamics.relay.invert.0=Scaled
info.thermaldynamics.relay.invert.1=Inverted Scaled
info.thermaldynamics.relay.invert.2=Threshold
info.thermaldynamics.relay.invert.3=Inverted Threshold
info.thermaldynamics.relay.relayRS=Relay Power
info.thermaldynamics.relay.threshold=Threshold >=
info.thermaldynamics.relay.type.0=Redstone Input
info.thermaldynamics.relay.type.1=Redstone Output
info.thermaldynamics.relay.type.2=Comparator Input

info.thermaldynamics.servo.decStackSize=Dec. Stack Size Extracted
info.thermaldynamics.servo.extractRate=Extraction Rate
Expand Down
Binary file modified src/main/resources/assets/thermaldynamics/textures/gui/relay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5ae9f68

Please sign in to comment.