Skip to content
This repository has been archived by the owner on Jan 3, 2023. It is now read-only.

Incomplete display of multiple Rarity tokens #1

Open
SayyadinaAtreides opened this issue Jun 16, 2015 · 4 comments
Open

Incomplete display of multiple Rarity tokens #1

SayyadinaAtreides opened this issue Jun 16, 2015 · 4 comments

Comments

@SayyadinaAtreides
Copy link

Various Hide blocks (have not tested Show) that include lines such as "Rarity Normal Magic" (which functions in-game to address both normal and magic items) are displaying in Filtration as applying only to Normal items. Switching the script text to "Rarity Magic Normal" continues to display in Filtration as applying only to Normal items.

Will provide screenshots if needed.

@ben-wallis
Copy link
Owner

I wasn't aware that the Rarity BlockItem supported that syntax - I haven't seen it used in any scripts. It's semantically the same as Rarity <= Magic - and I can't think of any scenario where you'd want "Rarity Normal Unique" for example. I'll leave this open as if the game supports it then Filtration should too, but I've got a fair number of higher priority issues currently.

@ben-wallis ben-wallis self-assigned this Jun 16, 2015
@SayyadinaAtreides
Copy link
Author

Makes sense. :) If I were writing a script in Filtration for the first time, I'd have just gone with <=; I assumed at first it was some sort of "oh hey I found a valid token, let's ignore the rest of the line" bug, but the fact that it parsed "Rarity Magic Normal" as "Rarity = Normal" as well is what intrigued me.

@ben-wallis
Copy link
Owner

The reason it parses "Rarity Magic Normal" as Rarity = Normal is because Normal is the first entry in the ItemRarity enum class, and "Rarity Magic Normal" doesn't match for the regex I use for Rarity rows - ^\w+\s+([><!=]{0,2})\s*(\w+)$. It also uses equals because Equal is the first entry in the FilterPredicateOperator enum class. So the bottom line is what you're seeing is the result of luck rather than anything intelligent happening.

You'll find that "Rarity Unique Rare", or "Rarity ermagerdthismakesnosense !1111" also parses as Rarity = Normal, lol.

@ben-wallis
Copy link
Owner

This is related to #17 and should be fixed in the next release.

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

No branches or pull requests

2 participants