From f665ad0df5235625de9aee87d6b9fc693c5e7ce9 Mon Sep 17 00:00:00 2001 From: morgantic <126607370+morgantic@users.noreply.github.com> Date: Sun, 21 Jul 2024 00:06:43 +0200 Subject: [PATCH 1/4] Update InputHandler.java Added function to adjust TWEAK_PERIODIC_ATTACK_INTERVAL by scrolling while holding the TWEAK_PERIODIC_ATTACK keybind --- .../java/fi/dy/masa/tweakeroo/event/InputHandler.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java b/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java index 8982981c8..57454c44e 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java +++ b/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java @@ -250,6 +250,17 @@ else if (FeatureToggle.TWEAK_ZOOM.getKeybind().isKeybindHeld() || String strValue = String.format("%s%.1f%s", preGreen, Configs.Generic.ZOOM_FOV.getDoubleValue(), rst); InfoUtils.printActionbarMessage("tweakeroo.message.set_zoom_fov_to", strValue); + return true; + } + else if (FeatureToggle.TWEAK_PERIODIC_ATTACK.getKeybind().isKeybindHeld()) + { + int newValue = Configs.Generic.PERIODIC_ATTACK_INTERVAL.getIntegerValue() + (dWheel > 0 ? 1 : -1); + Configs.Generic.PERIODIC_ATTACK_INTERVAL.setIntegerValue(newValue); + KeyCallbackAdjustable.setValueChanged(); + + String strValue = preGreen + Configs.Generic.PERIODIC_ATTACK_INTERVAL.getIntegerValue() + rst; + InfoUtils.printActionbarMessage("tweakeroo.message.set_periodic_attack_interval_to", strValue); + return true; } } From 89f78a37fdc7791f61445ad5d5a4a7da2d295e4a Mon Sep 17 00:00:00 2001 From: morgantic <126607370+morgantic@users.noreply.github.com> Date: Sun, 21 Jul 2024 00:07:38 +0200 Subject: [PATCH 2/4] Update en_us.json Added "tweakeroo.message.set_periodic_attack_interval_to" String --- src/main/resources/assets/tweakeroo/lang/en_us.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/resources/assets/tweakeroo/lang/en_us.json b/src/main/resources/assets/tweakeroo/lang/en_us.json index c3fb003ec..a66eb280c 100644 --- a/src/main/resources/assets/tweakeroo/lang/en_us.json +++ b/src/main/resources/assets/tweakeroo/lang/en_us.json @@ -637,6 +637,7 @@ "tweakeroo.message.set_placement_grid_size_to": "Set Placement Grid size to %s", "tweakeroo.message.set_placement_limit_to": "Set Placement Limit to %s", "tweakeroo.message.set_placement_restriction_mode_to": "Set Placement Restriction mode to %s", + "tweakeroo.message.set_periodic_attack_interval_to": "Set Periodic Attack Interval to %s", "tweakeroo.message.set_snap_aim_pitch_step_to": "Set Snap Aim pitch step to %s", "tweakeroo.message.set_snap_aim_yaw_step_to": "Set Snap Aim yaw step to %s", "tweakeroo.message.set_zoom_fov_to": "Set zoom FOV to %s", From d4248fc82598e4642ae17ae81df8f73041607497 Mon Sep 17 00:00:00 2001 From: morgantic <126607370+morgantic@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:17:43 +0200 Subject: [PATCH 3/4] Update InputHandler.java Added scroll handler for PERIODIC_USE_INTERVAL, PERIODIC_HOLD_ATTACK_INTERVAL and PERIODIC_HOLD_USE_INTERVAL --- .../dy/masa/tweakeroo/event/InputHandler.java | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java b/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java index 57454c44e..5df600e94 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java +++ b/src/main/java/fi/dy/masa/tweakeroo/event/InputHandler.java @@ -252,7 +252,7 @@ else if (FeatureToggle.TWEAK_ZOOM.getKeybind().isKeybindHeld() || return true; } - else if (FeatureToggle.TWEAK_PERIODIC_ATTACK.getKeybind().isKeybindHeld()) + else if (FeatureToggle.TWEAK_PERIODIC_ATTACK.getKeybind().isKeybindHeld()) { int newValue = Configs.Generic.PERIODIC_ATTACK_INTERVAL.getIntegerValue() + (dWheel > 0 ? 1 : -1); Configs.Generic.PERIODIC_ATTACK_INTERVAL.setIntegerValue(newValue); @@ -261,6 +261,39 @@ else if (FeatureToggle.TWEAK_PERIODIC_ATTACK.getKeybind().isKeybindHeld()) String strValue = preGreen + Configs.Generic.PERIODIC_ATTACK_INTERVAL.getIntegerValue() + rst; InfoUtils.printActionbarMessage("tweakeroo.message.set_periodic_attack_interval_to", strValue); + return true; + } + else if (FeatureToggle.TWEAK_PERIODIC_USE.getKeybind().isKeybindHeld()) + { + int newValue = Configs.Generic.PERIODIC_USE_INTERVAL.getIntegerValue() + (dWheel > 0 ? 1 : -1); + Configs.Generic.PERIODIC_USE_INTERVAL.setIntegerValue(newValue); + KeyCallbackAdjustable.setValueChanged(); + + String strValue = preGreen + Configs.Generic.PERIODIC_USE_INTERVAL.getIntegerValue() + rst; + InfoUtils.printActionbarMessage("tweakeroo.message.set_periodic_use_interval_to", strValue); + + return true; + } + else if (FeatureToggle.TWEAK_PERIODIC_HOLD_ATTACK.getKeybind().isKeybindHeld()) + { + int newValue = Configs.Generic.PERIODIC_HOLD_ATTACK_INTERVAL.getIntegerValue() + (dWheel > 0 ? 1 : -1); + Configs.Generic.PERIODIC_HOLD_ATTACK_INTERVAL.setIntegerValue(newValue); + KeyCallbackAdjustable.setValueChanged(); + + String strValue = preGreen + Configs.Generic.PERIODIC_HOLD_ATTACK_INTERVAL.getIntegerValue() + rst; + InfoUtils.printActionbarMessage("tweakeroo.message.set_periodic_hold_attack_interval_to", strValue); + + return true; + } + else if (FeatureToggle.TWEAK_PERIODIC_HOLD_USE.getKeybind().isKeybindHeld()) + { + int newValue = Configs.Generic.PERIODIC_HOLD_USE_INTERVAL.getIntegerValue() + (dWheel > 0 ? 1 : -1); + Configs.Generic.PERIODIC_HOLD_USE_INTERVAL.setIntegerValue(newValue); + KeyCallbackAdjustable.setValueChanged(); + + String strValue = preGreen + Configs.Generic.PERIODIC_HOLD_USE_INTERVAL.getIntegerValue() + rst; + InfoUtils.printActionbarMessage("tweakeroo.message.set_periodic_hold_use_interval_to", strValue); + return true; } } From f47d7965b039f83ea8b2ddaf8b2945184ff39bbd Mon Sep 17 00:00:00 2001 From: morgantic <126607370+morgantic@users.noreply.github.com> Date: Mon, 22 Jul 2024 11:18:38 +0200 Subject: [PATCH 4/4] Update en_us.json Added strings "tweakeroo.message.set_periodic_use_interval_to", "tweakeroo.message.set_periodic_hold_attack_interval_to" and "tweakeroo.message.set_periodic_hold_use_interval_to" --- src/main/resources/assets/tweakeroo/lang/en_us.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/resources/assets/tweakeroo/lang/en_us.json b/src/main/resources/assets/tweakeroo/lang/en_us.json index a66eb280c..b03587f97 100644 --- a/src/main/resources/assets/tweakeroo/lang/en_us.json +++ b/src/main/resources/assets/tweakeroo/lang/en_us.json @@ -638,6 +638,9 @@ "tweakeroo.message.set_placement_limit_to": "Set Placement Limit to %s", "tweakeroo.message.set_placement_restriction_mode_to": "Set Placement Restriction mode to %s", "tweakeroo.message.set_periodic_attack_interval_to": "Set Periodic Attack Interval to %s", + "tweakeroo.message.set_periodic_use_interval_to": "Set Periodic Use Interval to %s", + "tweakeroo.message.set_periodic_hold_attack_interval_to": "Set Periodic Hold Attack Interval to %s", + "tweakeroo.message.set_periodic_hold_use_interval_to": "Set Periodic Hold Use Interval to %s", "tweakeroo.message.set_snap_aim_pitch_step_to": "Set Snap Aim pitch step to %s", "tweakeroo.message.set_snap_aim_yaw_step_to": "Set Snap Aim yaw step to %s", "tweakeroo.message.set_zoom_fov_to": "Set zoom FOV to %s",