Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix templates for all regionTypes #661

Merged
merged 4 commits into from
Aug 21, 2018
Merged

Conversation

mrbuds
Copy link
Contributor

@mrbuds mrbuds commented Aug 20, 2018

=> use correct field for color
=> for aura and totem, use yellow color instead of glow for all regionTypes except "icon"
=> model : no conditions
Rename isUsableBlue => isNotUsableBlue

#660

mrbuds added 2 commits August 21, 2018 01:00
 => use correct field for color
 => for aura and totem, use yellow color instead of glow for all regionTypes except "icon"
 => model : no conditions
Rename isUsableBlue => isNotUsableBlue
@Stanzilla
Copy link
Contributor

So we have

onCdCheckGrey (isOnCdGrey better?)
spellInRangeRed (isSpellNotInRangeRed better?)
isBuffedGlow 
insufficientResourcesBlue
totemActiveGlow
isNotUsableBlue
buffGreyed (missingBuffGreyed better? or is it "hasbuff"?)

@Stanzilla Stanzilla merged commit 2fe7d06 into WeakAuras:master Aug 21, 2018
@mrbuds mrbuds deleted the smallfix branch August 22, 2018 01:46
@@ -255,7 +402,7 @@ local function createAbilityAndDebuffTrigger(triggers, item)
createAbilityTrigger(triggers, 1, item, "showAlways");
end

local function subTypesFor(item)
local function subTypesFor(item, regionType)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This function should filter which options are available, so that for models only basic ones are offered. Offering some choices which don't actually work is not great.

local function buffGreyed(conditions, trigger)
tinsert(conditions, buildCondition(trigger, checks.buffedFalse, {changes.grey}));
local function missingBuffGreyed(conditions, trigger, regionType)
if regionType ~= "model" then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is the possibility of adding region types via plugins, and in fact there's a plugin: StopMotion

So any check for regionTypes needs to test the supported ones. Testing for not model does not work.

See the later comment on where to move the check though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done in #664

To check if the property exists for the regionType i did this:
WeakAuras.regionTypes[regionType].default[property]

I'm not 100% sure this is the right way to test it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants