Is there a way that I could make a list instead of adding || operator for every new case?
iconSpriteHasColorOfRat entry &&
(entry.textsLeftToRight |> List.any (String.toLower >> String.contains "traitor"))
|| (entry.textsLeftToRight |> List.any (String.toLower >> String.contains "hastatus"))
|| (entry.textsLeftToRight |> List.any (String.toLower >> String.contains "misthios"))
|| (entry.textsLeftToRight |> List.any (String.toLower >> String.contains "nauclarius"))
|| (entry.textsLeftToRight |> List.any (String.toLower >> String.contains "transport"))
|| (entry.textsLeftToRight |> List.any (String.toLower >> String.contains "silencer"))
Using (List.any string.contain) on entry.textLeftToRight with strings of triggerList and see if there is a match?
triggerList : List String
triggerList =
[ "hastatus"
, "misthios"
, "nauclarius"
, "transport"
, "silencer"
, "ascriber"
, "eraser"
, "abolisher"
]
I’m not sure I’m being clear but if I come up with a different explanation I will edit.