Fetchr

Fetchr

556 Downloads

Trigger bingo.card_pos not reset on game start

UnlucksMcGee opened this issue ยท 3 comments

commented

After joining a game, the trigger bingo.card_pos does not get reset, and therefore shows up in the tab list when typing /trigger
image
Is there a particular reason why you commented out the line in this commit?
In my opinion, I think the user should only have access to that trigger in the lobby.

commented

The reason it is commented is bad implementation, basically.

The trigger is not only used to trigger it but it actually also stores the selected value. So resetting it would mean currently that the user's value is set to something that is undefined. That means it would always be in the default position, even disregarding offhand items.
The easy solution here would be to use the bingo.pref trigger in the menu and use card_pos as the storage.

I kind of want to look into incorporating the card into the hud components system as well though, which then would make the card_pos objective completely unnecessary.

The next release should have one of these fixes employed though, as triggering it by accident can have (and actually will have in most cases) bad side effects, most notably completely hiding the card. I just noticed this too late to solve it for the beta2 release, and it's an issue that was present in all previous versions.

commented

One workaround is to execute as @a run trigger bingo.card_pos add 0 which will effectively disable the trigger but it keeps its current score.

commented

Ohh, that's a clever way to disable a trigger!