Skip to content

Commit

Permalink
Fix anchors not able to be turned off in config (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyfts authored Jul 1, 2024
1 parent 7f4359b commit 3c2c492
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/leobeliik/extremesoundmuffler/Config.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ private static void buildConfig() {
75,
Integer.MIN_VALUE,
Integer.MAX_VALUE,
"Coordinates for the Muffler button in the player inventory. You can change this in game by holding the RMB over the button and draging it around");
"Coordinates of the Muffler button in the player inventory. You can change this in game by holding CTRL and LMB over the button and dragging it around");
invButtonVertical = config.getInt(
"invButtonY",
CATEGORY_INVENTORY_BUTTON,
7,
Integer.MIN_VALUE,
Integer.MAX_VALUE,
"Coordinates for the Muffler button in the player inventory. You can change this in game by holding the RMB over the button and draging it around");
"Coordinates of the Muffler button in the player inventory. You can change this in game by holding CTRL and LMB over the button and dragging it around");
disableAnchors = config.getBoolean("disableAnchors", CATEGORY_ANCHORS, false, "Disable the Anchors?");
config.save();
}
Expand All @@ -94,8 +94,8 @@ public static boolean getLawfulAllList() {
return lawfulAllList;
}

public static boolean getDisableAchors() {
return false;
public static boolean getDisableAnchors() {
return disableAnchors;
}

public static float getDefaultMuteVolume() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class MainScreen extends GuiScreen implements ISoundLists, IColorsGui {
private static String screenTitle = "";
private final int xSize = 256;
private final int ySize = 202;
private final boolean isAnchorsDisabled = Config.getDisableAchors();
private final boolean isAnchorsDisabled = Config.getDisableAnchors();
private final String tip = Tips.randomTip();
private int minYButton, maxYButton, index;
private ESMButton btnToggleMuffled;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ private float checkSound(float original, @Local(ordinal = 0, argsOnly = true) IS
return original * muffledSounds.get(soundLocation);
}

if (Config.getDisableAchors()) {
if (Config.getDisableAnchors()) {
return original;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class DataManager implements ISoundLists {
public static void loadData(String address) {
identifier = getIdentifier(address);
loadMuffledMap().forEach((R, F) -> muffledSounds.put(new ComparableResource(R), F));
if (!Config.getDisableAchors()) {
if (!Config.getDisableAnchors()) {
anchorList.clear();
anchorList.addAll(loadAnchors());
}
Expand All @@ -59,7 +59,7 @@ public static void loadData(String address) {
public static void saveData() {
saveMuffledMap();

if (!Config.getDisableAchors()) {
if (!Config.getDisableAnchors()) {
saveAnchors();
}
}
Expand Down

0 comments on commit 3c2c492

Please sign in to comment.