Join GitHub today
WML: Support [filter_side] in [item]. #3533
the current 'per team' implementation is also somwhzow bas in particular it doesnt play well with the current teams alliances syntax: the follwing example:
side1 is in team team1
with the current syntax it is afaik not possibel to create a label that is visible for 'team1' that is side1 and side3 but not for side2, this is because the check in display used substring, so visibility to team1,team2 imples visibility to team1 while actually the opposite way would make more sense. Of yourse this can be fixed, but maybe it makes more sense to change it to just sote the sides instead.
Another implementation woudl be to, instead of storeing sides ot team in the the overlay object to store the compltete filter in the overlay object and evaluate it when the item is drawn, this way the items visiblitity would (actuall this might not be true, it very much depnds on how exactly the drawing code works) automaticially be updated when the properties of the side change.
I'd say that's a separate situation to this @gfgtdf; but assuming we stick to specifying team rather than side, the correct way to determine if a label is visible to a side would be to split the label's team name and the side's team name and perform a set intersection. If it's empty, the label is not visible.