PGM
PGM copied to clipboard
Add score changes on dynamic filters
This allows changing scores based on dynamic filters for teams like so:
<score>
<on team="some-team-filter" score="2"/>
</score>
and for the team a player belongs to like so:
<score>
<on player="some-player-filter" score="5"/>
</score>
I'm not too familiar with the naming conventions so I imagine my choices will not be the best. Let me know if they should be renamed.
Also, I did this rather on a whim, so I didn't realize it might make more sense as part of #1016. I thought I'd submit this just in case we want it in the score module too.
I believe this one should be part of action/triggers, should be an action that can run in the context of either a player or a team. You can use q scope optional arg or derive it from context, similar in concept to how scope-switch gets its outer
I agree with Pablo here — I'm not sure if I'm supposed to close this myself or wait for someone else to look at it.
@OhPointFive Actions and triggers have been merged, so you can rebase this branch and change it to use it.
On-top of actions and triggers, variables were also merged.
See my comment on #1047 about how i think this could be implemented in a more flexible way that allows arbitrary score calculations. I'm going to close this as it's been stale for a couple months, feel free to open a new PR using actions & variables, or ask how to go about it if you want to take on it yourself.