Commit Graph

26 Commits

Author SHA1 Message Date
1f95899781 Make Trigger responsible for default data
Trigger now has a new method Trigger:SetData and two new fields
Trigger.defaultData and Trigger.data

Whenever SetData is used it ensures that all the keys and values from
defaultData are present in the new data.

The data argument from Trigger:SetState has been removed and it will now
always use the Trigger.Data field for notifying indicators
2023-04-14 15:37:57 +02:00
3a1cc35a1e Add Trigger.CreateFromConfig function to help initialize new triggers 2023-04-10 15:51:20 +02:00
0436f8a0e0 Add MultiTrigger to combine multiple triggers into one
MultiTrigger will pass on the data from the highest priority child
trigger.

Fix MultiTrigger

MultiTrigger didn't properly inherit from Trigger and reimplemented some
methods. This happened because it started out as a copy of Trigger
2023-04-10 15:51:20 +02:00
22dee8b536 Trigger:SetState now also takes doUpdate boolean
If the state the state does change and the trigger is active and
doUpdate is true, then the indicator is updated with the given data.
2023-04-10 15:51:20 +02:00
275f0c4b23 Add BorderIndicator 2023-04-10 15:51:20 +02:00
75d036d291 Rework square indicators
- The indicator will grab a frame from a pool
 - Having a frame, it now uses a real border/edge
 - There is a stacks number that can optionally be enabled
2023-04-10 15:51:11 +02:00
21a651b25c Make AuraTrigger supply stack information to the indicators 2023-04-07 10:15:51 +02:00
d66989297c Add a new trigger type statustrigger
StatusTrigger will trigger if a status activates (or reaches a certain
activation # of auras). This is an abstraction provided by AuraList
which keeps track of which auras belong to which statuses.

Added type annotations to all touched files
2023-04-07 10:15:51 +02:00
e55f139fca Activate indicators when they are set while the trigger is active
This fixes an issue where inverted triggers would not immediately activate the
indicator when they are created
2023-04-07 10:15:51 +02:00
8d2f3cef7f Minor annotation on the Object class 2023-04-07 10:15:51 +02:00
26c7ce091e Split Indicator and SquareIndicator into their own files, add annotations 2023-04-07 10:15:30 +02:00
8c4cc405aa Move ivert logic and trigger logic into Trigger
The base Trigger class is now responsible for inverting the trigger
state and also for signaling trigger activation to the target/indicator.

In addition the following non-function changes also occured:
 - The triggers moved into their own directory
 - The trigger code has been annotated to help lua-language-server
   deduce type information
 - AuraTrigger was moved into its own file

All these changes should make future development of other triggers easier
2023-04-04 06:40:29 +02:00
d85a1c3579 Allow triggers/indicators to be configured.
Also adds priest test config and expands shaman test config.
2023-04-03 08:45:39 +02:00
464fcbb1df Allow mouse keybinds to be configured 2023-04-01 05:19:03 +02:00
e72c4b3e3f Allow size and range check features to be configured.
This also improves the range check to fall back to UnitInRange if no
friendly spell is available
2023-04-01 01:20:39 +02:00
825738a040 Rework the way triggers and indicators work
Triggers are now a link between link between a datasource (for now only
AuraList) and an indicator (for now only SquareIndicator).
2023-03-19 06:54:02 +01:00
9c796159b3 Add UnitGroup class to put frames in a grid layout with sorting 2023-03-18 20:35:41 +01:00
f14ffbe0bd Handle characters that aren't fully loaded yet in UpdateName 2023-03-18 16:36:09 +01:00
7d1e3b933d Fix incorect Runic Power enum 2023-03-18 16:34:16 +01:00
16da36d353 Add power bars for healers and blood deathknights 2023-03-18 06:25:25 +01:00
5b18d2a39a Add level and top arguments to StatusBar constructor 2023-03-18 05:57:43 +01:00
d6e3a968c1 Add class colored names to the unit frames 2023-03-18 05:57:43 +01:00
b87aea2f9e Change UpdateRange to always show dead units as opaque 2023-03-18 05:57:43 +01:00
8271092d42 Fix the menu action on non-player frames 2023-03-16 05:18:30 +01:00
c0446ad8be Add support for hiding unit frames in raid groups 2023-03-16 04:54:34 +01:00
86825dd6e5 Initial commit 2023-03-15 17:13:01 +01:00