Overhauled the event system used to add code to each gesture.
New gesture event system:
- Previously, each time a gesture was registered/removed, a file was created/deleted which allowed for a custom event corresponding to said gesture to be used.
- Now, there is just one custom event created, which can accept any gesture sequence. It is called using the syntax gesture [[of] %gesture sequence%]. For example, the event would accept any of the following as valid syntaxes for the gesture sequence of up down.
- on gesture of up down
- on gesture up down
- on gesture:
- if event-gesture is "up down":
- As seen in the last example above, the event values for this new event are player and gesture. This means you can refer to the player who performed the gesture (e.g. for sending messages, etc.) as well as the gesture. The following line is an example of how these could both be used:
- set {gesture::%player%::lastUsed} to event-gesture
- The new event-gesture expression returns a string and follows the syntax [event[-| ]]gesture, so all of the following usages would be valid:
- if gesture is "up down":
- if event gesture is "up down":
- if event-gesture is "up down":
That should be everything that has changed. Apologies for the breaking changes, but this update should be more efficienct, and they shouldn't be hard to fix.