Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The behaviour of needs_select=yes event is rather strange and hard to understand: When a menu items with needs_select=yes it clicked, it first fires the previous select event again but this time in a synced context, so that the select event was fires 2 times total on the playing client and one time at the other clients. It also the breaks the specification in the wiki that select events are not fired in synced contexts. Also it might happen that the unit stands no longer at the position from where it was selected because it has moved causing unexpected behaviour in this case. The new way to let other clients know the currents selected unit is the [sync_variable] tag which was added in 1.13.
- Loading branch information
c0c4bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you need to check it twice? I'd think removing lines 96-98 would still be sufficient as a deprecation message.
c0c4bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just added the message everyhere where 'needs_select' is read, i think that one of the code is run when the new menu item is created and the other one is run when an existent one is modified (e.g when a menu item with that id already existed in [set_menu_item]) but i am not sure.
c0c4bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, but in the second case you are firing a (misleading) deprecation warning even when needs_select=no, so they may search their code and not find it.
c0c4bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it's being fired only if it was specified, I think? Regardless of its value.
c0c4bf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updates errormessage fc40439