feat: Per-combo reset options and preserve-position toggle
- Per-combo reset when: Game timer (default), Never, On target change, After X seconds. Never = cycle sequence without time/target reset. After seconds uses configurable 0.5–300s window. - Per-combo 'Preserve position when using other actions' (default on): when on, using another combo or any ability never resets this combo's step; it only resets per its own 'Reset when' setting. When off (original), using an action not in this combo resets it to step 1. - Optional ITargetManager via constructor for On target change; plugin loads if service unavailable (On target change no-op when null). Made-with: Cursor
This commit is contained in:
@@ -4,6 +4,23 @@ using Newtonsoft.Json;
|
||||
|
||||
namespace ConfigurableCombo;
|
||||
|
||||
/// <summary>When to reset the combo sequence back to step 1.</summary>
|
||||
[Serializable]
|
||||
public enum ComboResetMode
|
||||
{
|
||||
/// <summary>Reset when the game combo timer expires (default, ~15s).</summary>
|
||||
GameTimer = 0,
|
||||
|
||||
/// <summary>Never reset from time; always advance through the sequence (cycle after last step).</summary>
|
||||
Never = 1,
|
||||
|
||||
/// <summary>Reset when the current target changes.</summary>
|
||||
OnTargetChange = 2,
|
||||
|
||||
/// <summary>Reset after the configured number of seconds of inactivity.</summary>
|
||||
AfterSeconds = 3,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A single user-defined combo: put the first action on your hotbar; pressing it advances through the sequence.
|
||||
/// </summary>
|
||||
@@ -40,4 +57,21 @@ public class UserComboDefinition
|
||||
/// The action ID that is "on the bar" — i.e. the trigger. This is ActionIds[0] when the list is non-empty.
|
||||
/// </summary>
|
||||
public uint TriggerActionId => ActionIds.Count > 0 ? ActionIds[0] : 0;
|
||||
|
||||
/// <summary>
|
||||
/// When to reset this combo to step 1. Per-combo; e.g. one combo can use "Never" while another uses "After seconds".
|
||||
/// </summary>
|
||||
public ComboResetMode ResetMode { get; set; } = ComboResetMode.GameTimer;
|
||||
|
||||
/// <summary>
|
||||
/// Seconds after which the combo resets when <see cref="ResetMode"/> is <see cref="ComboResetMode.AfterSeconds"/>.
|
||||
/// Ignored for other modes.
|
||||
/// </summary>
|
||||
public float ResetAfterSeconds { get; set; } = 15f;
|
||||
|
||||
/// <summary>
|
||||
/// When true (default): using another combo or any action never clears this combo's position; it only resets per its own "Reset when" setting.
|
||||
/// When false (original): using an action that is not part of this combo clears this combo's state back to step 1.
|
||||
/// </summary>
|
||||
public bool PreservePositionWhenUsingOtherActions { get; set; } = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user