add forgehax option to active modules

This commit is contained in:
Bella 2020-03-24 14:51:35 -04:00
parent 251a58b1e0
commit 8e192ba414
No known key found for this signature in database
GPG Key ID: 815562EA23BFE344
2 changed files with 8 additions and 2 deletions

View File

@ -75,8 +75,8 @@ public class KamiActiveModulesUI extends AbstractComponentUI<me.zeroeightsix.kam
rgb = activeMods.getInfoColour(i);
}
String s = module.getHudInfo();
String text = module.getName() + (s == null ? "" : " " + KamiMod.colour + "7" + s);
String hudInfo = module.getHudInfo();
String text = activeMods.fHax() + module.getName() + (hudInfo == null ? "" : " " + KamiMod.colour + "7" + hudInfo);
int textWidth = renderer.getStringWidth(text);
int textHeight = renderer.getFontHeight() + 1;
int red = (rgb >> 16) & 0xFF;

View File

@ -21,6 +21,7 @@ import static me.zeroeightsix.kami.util.InfoCalculator.reverseNumber;
*/
@Module.Info(name = "ActiveModules", category = Module.Category.GUI, description = "Configures ActiveModules Colour", showOnArray = Module.ShowOnArray.OFF)
public class ActiveModules extends Module {
private Setting<Boolean> forgeHax = register(Settings.b("ForgeHax", false));
public Setting<Mode> mode = register(Settings.e("Mode", Mode.RAINBOW));
private Setting<Integer> rainbowSpeed = register(Settings.integerBuilder().withName("Speed R").withValue(30).withMinimum(0).withMaximum(100).withVisibility(v -> mode.getValue().equals(Mode.RAINBOW)).build());
public Setting<Integer> saturationR = register(Settings.integerBuilder().withName("Saturation R").withValue(117).withMinimum(0).withMaximum(255).withVisibility(v -> mode.getValue().equals(Mode.RAINBOW)).build());
@ -85,6 +86,11 @@ public class ActiveModules extends Module {
else return rSpeed;
}
public String fHax() {
if (forgeHax.getValue()) return ">";
else return "";
}
public enum Mode { RAINBOW, CUSTOM, CATEGORY, INFO_OVERLAY }
public void onDisable() { sendDisableMessage(getName()); }
}